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

Unified Diff: include/utils/SkDeferredCanvas.h

Issue 545813002: Picture Recording: fix the performance bottleneck in SkDeferredCanvas::isFullFrame (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: a small fix for memory leak in unit test Created 6 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
« no previous file with comments | « no previous file | src/utils/SkDeferredCanvas.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/utils/SkDeferredCanvas.h
diff --git a/include/utils/SkDeferredCanvas.h b/include/utils/SkDeferredCanvas.h
index 907cb91575043b1cfba2f16c1b27e4d6982c0516..5f781f88594e4fb48ece47189ff37bd80dddc5d6 100644
--- a/include/utils/SkDeferredCanvas.h
+++ b/include/utils/SkDeferredCanvas.h
@@ -89,6 +89,11 @@ public:
bool isFreshFrame() const;
/**
+ * Returns canvas's size.
+ */
+ SkISize getCanvasSize() const;
+
+ /**
* Returns true if the canvas has recorded draw commands that have
* not yet been played back.
*/
@@ -250,6 +255,9 @@ private:
size_t fBitmapSizeThreshold;
bool fDeferredDrawing;
+ mutable SkISize fCachedCanvasSize;
+ mutable bool fCachedCanvasSizeDirty;
+
friend class SkDeferredCanvasTester; // for unit testing
typedef SkCanvas INHERITED;
};
« no previous file with comments | « no previous file | src/utils/SkDeferredCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698