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

Unified Diff: chrome/browser/thumbnails/thumbnail_tab_helper.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: chrome/browser/thumbnails/thumbnail_tab_helper.cc
diff --git a/chrome/browser/thumbnails/thumbnail_tab_helper.cc b/chrome/browser/thumbnails/thumbnail_tab_helper.cc
index 0b062794e300d47144d1363042e8c132c28852e3..a57bc32eae386ee6b6b4ddfc148750e16cd0090c 100644
--- a/chrome/browser/thumbnails/thumbnail_tab_helper.cc
+++ b/chrome/browser/thumbnails/thumbnail_tab_helper.cc
@@ -118,11 +118,13 @@ void AsyncProcessThumbnail(content::WebContents* web_contents,
ui::GetScaleFactorForNativeView(view->GetNativeView()),
&copy_rect,
&context->requested_copy_size);
-
+ SkBitmap::Config preferred_format =
+ render_widget_host->PreferredReadbackFormat();
render_widget_host->CopyFromBackingStore(
copy_rect,
context->requested_copy_size,
- base::Bind(&ProcessCapturedBitmap, context, algorithm));
+ base::Bind(&ProcessCapturedBitmap, context, algorithm),
+ preferred_format);
piman 2014/03/10 18:27:20 I believe the receiving path expects 8888 bitmaps.
sivag 2014/03/11 14:41:50 Done.
}
} // namespace

Powered by Google App Engine
This is Rietveld 408576698