Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(109)

Side by Side Diff: tests/SkLiteDLTest.cpp

Issue 2355483002: abstract name of clipping ops, to transtion to a more restricted set (Closed)
Patch Set: no need for ifdef for globals Created 4 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tests/ReadPixelsTest.cpp ('k') | tests/WritePixelsTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 }
OLDNEW
« no previous file with comments | « tests/ReadPixelsTest.cpp ('k') | tests/WritePixelsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698