| 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 "SkCanvas.h" | 9 #include "SkCanvas.h" |
| 10 #include "SkGradientShader.h" | 10 #include "SkGradientShader.h" |
| (...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 53 | 53 |
| 54 protected: | 54 protected: |
| 55 virtual uint32_t onGetFlags() const SK_OVERRIDE { | 55 virtual uint32_t onGetFlags() const SK_OVERRIDE { |
| 56 return kSkipTiled_Flag; | 56 return kSkipTiled_Flag; |
| 57 } | 57 } |
| 58 | 58 |
| 59 virtual SkString onShortName() SK_OVERRIDE { | 59 virtual SkString onShortName() SK_OVERRIDE { |
| 60 return SkString("shadertext3"); | 60 return SkString("shadertext3"); |
| 61 } | 61 } |
| 62 | 62 |
| 63 virtual SkISize onISize() SK_OVERRIDE{ return make_isize(800, 1000); } | 63 virtual SkISize onISize() SK_OVERRIDE{ return SkISize::Make(800, 1000); } |
| 64 | 64 |
| 65 virtual void onOnceBeforeDraw() SK_OVERRIDE { | 65 virtual void onOnceBeforeDraw() SK_OVERRIDE { |
| 66 makebm(&fBmp, kPointSize / 4, kPointSize / 4); | 66 makebm(&fBmp, kPointSize / 4, kPointSize / 4); |
| 67 } | 67 } |
| 68 | 68 |
| 69 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { | 69 virtual void onDraw(SkCanvas* canvas) SK_OVERRIDE { |
| 70 | 70 |
| 71 SkPaint bmpPaint; | 71 SkPaint bmpPaint; |
| 72 bmpPaint.setAntiAlias(true); | 72 bmpPaint.setAntiAlias(true); |
| 73 bmpPaint.setFilterLevel(SkPaint::kLow_FilterLevel); | 73 bmpPaint.setFilterLevel(SkPaint::kLow_FilterLevel); |
| (...skipping 57 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 131 private: | 131 private: |
| 132 SkBitmap fBmp; | 132 SkBitmap fBmp; |
| 133 typedef GM INHERITED; | 133 typedef GM INHERITED; |
| 134 }; | 134 }; |
| 135 | 135 |
| 136 /////////////////////////////////////////////////////////////////////////////// | 136 /////////////////////////////////////////////////////////////////////////////// |
| 137 | 137 |
| 138 static GM* MyFactory(void*) { return new ShaderText3GM; } | 138 static GM* MyFactory(void*) { return new ShaderText3GM; } |
| 139 static GMRegistry reg(MyFactory); | 139 static GMRegistry reg(MyFactory); |
| 140 } | 140 } |
| OLD | NEW |