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

Unified Diff: src/pipe/SkGPipeWrite.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/SkRecorder.cpp ('k') | src/utils/SkDeferredCanvas.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/pipe/SkGPipeWrite.cpp
diff --git a/src/pipe/SkGPipeWrite.cpp b/src/pipe/SkGPipeWrite.cpp
index 9b73c6340ea70e4b28db9502ac0ab021b897ca0d..9f56f6f5498397bb896e455593a1d36d7b75dcba 100644
--- a/src/pipe/SkGPipeWrite.cpp
+++ b/src/pipe/SkGPipeWrite.cpp
@@ -232,7 +232,6 @@ public:
}
// overrides from SkCanvas
- virtual bool isDrawingToLayer() const SK_OVERRIDE;
virtual void drawPaint(const SkPaint& paint) SK_OVERRIDE;
virtual void drawPoints(PointMode, size_t count, const SkPoint pts[],
const SkPaint&) SK_OVERRIDE;
@@ -299,11 +298,7 @@ private:
void recordScale(const SkMatrix&);
void recordConcat(const SkMatrix&);
- enum {
- kNoSaveLayer = -1,
- };
SkNamedFactorySet* fFactorySet;
- int fFirstSaveLayerStackLevel;
SkBitmapHeap* fBitmapHeap;
SkGPipeController* fController;
SkWriter32& fWriter;
@@ -448,7 +443,6 @@ SkGPipeCanvas::SkGPipeCanvas(SkGPipeController* controller,
fDone = false;
fBlockSize = 0; // need first block from controller
fBytesNotified = 0;
- fFirstSaveLayerStackLevel = kNoSaveLayer;
sk_bzero(fCurrFlatIndex, sizeof(fCurrFlatIndex));
// Tell the reader the appropriate flags to use.
@@ -556,10 +550,6 @@ SkCanvas::SaveLayerStrategy SkGPipeCanvas::willSaveLayer(const SkRect* bounds, c
}
}
- if (kNoSaveLayer == fFirstSaveLayerStackLevel){
- fFirstSaveLayerStackLevel = this->getSaveCount();
- }
-
this->INHERITED::willSaveLayer(bounds, paint, saveFlags);
// we don't create a layer
return kNoLayer_SaveLayerStrategy;
@@ -571,17 +561,9 @@ void SkGPipeCanvas::willRestore() {
this->writeOp(kRestore_DrawOp);
}
- if (this->getSaveCount() - 1 == fFirstSaveLayerStackLevel){
- fFirstSaveLayerStackLevel = kNoSaveLayer;
- }
-
this->INHERITED::willRestore();
}
-bool SkGPipeCanvas::isDrawingToLayer() const {
- return kNoSaveLayer != fFirstSaveLayerStackLevel;
-}
-
void SkGPipeCanvas::recordTranslate(const SkMatrix& m) {
if (this->needOpBytes(2 * sizeof(SkScalar))) {
this->writeOp(kTranslate_DrawOp);
« no previous file with comments | « src/core/SkRecorder.cpp ('k') | src/utils/SkDeferredCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698