| OLD | NEW |
| 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 "SkBitmap.h" | 9 #include "SkBitmap.h" |
| 10 #include "SkShader.h" | 10 #include "SkShader.h" |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 const static int W = 64; | 159 const static int W = 64; |
| 160 const static int H = 64; | 160 const static int H = 64; |
| 161 XfermodesGM() {} | 161 XfermodesGM() {} |
| 162 | 162 |
| 163 protected: | 163 protected: |
| 164 virtual SkString onShortName() { | 164 virtual SkString onShortName() { |
| 165 return SkString("xfermodes"); | 165 return SkString("xfermodes"); |
| 166 } | 166 } |
| 167 | 167 |
| 168 virtual SkISize onISize() { | 168 virtual SkISize onISize() { |
| 169 return make_isize(1990, 640); | 169 return SkISize::Make(1990, 640); |
| 170 } | 170 } |
| 171 | 171 |
| 172 virtual void onDraw(SkCanvas* canvas) { | 172 virtual void onDraw(SkCanvas* canvas) { |
| 173 canvas->translate(SkIntToScalar(10), SkIntToScalar(20)); | 173 canvas->translate(SkIntToScalar(10), SkIntToScalar(20)); |
| 174 | 174 |
| 175 const struct { | 175 const struct { |
| 176 SkXfermode::Mode fMode; | 176 SkXfermode::Mode fMode; |
| 177 const char* fLabel; | 177 const char* fLabel; |
| 178 int fSourceTypeMask; // The source types to use this | 178 int fSourceTypeMask; // The source types to use this |
| 179 // mode with. See draw_mode for | 179 // mode with. See draw_mode for |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 private: | 283 private: |
| 284 typedef GM INHERITED; | 284 typedef GM INHERITED; |
| 285 }; | 285 }; |
| 286 | 286 |
| 287 ////////////////////////////////////////////////////////////////////////////// | 287 ////////////////////////////////////////////////////////////////////////////// |
| 288 | 288 |
| 289 static GM* MyFactory(void*) { return new XfermodesGM; } | 289 static GM* MyFactory(void*) { return new XfermodesGM; } |
| 290 static GMRegistry reg(MyFactory); | 290 static GMRegistry reg(MyFactory); |
| 291 | 291 |
| 292 } | 292 } |
| OLD | NEW |