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

Issue 4550001: Fix optimized pepper painting (Closed)

Created:
10 years, 1 month ago by piman
Modified:
9 years, 7 months ago
Reviewers:
brettw
CC:
chromium-reviews, jam, darin-cc_chromium.org, stuartmorgan+watch_chromium.org
Visibility:
Public.

Description

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. Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=65214

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+4 lines, -2 lines) Patch
M webkit/glue/plugins/pepper_plugin_instance.cc View 1 chunk +4 lines, -2 lines 0 comments Download

Messages

Total messages: 2 (0 generated)
piman
10 years, 1 month ago (2010-11-05 00:32:00 UTC) #1
brettw
10 years, 1 month ago (2010-11-05 02:57:03 UTC) #2
LGTM

On Thu, Nov 4, 2010 at 5:32 PM,  <piman@chromium.org> wrote:
> Reviewers: brettw,
>
> Description:
> 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.
>
> Please review this at http://codereview.chromium.org/4550001/show
>
> SVN Base: svn://svn.chromium.org/chrome/trunk/src
>
> Affected files:
>  M webkit/glue/plugins/pepper_plugin_instance.cc
>
>
> Index: webkit/glue/plugins/pepper_plugin_instance.cc
> diff --git a/webkit/glue/plugins/pepper_plugin_instance.cc
> b/webkit/glue/plugins/pepper_plugin_instance.cc
> index
>
9267e81c6a3dc0d449bd57d44a57afdc688e14ea..e173f8dabd10bd68621cbbce2c1e63e6a9b04606
> 100644
> --- a/webkit/glue/plugins/pepper_plugin_instance.cc
> +++ b/webkit/glue/plugins/pepper_plugin_instance.cc
> @@ -582,13 +582,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;
>  }
>
>
>
>

Powered by Google App Engine
This is Rietveld 408576698