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

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

Issue 1113573002: Maintain minimal error response. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove READBACK_NOT_SUPPORTED Created 5 years, 8 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
Index: content/browser/renderer_host/render_widget_host_view_android.cc
diff --git a/content/browser/renderer_host/render_widget_host_view_android.cc b/content/browser/renderer_host/render_widget_host_view_android.cc
index cbd5f871368fe7cc341a3ece6aaea6c4b9b5d4cf..75776d60f1373451852dda3b2fa45f6a89c46f5f 100644
--- a/content/browser/renderer_host/render_widget_host_view_android.cc
+++ b/content/browser/renderer_host/render_widget_host_view_android.cc
@@ -437,7 +437,7 @@ void RenderWidgetHostViewAndroid::GetScaledContentBitmap(
gfx::Rect src_subrect,
ReadbackRequestCallback& result_callback) {
if (!host_ || host_->is_hidden() || !IsSurfaceAvailableForCopy()) {
- result_callback.Run(SkBitmap(), READBACK_NOT_SUPPORTED);
+ result_callback.Run(SkBitmap(), READBACK_SURFACE_UNAVAILABLE);
return;
}
gfx::Size bounds = layer_->bounds();
@@ -925,7 +925,7 @@ void RenderWidgetHostViewAndroid::CopyFromCompositingSurface(
}
base::TimeTicks start_time = base::TimeTicks::Now();
if (using_browser_compositor_ && !IsSurfaceAvailableForCopy()) {
- callback.Run(SkBitmap(), READBACK_NOT_SUPPORTED);
+ callback.Run(SkBitmap(), READBACK_SURFACE_UNAVAILABLE);
return;
}
const gfx::Display& display =
@@ -1895,6 +1895,8 @@ void RenderWidgetHostViewAndroid::PrepareTextureCopyOutputResult(
output_size_in_pixel.height(),
color_type,
kOpaque_SkAlphaType))) {
+ scoped_callback_runner.Reset(
+ base::Bind(callback, SkBitmap(), READBACK_BITMAP_ALLOCATION_FAILURE));
return;
}

Powered by Google App Engine
This is Rietveld 408576698