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

Side by Side Diff: gm/gradients.cpp

Issue 1262703002: make tests portable by using 565 compatible colors (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: fix dstreadshuffle text portable gm 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/fatpathfill.cpp ('k') | gm/hairmodes.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 "SkGradientShader.h" 9 #include "SkGradientShader.h"
10 10
(...skipping 278 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 class ClampedGradientsGM : public GM { 289 class ClampedGradientsGM : public GM {
290 public: 290 public:
291 ClampedGradientsGM() {} 291 ClampedGradientsGM() {}
292 292
293 protected: 293 protected:
294 SkString onShortName() { return SkString("clamped_gradients"); } 294 SkString onShortName() { return SkString("clamped_gradients"); }
295 295
296 virtual SkISize onISize() { return SkISize::Make(640, 510); } 296 virtual SkISize onISize() { return SkISize::Make(640, 510); }
297 297
298 void drawBG(SkCanvas* canvas) { 298 void drawBG(SkCanvas* canvas) {
299 canvas->drawColor(0xFFDDDDDD); 299 canvas->drawColor(sk_tool_utils::color_to_565(0xFFDDDDDD));
300 } 300 }
301 301
302 virtual void onDraw(SkCanvas* canvas) { 302 virtual void onDraw(SkCanvas* canvas) {
303 this->drawBG(canvas); 303 this->drawBG(canvas);
304 304
305 SkRect r = { 0, 0, SkIntToScalar(100), SkIntToScalar(300) }; 305 SkRect r = { 0, 0, SkIntToScalar(100), SkIntToScalar(300) };
306 SkPaint paint; 306 SkPaint paint;
307 paint.setAntiAlias(true); 307 paint.setAntiAlias(true);
308 308
309 SkPoint center; 309 SkPoint center;
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
454 paint.setShader(fShader); 454 paint.setShader(fShader);
455 canvas->drawRect(SkRect::MakeWH(500, 500), paint); 455 canvas->drawRect(SkRect::MakeWH(500, 500), paint);
456 } 456 }
457 457
458 private: 458 private:
459 typedef GM INHERITED; 459 typedef GM INHERITED;
460 }; 460 };
461 DEF_GM( return new RadialGradient3GM; ) 461 DEF_GM( return new RadialGradient3GM; )
462 462
463 } 463 }
OLDNEW
« no previous file with comments | « gm/fatpathfill.cpp ('k') | gm/hairmodes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698