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

Side by Side Diff: gm/gradients_2pt_conical.cpp

Issue 1176243006: make gm background colors 565 compatible (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: revert bitmap test changes -- only need to change font Created 5 years, 6 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/gradients_no_texture.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 288 matching lines...) Expand 10 before | Expand all | Expand 10 after
299 kOutside_GradCaseType, 299 kOutside_GradCaseType,
300 kInside_GradCaseType, 300 kInside_GradCaseType,
301 kEdge_GradCaseType, 301 kEdge_GradCaseType,
302 }; 302 };
303 303
304 /////////////////////////////////////////////////////////////////////////////// 304 ///////////////////////////////////////////////////////////////////////////////
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(sk_tool_utils::color_to_565(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 SkString onShortName() { 315 SkString onShortName() {
316 return fName; 316 return fName;
317 } 317 }
318 318
319 virtual SkISize onISize() { return SkISize::Make(840, 815); } 319 virtual SkISize onISize() { return SkISize::Make(840, 815); }
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after
365 365
366 static GM* MyFactory1(void*) { return new ConicalGradientsGM(kInside_GradCaseTyp e); } 366 static GM* MyFactory1(void*) { return new ConicalGradientsGM(kInside_GradCaseTyp e); }
367 static GMRegistry reg1(MyFactory1); 367 static GMRegistry reg1(MyFactory1);
368 368
369 static GM* MyFactory2(void*) { return new ConicalGradientsGM(kOutside_GradCaseTy pe); } 369 static GM* MyFactory2(void*) { return new ConicalGradientsGM(kOutside_GradCaseTy pe); }
370 static GMRegistry reg2(MyFactory2); 370 static GMRegistry reg2(MyFactory2);
371 371
372 static GM* MyFactory3(void*) { return new ConicalGradientsGM(kEdge_GradCaseType) ; } 372 static GM* MyFactory3(void*) { return new ConicalGradientsGM(kEdge_GradCaseType) ; }
373 static GMRegistry reg3(MyFactory3); 373 static GMRegistry reg3(MyFactory3);
374 } 374 }
OLDNEW
« no previous file with comments | « gm/gradients.cpp ('k') | gm/gradients_no_texture.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698