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

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

Issue 10831063: Clip the bitmap for creating the thumbnail on GPU when accelerated compositing is active. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: address comments Created 8 years, 4 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 | chrome/browser/tab_contents/thumbnail_generator.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: chrome/browser/tab_contents/thumbnail_generator.h
diff --git a/chrome/browser/tab_contents/thumbnail_generator.h b/chrome/browser/tab_contents/thumbnail_generator.h
index 70042752f1cc03872da814042ddc508677a2fc61..94c131a02836f39010e28ee04d757bd2976a1831 100644
--- a/chrome/browser/tab_contents/thumbnail_generator.h
+++ b/chrome/browser/tab_contents/thumbnail_generator.h
@@ -45,6 +45,8 @@ class ThumbnailGenerator : public content::NotificationObserver,
// The result of clipping. This can be used to determine if the
// generated thumbnail is good or not.
enum ClipResult {
+ // Clipping is not done yet.
+ kUnprocessed,
// The source image is smaller.
kSourceIsSmaller,
// Wider than tall by twice or more, clip horizontally.
@@ -113,7 +115,7 @@ class ThumbnailGenerator : public content::NotificationObserver,
// Update the thumbnail of the given tab.
void UpdateThumbnail(content::WebContents* web_contents,
const SkBitmap& bitmap,
- const ThumbnailGenerator::ClipResult& clip_result);
+ const ClipResult& clip_result);
// Returns true if we should update the thumbnail of the given URL.
static bool ShouldUpdateThumbnail(Profile* profile,
@@ -141,12 +143,14 @@ class ThumbnailGenerator : public content::NotificationObserver,
// AsyncUpdateThumbnail invocation. This runs on the UI thread.
void UpdateThumbnailWithBitmap(
content::WebContents* web_contents,
+ ClipResult clip_result,
const SkBitmap& bitmap);
// Called when the canvas for generating a thumbnail is ready after the
// AsyncUpdateThumbnail invocation. This runs on the UI thread.
void UpdateThumbnailWithCanvas(
content::WebContents* web_contents,
+ ClipResult clip_result,
skia::PlatformCanvas* temp_canvas,
bool result);
« no previous file with comments | « no previous file | chrome/browser/tab_contents/thumbnail_generator.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698