| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 Google Inc. |
| 3 * | 3 * |
| 4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
| 5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
| 6 */ | 6 */ |
| 7 | 7 |
| 8 #include "Test.h" | 8 #include "Test.h" |
| 9 #include "SkLiteDL.h" | 9 #include "SkLiteDL.h" |
| 10 #include "SkLiteRecorder.h" | 10 #include "SkLiteRecorder.h" |
| 11 | 11 |
| 12 DEF_TEST(SkLiteDL_basics, r) { | 12 DEF_TEST(SkLiteDL_basics, r) { |
| 13 sk_sp<SkLiteDL> p { SkLiteDL::New({2,2,3,3}) }; | 13 sk_sp<SkLiteDL> p { SkLiteDL::New({2,2,3,3}) }; |
| 14 | 14 |
| 15 p->save(); | 15 p->save(); |
| 16 p->clipRect(SkRect{2,3,4,5}, SkRegion::kIntersect_Op, true); | 16 p->clipRect(SkRect{2,3,4,5}, SkCanvas::kIntersect_Op, true); |
| 17 p->drawRect(SkRect{0,0,9,9}, SkPaint{}); | 17 p->drawRect(SkRect{0,0,9,9}, SkPaint{}); |
| 18 p->restore(); | 18 p->restore(); |
| 19 } | 19 } |
| 20 | 20 |
| 21 DEF_TEST(SkLiteRecorder, r) { | 21 DEF_TEST(SkLiteRecorder, r) { |
| 22 sk_sp<SkLiteDL> p { SkLiteDL::New({2,2,3,3}) }; | 22 sk_sp<SkLiteDL> p { SkLiteDL::New({2,2,3,3}) }; |
| 23 | 23 |
| 24 SkLiteRecorder rec; | 24 SkLiteRecorder rec; |
| 25 SkCanvas* c = &rec; | 25 SkCanvas* c = &rec; |
| 26 | 26 |
| 27 rec.reset(p.get()); | 27 rec.reset(p.get()); |
| 28 | 28 |
| 29 c->save(); | 29 c->save(); |
| 30 c->clipRect(SkRect{2,3,4,5}, SkRegion::kIntersect_Op, true); | 30 c->clipRect(SkRect{2,3,4,5}, SkCanvas::kIntersect_Op, true); |
| 31 c->drawRect(SkRect{0,0,9,9}, SkPaint{}); | 31 c->drawRect(SkRect{0,0,9,9}, SkPaint{}); |
| 32 c->restore(); | 32 c->restore(); |
| 33 } | 33 } |
| OLD | NEW |