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

Side by Side Diff: gm/gradients_2pt_conical.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.cpp ('k') | gm/gradtext.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 2014 Google Inc. 2 * Copyright 2014 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 "SkGradientShader.h" 9 #include "SkGradientShader.h"
10 10
(...skipping 294 matching lines...) Expand 10 before | Expand all | Expand 10 after
305 305
306 class ConicalGradientsGM : public GM { 306 class ConicalGradientsGM : public GM {
307 public: 307 public:
308 ConicalGradientsGM(GradCaseType gradCaseType) { 308 ConicalGradientsGM(GradCaseType gradCaseType) {
309 this->setBGColor(0xFFDDDDDD); 309 this->setBGColor(0xFFDDDDDD);
310 fName.printf("gradients_2pt_conical_%s", gGradCases[gradCaseType].fName) ; 310 fName.printf("gradients_2pt_conical_%s", gGradCases[gradCaseType].fName) ;
311 fGradCaseType = gradCaseType; 311 fGradCaseType = gradCaseType;
312 } 312 }
313 313
314 protected: 314 protected:
315 virtual uint32_t onGetFlags() const SK_OVERRIDE {
316 if (fGradCaseType != kInside_GradCaseType) {
317 return kSkipTiled_Flag;
318 }
319 return 0;
320 }
321
322 SkString onShortName() { 315 SkString onShortName() {
323 return fName; 316 return fName;
324 } 317 }
325 318
326 virtual SkISize onISize() { return SkISize::Make(840, 815); } 319 virtual SkISize onISize() { return SkISize::Make(840, 815); }
327 320
328 virtual void onDraw(SkCanvas* canvas) { 321 virtual void onDraw(SkCanvas* canvas) {
329 322
330 SkPoint pts[2] = { 323 SkPoint pts[2] = {
331 { 0, 0 }, 324 { 0, 0 },
(...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after
372 365
373 static GM* MyFactory1(void*) { return new ConicalGradientsGM(kInside_GradCaseTyp e); } 366 static GM* MyFactory1(void*) { return new ConicalGradientsGM(kInside_GradCaseTyp e); }
374 static GMRegistry reg1(MyFactory1); 367 static GMRegistry reg1(MyFactory1);
375 368
376 static GM* MyFactory2(void*) { return new ConicalGradientsGM(kOutside_GradCaseTy pe); } 369 static GM* MyFactory2(void*) { return new ConicalGradientsGM(kOutside_GradCaseTy pe); }
377 static GMRegistry reg2(MyFactory2); 370 static GMRegistry reg2(MyFactory2);
378 371
379 static GM* MyFactory3(void*) { return new ConicalGradientsGM(kEdge_GradCaseType) ; } 372 static GM* MyFactory3(void*) { return new ConicalGradientsGM(kEdge_GradCaseType) ; }
380 static GMRegistry reg3(MyFactory3); 373 static GMRegistry reg3(MyFactory3);
381 } 374 }
OLDNEW
« no previous file with comments | « gm/gradients.cpp ('k') | gm/gradtext.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698