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

Unified Diff: chrome/browser/tab_contents/thumbnail_generator.cc

Issue 10349013: Prevent browser thumbnailer from trying to read from frontbuffer (surface texture) when none exists. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase for landing Created 8 years, 7 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
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_aura.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/thumbnail_generator.cc
diff --git a/chrome/browser/tab_contents/thumbnail_generator.cc b/chrome/browser/tab_contents/thumbnail_generator.cc
index 1834ae748f43b2c278159a99e2bbaa658389e92c..44fcdb752e2f4d525999e31f91973c97c1cca780 100644
--- a/chrome/browser/tab_contents/thumbnail_generator.cc
+++ b/chrome/browser/tab_contents/thumbnail_generator.cc
@@ -443,6 +443,11 @@ void ThumbnailGenerator::UpdateThumbnailIfNecessary(
Profile* profile =
Profile::FromBrowserContext(web_contents->GetBrowserContext());
history::TopSites* top_sites = profile->GetTopSites();
+ bool surface_available =
+ web_contents->GetRenderWidgetHostView()->IsSurfaceAvailableForCopy();
+ // Skip if we can't update the thumbnail.
+ if (!surface_available)
+ return;
// Skip if we don't need to update the thumbnail.
if (!ShouldUpdateThumbnail(profile, top_sites, url))
return;
« no previous file with comments | « no previous file | content/browser/renderer_host/render_widget_host_view_aura.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698