Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(639)

Unified Diff: chrome/browser/ui/gtk/nine_box.h

Issue 8779001: GTK: Make NineBox use CairoCachedSurfaces via gfx::Image. (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Rebase for merge Created 9 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | chrome/browser/ui/gtk/nine_box.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/ui/gtk/nine_box.h
diff --git a/chrome/browser/ui/gtk/nine_box.h b/chrome/browser/ui/gtk/nine_box.h
index 25a86cbb6f949c72b360b285a0934764f3152d66..526bda62bc7c605f1a4b3c696094a608316f2917 100644
--- a/chrome/browser/ui/gtk/nine_box.h
+++ b/chrome/browser/ui/gtk/nine_box.h
@@ -8,6 +8,10 @@
#include <gtk/gtk.h>
+namespace gfx {
+class Image;
+}
+
// A NineBox manages a set of source images representing a 3x3 grid, where
// non-corner images can be tiled to make a larger image. It's used to
// use bitmaps for constructing image-based resizable widgets like buttons.
@@ -16,9 +20,6 @@
// in width, only pass in images for the left column (leave others NULL).
// Similarly, for a horizontal image that stretches in width but is fixed in
// height, only pass in images for the top row.
-//
-// TODO(port): add support for caching server-side pixmaps of prerendered
-// nineboxes.
class NineBox {
public:
// Construct a NineBox with nine images. Images are specified using resource
@@ -39,10 +40,6 @@ class NineBox {
// As above, but rendered partially transparent.
void RenderToWidgetWithOpacity(GtkWidget* dst, double opacity) const;
- // Render the top row of images to |dst| between |x1| and |x1| + |width|.
- // This is split from RenderToWidget so the toolbar can use it.
- void RenderTopCenterStrip(cairo_t* cr, int x, int y, int width) const;
-
// Set the shape of |widget| to match that of the ninebox. Note that |widget|
// must have its own window and be allocated. Also, currently only the top
// three images are used.
@@ -51,8 +48,8 @@ class NineBox {
void ContourWidget(GtkWidget* widget) const;
private:
- GdkPixbuf* images_[9];
- bool unref_pixbufs_on_destroy_;
+ gfx::Image* images_[9];
+ bool unref_images_on_destroy_;
};
#endif // CHROME_BROWSER_UI_GTK_NINE_BOX_H_
« no previous file with comments | « no previous file | chrome/browser/ui/gtk/nine_box.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698