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

Side by Side Diff: gm/bitmaprect.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/addarc.cpp ('k') | gm/blend.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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
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 28 matching lines...) Expand all
39 SkString str; 39 SkString str;
40 str.printf("bitmaprect_%s", fUseIRect ? "i" : "s"); 40 str.printf("bitmaprect_%s", fUseIRect ? "i" : "s");
41 return str; 41 return str;
42 } 42 }
43 43
44 SkISize onISize() override { 44 SkISize onISize() override {
45 return SkISize::Make(640, 480); 45 return SkISize::Make(640, 480);
46 } 46 }
47 47
48 void onDraw(SkCanvas* canvas) override { 48 void onDraw(SkCanvas* canvas) override {
49 canvas->drawColor(0xFFCCCCCC); 49 canvas->drawColor(sk_tool_utils::color_to_565(0xFFCCCCCC));
50 50
51 const SkIRect src[] = { 51 const SkIRect src[] = {
52 { 0, 0, 32, 32 }, 52 { 0, 0, 32, 32 },
53 { 0, 0, 80, 80 }, 53 { 0, 0, 80, 80 },
54 { 32, 32, 96, 96 }, 54 { 32, 32, 96, 96 },
55 { -32, -32, 32, 32, } 55 { -32, -32, 32, 32, }
56 }; 56 };
57 57
58 SkPaint paint; 58 SkPaint paint;
59 paint.setStyle(SkPaint::kStroke_Style); 59 paint.setStyle(SkPaint::kStroke_Style);
(...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after
286 static skiagm::GMRegistry reg0(MyFactory0); 286 static skiagm::GMRegistry reg0(MyFactory0);
287 static skiagm::GMRegistry reg1(MyFactory1); 287 static skiagm::GMRegistry reg1(MyFactory1);
288 288
289 static skiagm::GMRegistry reg2(MyFactory2); 289 static skiagm::GMRegistry reg2(MyFactory2);
290 290
291 #ifndef SK_BUILD_FOR_ANDROID 291 #ifndef SK_BUILD_FOR_ANDROID
292 static skiagm::GMRegistry reg3(MyFactory3); 292 static skiagm::GMRegistry reg3(MyFactory3);
293 static skiagm::GMRegistry reg4(MyFactory4); 293 static skiagm::GMRegistry reg4(MyFactory4);
294 #endif 294 #endif
295 295
OLDNEW
« no previous file with comments | « gm/addarc.cpp ('k') | gm/blend.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698