Index: content/browser/renderer_host/render_widget_host_view_aura.cc |
diff --git a/content/browser/renderer_host/render_widget_host_view_aura.cc b/content/browser/renderer_host/render_widget_host_view_aura.cc |
index 21c983a3f5330bd03098f6fa06503f5c26b4082a..945e3af48f594d085f764715d4f6c718b46ff84b 100644 |
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc |
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc |
@@ -1865,7 +1865,8 @@ void RenderWidgetHostViewAura::CopyFromCompositingSurfaceHasResult( |
} |
DCHECK(result->HasBitmap()); |
- PrepareBitmapCopyOutputResult(dst_size_in_pixel, callback, result.Pass()); |
+ PrepareBitmapCopyOutputResult(dst_size_in_pixel, config, callback, |
+ result.Pass()); |
} |
static void CopyFromCompositingSurfaceFinished( |
@@ -1893,7 +1894,7 @@ void RenderWidgetHostViewAura::PrepareTextureCopyOutputResult( |
return; |
scoped_ptr<SkBitmap> bitmap(new SkBitmap); |
- bitmap->setConfig(SkBitmap::kARGB_8888_Config, |
+ bitmap->setConfig(config, |
dst_size_in_pixel.width(), dst_size_in_pixel.height(), |
0, kOpaque_SkAlphaType); |
if (!bitmap->allocPixels()) |
@@ -1935,10 +1936,15 @@ void RenderWidgetHostViewAura::PrepareTextureCopyOutputResult( |
// static |
void RenderWidgetHostViewAura::PrepareBitmapCopyOutputResult( |
const gfx::Size& dst_size_in_pixel, |
+ const SkBitmap::Config config, |
const base::Callback<void(bool, const SkBitmap&)>& callback, |
scoped_ptr<cc::CopyOutputResult> result) { |
+ if (config != SkBitmap::kARGB_8888_Config) { |
+ NOTIMPLEMENTED(); |
+ callback.Run(false, SkBitmap()); |
+ return; |
+ } |
DCHECK(result->HasBitmap()); |
- |
base::ScopedClosureRunner scoped_callback_runner( |
base::Bind(callback, false, SkBitmap())); |
if (!result->HasBitmap()) |