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 | 8 |
9 // This test only works with the GPU backend. | 9 // This test only works with the GPU backend. |
10 | 10 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 kNone_GrTextureFlags; | 84 kNone_GrTextureFlags; |
85 desc.fConfig = kSkia8888_GrPixelConfig; | 85 desc.fConfig = kSkia8888_GrPixelConfig; |
86 desc.fWidth = 2 * S; | 86 desc.fWidth = 2 * S; |
87 desc.fHeight = 2 * S; | 87 desc.fHeight = 2 * S; |
88 GrTexture* texture = | 88 GrTexture* texture = |
89 ctx->createUncachedTexture(desc, gTextureData.get(), 0); | 89 ctx->createUncachedTexture(desc, gTextureData.get(), 0); |
90 | 90 |
91 if (!texture) { | 91 if (!texture) { |
92 return; | 92 return; |
93 } | 93 } |
94 SkAutoUnref au(texture); | 94 SkAutoTUnref<GrTexture> au(texture); |
95 | 95 |
96 GrContext::AutoClip acs(ctx, SkRect::MakeWH(2*S, 2*S)); | 96 GrContext::AutoClip acs(ctx, SkRect::MakeWH(2*S, 2*S)); |
97 | 97 |
98 ctx->setRenderTarget(target); | 98 ctx->setRenderTarget(target); |
99 | 99 |
100 GrPaint paint; | 100 GrPaint paint; |
101 paint.setBlendFunc(kOne_GrBlendCoeff, kISA_GrBlendCoeff); | 101 paint.setBlendFunc(kOne_GrBlendCoeff, kISA_GrBlendCoeff); |
102 SkMatrix vm; | 102 SkMatrix vm; |
103 if (i) { | 103 if (i) { |
104 vm.setRotate(90 * SK_Scalar1, | 104 vm.setRotate(90 * SK_Scalar1, |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
137 }; | 137 }; |
138 | 138 |
139 ////////////////////////////////////////////////////////////////////////////// | 139 ////////////////////////////////////////////////////////////////////////////// |
140 | 140 |
141 static GM* MyFactory(void*) { return new TexDataGM; } | 141 static GM* MyFactory(void*) { return new TexDataGM; } |
142 static GMRegistry reg(MyFactory); | 142 static GMRegistry reg(MyFactory); |
143 | 143 |
144 } | 144 } |
145 | 145 |
146 #endif | 146 #endif |
OLD | NEW |