diff options
author | piman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-05 17:10:39 +0000 |
---|---|---|
committer | piman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2010-11-05 17:10:39 +0000 |
commit | dac34297bab50614b5f064d0867a913f6b83fe24 (patch) | |
tree | 43af7c79a58c26b91ffa253d3f01f50dac22a862 /webkit/glue/plugins | |
parent | 26a70a153a51257706e27485e1382e1e25fbf4fe (diff) | |
download | chromium_src-dac34297bab50614b5f064d0867a913f6b83fe24.zip chromium_src-dac34297bab50614b5f064d0867a913f6b83fe24.tar.gz chromium_src-dac34297bab50614b5f064d0867a913f6b83fe24.tar.bz2 |
Fix optimized pepper painting
There was some confusion about the coordinates space used for pepper::PluginInstance::clip_
BUG=none
TEST=test with pepper flash on youtube, make sure GetBitmapForOptimizedPluginPaint succeeds most of the time, and that it paints correctly.
Review URL: http://codereview.chromium.org/4550001
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@65214 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'webkit/glue/plugins')
-rw-r--r-- | webkit/glue/plugins/pepper_plugin_instance.cc | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/webkit/glue/plugins/pepper_plugin_instance.cc b/webkit/glue/plugins/pepper_plugin_instance.cc index b40874a..31ef4da 100644 --- a/webkit/glue/plugins/pepper_plugin_instance.cc +++ b/webkit/glue/plugins/pepper_plugin_instance.cc @@ -606,13 +606,15 @@ bool PluginInstance::GetBitmapForOptimizedPluginPaint( gfx::Rect plugin_backing_store_rect(position_.origin(), gfx::Size(image_data->width(), image_data->height())); - gfx::Rect plugin_paint_rect = plugin_backing_store_rect.Intersect(clip_); + gfx::Rect clip_page(clip_); + clip_page.Offset(position_.origin()); + gfx::Rect plugin_paint_rect = plugin_backing_store_rect.Intersect(clip_page); if (!plugin_paint_rect.Contains(paint_bounds)) return false; *dib = image_data->platform_image()->GetTransportDIB(); *location = plugin_backing_store_rect; - *clip = clip_; + *clip = clip_page; return true; } |