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

Unified Diff: content/browser/frame_host/navigation_entry_screenshot_manager.cc

Issue 188633002: Query the preferred readback config in CopyFromBackingStore (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Add Preferred format support for all functions. Created 6 years, 9 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/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 b2bf429dc0a6c66a34266a5267ed62267a8aacb6..dcae6c8f23ecdb48612e4e0dbf8ca32a8ad5326a 100644
--- a/content/browser/frame_host/navigation_entry_screenshot_manager.cc
+++ b/content/browser/frame_host/navigation_entry_screenshot_manager.cc
@@ -134,11 +134,14 @@ void NavigationEntryScreenshotManager::TakeScreenshotImpl(
NavigationEntryImpl* entry) {
DCHECK(host && host->GetView());
DCHECK(entry);
- host->CopyFromBackingStore(gfx::Rect(),
+ SkBitmap::Config preffered_format = host->PreferredReadbackFormat();
piman 2014/03/10 18:27:20 typo: preferred_format.
sivag 2014/03/11 14:41:50 Done.
+ host->CopyFromBackingStore(
+ gfx::Rect(),
host->GetView()->GetViewBounds().size(),
base::Bind(&NavigationEntryScreenshotManager::OnScreenshotTaken,
screenshot_factory_.GetWeakPtr(),
- entry->GetUniqueID()));
+ entry->GetUniqueID()),
+ preffered_format);
}
void NavigationEntryScreenshotManager::SetMinScreenshotIntervalMS(

Powered by Google App Engine
This is Rietveld 408576698