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

Side by Side Diff: gm/pathinterior.cpp

Issue 371023005: Add always-threaded SkRecord quilt tests. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: bigger tile -> more GMs can quilt Created 6 years, 5 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/ninepatchstretch.cpp ('k') | gm/pathopsinverse.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 2012 Google Inc. 2 * Copyright 2012 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 "SkGraphics.h" 10 #include "SkGraphics.h"
11 #include "SkRandom.h" 11 #include "SkRandom.h"
12 #include "SkLayerDrawLooper.h" 12 #include "SkLayerDrawLooper.h"
13 #include "SkBlurMaskFilter.h" 13 #include "SkBlurMaskFilter.h"
14 14
15 static SkRect inset(const SkRect& r) { 15 static SkRect inset(const SkRect& r) {
16 SkRect rect = r; 16 SkRect rect = r;
17 rect.inset(r.width() / 8, r.height() / 8); 17 rect.inset(r.width() / 8, r.height() / 8);
18 return rect; 18 return rect;
19 } 19 }
20 20
21 class PathInteriorGM : public skiagm::GM { 21 class PathInteriorGM : public skiagm::GM {
22 public: 22 public:
23 PathInteriorGM() { 23 PathInteriorGM() {
24 this->setBGColor(0xFFDDDDDD); 24 this->setBGColor(0xFFDDDDDD);
25 } 25 }
26 26
27 protected: 27 protected:
28 virtual uint32_t onGetFlags() const SK_OVERRIDE {
29 return kSkipTiled_Flag;
30 }
31
32 virtual SkISize onISize() { 28 virtual SkISize onISize() {
33 return SkISize::Make(770, 770); 29 return SkISize::Make(770, 770);
34 } 30 }
35 31
36 virtual SkString onShortName() SK_OVERRIDE { 32 virtual SkString onShortName() SK_OVERRIDE {
37 return SkString("pathinterior"); 33 return SkString("pathinterior");
38 } 34 }
39 35
40 void show(SkCanvas* canvas, const SkPath& path) { 36 void show(SkCanvas* canvas, const SkPath& path) {
41 SkPaint paint; 37 SkPaint paint;
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
108 104
109 private: 105 private:
110 106
111 typedef GM INHERITED; 107 typedef GM INHERITED;
112 }; 108 };
113 109
114 ////////////////////////////////////////////////////////////////////////////// 110 //////////////////////////////////////////////////////////////////////////////
115 111
116 static skiagm::GM* MyFactory(void*) { return new PathInteriorGM; } 112 static skiagm::GM* MyFactory(void*) { return new PathInteriorGM; }
117 static skiagm::GMRegistry reg(MyFactory); 113 static skiagm::GMRegistry reg(MyFactory);
OLDNEW
« no previous file with comments | « gm/ninepatchstretch.cpp ('k') | gm/pathopsinverse.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698