summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/render_widget.h
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-23 19:46:06 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-23 19:46:06 +0000
commit1d01ed634bd4a4e3c15d89931aad1bfc62e0b6cd (patch)
treed0c01b2443bf1cb89824f906848e98426303acec /chrome/renderer/render_widget.h
parentdb359dc0e51d8b28f6d93ce979cdf6e081f4211c (diff)
downloadchromium_src-1d01ed634bd4a4e3c15d89931aad1bfc62e0b6cd.zip
chromium_src-1d01ed634bd4a4e3c15d89931aad1bfc62e0b6cd.tar.gz
chromium_src-1d01ed634bd4a4e3c15d89931aad1bfc62e0b6cd.tar.bz2
Add some optimizations to plugin painting.
The simplest one is to disable blending when the plugin is opaque. The more complicated one is to bypass webkit painting the background of plugins when we know the plugin to be always on top and also opaque. The always on top flag is currently set by a new "Private2" API. Bypassing WebKit makes animations faster. BUG=none TEST=none Review URL: http://codereview.chromium.org/3421030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60329 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/render_widget.h')
-rw-r--r--chrome/renderer/render_widget.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/chrome/renderer/render_widget.h b/chrome/renderer/render_widget.h
index 7f9e247..61abdee 100644
--- a/chrome/renderer/render_widget.h
+++ b/chrome/renderer/render_widget.h
@@ -197,6 +197,19 @@ class RenderWidget : public IPC::Channel::Listener,
virtual void DidInitiatePaint() {}
virtual void DidFlushPaint() {}
+ // Detects if a suitable opaque plugin covers |*bounds| with no compositing
+ // necessary.
+ //
+ // Returns true if the paint can be handled by just blitting the plugin
+ // bitmap. In this case, the |*dib| parameter will contain the TransportDIB
+ // and the |*bounds| will be updated to contain the rect on the page that
+ // contains the given DIB (this may go off the visible page).
+ //
+ // A return value of false means optimized painting can not be used and we
+ // should continue with the normal painting code path.
+ virtual bool GetBitmapForOptimizedPluginPaint(gfx::Rect* bounds,
+ TransportDIB** dib);
+
// Sets the "hidden" state of this widget. All accesses to is_hidden_ should
// use this method so that we can properly inform the RenderThread of our
// state.