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

Side by Side Diff: gm/gradtext.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/gradients_2pt_conical.cpp ('k') | gm/lerpmode.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 2011 Google Inc. 2 * Copyright 2011 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 "SkGradientShader.h" 10 #include "SkGradientShader.h"
(...skipping 82 matching lines...) Expand 10 before | Expand all | Expand 10 after
93 typedef GM INHERITED; 93 typedef GM INHERITED;
94 }; 94 };
95 95
96 96
97 97
98 class GradTextGM : public GM { 98 class GradTextGM : public GM {
99 public: 99 public:
100 GradTextGM () {} 100 GradTextGM () {}
101 101
102 protected: 102 protected:
103 virtual uint32_t onGetFlags() const SK_OVERRIDE {
104 return kSkipTiled_Flag;
105 }
106
107
108 virtual SkString onShortName() { 103 virtual SkString onShortName() {
109 return SkString("gradtext"); 104 return SkString("gradtext");
110 } 105 }
111 106
112 virtual SkISize onISize() { return SkISize::Make(500, 480); } 107 virtual SkISize onISize() { return SkISize::Make(500, 480); }
113 108
114 static void draw_text(SkCanvas* canvas, const SkPaint& paint) { 109 static void draw_text(SkCanvas* canvas, const SkPaint& paint) {
115 const char* text = "When in the course of human events"; 110 const char* text = "When in the course of human events";
116 size_t len = strlen(text); 111 size_t len = strlen(text);
117 canvas->drawText(text, len, 0, 0, paint); 112 canvas->drawText(text, len, 0, 0, paint);
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
161 ////////////////////////////////////////////////////////////////////////////// 156 //////////////////////////////////////////////////////////////////////////////
162 157
163 static GM* MyFactory(void*) { return new GradTextGM; } 158 static GM* MyFactory(void*) { return new GradTextGM; }
164 static GM* CMyFactory(void*) { return new ChromeGradTextGM1; } 159 static GM* CMyFactory(void*) { return new ChromeGradTextGM1; }
165 static GM* CMyFactory2(void*) { return new ChromeGradTextGM2; } 160 static GM* CMyFactory2(void*) { return new ChromeGradTextGM2; }
166 161
167 static GMRegistry reg(MyFactory); 162 static GMRegistry reg(MyFactory);
168 static GMRegistry Creg(CMyFactory); 163 static GMRegistry Creg(CMyFactory);
169 static GMRegistry Creg2(CMyFactory2); 164 static GMRegistry Creg2(CMyFactory2);
170 } 165 }
OLDNEW
« no previous file with comments | « gm/gradients_2pt_conical.cpp ('k') | gm/lerpmode.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698