Closed Bug 979839 Opened 11 years ago Closed 11 years ago

Port GTK2 to GTK3 - rendering artifacts when nsWindow is resized

Categories

(Core :: Widget: Gtk, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED
mozilla31

People

(Reporter: stransky, Assigned: stransky)

References

Details

Attachments

(2 files, 1 obsolete file)

downstream bugs: https://bugzilla.redhat.com/show_bug.cgi?id=1056313 https://bugzilla.redhat.com/show_bug.cgi?id=1070741 It's caused by: expose_event(cairo_t* cr) [...] cairo_surface_t *surf = cairo_get_target(cr); [...] mThebesSurface = gfxASurface::Wrap(surf); where cr/surf (obtained from gtk) are the same even when the window itself is resized. The result is that gfxASurface::Wrap() does not create a new mThebesSurface surface but keeps to return the first, original one, with old size buffered.
Attached patch patch (obsolete) (deleted) — Splinter Review
Attachment #8386088 - Flags: review?(karlt)
Comment on attachment 8386088 [details] [diff] [review] patch gfxXlibSurface(cairo_surface_t*) should not be used like this. (This constructor should really not be public, so as to prevent this.) Each of the wrapper gfxXlibSurface surfaces will not be deleted until the cairo_surface_t is destroyed, and so they leak. Perhaps the simplest solution is to remove mSize from gfxXlibSurface and make GetSize() call cairo_xlib_surface_get_width/height() each time. (If don't think that would be a performance problem.)
Attachment #8386088 - Flags: review?(karlt) → review-
Attached patch patch v.2 (deleted) — Splinter Review
Thanks! There's the updated one. It also fixes a build warning when cairo_gdk_drawable_key is not used in gtk3 code.
Attachment #8386088 - Attachment is obsolete: true
Attachment #8386739 - Flags: review?(karlt)
Comment on attachment 8386739 [details] [diff] [review] patch v.2 Looks good to me thanks. Better check that Jeff is happy with this.
Attachment #8386739 - Flags: review?(karlt)
Attachment #8386739 - Flags: review+
Attachment #8386739 - Flags: feedback?(jmuizelaar)
This patch fixes the corruption I mentioned in https://bugzilla.mozilla.org/show_bug.cgi?id=624422#c48
Comment on attachment 8386739 [details] [diff] [review] patch v.2 Feel free to land this, once it has a better checkin comment.
Attachment #8386739 - Flags: feedback?(jmuizelaar)
Attached patch patch for check-in (deleted) — Splinter Review
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla31
Blocks: 1034064
No longer blocks: 1034064
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: