diff options
author | Matt A. Tobin <email@mattatobin.com> | 2019-11-10 15:43:51 -0500 |
---|---|---|
committer | Matt A. Tobin <email@mattatobin.com> | 2019-11-10 15:43:51 -0500 |
commit | b0e23e79e72b7892b826fabea4f9e02c421d2861 (patch) | |
tree | 26f20aea660514c213a3ae942eab222e5ccebde3 /gfx/cairo/win32-transparent-surface.patch | |
parent | 03590a6711d601ef3ddb48787e9f3f556705b5db (diff) | |
parent | b00601953bade944cd6df9cde6fcdd1f10d76feb (diff) | |
download | UXP-b0e23e79e72b7892b826fabea4f9e02c421d2861.tar UXP-b0e23e79e72b7892b826fabea4f9e02c421d2861.tar.gz UXP-b0e23e79e72b7892b826fabea4f9e02c421d2861.tar.lz UXP-b0e23e79e72b7892b826fabea4f9e02c421d2861.tar.xz UXP-b0e23e79e72b7892b826fabea4f9e02c421d2861.zip |
Merge branch 'master' into mailnews-work
Diffstat (limited to 'gfx/cairo/win32-transparent-surface.patch')
-rw-r--r-- | gfx/cairo/win32-transparent-surface.patch | 129 |
1 files changed, 0 insertions, 129 deletions
diff --git a/gfx/cairo/win32-transparent-surface.patch b/gfx/cairo/win32-transparent-surface.patch deleted file mode 100644 index c8765cf28..000000000 --- a/gfx/cairo/win32-transparent-surface.patch +++ /dev/null @@ -1,129 +0,0 @@ -diff --git a/gfx/cairo/cairo/src/cairo-win32-surface.c b/gfx/cairo/cairo/src/cairo-win32-surface.c ---- a/gfx/cairo/cairo/src/cairo-win32-surface.c -+++ b/gfx/cairo/cairo/src/cairo-win32-surface.c -@@ -1709,40 +1709,23 @@ _cairo_win32_surface_show_glyphs (void - } - #else - return CAIRO_INT_STATUS_UNSUPPORTED; - #endif - } - - #undef STACK_GLYPH_SIZE - --/** -- * cairo_win32_surface_create: -- * @hdc: the DC to create a surface for -- * -- * Creates a cairo surface that targets the given DC. The DC will be -- * queried for its initial clip extents, and this will be used as the -- * size of the cairo surface. The resulting surface will always be of -- * format %CAIRO_FORMAT_RGB24; should you need another surface format, -- * you will need to create one through -- * cairo_win32_surface_create_with_dib(). -- * -- * Return value: the newly created surface -- **/ --cairo_surface_t * --cairo_win32_surface_create (HDC hdc) -+static cairo_surface_t * -+cairo_win32_surface_create_internal (HDC hdc, cairo_format_t format) - { - cairo_win32_surface_t *surface; - -- cairo_format_t format; - RECT rect; - -- /* Assume that everything coming in as a HDC is RGB24 */ -- format = CAIRO_FORMAT_RGB24; -- - surface = malloc (sizeof (cairo_win32_surface_t)); - if (surface == NULL) - return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); - - if (_cairo_win32_save_initial_clip (hdc, surface) != CAIRO_STATUS_SUCCESS) { - free (surface); - return _cairo_surface_create_in_error (_cairo_error (CAIRO_STATUS_NO_MEMORY)); - } -@@ -1765,17 +1748,58 @@ cairo_win32_surface_create (HDC hdc) - surface->extents.width = rect.right - rect.left; - surface->extents.height = rect.bottom - rect.top; - - surface->flags = _cairo_win32_flags_for_dc (surface->dc); - - _cairo_surface_init (&surface->base, &cairo_win32_surface_backend, - _cairo_content_from_format (format)); - -- return (cairo_surface_t *)surface; -+ return &surface->base; -+} -+ -+/** -+ * cairo_win32_surface_create: -+ * @hdc: the DC to create a surface for -+ * -+ * Creates a cairo surface that targets the given DC. The DC will be -+ * queried for its initial clip extents, and this will be used as the -+ * size of the cairo surface. The resulting surface will always be of -+ * format %CAIRO_FORMAT_RGB24; should you need another surface format, -+ * you will need to create one through -+ * cairo_win32_surface_create_with_dib() or call -+ * cairo_win32_surface_create_with_alpha. -+ * -+ * Return value: the newly created surface -+ **/ -+cairo_surface_t * -+cairo_win32_surface_create (HDC hdc) -+{ -+ /* Assume everything comes in as RGB24 */ -+ return cairo_win32_surface_create_internal(hdc, CAIRO_FORMAT_RGB24); -+} -+ -+/** -+ * cairo_win32_surface_create_with_alpha: -+ * @hdc: the DC to create a surface for -+ * -+ * Creates a cairo surface that targets the given DC. The DC will be -+ * queried for its initial clip extents, and this will be used as the -+ * size of the cairo surface. The resulting surface will always be of -+ * format %CAIRO_FORMAT_ARGB32; this format is used when drawing into -+ * transparent windows. -+ * -+ * Return value: the newly created surface -+ * -+ * Since: 1.10 -+ **/ -+cairo_surface_t * -+cairo_win32_surface_create_with_alpha (HDC hdc) -+{ -+ return cairo_win32_surface_create_internal(hdc, CAIRO_FORMAT_ARGB32); - } - - /** - * cairo_win32_surface_create_with_dib: - * @format: format of pixels in the surface to create - * @width: width of the surface, in pixels - * @height: height of the surface, in pixels - * -diff --git a/gfx/cairo/cairo/src/cairo-win32.h b/gfx/cairo/cairo/src/cairo-win32.h ---- a/gfx/cairo/cairo/src/cairo-win32.h -+++ b/gfx/cairo/cairo/src/cairo-win32.h -@@ -44,16 +44,19 @@ - #include <windows.h> - - CAIRO_BEGIN_DECLS - - cairo_public cairo_surface_t * - cairo_win32_surface_create (HDC hdc); - - cairo_public cairo_surface_t * -+cairo_win32_surface_create_with_alpha (HDC hdc); -+ -+cairo_public cairo_surface_t * - cairo_win32_printing_surface_create (HDC hdc); - - cairo_public cairo_surface_t * - cairo_win32_surface_create_with_ddb (HDC hdc, - cairo_format_t format, - int width, - int height); - |