After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 640358 - [PATCH] mahjongg: board rendering issues, no double buffering
[PATCH] mahjongg: board rendering issues, no double buffering
Status: RESOLVED INVALID
Product: gnome-games-superseded
Classification: Deprecated
Component: mahjongg
trunk
Other Linux
: Normal normal
: ---
Assigned To: GNOME Games maintainers
GNOME Games maintainers
Depends on:
Blocks:
 
 
Reported: 2011-01-24 00:24 UTC by Emilio Pozuelo Monfort
Modified: 2011-01-25 02:04 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Rendering issues at the bottom of the board (74.34 KB, image/png)
2011-01-24 00:25 UTC, Emilio Pozuelo Monfort
  Details
Don't disable double buffering for the board widget (1.12 KB, patch)
2011-01-24 00:26 UTC, Emilio Pozuelo Monfort
none Details | Review

Description Emilio Pozuelo Monfort 2011-01-24 00:24:21 UTC
The comment in drawing.c that says we're doing double buffering is no longer correct. Seems to have been broken with the changes to cairo_t for gtk+ 3 in commit aab65121a74d703a639a3fd756797bbe07a1a6fe.

The problem is that we're disabling double buffering in gtk+ (see the documentation for gtk_widget_set_double_buffered), which means we need to draw to an offscreen buffer ourselves, but we're directly drawing to the board, so we can get rendering issues (glitches).

In any case, doing double buffering ourselves seems kinda silly when we can do normal drawing and relay on gtk+ to do that for us, so the obvious fix is to stop turning off double buffering in the board widget.

Screenshot with my rendering issues with git master (which are of course gone when applying my patch) and patch attached.
Comment 1 Emilio Pozuelo Monfort 2011-01-24 00:25:40 UTC
Created attachment 179115 [details]
Rendering issues at the bottom of the board
Comment 2 Emilio Pozuelo Monfort 2011-01-24 00:26:33 UTC
Created attachment 179116 [details] [review]
Don't disable double buffering for the board widget

OK to push?
Comment 3 Robert Ancell 2011-01-24 10:47:05 UTC
I think the problem may actually be bug 640195 (I haven't tried that GDK yet so can't confirm).  Enabling double buffering would just have three buffers...
Comment 4 Emilio Pozuelo Monfort 2011-01-24 20:37:35 UTC
I've just tried gtk+ from master and you're right! Closing as invalid.

I wonder whether it would make sense to use gtk+'s double buffering and just draw directly to it.
Comment 5 Robert Ancell 2011-01-25 02:04:46 UTC
The current double buffering in mahjongg is just a straight copy from the existing GTK2 code.  I'd also expect drawing directly and carefully using queue_draw_area () should be just as good.  (patches welcome :))