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

Side by Side Diff: gm/emptypath.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/drawlooper.cpp ('k') | gm/filltypes.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 "SkPaint.h" 10 #include "SkPaint.h"
(...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 canvas->translate(0, rect.height() + 40 * SK_Scalar1); 85 canvas->translate(0, rect.height() + 40 * SK_Scalar1);
86 canvas->save(); 86 canvas->save();
87 } else { 87 } else {
88 canvas->translate(rect.width() + 40 * SK_Scalar1, 0); 88 canvas->translate(rect.width() + 40 * SK_Scalar1, 0);
89 } 89 }
90 ++i; 90 ++i;
91 91
92 92
93 SkColor color = rand.nextU(); 93 SkColor color = rand.nextU();
94 color = 0xff000000 | color; // force solid 94 color = 0xff000000 | color; // force solid
95 sk_tool_utils::color_to_565(&color); 95 color = sk_tool_utils::color_to_565(color);
96 this->drawEmpty(canvas, color, rect, 96 this->drawEmpty(canvas, color, rect,
97 gStyles[style].fStyle, gFills[fill].fFill); 97 gStyles[style].fStyle, gFills[fill].fFill);
98 98
99 SkPaint rectPaint; 99 SkPaint rectPaint;
100 rectPaint.setColor(SK_ColorBLACK); 100 rectPaint.setColor(SK_ColorBLACK);
101 rectPaint.setStyle(SkPaint::kStroke_Style); 101 rectPaint.setStyle(SkPaint::kStroke_Style);
102 rectPaint.setStrokeWidth(-1); 102 rectPaint.setStrokeWidth(-1);
103 rectPaint.setAntiAlias(true); 103 rectPaint.setAntiAlias(true);
104 canvas->drawRect(rect, rectPaint); 104 canvas->drawRect(rect, rectPaint);
105 105
(...skipping 19 matching lines...) Expand all
125 private: 125 private:
126 typedef GM INHERITED; 126 typedef GM INHERITED;
127 }; 127 };
128 128
129 ////////////////////////////////////////////////////////////////////////////// 129 //////////////////////////////////////////////////////////////////////////////
130 130
131 static GM* MyFactory(void*) { return new EmptyPathGM; } 131 static GM* MyFactory(void*) { return new EmptyPathGM; }
132 static GMRegistry reg(MyFactory); 132 static GMRegistry reg(MyFactory);
133 133
134 } 134 }
OLDNEW
« no previous file with comments | « gm/drawlooper.cpp ('k') | gm/filltypes.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698