| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 "SkCanvas.h" | 9 #include "SkCanvas.h" |
| 10 #include "SkColorFilter.h" | 10 #include "SkColorFilter.h" |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 42 | 42 |
| 43 protected: | 43 protected: |
| 44 virtual SkString onShortName() { | 44 virtual SkString onShortName() { |
| 45 return fName; | 45 return fName; |
| 46 } | 46 } |
| 47 | 47 |
| 48 virtual SkISize onISize() { | 48 virtual SkISize onISize() { |
| 49 return SkISize::Make(640, 480); | 49 return SkISize::Make(640, 480); |
| 50 } | 50 } |
| 51 | 51 |
| 52 virtual uint32_t onGetFlags() const SK_OVERRIDE { |
| 53 return kSkipTiled_Flag; |
| 54 } |
| 55 |
| 52 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { | 56 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { |
| 53 SkPaint paint; | 57 SkPaint paint; |
| 54 SkRect r; | 58 SkRect r; |
| 55 r.setWH(600, 50); | 59 r.setWH(600, 50); |
| 56 paint.setShader(make_shader(r))->unref(); | 60 paint.setShader(make_shader(r))->unref(); |
| 57 | 61 |
| 58 const struct { | 62 const struct { |
| 59 InstallPaint fProc; | 63 InstallPaint fProc; |
| 60 uint32_t fData0, fData1; | 64 uint32_t fData0, fData1; |
| 61 } rec[] = { | 65 } rec[] = { |
| (...skipping 16 matching lines...) Expand all Loading... |
| 78 | 82 |
| 79 private: | 83 private: |
| 80 SkString fName; | 84 SkString fName; |
| 81 typedef GM INHERITED; | 85 typedef GM INHERITED; |
| 82 }; | 86 }; |
| 83 | 87 |
| 84 | 88 |
| 85 ////////////////////////////////////////////////////////////////////////////// | 89 ////////////////////////////////////////////////////////////////////////////// |
| 86 | 90 |
| 87 DEF_GM( return SkNEW(ColorFiltersGM); ) | 91 DEF_GM( return SkNEW(ColorFiltersGM); ) |
| OLD | NEW |