Index: content/browser/renderer_host/render_widget_host_impl.cc |
diff --git a/content/browser/renderer_host/render_widget_host_impl.cc b/content/browser/renderer_host/render_widget_host_impl.cc |
index 73c306d28292d3d19feb1d8aec5d5d9ba7fa3633..3cd158729be2b8d30a7aed79288d35c037feeb6c 100644 |
--- a/content/browser/renderer_host/render_widget_host_impl.cc |
+++ b/content/browser/renderer_host/render_widget_host_impl.cc |
@@ -718,16 +718,15 @@ void RenderWidgetHostImpl::SetIsLoading(bool is_loading) { |
void RenderWidgetHostImpl::CopyFromBackingStore( |
const gfx::Rect& src_subrect, |
const gfx::Size& accelerated_dst_size, |
- const base::Callback<void(bool, const SkBitmap&)>& callback) { |
+ const base::Callback<void(bool, const SkBitmap&)>& callback, |
+ const SkBitmap::Config& bitmap_config) { |
if (view_ && is_accelerated_compositing_active_) { |
TRACE_EVENT0("browser", |
"RenderWidgetHostImpl::CopyFromBackingStore::FromCompositingSurface"); |
gfx::Rect accelerated_copy_rect = src_subrect.IsEmpty() ? |
gfx::Rect(view_->GetViewBounds().size()) : src_subrect; |
- view_->CopyFromCompositingSurface(accelerated_copy_rect, |
- accelerated_dst_size, |
- callback, |
- SkBitmap::kARGB_8888_Config); |
+ view_->CopyFromCompositingSurface( |
+ accelerated_copy_rect, accelerated_dst_size, callback, bitmap_config); |
return; |
} |
@@ -2532,4 +2531,10 @@ void RenderWidgetHostImpl::AddLatencyInfoComponentIds( |
} |
} |
+SkBitmap::Config RenderWidgetHostImpl::PreferredReadbackFormat() { |
+ if (view_) |
+ return view_->PreferredReadbackFormat(); |
+ return SkBitmap::kARGB_8888_Config; |
+} |
+ |
} // namespace content |