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

Unified Diff: content/browser/renderer_host/render_widget_host_view_aura.cc

Issue 146873002: Handle Left out paths on Android/Aura for Async ReadBack. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 6 years, 10 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/browser/renderer_host/render_widget_host_view_aura.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 599f976566f37beacdcc3adfd01e3d9e2cf174ec..ce1f881bc4a6abf6bf6e71160c59827abc55cff5 100644
--- a/content/browser/renderer_host/render_widget_host_view_aura.cc
+++ b/content/browser/renderer_host/render_widget_host_view_aura.cc
@@ -1846,7 +1846,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(
@@ -1879,7 +1880,7 @@ void RenderWidgetHostViewAura::PrepareTextureCopyOutputResult(
base::Bind(callback, false, SkBitmap()));
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())
@@ -1921,8 +1922,14 @@ 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()));
« no previous file with comments | « content/browser/renderer_host/render_widget_host_view_aura.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698