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

Side by Side Diff: gm/colormatrix.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/clipdrawdraw.cpp ('k') | gm/complexclip3.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 "SkColorMatrixFilter.h" 9 #include "SkColorMatrixFilter.h"
10 #include "SkGradientShader.h" 10 #include "SkGradientShader.h"
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
42 SkDoOnce fOnce; 42 SkDoOnce fOnce;
43 void init() { 43 void init() {
44 if (fOnce.once()) { 44 if (fOnce.once()) {
45 fSolidBitmap = this->createSolidBitmap(64, 64); 45 fSolidBitmap = this->createSolidBitmap(64, 64);
46 fTransparentBitmap = this->createTransparentBitmap(64, 64); 46 fTransparentBitmap = this->createTransparentBitmap(64, 64);
47 } 47 }
48 } 48 }
49 49
50 public: 50 public:
51 ColorMatrixGM() { 51 ColorMatrixGM() {
52 this->setBGColor(0xFF808080); 52 this->setBGColor(sk_tool_utils::color_to_565(0xFF808080));
53 } 53 }
54 54
55 protected: 55 protected:
56 virtual SkString onShortName() { 56 virtual SkString onShortName() {
57 return SkString("colormatrix"); 57 return SkString("colormatrix");
58 } 58 }
59 59
60 virtual SkISize onISize() { 60 virtual SkISize onISize() {
61 return SkISize::Make(WIDTH, HEIGHT); 61 return SkISize::Make(WIDTH, HEIGHT);
62 } 62 }
(...skipping 102 matching lines...) Expand 10 before | Expand all | Expand 10 after
165 SkBitmap fTransparentBitmap; 165 SkBitmap fTransparentBitmap;
166 typedef GM INHERITED; 166 typedef GM INHERITED;
167 }; 167 };
168 168
169 ////////////////////////////////////////////////////////////////////////////// 169 //////////////////////////////////////////////////////////////////////////////
170 170
171 static GM* MyFactory(void*) { return new ColorMatrixGM; } 171 static GM* MyFactory(void*) { return new ColorMatrixGM; }
172 static GMRegistry reg(MyFactory); 172 static GMRegistry reg(MyFactory);
173 173
174 } 174 }
OLDNEW
« no previous file with comments | « gm/clipdrawdraw.cpp ('k') | gm/complexclip3.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698