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

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: Fix for test build issue. 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..1e066323ea29f8bc3489be9fb0b9554d73b36987 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 preferred_format = host->PreferredReadbackFormat();
+ host->CopyFromBackingStore(
+ gfx::Rect(),
host->GetView()->GetViewBounds().size(),
base::Bind(&NavigationEntryScreenshotManager::OnScreenshotTaken,
screenshot_factory_.GetWeakPtr(),
- entry->GetUniqueID()));
+ entry->GetUniqueID()),
+ preferred_format);
}
void NavigationEntryScreenshotManager::SetMinScreenshotIntervalMS(

Powered by Google App Engine
This is Rietveld 408576698