Closed
Bug 1255342
Opened 9 years ago
Closed 9 years ago
Add LockBits support for cairo win32 surfaces
Categories
(Core :: Graphics, defect)
Core
Graphics
Tracking
()
RESOLVED
FIXED
mozilla48
Tracking | Status | |
---|---|---|
firefox48 | --- | fixed |
People
(Reporter: jrmuizel, Assigned: lsalzman)
References
(Blocks 1 open bug)
Details
(Whiteboard: gfx-noted)
Attachments
(1 file, 1 obsolete file)
2.21 KB,
patch
|
sotaro
:
review+
|
Details | Diff | Splinter Review |
No description provided.
Reporter | ||
Updated•9 years ago
|
Attachment #8728885 -
Attachment is patch: true
Attachment #8728885 -
Flags: review?(lsalzman)
Comment 1•9 years ago
|
||
Comment on attachment 8728885 [details] [diff] [review]
Add LockBits support for cairo win32 surfaces
Review of attachment 8728885 [details] [diff] [review]:
-----------------------------------------------------------------
I just built the patch and the following needs to be updated.
::: gfx/2d/DrawTargetCairo.cpp
@@ +719,5 @@
> IntPoint* aOrigin)
> {
> cairo_surface_t* surf = cairo_get_group_target(mContext);
> + if (cairo_surface_get_type(surf) == CAIRO_SURFACE_TYPE_WIN32) {
> + cairo_surface_t *imgsurf = cairo_win32_surface_get_image();
missing parameter.
@@ +758,5 @@
> MOZ_ASSERT(mLockedBits == aData);
> mLockedBits = nullptr;
> cairo_surface_t* surf = cairo_get_group_target(mContext);
> + if (cairo_surface_get_type(surf) == CAIRO_SURFACE_TYPE_WIN32) {
> + cairo_surface_t *imgsurf = cairo_win32_surface_get_image();
missing parameter.
Assignee | ||
Comment 2•9 years ago
|
||
Comment on attachment 8728885 [details] [diff] [review]
Add LockBits support for cairo win32 surfaces
In LockBits, cairo_surface_get_device_offset will always return the wrong value here in because it's querying the embedded image surface and not the original win32 surface. Just that one particular call needs to make sure it uses the original group target, though the other usage looks correct.
The ReleaseBits part probably needs to mark both the original win32 surface and the image surface as dirty, or otherwise one or the other might accidentally be left as clear.
Whiteboard: gfx-noted
Assignee | ||
Comment 3•9 years ago
|
||
Comment on attachment 8728885 [details] [diff] [review]
Add LockBits support for cairo win32 surfaces
Review of attachment 8728885 [details] [diff] [review]:
-----------------------------------------------------------------
r- for now since the patch won't work as it is until above issues resolved.
Attachment #8728885 -
Flags: review?(lsalzman) → review-
Updated•9 years ago
|
Blocks: unaccel-video
Assignee | ||
Comment 4•9 years ago
|
||
This solves a few problems that cropped up with Jeff's original patch:
It makes sure to get the device offset from the original group target and not the image surface.
It makes sure to mark both surfaces as dirty just in case.
It #ifdefs out Win32 details depending on whether it is available.
Fixes code formatting.
Assignee: nobody → lsalzman
Attachment #8728885 -
Attachment is obsolete: true
Status: NEW → ASSIGNED
Attachment #8737332 -
Flags: review?(sotaro.ikeda.g)
Updated•9 years ago
|
Attachment #8737332 -
Flags: review?(sotaro.ikeda.g) → review+
Assignee | ||
Comment 5•9 years ago
|
||
Comment 7•9 years ago
|
||
bugherder |
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
status-firefox48:
--- → fixed
Resolution: --- → FIXED
Target Milestone: --- → mozilla48
You need to log in
before you can comment on or make changes to this bug.
Description
•