add guard for obsolete (non-functioning) replayClips
replayClips has been disabled (broken) for a while. This CL just attempts to hide the api (will remove once android's callsite is removed) Bug: skia: Change-Id: I35b412addfc0a08ea888a62609888b9b54dce2a6 Reviewed-on: https://skia-review.googlesource.com/11401 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
This commit is contained in:
parent
e78b7259c3
commit
93b1b4feda
@ -14,4 +14,5 @@ android_framework_defines = [
|
|||||||
"SK_IGNORE_GPU_DITHER",
|
"SK_IGNORE_GPU_DITHER",
|
||||||
"SK_SUPPORT_LEGACY_SHADER_ISABITMAP",
|
"SK_SUPPORT_LEGACY_SHADER_ISABITMAP",
|
||||||
"SK_SUPPORT_LEGACY_EMBOSSMASKFILTER",
|
"SK_SUPPORT_LEGACY_EMBOSSMASKFILTER",
|
||||||
|
"SK_SUPPORT_OBSOLETE_REPLAYCLIP",
|
||||||
]
|
]
|
||||||
|
@ -21,7 +21,9 @@ class GrContext;
|
|||||||
class GrRenderTargetContext;
|
class GrRenderTargetContext;
|
||||||
class SkBaseDevice;
|
class SkBaseDevice;
|
||||||
class SkBitmap;
|
class SkBitmap;
|
||||||
|
#ifdef SK_SUPPORT_OBSOLETE_REPLAYCLIP
|
||||||
class SkCanvasClipVisitor;
|
class SkCanvasClipVisitor;
|
||||||
|
#endif
|
||||||
class SkClipStack;
|
class SkClipStack;
|
||||||
class SkData;
|
class SkData;
|
||||||
class SkDraw;
|
class SkDraw;
|
||||||
@ -1281,6 +1283,7 @@ public:
|
|||||||
*/
|
*/
|
||||||
const SkMatrix& getTotalMatrix() const;
|
const SkMatrix& getTotalMatrix() const;
|
||||||
|
|
||||||
|
#ifdef SK_SUPPORT_OBSOLETE_REPLAYCLIP
|
||||||
typedef SkCanvasClipVisitor ClipVisitor;
|
typedef SkCanvasClipVisitor ClipVisitor;
|
||||||
/**
|
/**
|
||||||
* Replays the clip operations, back to front, that have been applied to
|
* Replays the clip operations, back to front, that have been applied to
|
||||||
@ -1288,6 +1291,7 @@ public:
|
|||||||
* clip. All clips have already been transformed into device space.
|
* clip. All clips have already been transformed into device space.
|
||||||
*/
|
*/
|
||||||
void replayClips(ClipVisitor*) const;
|
void replayClips(ClipVisitor*) const;
|
||||||
|
#endif
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
@ -1687,6 +1691,7 @@ private:
|
|||||||
};
|
};
|
||||||
#define SkAutoCanvasRestore(...) SK_REQUIRE_LOCAL_VAR(SkAutoCanvasRestore)
|
#define SkAutoCanvasRestore(...) SK_REQUIRE_LOCAL_VAR(SkAutoCanvasRestore)
|
||||||
|
|
||||||
|
#ifdef SK_SUPPORT_OBSOLETE_REPLAYCLIP
|
||||||
class SkCanvasClipVisitor {
|
class SkCanvasClipVisitor {
|
||||||
public:
|
public:
|
||||||
virtual ~SkCanvasClipVisitor();
|
virtual ~SkCanvasClipVisitor();
|
||||||
@ -1694,5 +1699,6 @@ public:
|
|||||||
virtual void clipRRect(const SkRRect&, SkClipOp, bool antialias) = 0;
|
virtual void clipRRect(const SkRRect&, SkClipOp, bool antialias) = 0;
|
||||||
virtual void clipPath(const SkPath&, SkClipOp, bool antialias) = 0;
|
virtual void clipPath(const SkPath&, SkClipOp, bool antialias) = 0;
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1573,6 +1573,7 @@ void SkCanvas::validateClip() const {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef SK_SUPPORT_OBSOLETE_REPLAYCLIP
|
||||||
void SkCanvas::replayClips(ClipVisitor* visitor) const {
|
void SkCanvas::replayClips(ClipVisitor* visitor) const {
|
||||||
#if 0
|
#if 0
|
||||||
SkClipStack::B2TIter iter(*fClipStack);
|
SkClipStack::B2TIter iter(*fClipStack);
|
||||||
@ -1583,6 +1584,7 @@ void SkCanvas::replayClips(ClipVisitor* visitor) const {
|
|||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
bool SkCanvas::androidFramework_isClipAA() const {
|
bool SkCanvas::androidFramework_isClipAA() const {
|
||||||
bool containsAA = false;
|
bool containsAA = false;
|
||||||
@ -3127,7 +3129,9 @@ int SkCanvas::LayerIter::y() const { return fImpl->getY(); }
|
|||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
#ifdef SK_SUPPORT_OBSOLETE_REPLAYCLIP
|
||||||
SkCanvasClipVisitor::~SkCanvasClipVisitor() { }
|
SkCanvasClipVisitor::~SkCanvasClipVisitor() { }
|
||||||
|
#endif
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
||||||
|
@ -70,6 +70,7 @@ bool SkClipStack::Element::operator== (const Element& element) const {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef SK_SUPPORT_OBSOLETE_REPLAYCLIP
|
||||||
void SkClipStack::Element::replay(SkCanvasClipVisitor* visitor) const {
|
void SkClipStack::Element::replay(SkCanvasClipVisitor* visitor) const {
|
||||||
static const SkRect kEmptyRect = { 0, 0, 0, 0 };
|
static const SkRect kEmptyRect = { 0, 0, 0, 0 };
|
||||||
|
|
||||||
@ -88,6 +89,7 @@ void SkClipStack::Element::replay(SkCanvasClipVisitor* visitor) const {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
void SkClipStack::Element::invertShapeFillType() {
|
void SkClipStack::Element::invertShapeFillType() {
|
||||||
switch (fType) {
|
switch (fType) {
|
||||||
|
@ -21,7 +21,9 @@
|
|||||||
#include "GrResourceKey.h"
|
#include "GrResourceKey.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
#ifdef SK_SUPPORT_OBSOLETE_REPLAYCLIP
|
||||||
class SkCanvasClipVisitor;
|
class SkCanvasClipVisitor;
|
||||||
|
#endif
|
||||||
|
|
||||||
// Because a single save/restore state can have multiple clips, this class
|
// Because a single save/restore state can have multiple clips, this class
|
||||||
// stores the stack depth (fSaveCount) and clips (fDeque) separately.
|
// stores the stack depth (fSaveCount) and clips (fDeque) separately.
|
||||||
@ -196,10 +198,12 @@ public:
|
|||||||
return kPath_Type == fType && fPath.get()->isInverseFillType();
|
return kPath_Type == fType && fPath.get()->isInverseFillType();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef SK_SUPPORT_OBSOLETE_REPLAYCLIP
|
||||||
/**
|
/**
|
||||||
* Replay this clip into the visitor.
|
* Replay this clip into the visitor.
|
||||||
*/
|
*/
|
||||||
void replay(SkCanvasClipVisitor*) const;
|
void replay(SkCanvasClipVisitor*) const;
|
||||||
|
#endif
|
||||||
|
|
||||||
#ifdef SK_DEBUG
|
#ifdef SK_DEBUG
|
||||||
/**
|
/**
|
||||||
|
@ -275,24 +275,6 @@ private:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
class Canvas2CanvasClipVisitor : public SkCanvas::ClipVisitor {
|
|
||||||
public:
|
|
||||||
Canvas2CanvasClipVisitor(SkCanvas* target) : fTarget(target) {}
|
|
||||||
|
|
||||||
void clipRect(const SkRect& r, SkClipOp op, bool aa) override {
|
|
||||||
fTarget->clipRect(r, op, aa);
|
|
||||||
}
|
|
||||||
void clipRRect(const SkRRect& r, SkClipOp op, bool aa) override {
|
|
||||||
fTarget->clipRRect(r, op, aa);
|
|
||||||
}
|
|
||||||
void clipPath(const SkPath& p, SkClipOp op, bool aa) override {
|
|
||||||
fTarget->clipPath(p, op, aa);
|
|
||||||
}
|
|
||||||
|
|
||||||
private:
|
|
||||||
SkCanvas* fTarget;
|
|
||||||
};
|
|
||||||
|
|
||||||
// Format strings that describe the test context. The %s token is where
|
// Format strings that describe the test context. The %s token is where
|
||||||
// the name of the test step is inserted. The context is required for
|
// the name of the test step is inserted. The context is required for
|
||||||
// disambiguating the error in the case of failures that are reported in
|
// disambiguating the error in the case of failures that are reported in
|
||||||
|
@ -149,6 +149,7 @@ int SkDebugCanvas::getCommandAtPoint(int x, int y, int index) {
|
|||||||
return layer;
|
return layer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef SK_SUPPORT_OBSOLETE_REPLAYCLIP
|
||||||
class SkDebugClipVisitor : public SkCanvas::ClipVisitor {
|
class SkDebugClipVisitor : public SkCanvas::ClipVisitor {
|
||||||
public:
|
public:
|
||||||
SkDebugClipVisitor(SkCanvas* canvas) : fCanvas(canvas) {}
|
SkDebugClipVisitor(SkCanvas* canvas) : fCanvas(canvas) {}
|
||||||
@ -181,6 +182,7 @@ protected:
|
|||||||
private:
|
private:
|
||||||
typedef SkCanvas::ClipVisitor INHERITED;
|
typedef SkCanvas::ClipVisitor INHERITED;
|
||||||
};
|
};
|
||||||
|
#endif
|
||||||
|
|
||||||
// set up the saveLayer commands so that the active ones
|
// set up the saveLayer commands so that the active ones
|
||||||
// return true in their 'active' method
|
// return true in their 'active' method
|
||||||
@ -288,6 +290,7 @@ void SkDebugCanvas::drawTo(SkCanvas* originalCanvas, int index, int m) {
|
|||||||
filterCanvas.restore();
|
filterCanvas.restore();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#ifdef SK_SUPPORT_OBSOLETE_REPLAYCLIP
|
||||||
if (fMegaVizMode) {
|
if (fMegaVizMode) {
|
||||||
filterCanvas.save();
|
filterCanvas.save();
|
||||||
// nuke the CTM
|
// nuke the CTM
|
||||||
@ -305,6 +308,7 @@ void SkDebugCanvas::drawTo(SkCanvas* originalCanvas, int index, int m) {
|
|||||||
|
|
||||||
filterCanvas.restore();
|
filterCanvas.restore();
|
||||||
}
|
}
|
||||||
|
#endif
|
||||||
if (pathOpsMode) {
|
if (pathOpsMode) {
|
||||||
this->resetClipStackData();
|
this->resetClipStackData();
|
||||||
const SkClipStack* clipStack = nullptr;//HACK filterCanvas.getClipStack();
|
const SkClipStack* clipStack = nullptr;//HACK filterCanvas.getClipStack();
|
||||||
|
Loading…
Reference in New Issue
Block a user