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

Unified Diff: src/core/SkCanvas.cpp

Issue 312553006: remove SkBounder -- unused and unloved (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: address review comments Created 6 years, 7 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 | « src/animator/SkDisplayList.h ('k') | src/core/SkDraw.cpp » ('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 6d2b3b1f20df6dfdb47360fd45b617a9ee10af2c..53dec2ef4c77ec4553cf2471f3fa699ac008c452 100644
--- a/src/core/SkCanvas.cpp
+++ b/src/core/SkCanvas.cpp
@@ -1,4 +1,3 @@
-
/*
* Copyright 2008 The Android Open Source Project
*
@@ -9,7 +8,6 @@
#include "SkCanvas.h"
#include "SkBitmapDevice.h"
-#include "SkBounder.h"
#include "SkDeviceImageFilterProxy.h"
#include "SkDraw.h"
#include "SkDrawFilter.h"
@@ -257,7 +255,6 @@ public:
canvas->updateDeviceCMCache();
fClipStack = &canvas->fClipStack;
- fBounder = canvas->getBounder();
fCurrLayer = canvas->fMCRec->fTopLayer;
fSkipEmptyClips = skipEmptyClips;
}
@@ -282,9 +279,6 @@ public:
SkDEBUGCODE(this->validate();)
fCurrLayer = rec->fNext;
- if (fBounder) {
- fBounder->setClip(fClip);
- }
// fCurrLayer may be NULL now
return true;
@@ -424,23 +418,6 @@ bool AutoDrawLooper::doNext(SkDrawFilter::Type drawType) {
return true;
}
-/* Stack helper for managing a SkBounder. In the destructor, if we were
- given a bounder, we call its commit() method, signifying that we are
- done accumulating bounds for that draw.
-*/
-class SkAutoBounderCommit {
-public:
- SkAutoBounderCommit(SkBounder* bounder) : fBounder(bounder) {}
- ~SkAutoBounderCommit() {
- if (NULL != fBounder) {
- fBounder->commit();
- }
- }
-private:
- SkBounder* fBounder;
-};
-#define SkAutoBounderCommit(...) SK_REQUIRE_LOCAL_VAR(SkAutoBounderCommit)
-
#include "SkColorPriv.h"
////////// macros to place around the internal draw calls //////////////////
@@ -449,14 +426,12 @@ private:
this->predrawNotify(); \
AutoDrawLooper looper(this, paint, true); \
while (looper.next(type)) { \
- SkAutoBounderCommit ac(fBounder); \
SkDrawIter iter(this);
#define LOOPER_BEGIN(paint, type, bounds) \
this->predrawNotify(); \
AutoDrawLooper looper(this, paint, false, bounds); \
while (looper.next(type)) { \
- SkAutoBounderCommit ac(fBounder); \
SkDrawIter iter(this);
#define LOOPER_END }
@@ -464,7 +439,6 @@ private:
////////////////////////////////////////////////////////////////////////////
SkBaseDevice* SkCanvas::init(SkBaseDevice* device) {
- fBounder = NULL;
fCachedLocalClipBounds.setEmpty();
fCachedLocalClipBoundsDirty = true;
fAllowSoftClip = true;
@@ -526,17 +500,11 @@ SkCanvas::~SkCanvas() {
this->internalRestore(); // restore the last, since we're going away
- SkSafeUnref(fBounder);
SkDELETE(fMetaData);
dec_canvas();
}
-SkBounder* SkCanvas::setBounder(SkBounder* bounder) {
- SkRefCnt_SafeAssign(fBounder, bounder);
- return bounder;
-}
-
SkDrawFilter* SkCanvas::getDrawFilter() const {
return fMCRec->fFilter;
}
« no previous file with comments | « src/animator/SkDisplayList.h ('k') | src/core/SkDraw.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698