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

Unified Diff: src/utils/SkDeferredCanvas.cpp

Issue 571053002: Revert of Picture Recording: fix the performance bottleneck in SkDeferredCanvas::isFullFrame (Closed) Base URL: https://chromium.googlesource.com/skia.git@master
Patch Set: 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 | « include/utils/SkDeferredCanvas.h ('k') | tests/DeferredCanvasTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/utils/SkDeferredCanvas.cpp
diff --git a/src/utils/SkDeferredCanvas.cpp b/src/utils/SkDeferredCanvas.cpp
index cce5dde538333a5a097ca692b0f01728aab4ba16..b46e92a4a09690d60da94d95a634aad43b799f7d 100644
--- a/src/utils/SkDeferredCanvas.cpp
+++ b/src/utils/SkDeferredCanvas.cpp
@@ -526,8 +526,6 @@
void SkDeferredCanvas::init() {
fBitmapSizeThreshold = kDeferredCanvasBitmapSizeThreshold;
fDeferredDrawing = true; // On by default
- fCachedCanvasSize.setEmpty();
- fCachedCanvasSizeDirty = true;
}
void SkDeferredCanvas::setMaxRecordingStorage(size_t maxStorage) {
@@ -589,14 +587,6 @@
bool SkDeferredCanvas::isFreshFrame() const {
return this->getDeferredDevice()->isFreshFrame();
-}
-
-SkISize SkDeferredCanvas::getCanvasSize() const {
- if (fCachedCanvasSizeDirty) {
- fCachedCanvasSize = this->getBaseLayerSize();
- fCachedCanvasSizeDirty = false;
- }
- return fCachedCanvasSize;
}
bool SkDeferredCanvas::hasPendingCommands() const {
@@ -619,7 +609,6 @@
// all pending commands, which can help to seamlessly recover from
// a lost accelerated graphics context.
deferredDevice->setSurface(surface);
- fCachedCanvasSizeDirty = true;
return surface;
}
@@ -643,7 +632,7 @@
bool SkDeferredCanvas::isFullFrame(const SkRect* rect,
const SkPaint* paint) const {
SkCanvas* canvas = this->drawingCanvas();
- SkISize canvasSize = this->getCanvasSize();
+ SkISize canvasSize = this->getDeviceSize();
if (rect) {
if (!canvas->getTotalMatrix().rectStaysRect()) {
return false; // conservative
« no previous file with comments | « include/utils/SkDeferredCanvas.h ('k') | tests/DeferredCanvasTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698