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

Unified Diff: chrome/browser/extensions/api/capture_web_contents_function.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/extensions/api/capture_web_contents_function.cc
diff --git a/chrome/browser/extensions/api/capture_web_contents_function.cc b/chrome/browser/extensions/api/capture_web_contents_function.cc
index 8e7fd7cbf1ba968278132e2dd600b12555f54115..51922addb2c4dacac7967d47ff2e4f13e467fa2e 100644
--- a/chrome/browser/extensions/api/capture_web_contents_function.cc
+++ b/chrome/browser/extensions/api/capture_web_contents_function.cc
@@ -72,11 +72,14 @@ bool CaptureWebContentsFunction::RunImpl() {
OnCaptureFailure(FAILURE_REASON_VIEW_INVISIBLE);
return false;
}
+ SkBitmap::Config preferred_format =
+ render_view_host->PreferredReadbackFormat();
render_view_host->CopyFromBackingStore(
gfx::Rect(),
view->GetViewBounds().size(),
base::Bind(&CaptureWebContentsFunction::CopyFromBackingStoreComplete,
- this));
+ this),
+ preferred_format);
piman 2014/03/10 18:27:20 The receiving code only accepts 8888.
sivag 2014/03/11 14:41:50 Done.
return true;
}
« no previous file with comments | « no previous file | chrome/browser/thumbnails/thumbnail_tab_helper.cc » ('j') | chrome/browser/thumbnails/thumbnail_tab_helper.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698