Skip to content

Commit

Permalink
clipstack is now private
Browse files Browse the repository at this point in the history
BUG=skia:

Change-Id: I91e601d59eb5d46de17c280898ca01fcfab89e5c
NOTREECHECKS=True
Reviewed-on: https://skia-review.googlesource.com/7362
Commit-Queue: Mike Reed <reed@google.com>
Reviewed-by: Mike Reed <reed@google.com>
  • Loading branch information
reed-at-google authored and Skia Commit-Bot committed Jan 21, 2017
1 parent 8ccbbb4 commit 288e471
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 21 deletions.
1 change: 0 additions & 1 deletion gn/android_framework_defines.gni
Original file line number Diff line number Diff line change
Expand Up @@ -16,5 +16,4 @@ android_framework_defines = [
"SK_SUPPORT_LEGACY_SHADER_ISABITMAP",
"SK_SUPPORT_LEGACY_EMBOSSMASKFILTER",
"SK_SUPPORT_EXOTIC_CLIPOPS",
"SK_SUPPORT_LEGACY_CANVAS_GETCLIPSTACK",
]
4 changes: 0 additions & 4 deletions include/core/SkCanvas.h
Original file line number Diff line number Diff line change
Expand Up @@ -1624,9 +1624,6 @@ class SK_API SkCanvas : SkNoncopyable {
*/
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.
Expand All @@ -1635,7 +1632,6 @@ class SK_API SkCanvas : SkNoncopyable {
const SkClipStack* getClipStack() const {
return fClipStack.get();
}
private:

/**
* Keep track of the device clip bounds and if the matrix is scale-translate. This allows
Expand Down
16 changes: 0 additions & 16 deletions tests/CanvasTest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,20 +187,6 @@ class Canvas2CanvasClipVisitor : public SkCanvas::ClipVisitor {
SkCanvas* fTarget;
};

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;
{
SkCanvas canvas(10, 10);
cs = SkRef(canvas.getClipStack());
}
REPORTER_ASSERT(reporter, cs->unique());
cs->unref();
#endif
}

// 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
// disambiguating the error in the case of failures that are reported in
Expand Down Expand Up @@ -532,8 +518,6 @@ static void TestOverrideStateConsistency(skiatest::Reporter* reporter, const Tes
SkCanvas referenceCanvas(referenceStore);
testStep->setAssertMessageFormat(kCanvasDrawAssertMessageFormat);
testStep->draw(&referenceCanvas, d, reporter);

test_clipstack(reporter);
}

static void test_newraster(skiatest::Reporter* reporter) {
Expand Down

0 comments on commit 288e471

Please sign in to comment.