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

Unified Diff: third_party/WebKit/Source/platform/graphics/ImageBuffer.h

Issue 1367683002: Make 2D canvas smarter about chosing whether or not to use GPU acceleration (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: added nullptr check + fixed style check errors Created 5 years, 3 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: third_party/WebKit/Source/platform/graphics/ImageBuffer.h
diff --git a/third_party/WebKit/Source/platform/graphics/ImageBuffer.h b/third_party/WebKit/Source/platform/graphics/ImageBuffer.h
index 5d32e199a080e46cc3a8a1745fca83a1ab0ea524..8019b9547c0300777b40fc6eb93638bfc2648da1 100644
--- a/third_party/WebKit/Source/platform/graphics/ImageBuffer.h
+++ b/third_party/WebKit/Source/platform/graphics/ImageBuffer.h
@@ -82,6 +82,7 @@ public:
bool isRecording() const { return m_surface->isRecording(); }
void setHasExpensiveOp() { m_surface->setHasExpensiveOp(); }
bool isExpensiveToPaint() const { return m_surface->isExpensiveToPaint(); }
+ void prepareSurfaceForPaintingIfNeeded() { m_surface->prepareSurfaceForPaintingIfNeeded(); }
bool isSurfaceValid() const;
bool restoreSurface() const;
void didDraw(const FloatRect&) const;
@@ -130,8 +131,8 @@ public:
void notifySurfaceInvalid();
- PassRefPtr<SkImage> newSkImageSnapshot() const;
- PassRefPtr<Image> newImageSnapshot() const;
+ PassRefPtr<SkImage> newSkImageSnapshot(AccelerationHint) const;
+ PassRefPtr<Image> newImageSnapshot(AccelerationHint = PreferNoAcceleration) const;
DisplayItemClient displayItemClient() const { return toDisplayItemClient(this); }
String debugName() const { return "ImageBuffer"; }

Powered by Google App Engine
This is Rietveld 408576698