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

Side by Side Diff: gm/drawable.cpp

Issue 1273613002: Revert of IWYU: 'core' target, files starting A-C. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 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 | « gm/degeneratesegments.cpp ('k') | gm/dstreadshuffle.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 2015 Google Inc. 2 * Copyright 2015 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 "gm.h" 8 #include "gm.h"
9 #include "SkCanvas.h" 9 #include "SkCanvas.h"
10 #include "SkDrawable.h" 10 #include "SkDrawable.h"
11 #include "SkPath.h"
12 11
13 struct MyDrawable : public SkDrawable { 12 struct MyDrawable : public SkDrawable {
14 SkRect onGetBounds() override { return SkRect::MakeWH(50, 100); } 13 SkRect onGetBounds() override { return SkRect::MakeWH(50, 100); }
15 14
16 void onDraw(SkCanvas* canvas) override { 15 void onDraw(SkCanvas* canvas) override {
17 SkPath path; 16 SkPath path;
18 path.moveTo(10, 10); 17 path.moveTo(10, 10);
19 path.conicTo(10, 90, 50, 90, 0.9f); 18 path.conicTo(10, 90, 50, 90, 0.9f);
20 19
21 SkPaint paint; 20 SkPaint paint;
(...skipping 16 matching lines...) Expand all
38 canvas->drawDrawable(drawable); 37 canvas->drawDrawable(drawable);
39 canvas->drawDrawable(drawable, 0, 150); 38 canvas->drawDrawable(drawable, 0, 150);
40 39
41 SkMatrix m = SkMatrix::MakeScale(1.5f, 0.8f); 40 SkMatrix m = SkMatrix::MakeScale(1.5f, 0.8f);
42 m.postTranslate(70, 0); 41 m.postTranslate(70, 0);
43 canvas->drawDrawable(drawable, &m); 42 canvas->drawDrawable(drawable, &m);
44 43
45 m.postTranslate(0, 150); 44 m.postTranslate(0, 150);
46 canvas->drawDrawable(drawable, &m); 45 canvas->drawDrawable(drawable, &m);
47 } 46 }
OLDNEW
« no previous file with comments | « gm/degeneratesegments.cpp ('k') | gm/dstreadshuffle.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698