| 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 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 50 ShaderText3GM() { | 50 ShaderText3GM() { |
| 51 this->setBGColor(sk_tool_utils::color_to_565(0xFFDDDDDD)); | 51 this->setBGColor(sk_tool_utils::color_to_565(0xFFDDDDDD)); |
| 52 } | 52 } |
| 53 | 53 |
| 54 protected: | 54 protected: |
| 55 | 55 |
| 56 SkString onShortName() override { | 56 SkString onShortName() override { |
| 57 return SkString("shadertext3"); | 57 return SkString("shadertext3"); |
| 58 } | 58 } |
| 59 | 59 |
| 60 SkISize onISize() override{ return SkISize::Make(800, 1000); } | 60 SkISize onISize() override{ return SkISize::Make(820, 930); } |
| 61 | 61 |
| 62 void onOnceBeforeDraw() override { | 62 void onOnceBeforeDraw() override { |
| 63 makebm(&fBmp, kPointSize / 4, kPointSize / 4); | 63 makebm(&fBmp, kPointSize / 4, kPointSize / 4); |
| 64 } | 64 } |
| 65 | 65 |
| 66 void onDraw(SkCanvas* canvas) override { | 66 void onDraw(SkCanvas* canvas) override { |
| 67 | 67 |
| 68 SkPaint bmpPaint; | 68 SkPaint bmpPaint; |
| 69 bmpPaint.setAntiAlias(true); | 69 bmpPaint.setAntiAlias(true); |
| 70 bmpPaint.setFilterQuality(kLow_SkFilterQuality); | 70 bmpPaint.setFilterQuality(kLow_SkFilterQuality); |
| (...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 126 private: | 126 private: |
| 127 SkBitmap fBmp; | 127 SkBitmap fBmp; |
| 128 typedef GM INHERITED; | 128 typedef GM INHERITED; |
| 129 }; | 129 }; |
| 130 | 130 |
| 131 /////////////////////////////////////////////////////////////////////////////// | 131 /////////////////////////////////////////////////////////////////////////////// |
| 132 | 132 |
| 133 static GM* MyFactory(void*) { return new ShaderText3GM; } | 133 static GM* MyFactory(void*) { return new ShaderText3GM; } |
| 134 static GMRegistry reg(MyFactory); | 134 static GMRegistry reg(MyFactory); |
| 135 } | 135 } |
| OLD | NEW |