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

Unified Diff: src/core/SkCanvas.cpp

Issue 803913005: Remove SkCanvas::isDrawingToLayer (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: init fix Created 6 years 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') | src/core/SkPictureRecord.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkCanvas.cpp
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index a72b58c7cbc8d407b34b0796119bf4a66dcb91bd..751fabd6664ce9618244900d299b7860886cfa87 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -416,7 +416,6 @@ SkBaseDevice* SkCanvas::init(SkBaseDevice* device, InitFlags flags) {
fAllowSimplifyClip = false;
fDeviceCMDirty = true;
fSaveCount = 1;
- fSaveLayerCount = 0;
fMetaData = NULL;
fMCRec = (MCRec*)fMCStack.push_back();
@@ -527,7 +526,6 @@ SkCanvas::SkCanvas(const SkBitmap& bitmap)
SkCanvas::~SkCanvas() {
// free up the contents of our deque
this->restoreToCount(1); // restore everything but the last
- SkASSERT(0 == fSaveLayerCount);
this->internalRestore(); // restore the last, since we're going away
@@ -990,8 +988,6 @@ void SkCanvas::internalSaveLayer(const SkRect* bounds, const SkPaint* paint, Sav
layer->fNext = fMCRec->fTopLayer;
fMCRec->fLayer = layer;
fMCRec->fTopLayer = layer; // this field is NOT an owner of layer
-
- fSaveLayerCount += 1;
}
int SkCanvas::saveLayerAlpha(const SkRect* bounds, U8CPU alpha) {
@@ -1038,18 +1034,11 @@ void SkCanvas::internalRestore() {
layer->fPaint);
// reset this, since internalDrawDevice will have set it to true
fDeviceCMDirty = true;
-
- SkASSERT(fSaveLayerCount > 0);
- fSaveLayerCount -= 1;
}
SkDELETE(layer);
}
}
-bool SkCanvas::isDrawingToLayer() const {
- return fSaveLayerCount > 0;
-}
-
SkSurface* SkCanvas::newSurface(const SkImageInfo& info, const SkSurfaceProps* props) {
if (NULL == props) {
props = &fProps;
« no previous file with comments | « include/utils/SkDeferredCanvas.h ('k') | src/core/SkPictureRecord.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698