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

Unified Diff: chrome/browser/thumbnails/thumbnail_tab_helper.cc

Issue 259523008: Remove RenderWidgetHost::GetSnapshotFromRenderer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: getsnapshotfromrenderer: rm Created 6 years, 8 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 1c382b5651aa2dc14a89f01146a6d3ca688d3d16..43fba1a2bf29fe956081bb6fe59b762918733dc8 100644
--- a/chrome/browser/thumbnails/thumbnail_tab_helper.cc
+++ b/chrome/browser/thumbnails/thumbnail_tab_helper.cc
@@ -75,13 +75,6 @@ void ProcessCapturedBitmap(scoped_refptr<ThumbnailingContext> context,
algorithm->ProcessBitmap(context, base::Bind(&UpdateThumbnail), bitmap);
}
-void GotSnapshotFromRenderer(base::Callback<void(const SkBitmap&)> callback,
- bool success,
- const SkBitmap& bitmap) {
- if (success)
- callback.Run(bitmap);
-}
-
void AsyncProcessThumbnail(content::WebContents* web_contents,
scoped_refptr<ThumbnailingContext> context,
scoped_refptr<ThumbnailingAlgorithm> algorithm) {
@@ -90,18 +83,8 @@ void AsyncProcessThumbnail(content::WebContents* web_contents,
content::RenderWidgetHostView* view = render_widget_host->GetView();
if (!view)
return;
- if (!view->IsSurfaceAvailableForCopy()) {
- // On Windows XP and possibly due to driver issues, neither the backing
- // store nor the compositing surface is available in the browser when
- // accelerated compositing is active, so ask the renderer to send a snapshot
- // for creating the thumbnail.
- render_widget_host->GetSnapshotFromRenderer(
- gfx::Rect(),
- base::Bind(GotSnapshotFromRenderer, base::Bind(
- &ThumbnailingAlgorithm::ProcessBitmap,
- algorithm, context, base::Bind(&UpdateThumbnail))));
+ if (!view->IsSurfaceAvailableForCopy())
return;
- }
gfx::Rect copy_rect = gfx::Rect(view->GetViewBounds().size());
// Clip the pixels that will commonly hold a scrollbar, which looks bad in
« no previous file with comments | « chrome/browser/extensions/api/capture_web_contents_function.cc ('k') | chrome/browser/ui/pdf/pdf_browsertest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698