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

Unified Diff: content/browser/frame_host/navigation_entry_screenshot_manager.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/frame_host/navigation_entry_screenshot_manager.cc
diff --git a/content/browser/frame_host/navigation_entry_screenshot_manager.cc b/content/browser/frame_host/navigation_entry_screenshot_manager.cc
index 162cfb790439c149272824da5ab282eff8a0d801..780f3c049caa1648980c237e2d919e89723b4b1c 100644
--- a/content/browser/frame_host/navigation_entry_screenshot_manager.cc
+++ b/content/browser/frame_host/navigation_entry_screenshot_manager.cc
@@ -135,9 +135,10 @@ void NavigationEntryScreenshotManager::SetMinScreenshotIntervalMS(
min_screenshot_interval_ms_ = interval_ms;
}
-void NavigationEntryScreenshotManager::OnScreenshotTaken(int unique_id,
- bool success,
- const SkBitmap& bitmap) {
+void NavigationEntryScreenshotManager::OnScreenshotTaken(
+ int unique_id,
+ const SkBitmap& bitmap,
+ ReadbackResponse response) {
NavigationEntryImpl* entry = NULL;
int entry_count = owner_->GetEntryCount();
for (int i = 0; i < entry_count; ++i) {
@@ -153,7 +154,7 @@ void NavigationEntryScreenshotManager::OnScreenshotTaken(int unique_id,
return;
}
- if (!success || bitmap.empty() || bitmap.isNull()) {
+ if ((response != READBACK_SUCCESS) || bitmap.empty() || bitmap.isNull()) {
if (!ClearScreenshot(entry))
OnScreenshotSet(entry);
return;

Powered by Google App Engine
This is Rietveld 408576698