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 627353 - Convert all drawing to Cairo
Convert all drawing to Cairo
Status: RESOLVED FIXED
Product: libgnomekbd
Classification: Core
Component: Drawing
unspecified
Other All
: Normal normal
: ---
Assigned To: libgnomekbd maintainers
Sergey V. Udaltsov
Depends on:
Blocks: 626688
 
 
Reported: 2010-08-19 11:04 UTC by Benjamin Otte (Company)
Modified: 2010-08-25 17:13 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Blit pixmap using Cairo (1.53 KB, patch)
2010-08-19 11:04 UTC, Benjamin Otte (Company)
none Details | Review
Clear pixmap using Cairo (1.56 KB, patch)
2010-08-19 11:04 UTC, Benjamin Otte (Company)
none Details | Review
Draw flag pixbuf using Cairo (2.31 KB, patch)
2010-08-19 11:04 UTC, Benjamin Otte (Company)
none Details | Review
Draw flag pixbuf using Cairo (2.34 KB, patch)
2010-08-24 12:17 UTC, Benjamin Otte (Company)
none Details | Review
Draw flag pixbuf using Cairo (2.34 KB, patch)
2010-08-24 23:03 UTC, Benjamin Otte (Company)
none Details | Review

Description Benjamin Otte (Company) 2010-08-19 11:04:43 UTC
These patches get rid of the deprecated GDK drawing functions and use Cairo instead. Note that I tested the patches, but as I'm not sure what they are used for exactly I'd be happy if you could check them.
Comment 1 Benjamin Otte (Company) 2010-08-19 11:04:45 UTC
Created attachment 168279 [details] [review]
Blit pixmap using Cairo
Comment 2 Benjamin Otte (Company) 2010-08-19 11:04:48 UTC
Created attachment 168280 [details] [review]
Clear pixmap using Cairo
Comment 3 Benjamin Otte (Company) 2010-08-19 11:04:51 UTC
Created attachment 168281 [details] [review]
Draw flag pixbuf using Cairo

No complicated pixbuf scaling code needed anymore, Cairo does that
automatically.
Comment 4 Sergey V. Udaltsov 2010-08-20 23:27:38 UTC
First 2 patches look ok to me. Could you please update the last patch so that it would only do scaling when necessary (see the variable scaling_needed)?
Comment 5 Sergey V. Udaltsov 2010-08-20 23:35:07 UTC
(2 patches are committed, thanks)
Comment 6 Benjamin Otte (Company) 2010-08-24 12:17:55 UTC
Created attachment 168640 [details] [review]
Draw flag pixbuf using Cairo

No complicated pixbuf scaling code needed anymore, Cairo does that
automatically.
Comment 7 Benjamin Otte (Company) 2010-08-24 12:18:53 UTC
Comment on attachment 168281 [details] [review]
Draw flag pixbuf using Cairo

Updated the patch after discussion on IRC to remove the needs_scaling variable. Manual optimization of scaling  is not needed as Cairo does it automatically.
Comment 8 Sergey V. Udaltsov 2010-08-24 22:47:34 UTC
I hate to tell you but your patch does not work when flags are enabled - I see nothing (tried gkbd-indicator-test).
Comment 9 Benjamin Otte (Company) 2010-08-24 23:03:06 UTC
Created attachment 168691 [details] [review]
Draw flag pixbuf using Cairo

No complicated pixbuf scaling code needed anymore, Cairo does that
automatically.
Comment 10 Benjamin Otte (Company) 2010-08-24 23:05:47 UTC
Comment on attachment 168640 [details] [review]
Draw flag pixbuf using Cairo

A test program! Had I found that earlier... :)

I forgot the sign in the last cairo_translate() call. Fixed with the newest patch.
Comment 11 Sergey V. Udaltsov 2010-08-25 17:13:15 UTC
Sweet! Committed, thank you!