summaryrefslogtreecommitdiffstats
path: root/chrome/renderer/pepper_plugin_delegate_impl.h
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-24 05:39:15 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-09-24 05:39:15 +0000
commitca4847f0a19f9565b6ca19fa47729bb746f5f736 (patch)
treeb8dd17796537fa49e00f66b8d3f9ac8d1c90b9d8 /chrome/renderer/pepper_plugin_delegate_impl.h
parent61b4a61bf1ea2a610c076cb28de59aa1137b3c4f (diff)
downloadchromium_src-ca4847f0a19f9565b6ca19fa47729bb746f5f736.zip
chromium_src-ca4847f0a19f9565b6ca19fa47729bb746f5f736.tar.gz
chromium_src-ca4847f0a19f9565b6ca19fa47729bb746f5f736.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. This is a re-land of the previous patch with a trivial compilation fix. This also adds a clip rect to the GetBitmap... function so we can properly handle plugins in nested iframes with proper clipping. BUG=none TEST=none Original review URL: http://codereview.chromium.org/3421030 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@60426 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'chrome/renderer/pepper_plugin_delegate_impl.h')
-rw-r--r--chrome/renderer/pepper_plugin_delegate_impl.h14
1 files changed, 14 insertions, 0 deletions
diff --git a/chrome/renderer/pepper_plugin_delegate_impl.h b/chrome/renderer/pepper_plugin_delegate_impl.h
index a5808d5..8bacb44 100644
--- a/chrome/renderer/pepper_plugin_delegate_impl.h
+++ b/chrome/renderer/pepper_plugin_delegate_impl.h
@@ -19,6 +19,10 @@
class FilePath;
class RenderView;
+namespace gfx {
+class Rect;
+}
+
namespace pepper {
class FileIO;
class PluginInstance;
@@ -29,6 +33,8 @@ class WebFileChooserCompletion;
struct WebFileChooserParams;
}
+class TransportDIB;
+
class PepperPluginDelegateImpl
: public pepper::PluginDelegate,
public base::SupportsWeakPtr<PepperPluginDelegateImpl> {
@@ -41,6 +47,14 @@ class PepperPluginDelegateImpl
void ViewInitiatedPaint();
void ViewFlushedPaint();
+ // Called by RenderView to implement the corresponding function in its base
+ // class RenderWidget (see that for more).
+ bool GetBitmapForOptimizedPluginPaint(
+ const gfx::Rect& paint_bounds,
+ TransportDIB** dib,
+ gfx::Rect* location,
+ gfx::Rect* clip);
+
// Called by RenderView when ViewMsg_AsyncOpenFile_ACK.
void OnAsyncFileOpened(base::PlatformFileError error_code,
base::PlatformFile file,