OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 "SkBlurMaskFilter.h" | 9 #include "SkBlurMaskFilter.h" |
10 #include "SkCanvas.h" | 10 #include "SkCanvas.h" |
11 #include "SkPath.h" | 11 #include "SkPath.h" |
12 #include "SkShader.h" | 12 #include "SkShader.h" |
13 | 13 |
14 namespace skiagm { | 14 namespace skiagm { |
15 | 15 |
16 /** | 16 /** |
17 * Stress test the GPU samplers by rendering a textured glyph with a mask and | 17 * Stress test the GPU samplers by rendering a textured glyph with a mask and |
18 * an AA clip | 18 * an AA clip |
19 */ | 19 */ |
20 class SamplerStressGM : public GM { | 20 class SamplerStressGM : public GM { |
21 public: | 21 public: |
22 SamplerStressGM() | 22 SamplerStressGM() |
23 : fTextureCreated(false) | 23 : fTextureCreated(false) |
24 , fShader(NULL) | 24 , fShader(nullptr) |
25 , fMaskFilter(NULL) { | 25 , fMaskFilter(nullptr) { |
26 } | 26 } |
27 | 27 |
28 virtual ~SamplerStressGM() { | 28 virtual ~SamplerStressGM() { |
29 } | 29 } |
30 | 30 |
31 protected: | 31 protected: |
32 | 32 |
33 SkString onShortName() override { | 33 SkString onShortName() override { |
34 return SkString("gpusamplerstress"); | 34 return SkString("gpusamplerstress"); |
35 } | 35 } |
(...skipping 111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
147 | 147 |
148 typedef GM INHERITED; | 148 typedef GM INHERITED; |
149 }; | 149 }; |
150 | 150 |
151 ////////////////////////////////////////////////////////////////////////////// | 151 ////////////////////////////////////////////////////////////////////////////// |
152 | 152 |
153 static GM* MyFactory(void*) { return new SamplerStressGM; } | 153 static GM* MyFactory(void*) { return new SamplerStressGM; } |
154 static GMRegistry reg(MyFactory); | 154 static GMRegistry reg(MyFactory); |
155 | 155 |
156 } | 156 } |
OLD | NEW |