Closed Bug 1277306 Opened 4 years ago Closed 4 years ago

Make non-XSHM gtk drawing more sane

Categories

(Core :: Graphics, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla49
Tracking Status
firefox49 --- fixed

People

(Reporter: jrmuizel, Assigned: acomminos)

References

Details

Attachments

(1 file)

The basic idea is to do things more like the Windows widget backend.
Assignee: nobody → andrew
Blocks: 1276923
It's worth noting that this should permit a drawing path on Wayland as well.
https://reviewboard.mozilla.org/r/56996/#review54314

::: widget/gtk/nsWindow.cpp:6623
(Diff revision 1)
> +    LayoutDeviceIntRect bounds = aInvalidRegion.GetBounds();
> +    cairo_t* cr = gdk_cairo_create(mGdkWindow);
> +    cairo_surface_mark_dirty(mFallbackSurface);
> +    cairo_set_source_surface(cr, mFallbackSurface, 0, 0);
> +    // Transform our path into the window's coordinate system.
> +    cairo_rectangle(cr, DevicePixelsToGdkCoordRoundDown(bounds.x),

Any reason not to use the the invalid reason instead of the bounds here?
Comment on attachment 8758891 [details]
Bug 1277306 - Fallback to a cairo image surface when SHM and XRender are unavailable when drawing to a GDK window.

Review request updated; see interdiff: https://reviewboard.mozilla.org/r/56996/diff/1-2/
Attachment #8758891 - Attachment description: MozReview Request: Bug 1277306 - Fallback to a cairo image surface when SHM and XRender are unavailable when drawing to a GDK window. r=jrmuizel → Bug 1277306 - Fallback to a cairo image surface when SHM and XRender are unavailable when drawing to a GDK window.
Attachment #8758891 - Flags: review?(lsalzman)
https://reviewboard.mozilla.org/r/56996/#review54314

> Any reason not to use the the invalid reason instead of the bounds here?

Nope, fixed in the latest revision.
Comment on attachment 8758891 [details]
Bug 1277306 - Fallback to a cairo image surface when SHM and XRender are unavailable when drawing to a GDK window.

https://reviewboard.mozilla.org/r/56996/#review54394
Attachment #8758891 - Flags: review?(lsalzman) → review+
Pushed by acomminos@mozilla.com:
https://hg.mozilla.org/integration/mozilla-inbound/rev/867a9bdc2066
Fallback to a cairo image surface when SHM and XRender are unavailable when drawing to a GDK window. r=lsalzman
https://hg.mozilla.org/mozilla-central/rev/867a9bdc2066
Status: NEW → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla49
Attachment #8758891 - Flags: review?(jmuizelaar) → review+
You need to log in before you can comment on or make changes to this bug.