update cliptype test to exercise clipstack backend
BUG=skia: Change-Id: Iaa54dd8d556db3cead723558e812d927376b08c0 Reviewed-on: https://skia-review.googlesource.com/9186 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Mike Reed <reed@google.com>
This commit is contained in:
parent
90732fd36e
commit
3b4c22d373
@ -814,10 +814,7 @@ DEF_TEST(CanvasStack, r) {
|
||||
REPORTER_ASSERT(r, !life[1]);
|
||||
}
|
||||
|
||||
DEF_TEST(CanvasClipType, r) {
|
||||
sk_sp<SkSurface> surf = SkSurface::MakeRasterN32Premul(10, 10);
|
||||
SkCanvas* canvas = surf->getCanvas();
|
||||
|
||||
static void test_cliptype(SkCanvas* canvas, skiatest::Reporter* r) {
|
||||
REPORTER_ASSERT(r, !canvas->isClipEmpty());
|
||||
REPORTER_ASSERT(r, canvas->isClipRect());
|
||||
|
||||
@ -842,3 +839,12 @@ DEF_TEST(CanvasClipType, r) {
|
||||
REPORTER_ASSERT(r, !canvas->isClipEmpty());
|
||||
REPORTER_ASSERT(r, canvas->isClipRect());
|
||||
}
|
||||
|
||||
DEF_TEST(CanvasClipType, r) {
|
||||
// test rasterclip backend
|
||||
test_cliptype(SkSurface::MakeRasterN32Premul(10, 10)->getCanvas(), r);
|
||||
|
||||
// test clipstack backend
|
||||
SkDynamicMemoryWStream stream;
|
||||
test_cliptype(SkDocument::MakePDF(&stream)->beginPage(100, 100), r);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user