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

Side by Side Diff: gm/drawable.cpp

Issue 1265033002: IWYU: 'core' target, files starting A-C. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Rebase (a file was deleted). 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"
11 12
12 struct MyDrawable : public SkDrawable { 13 struct MyDrawable : public SkDrawable {
13 SkRect onGetBounds() override { return SkRect::MakeWH(50, 100); } 14 SkRect onGetBounds() override { return SkRect::MakeWH(50, 100); }
14 15
15 void onDraw(SkCanvas* canvas) override { 16 void onDraw(SkCanvas* canvas) override {
16 SkPath path; 17 SkPath path;
17 path.moveTo(10, 10); 18 path.moveTo(10, 10);
18 path.conicTo(10, 90, 50, 90, 0.9f); 19 path.conicTo(10, 90, 50, 90, 0.9f);
19 20
20 SkPaint paint; 21 SkPaint paint;
(...skipping 16 matching lines...) Expand all
37 canvas->drawDrawable(drawable); 38 canvas->drawDrawable(drawable);
38 canvas->drawDrawable(drawable, 0, 150); 39 canvas->drawDrawable(drawable, 0, 150);
39 40
40 SkMatrix m = SkMatrix::MakeScale(1.5f, 0.8f); 41 SkMatrix m = SkMatrix::MakeScale(1.5f, 0.8f);
41 m.postTranslate(70, 0); 42 m.postTranslate(70, 0);
42 canvas->drawDrawable(drawable, &m); 43 canvas->drawDrawable(drawable, &m);
43 44
44 m.postTranslate(0, 150); 45 m.postTranslate(0, 150);
45 canvas->drawDrawable(drawable, &m); 46 canvas->drawDrawable(drawable, &m);
46 } 47 }
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