remove dead code around replayClips
Bug: skia: Change-Id: I208bf41846265524d86f65de660311199fefc158 Reviewed-on: https://skia-review.googlesource.com/13338 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
This commit is contained in:
parent
0a4b4100c1
commit
1335a0561e
@ -14,6 +14,5 @@ android_framework_defines = [
|
||||
"SK_IGNORE_GPU_DITHER",
|
||||
"SK_SUPPORT_LEGACY_SHADER_ISABITMAP",
|
||||
"SK_SUPPORT_LEGACY_EMBOSSMASKFILTER",
|
||||
"SK_SUPPORT_OBSOLETE_REPLAYCLIP",
|
||||
"SK_SUPPORT_LEGACY_NO_ADDR_PIXELREF",
|
||||
]
|
||||
|
@ -21,9 +21,6 @@ class GrContext;
|
||||
class GrRenderTargetContext;
|
||||
class SkBaseDevice;
|
||||
class SkBitmap;
|
||||
#ifdef SK_SUPPORT_OBSOLETE_REPLAYCLIP
|
||||
class SkCanvasClipVisitor;
|
||||
#endif
|
||||
class SkClipStack;
|
||||
class SkData;
|
||||
class SkDraw;
|
||||
@ -1253,16 +1250,6 @@ public:
|
||||
*/
|
||||
const SkMatrix& getTotalMatrix() const;
|
||||
|
||||
#ifdef SK_SUPPORT_OBSOLETE_REPLAYCLIP
|
||||
typedef SkCanvasClipVisitor ClipVisitor;
|
||||
/**
|
||||
* Replays the clip operations, back to front, that have been applied to
|
||||
* the canvas, calling the appropriate method on the visitor for each
|
||||
* clip. All clips have already been transformed into device space.
|
||||
*/
|
||||
void replayClips(ClipVisitor*) const;
|
||||
#endif
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// don't call
|
||||
@ -1661,14 +1648,4 @@ private:
|
||||
};
|
||||
#define SkAutoCanvasRestore(...) SK_REQUIRE_LOCAL_VAR(SkAutoCanvasRestore)
|
||||
|
||||
#ifdef SK_SUPPORT_OBSOLETE_REPLAYCLIP
|
||||
class SkCanvasClipVisitor {
|
||||
public:
|
||||
virtual ~SkCanvasClipVisitor();
|
||||
virtual void clipRect(const SkRect&, SkClipOp, bool antialias) = 0;
|
||||
virtual void clipRRect(const SkRRect&, SkClipOp, bool antialias) = 0;
|
||||
virtual void clipPath(const SkPath&, SkClipOp, bool antialias) = 0;
|
||||
};
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
@ -1582,19 +1582,6 @@ void SkCanvas::validateClip() const {
|
||||
}
|
||||
#endif
|
||||
|
||||
#ifdef SK_SUPPORT_OBSOLETE_REPLAYCLIP
|
||||
void SkCanvas::replayClips(ClipVisitor* visitor) const {
|
||||
#if 0
|
||||
SkClipStack::B2TIter iter(*fClipStack);
|
||||
const SkClipStack::Element* element;
|
||||
|
||||
while ((element = iter.next()) != nullptr) {
|
||||
element->replay(visitor);
|
||||
}
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
|
||||
bool SkCanvas::androidFramework_isClipAA() const {
|
||||
bool containsAA = false;
|
||||
|
||||
@ -3128,12 +3115,6 @@ int SkCanvas::LayerIter::y() const { return fImpl->getY(); }
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
#ifdef SK_SUPPORT_OBSOLETE_REPLAYCLIP
|
||||
SkCanvasClipVisitor::~SkCanvasClipVisitor() { }
|
||||
#endif
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
static bool supported_for_raster_canvas(const SkImageInfo& info) {
|
||||
switch (info.alphaType()) {
|
||||
case kPremul_SkAlphaType:
|
||||
|
@ -70,27 +70,6 @@ bool SkClipStack::Element::operator== (const Element& element) const {
|
||||
}
|
||||
}
|
||||
|
||||
#ifdef SK_SUPPORT_OBSOLETE_REPLAYCLIP
|
||||
void SkClipStack::Element::replay(SkCanvasClipVisitor* visitor) const {
|
||||
static const SkRect kEmptyRect = { 0, 0, 0, 0 };
|
||||
|
||||
switch (fType) {
|
||||
case kPath_Type:
|
||||
visitor->clipPath(this->getPath(), this->getOp(), this->isAA());
|
||||
break;
|
||||
case kRRect_Type:
|
||||
visitor->clipRRect(this->getRRect(), this->getOp(), this->isAA());
|
||||
break;
|
||||
case kRect_Type:
|
||||
visitor->clipRect(this->getRect(), this->getOp(), this->isAA());
|
||||
break;
|
||||
case kEmpty_Type:
|
||||
visitor->clipRect(kEmptyRect, kIntersect_SkClipOp, false);
|
||||
break;
|
||||
}
|
||||
}
|
||||
#endif
|
||||
|
||||
void SkClipStack::Element::invertShapeFillType() {
|
||||
switch (fType) {
|
||||
case kRect_Type:
|
||||
|
@ -21,10 +21,6 @@
|
||||
#include "GrResourceKey.h"
|
||||
#endif
|
||||
|
||||
#ifdef SK_SUPPORT_OBSOLETE_REPLAYCLIP
|
||||
class SkCanvasClipVisitor;
|
||||
#endif
|
||||
|
||||
// Because a single save/restore state can have multiple clips, this class
|
||||
// stores the stack depth (fSaveCount) and clips (fDeque) separately.
|
||||
// Each clip in fDeque stores the stack state to which it belongs
|
||||
@ -198,13 +194,6 @@ public:
|
||||
return kPath_Type == fType && fPath.get()->isInverseFillType();
|
||||
}
|
||||
|
||||
#ifdef SK_SUPPORT_OBSOLETE_REPLAYCLIP
|
||||
/**
|
||||
* Replay this clip into the visitor.
|
||||
*/
|
||||
void replay(SkCanvasClipVisitor*) const;
|
||||
#endif
|
||||
|
||||
#ifdef SK_DEBUG
|
||||
/**
|
||||
* Dumps the element to SkDebugf. This is intended for Skia development debugging
|
||||
|
@ -149,41 +149,6 @@ int SkDebugCanvas::getCommandAtPoint(int x, int y, int index) {
|
||||
return layer;
|
||||
}
|
||||
|
||||
#ifdef SK_SUPPORT_OBSOLETE_REPLAYCLIP
|
||||
class SkDebugClipVisitor : public SkCanvas::ClipVisitor {
|
||||
public:
|
||||
SkDebugClipVisitor(SkCanvas* canvas) : fCanvas(canvas) {}
|
||||
|
||||
void clipRect(const SkRect& r, SkClipOp, bool doAA) override {
|
||||
SkPaint p;
|
||||
p.setColor(SK_ColorRED);
|
||||
p.setStyle(SkPaint::kStroke_Style);
|
||||
p.setAntiAlias(doAA);
|
||||
fCanvas->drawRect(r, p);
|
||||
}
|
||||
void clipRRect(const SkRRect& rr, SkClipOp, bool doAA) override {
|
||||
SkPaint p;
|
||||
p.setColor(SK_ColorGREEN);
|
||||
p.setStyle(SkPaint::kStroke_Style);
|
||||
p.setAntiAlias(doAA);
|
||||
fCanvas->drawRRect(rr, p);
|
||||
}
|
||||
void clipPath(const SkPath& path, SkClipOp, bool doAA) override {
|
||||
SkPaint p;
|
||||
p.setColor(SK_ColorBLUE);
|
||||
p.setStyle(SkPaint::kStroke_Style);
|
||||
p.setAntiAlias(doAA);
|
||||
fCanvas->drawPath(path, p);
|
||||
}
|
||||
|
||||
protected:
|
||||
SkCanvas* fCanvas;
|
||||
|
||||
private:
|
||||
typedef SkCanvas::ClipVisitor INHERITED;
|
||||
};
|
||||
#endif
|
||||
|
||||
// set up the saveLayer commands so that the active ones
|
||||
// return true in their 'active' method
|
||||
void SkDebugCanvas::markActiveCommands(int index) {
|
||||
@ -290,25 +255,6 @@ void SkDebugCanvas::drawTo(SkCanvas* originalCanvas, int index, int m) {
|
||||
filterCanvas.restore();
|
||||
}
|
||||
|
||||
#ifdef SK_SUPPORT_OBSOLETE_REPLAYCLIP
|
||||
if (fMegaVizMode) {
|
||||
filterCanvas.save();
|
||||
// nuke the CTM
|
||||
filterCanvas.resetMatrix();
|
||||
// turn off clipping
|
||||
if (!windowRect.isEmpty()) {
|
||||
SkRect r = windowRect;
|
||||
r.outset(SK_Scalar1, SK_Scalar1);
|
||||
filterCanvas.clipRect(r, kReplace_SkClipOp);
|
||||
}
|
||||
// visualize existing clips
|
||||
SkDebugClipVisitor visitor(&filterCanvas);
|
||||
|
||||
filterCanvas.replayClips(&visitor);
|
||||
|
||||
filterCanvas.restore();
|
||||
}
|
||||
#endif
|
||||
if (pathOpsMode) {
|
||||
this->resetClipStackData();
|
||||
const SkClipStack* clipStack = nullptr;//HACK filterCanvas.getClipStack();
|
||||
|
Loading…
Reference in New Issue
Block a user