hide getClipStack
BUG=skia:6122 Change-Id: I0aca03b349541174ced019f4f2116e0015c980c4 Reviewed-on: https://skia-review.googlesource.com/7097 Reviewed-by: Florin Malita <fmalita@chromium.org> Commit-Queue: Mike Reed <reed@google.com>
This commit is contained in:
parent
d32b8177da
commit
46784be70c
@ -16,4 +16,5 @@ android_framework_defines = [
|
||||
"SK_SUPPORT_LEGACY_SHADER_ISABITMAP",
|
||||
"SK_SUPPORT_LEGACY_EMBOSSMASKFILTER",
|
||||
"SK_SUPPORT_EXOTIC_CLIPOPS",
|
||||
"SK_SUPPORT_LEGACY_CANVAS_GETCLIPSTACK",
|
||||
]
|
||||
|
@ -539,7 +539,6 @@ public:
|
||||
*/
|
||||
virtual bool getClipDeviceBounds(SkIRect* bounds) const;
|
||||
|
||||
|
||||
/** Fill the entire canvas' bitmap (restricted to the current clip) with the
|
||||
specified ARGB color, using the specified mode.
|
||||
@param a the alpha component (0..255) of the color to fill the canvas
|
||||
@ -1289,15 +1288,6 @@ public:
|
||||
*/
|
||||
const SkMatrix& getTotalMatrix() const;
|
||||
|
||||
/** Return the clip stack. The clip stack stores all the individual
|
||||
* clips organized by the save/restore frame in which they were
|
||||
* added.
|
||||
* @return the current clip stack ("list" of individual clip elements)
|
||||
*/
|
||||
const SkClipStack* getClipStack() const {
|
||||
return fClipStack.get();
|
||||
}
|
||||
|
||||
typedef SkCanvasClipVisitor ClipVisitor;
|
||||
/**
|
||||
* Replays the clip operations, back to front, that have been applied to
|
||||
@ -1636,6 +1626,18 @@ private:
|
||||
*/
|
||||
bool canDrawBitmapAsSprite(SkScalar x, SkScalar y, int w, int h, const SkPaint&);
|
||||
|
||||
#ifdef SK_SUPPORT_LEGACY_CANVAS_GETCLIPSTACK
|
||||
public:
|
||||
#endif
|
||||
/** Return the clip stack. The clip stack stores all the individual
|
||||
* clips organized by the save/restore frame in which they were
|
||||
* added.
|
||||
* @return the current clip stack ("list" of individual clip elements)
|
||||
*/
|
||||
const SkClipStack* getClipStack() const {
|
||||
return fClipStack.get();
|
||||
}
|
||||
private:
|
||||
|
||||
/**
|
||||
* Keep track of the device clip bounds and if the matrix is scale-translate. This allows
|
||||
|
@ -590,6 +590,7 @@ DEFINES_ALL = [
|
||||
"SK_NO_ANALYTIC_AA",
|
||||
"SK_SUPPORT_LEGACY_BITMAP_SETPIXELREF",
|
||||
"SK_SUPPORT_LEGACY_CLIPOP_EXOTIC_NAMES",
|
||||
"SK_SUPPORT_LEGACY_CANVAS_GETCLIPSTACK",
|
||||
]
|
||||
|
||||
################################################################################
|
||||
|
@ -188,6 +188,7 @@ private:
|
||||
};
|
||||
|
||||
static void test_clipstack(skiatest::Reporter* reporter) {
|
||||
#ifdef SK_SUPPORT_LEGACY_CANVAS_GETCLIPSTACK
|
||||
// The clipstack is refcounted, and needs to be able to out-live the canvas if a client has
|
||||
// ref'd it.
|
||||
const SkClipStack* cs = nullptr;
|
||||
@ -197,6 +198,7 @@ static void test_clipstack(skiatest::Reporter* reporter) {
|
||||
}
|
||||
REPORTER_ASSERT(reporter, cs->unique());
|
||||
cs->unref();
|
||||
#endif
|
||||
}
|
||||
|
||||
// Format strings that describe the test context. The %s token is where
|
||||
|
Loading…
Reference in New Issue
Block a user