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

Unified Diff: content/renderer/render_widget.cc

Issue 10905036: Pepper Flash Mac: Fix crash when playing video on MB retina (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: disable test on windows Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « content/renderer/render_widget.h ('k') | content/renderer/render_widget_fullscreen_pepper.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/renderer/render_widget.cc
diff --git a/content/renderer/render_widget.cc b/content/renderer/render_widget.cc
index 646aafd37cbbcfea58fdbad92be4b1b865c94535..4bd1a63e8f570ebda22c8f491230b7ce0bf6cb36 100644
--- a/content/renderer/render_widget.cc
+++ b/content/renderer/render_widget.cc
@@ -668,10 +668,12 @@ void RenderWidget::PaintRect(const gfx::Rect& rect,
// First see if this rect is a plugin that can paint itself faster.
TransportDIB* optimized_dib = NULL;
gfx::Rect optimized_copy_rect, optimized_copy_location;
+ float dib_scale_factor;
webkit::ppapi::PluginInstance* optimized_instance =
GetBitmapForOptimizedPluginPaint(rect, &optimized_dib,
&optimized_copy_location,
- &optimized_copy_rect);
+ &optimized_copy_rect,
+ &dib_scale_factor);
if (optimized_instance) {
// This plugin can be optimize-painted and we can just ask it to paint
// itself. We don't actually need the TransportDIB in this case.
@@ -931,6 +933,7 @@ void RenderWidget::DoDeferredUpdate() {
// case where there may be multiple invalid regions.
TransportDIB* dib = NULL;
gfx::Rect optimized_copy_rect, optimized_copy_location;
+ float dib_scale_factor = 1;
DCHECK(!pending_update_params_.get());
pending_update_params_.reset(new ViewHostMsg_UpdateRect_Params);
pending_update_params_->dx = update.scroll_delta.x();
@@ -948,12 +951,14 @@ void RenderWidget::DoDeferredUpdate() {
if (update.scroll_rect.IsEmpty() &&
!is_accelerated_compositing_active_ &&
GetBitmapForOptimizedPluginPaint(bounds, &dib, &optimized_copy_location,
- &optimized_copy_rect)) {
+ &optimized_copy_rect,
+ &dib_scale_factor)) {
// Only update the part of the plugin that actually changed.
optimized_copy_rect = optimized_copy_rect.Intersect(bounds);
pending_update_params_->bitmap = dib->id();
pending_update_params_->bitmap_rect = optimized_copy_location;
pending_update_params_->copy_rects.push_back(optimized_copy_rect);
+ pending_update_params_->scale_factor = dib_scale_factor;
} else if (!is_accelerated_compositing_active_) {
// Compute a buffer for painting and cache it.
gfx::Rect pixel_bounds = bounds.Scale(device_scale_factor_);
@@ -1557,7 +1562,8 @@ webkit::ppapi::PluginInstance* RenderWidget::GetBitmapForOptimizedPluginPaint(
const gfx::Rect& paint_bounds,
TransportDIB** dib,
gfx::Rect* location,
- gfx::Rect* clip) {
+ gfx::Rect* clip,
+ float* scale_factor) {
// Bare RenderWidgets don't support optimized plugin painting.
return NULL;
}
« no previous file with comments | « content/renderer/render_widget.h ('k') | content/renderer/render_widget_fullscreen_pepper.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698