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

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

Issue 593503003: Support error handling for Surface readbacks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Formatted code and fixed build issue in test. Created 6 years, 1 month 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_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 e88295ae134acb3c7067019996f637f2f6a0a49d..344032a75a8f43b2137907f525dbea883cdd3a7c 100644
--- a/content/browser/renderer_host/render_widget_host_impl.cc
+++ b/content/browser/renderer_host/render_widget_host_impl.cc
@@ -693,7 +693,7 @@ void RenderWidgetHostImpl::ViewDestroyed() {
void RenderWidgetHostImpl::CopyFromBackingStore(
const gfx::Rect& src_subrect,
const gfx::Size& accelerated_dst_size,
- const base::Callback<void(bool, const SkBitmap&)>& callback,
+ ReadbackRequestCallback& callback,
const SkColorType color_type) {
if (view_) {
TRACE_EVENT0("browser",
@@ -705,7 +705,7 @@ void RenderWidgetHostImpl::CopyFromBackingStore(
return;
}
- callback.Run(false, SkBitmap());
+ callback.Run(SkBitmap(), content::READBACK_FAILED);
}
bool RenderWidgetHostImpl::CanCopyFromBackingStore() {

Powered by Google App Engine
This is Rietveld 408576698