aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--include/core/SkDevice.h14
-rw-r--r--include/gpu/GrContext.h12
-rw-r--r--include/gpu/SkGpuDevice.h9
-rw-r--r--src/core/SkCanvas.cpp16
-rw-r--r--src/gpu/GrClipMaskManager.h11
-rw-r--r--src/gpu/GrContext.cpp8
-rw-r--r--src/gpu/GrDrawTarget.h3
-rw-r--r--src/gpu/GrGpu.h7
8 files changed, 1 insertions, 79 deletions
diff --git a/include/core/SkDevice.h b/include/core/SkDevice.h
index 688ce8ef40..184fb6f3bd 100644
--- a/include/core/SkDevice.h
+++ b/include/core/SkDevice.h
@@ -353,20 +353,6 @@ private:
friend class SkDeviceFilteredPaint;
friend class DeviceImageFilterProxy;
- /**
- * postSave is called by SkCanvas to inform the device that it has
- * just completed a save operation. This allows derived
- * classes to initialize their state-dependent caches.
- */
- virtual void postSave() {};
-
- /**
- * preRestore is called by SkCanvas right before it executes a restore
- * operation. As the partner of postSave, it allows
- * derived classes to clear their state-dependent caches.
- */
- virtual void preRestore() {};
-
// just called by SkCanvas when built as a layer
void setOrigin(int x, int y) { fOrigin.set(x, y); }
// just called by SkCanvas for saveLayer
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h
index f5b44bf628..d718637e04 100644
--- a/include/gpu/GrContext.h
+++ b/include/gpu/GrContext.h
@@ -683,18 +683,6 @@ public:
void unlockStencilBuffer(GrResourceEntry* sbEntry);
GrStencilBuffer* findStencilBuffer(int width, int height, int sampleCnt);
- /*
- * postClipPush acts as a hint to this and lower-level classes (e.g.,
- * GrGpu) that the clip stack has changed.
- */
- virtual void postClipPush();
-
- /*
- * preClipPop acts as a hint that the clip stack has been restored to an
- * earlier state.
- */
- virtual void preClipPop();
-
GrPathRenderer* getPathRenderer(const SkPath& path,
GrPathFill fill,
const GrDrawTarget* target,
diff --git a/include/gpu/SkGpuDevice.h b/include/gpu/SkGpuDevice.h
index 124e7846fa..40444a975c 100644
--- a/include/gpu/SkGpuDevice.h
+++ b/include/gpu/SkGpuDevice.h
@@ -144,14 +144,7 @@ private:
// used by createCompatibleDevice
SkGpuDevice(GrContext*, GrTexture* texture, TexCache, bool needClear);
- // overrides from SkDevice
- virtual void postSave() SK_OVERRIDE {
- fContext->postClipPush();
- }
- virtual void preRestore() SK_OVERRIDE {
- fContext->preClipPop();
- }
-
+ // override from SkDevice
virtual SkDevice* onCreateCompatibleDevice(SkBitmap::Config config,
int width, int height,
bool isOpaque,
diff --git a/src/core/SkCanvas.cpp b/src/core/SkCanvas.cpp
index 9ba76215e1..7d1ecbf8e9 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -705,14 +705,6 @@ int SkCanvas::internalSave(SaveFlags flags) {
fClipStack.save();
SkASSERT(fClipStack.getSaveCount() == this->getSaveCount() - 1);
- for (DeviceCM* curLayer = fMCRec->fTopLayer;
- curLayer;
- curLayer = curLayer->fNext) {
- if (NULL != curLayer->fDevice) {
- curLayer->fDevice->postSave();
- }
- }
-
return saveCount;
}
@@ -883,14 +875,6 @@ void SkCanvas::restore() {
void SkCanvas::internalRestore() {
SkASSERT(fMCStack.count() != 0);
- for (DeviceCM* curLayer = fMCRec->fTopLayer;
- curLayer;
- curLayer = curLayer->fNext) {
- if (NULL != curLayer->fDevice) {
- curLayer->fDevice->preRestore();
- }
- }
-
fDeviceCMDirty = true;
fLocalBoundsCompareTypeDirty = true;
fLocalBoundsCompareTypeDirtyBW = true;
diff --git a/src/gpu/GrClipMaskManager.h b/src/gpu/GrClipMaskManager.h
index 00ca642262..bb597ba63f 100644
--- a/src/gpu/GrClipMaskManager.h
+++ b/src/gpu/GrClipMaskManager.h
@@ -297,17 +297,6 @@ public:
}
}
- void postClipPush() {
- // TODO: make sure that, if the clip stack is unaltered, the
- // prior clip mask is reused (i.e., a push w/ no change to the
- // clip stack)
- fAACache.push();
- }
-
- void preClipPop() {
- fAACache.pop();
- }
-
void setContext(GrContext* context) {
fAACache.setContext(context);
}
diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp
index 076079928b..6326f4d24e 100644
--- a/src/gpu/GrContext.cpp
+++ b/src/gpu/GrContext.cpp
@@ -1973,12 +1973,4 @@ GrTexture* GrContext::applyMorphology(GrTexture* srcTexture,
return srcTexture;
}
-void GrContext::postClipPush() {
- fGpu->postClipPush();
-}
-
-void GrContext::preClipPop() {
- fGpu->preClipPop();
-};
-
///////////////////////////////////////////////////////////////////////////////
diff --git a/src/gpu/GrDrawTarget.h b/src/gpu/GrDrawTarget.h
index 9b9be64832..66256cf877 100644
--- a/src/gpu/GrDrawTarget.h
+++ b/src/gpu/GrDrawTarget.h
@@ -191,9 +191,6 @@ public:
static bool StageUsesTexCoords(GrVertexLayout layout, int stage);
- virtual void postClipPush() {};
- virtual void preClipPop() {};
-
private:
static const int TEX_COORD_BIT_CNT = GrDrawState::kNumStages *
GrDrawState::kMaxTexCoords;
diff --git a/src/gpu/GrGpu.h b/src/gpu/GrGpu.h
index 5c21b55edf..f502dba23d 100644
--- a/src/gpu/GrGpu.h
+++ b/src/gpu/GrGpu.h
@@ -362,13 +362,6 @@ public:
// clipping.
};
- virtual void postClipPush() SK_OVERRIDE {
- fClipMaskManager.postClipPush();
- }
- virtual void preClipPop() SK_OVERRIDE {
- fClipMaskManager.preClipPop();
- }
-
protected:
enum DrawType {
kDrawPoints_DrawType,