From 40bad03889d4fc90799fdfe39a3fd503cdfb492e Mon Sep 17 00:00:00 2001 From: "erg@google.com" Date: Wed, 9 Sep 2009 23:07:10 +0000 Subject: Upload GdkPixbufs into cairo surfaces so they (hopefully) live on the X server and have better performance. In the presence of XRender, let cairo do things smarter. This is a big win performance wise. BrowserWindowGtk::OnCustomFrameExpose, a heavy user of images sped up from an average runtime of 20.5ms to 0.7ms. TEST=Run through valgrind, don't leak memory. TEST=Run both before and after using xtrace. Notice fewer XCreatePixmap requests and more XRender-CreatePicture requests. BUG=http://crbug.com/10499 Review URL: http://codereview.chromium.org/197046 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25814 0039d316-1c4b-4281-b951-d872f2087c98 --- chrome/browser/browser_theme_provider.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'chrome/browser/browser_theme_provider.h') diff --git a/chrome/browser/browser_theme_provider.h b/chrome/browser/browser_theme_provider.h index 0053ef2..7532f97 100644 --- a/chrome/browser/browser_theme_provider.h +++ b/chrome/browser/browser_theme_provider.h @@ -242,6 +242,10 @@ class BrowserThemeProvider : public base::RefCounted, // Save the modified bitmap at image_cache_[id]. virtual void SaveThemeBitmap(const std::string resource_name, int id); + // Clears the platform-specific caches. Do not call directly; it's called + // from ClearCaches(). + virtual void FreePlatformCaches(); + Profile* profile() { return profile_; } // Subclasses may need us to not use the on-disk image cache. The GTK @@ -312,10 +316,6 @@ class BrowserThemeProvider : public base::RefCounted, // Frees generated images and clears the image cache. void ClearCaches(); - // Clears the platform-specific caches. Do not call directly; it's called - // from ClearCaches(). - void FreePlatformCaches(); - // Encode image at image_cache_[id] as PNG and write to disk. bool WriteImagesToDisk(); -- cgit v1.1