summaryrefslogtreecommitdiffstats
path: root/views/view.h
diff options
context:
space:
mode:
authorsadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-15 02:18:36 +0000
committersadrul@chromium.org <sadrul@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2011-03-15 02:18:36 +0000
commitc797cd43680b525ea771dc226ca353078c5c56f1 (patch)
treea172b53773aec97a6c3dd9c4fcf93acc27d0cca2 /views/view.h
parent8df9747bff840d1a63b9fe1309b18e5fb21e8340 (diff)
downloadchromium_src-c797cd43680b525ea771dc226ca353078c5c56f1.zip
chromium_src-c797cd43680b525ea771dc226ca353078c5c56f1.tar.gz
chromium_src-c797cd43680b525ea771dc226ca353078c5c56f1.tar.bz2
Start working on compositor tree painting.
As a first step, maintain a skia canvas in each transformed view. Each transformed view will acquire a texture-id for the canvas it owns. Whenever the canvas is updated, it will trigger a refresh in the compositor tree. BUG=none TEST=none Review URL: http://codereview.chromium.org/6594125 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@78149 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'views/view.h')
-rw-r--r--views/view.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/views/view.h b/views/view.h
index 8117ab2..e09f0bee 100644
--- a/views/view.h
+++ b/views/view.h
@@ -34,8 +34,11 @@ class Path;
namespace ui {
struct AccessibleViewState;
+class Compositor;
class ThemeProvider;
class Transform;
+
+typedef unsigned int TextureID;
}
using ui::ThemeProvider;
@@ -562,6 +565,11 @@ class View : public AcceleratorTarget {
flip_canvas_on_paint_for_rtl_ui_ = enable;
}
+ // Accelerated painting ------------------------------------------------------
+
+ // Enable/Disable accelerated compositing.
+ static void set_use_acceleration_when_possible(bool use);
+
// Input ---------------------------------------------------------------------
// The points (and mouse locations) in the following functions are in the
// view's coordinates, except for a RootView.
@@ -1016,6 +1024,11 @@ class View : public AcceleratorTarget {
// relevant contents.
virtual void OnPaintFocusBorder(gfx::Canvas* canvas);
+ // Accelerated painting ------------------------------------------------------
+
+ // Performs accelerated painting using the compositor.
+ virtual void PaintComposite(ui::Compositor* compositor);
+
// Input ---------------------------------------------------------------------
// Called by HitTest to see if this View has a custom hit test mask. If the
@@ -1333,6 +1346,16 @@ class View : public AcceleratorTarget {
// right-to-left locales for this View.
bool flip_canvas_on_paint_for_rtl_ui_;
+ // Accelerated painting ------------------------------------------------------
+
+ // Each transformed view will maintain its own canvas.
+ scoped_ptr<gfx::Canvas> canvas_;
+
+ // Texture ID used for accelerated painting.
+ // TODO(sadrul): This will eventually be replaced by an abstract texture
+ // object.
+ ui::TextureID texture_id_;
+
// Accelerators --------------------------------------------------------------
// true if when we were added to hierarchy we were without focus manager