Closed Bug 577200 Opened 14 years ago Closed 14 years ago

Allow gfxWindowsSurface to contain Alpha

Categories

(Core :: Graphics, defect)

x86
Windows Vista
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: bas.schouten, Assigned: bas.schouten)

References

Details

Attachments

(2 files, 1 obsolete file)

Attached patch Allow HDC surfaces to contain alpha (obsolete) (deleted) — Splinter Review
When a gfxWindowsSurface is created around an HDC it currently always believes it's opaque. For the glass window surface this isn't true. It should be told properly if it's wrapping a transparent DC, this allows BasicLayers to later determine if it's dealing with a transparent surface so it knows if it needs to clear it when reusing it.
Attachment #456229 - Flags: review?(jmuizelaar)
Attachment #456229 - Flags: review?(jmuizelaar) → review-
Comment on attachment 456229 [details] [diff] [review] Allow HDC surfaces to contain alpha The new function needs documentation describing what it is there for and what it does. I think one problem, is that the function doesn't really make it clear that difference between cairo_win32_surface_create and cairo_win32_surface_create_transparent is not really in the surface that's created but in the way that we interpret the data associated with the HDC. A better name would help, though I'm not exactly sure what that name should be.
roc and I came up with cairo_win32_surface_create_with_alpha which I think is better.
With Both of the patches shown here I was seeing bug 552114 with OOPP on.
Attached patch Part 1 v2 (deleted) — Splinter Review
Attachment #456229 - Attachment is obsolete: true
Attachment #456603 - Flags: review?(jmuizelaar)
Comment on attachment 456603 [details] [diff] [review] Part 1 v2 >- * Creates a cairo surface that targets the given DC. The DC will be >- * queried for its initial clip extents, and this >+ * 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 (as supported for transparent windows with >+ * Windows Vista and up. Fix up the comment and a close paren.
Attachment #456603 - Flags: review?(jmuizelaar) → review+
Status: ASSIGNED → RESOLVED
Closed: 14 years ago
Resolution: --- → FIXED
Whiteboard: [needs landing]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: