aboutsummaryrefslogtreecommitdiffstats
path: root/recipes/mozilla/files
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2009-06-03 13:55:17 +0200
committerKoen Kooi <koen@Powerbook-3.local>2009-06-05 17:48:09 +0200
commitd76be98f7b1aabdbd32dd9a50b0c135c139de9ec (patch)
tree0815c2f791243d711eba0f3579b46238c509aa1e /recipes/mozilla/files
parent8fc3b478daa6eab29547f37772d288541623a515 (diff)
downloadopenembedded-d76be98f7b1aabdbd32dd9a50b0c135c139de9ec.tar.gz
firefox 3.0.1: make it go faster in 16bpp modes
Diffstat (limited to 'recipes/mozilla/files')
-rw-r--r--recipes/mozilla/files/use-native-bpp.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/recipes/mozilla/files/use-native-bpp.patch b/recipes/mozilla/files/use-native-bpp.patch
new file mode 100644
index 0000000000..4b0f0d1ddb
--- /dev/null
+++ b/recipes/mozilla/files/use-native-bpp.patch
@@ -0,0 +1,37 @@
+Subject: [PATCH] Use native format for storing non-transparent pictures.
+
+When using 16-bit color depth for desktop, it is preferable
+to also use 16bpp format for images to get better performance.
+As an additional bonus, the browser uses less memory when
+viewing pages with lots of images.
+
+Taken from https://bugzilla.mozilla.org/show_bug.cgi?id=386440
+---
+ gfx/thebes/src/gfxPlatformGtk.cpp | 11 +++++++++--
+ 1 files changed, 9 insertions(+), 2 deletions(-)
+
+diff --git a/gfx/thebes/src/gfxPlatformGtk.cpp b/gfx/thebes/src/gfxPlatformGtk.cpp
+index 39e09e7..78e6002 100644
+--- a/gfx/thebes/src/gfxPlatformGtk.cpp
++++ b/gfx/thebes/src/gfxPlatformGtk.cpp
+@@ -142,8 +142,15 @@ gfxPlatformGtk::CreateOffscreenSurface(const gfxIntSize& size,
+
+ if (!UseGlitz()) {
+ GdkPixmap* pixmap = nsnull;
+- XRenderPictFormat* xrenderFormat =
+- XRenderFindStandardFormat(display, xrenderFormatID);
++ XRenderPictFormat* xrenderFormat = nsnull;
++
++ if (xrenderFormatID == PictStandardRGB24) {
++ // Actually we want not strictly RGB24, but the fastest non-alpha format
++ xrenderFormat = XRenderFindVisualFormat(display, GDK_VISUAL_XVISUAL(gdk_visual_get_system()));
++ }
++
++ if (!xrenderFormat)
++ xrenderFormat = XRenderFindStandardFormat(display, xrenderFormatID);
+
+ if (!xrenderFormat) {
+ // We don't have Render; see if we can just create a pixmap
+--
+1.5.6.5
+