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

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: 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: athena/content/content_proxy.cc
diff --git a/athena/content/content_proxy.cc b/athena/content/content_proxy.cc
index 2c962e7c72c3d46fe8f4592cba5928a50b979140..ca089b389937863ecce9814ab7cbb92c87e46021 100644
--- a/athena/content/content_proxy.cc
+++ b/athena/content/content_proxy.cc
@@ -157,12 +157,14 @@ void ContentProxy::CreateProxyContent() {
kAlpha_8_SkColorType);
}
-void ContentProxy::OnContentImageRead(bool success, const SkBitmap& bitmap) {
+void ContentProxy::OnContentImageRead(const SkBitmap& bitmap,
+ 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