Summary: | True dynamic linking of AlphaBlend | ||
---|---|---|---|
Product: | cairo | Reporter: | Hans Breuer <hans> |
Component: | win32 backend | Assignee: | Owen Taylor <otaylor> |
Status: | RESOLVED FIXED | QA Contact: | cairo-bugs mailing list <cairo-bugs> |
Severity: | normal | ||
Priority: | high | CC: | cbiesinger, jwatt, tor |
Version: | 0.9.3 | ||
Hardware: | x86 (IA32) | ||
OS: | Windows (All) | ||
Whiteboard: | |||
i915 platform: | i915 features: | ||
Attachments: |
mozilla patch
My version (derived from the Mozilla patch) |
Description
Hans Breuer
2005-07-31 05:31:16 UTC
The other half of the patch - getting rid of WINVER define diff --exclude-from=c:\util\tool\diff.ign -u --recursive from-cvs/cairo/cairo/src/cairo-win32-private.h my-gtk/cairo/cairo/src/cairo-win32-private.h --- from-cvs/cairo/cairo/src/cairo-win32-private.h Thu Feb 24 23:45:19 2005 +++ my-gtk/cairo/cairo/src/cairo-win32-private.h Tue Apr 12 23:51:47 2005 @@ -36,13 +36,15 @@ #ifndef CAIRO_WIN32_PRIVATE_H #define CAIRO_WIN32_PRIVATE_H -/* We depend on various features introduced with Win2k and Win98, - * like AlphaBlend. If it turns out to be a problem, we could - * use GetProcAddress() to look them up. +#include <cairo-win32.h> +/* The only feature needed from WINVER 0x0500 but not available + * with standard msvc headers is this constant. Just defineing it + * is much better than forcing WINVER */ -#define WINVER 0x0500 +#ifndef AC_SRC_ALPHA +#define AC_SRC_ALPHA 0x01 +#endif -#include <cairo-win32.h> #include <cairoint.h> typedef struct _cairo_win32_surface { Created attachment 3279 [details] [review] Merge fixed point arithmetic support this would be the patch used in mozilla for this purpose; it's a bit different... if my reading of cairo-surface.c is right, then the mozilla patch has the advantage that it makes cairo-surface fallback to some other way of compositing and thus it works even on win9x. Created attachment 2920 [details] [review] mozilla patch reattaching the mozilla patch, looks like it disappeared Move bugs against "cvs" version to "0.9.3" so we can remove the "cvs" version. Created attachment 3006 [details] [review] My version (derived from the Mozilla patch) I took the mozilla patch and fixed it up a lot stylistically. The result looks OK to me and tests to work. Remaining questions are: - Where is this "mozilla code" from? Who wrote it? Is it is in fact MPL/LGPL licensed (I assume so, since it's from the Mozilla tree, but worth checking) - Is the VC5 stuff really necessary? Are we even close to being able to compile Cairo on VC5? it's from https://bugzilla.mozilla.org/show_bug.cgi?id=291818 which seems to have copied the code that was checked in as part of https://bugzilla.mozilla.org/show_bug.cgi?id=36694, written by VYV03354@nifty.ne.jp being mozilla code, it is mpl/gpl/lgpl tri-licensed. as for the vc5 question, no idea... Hi Owen, one thing which appears to be missing in your patch seems to be 'the other half' - i.e. we should get rid of the #define WINVER 0x0500 2005-08-23 Owen Taylor <otaylor@redhat.com> * src/cairo-win32-font.c (_cairo_win32_scaled_font_show_glyphs): Check for AlphaBlend() with GetProcAddress() to support older compilation environments like MSVC 6. (Also fixes this portion of the code to run on Win98 and Win95, but much of the rest of cairo-win32-* won't work in that environment) (#3926, Hans Breuer, Christian Biesinger, based on code originally from Mozilla) * src/cairo-win32-private.h: Remove WINVER define, since it was (hopefully) there only for AlphaBlend(). I'm trusting you that we don't need the WINVER define for anything else, Hans :-) |
Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.