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

Unified Diff: athena/content/content_proxy.cc

Issue 593503003: Support error handling for Surface readbacks (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Use content namespace to resolve readback params. 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: athena/content/content_proxy.cc
diff --git a/athena/content/content_proxy.cc b/athena/content/content_proxy.cc
index 2c962e7c72c3d46fe8f4592cba5928a50b979140..72c8a8d957c1e097948aee54ddc0d65ccaa528c5 100644
--- a/athena/content/content_proxy.cc
+++ b/athena/content/content_proxy.cc
@@ -157,12 +157,15 @@ void ContentProxy::CreateProxyContent() {
kAlpha_8_SkColorType);
}
-void ContentProxy::OnContentImageRead(bool success, const SkBitmap& bitmap) {
+void ContentProxy::OnContentImageRead(
+ const SkBitmap& bitmap,
+ const content::ReadbackResponse& response) {
// Now we can hide the content. Note that after hiding we are freeing memory
// and if something goes wrong we will end up with an empty page.
HideOriginalContent();
- if (!success || bitmap.empty() || bitmap.isNull())
+ if ((response != content::READBACK_SUCCESS) || bitmap.empty() ||
+ bitmap.isNull())
return;
// While we are encoding the image, we keep the current image as reference

Powered by Google App Engine
This is Rietveld 408576698