| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |