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

Unified Diff: src/core/SkPictureRecord.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 | « src/core/SkPictureRecord.h ('k') | src/core/SkRecorder.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkPictureRecord.cpp
diff --git a/src/core/SkPictureRecord.cpp b/src/core/SkPictureRecord.cpp
index eec6bc0bcb2034eae08194ef84ae3c4f879a594d..6448d1eb5774bab4a58717d83be42c5634b59621 100644
--- a/src/core/SkPictureRecord.cpp
+++ b/src/core/SkPictureRecord.cpp
@@ -31,7 +31,6 @@ static const uint32_t kSaveLayerWithBoundsSize = 4 * kUInt32Size + sizeof(SkRect
SkPictureRecord::SkPictureRecord(const SkISize& dimensions, uint32_t flags)
: INHERITED(dimensions.width(), dimensions.height())
- , fFirstSavedLayerIndex(kNoSavedLayerIndex)
, fRecordFlags(flags)
, fInitialSaveCount(kNoInitialSave) {
}
@@ -151,9 +150,6 @@ SkCanvas::SaveLayerStrategy SkPictureRecord::willSaveLayer(const SkRect* bounds,
// from a clip entry.
fRestoreOffsetStack.push(-(int32_t)fWriter.bytesWritten());
this->recordSaveLayer(bounds, paint, flags);
- if (kNoSavedLayerIndex == fFirstSavedLayerIndex) {
- fFirstSavedLayerIndex = fRestoreOffsetStack.count();
- }
this->INHERITED::willSaveLayer(bounds, paint, flags);
/* No need for a (potentially very big) layer which we don't actually need
@@ -187,10 +183,6 @@ void SkPictureRecord::recordSaveLayer(const SkRect* bounds, const SkPaint* paint
this->validate(initialOffset, size);
}
-bool SkPictureRecord::isDrawingToLayer() const {
- return fFirstSavedLayerIndex != kNoSavedLayerIndex;
-}
-
#ifdef SK_DEBUG
/*
* Read the op code from 'offset' in 'writer' and extract the size too.
@@ -221,10 +213,6 @@ void SkPictureRecord::willRestore() {
return;
}
- if (fRestoreOffsetStack.count() == fFirstSavedLayerIndex) {
- fFirstSavedLayerIndex = kNoSavedLayerIndex;
- }
-
this->recordRestore();
fRestoreOffsetStack.pop();
« no previous file with comments | « src/core/SkPictureRecord.h ('k') | src/core/SkRecorder.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698