| 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 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 77 } | 77 } |
| 78 } | 78 } |
| 79 | 79 |
| 80 GrSurfaceDesc desc; | 80 GrSurfaceDesc desc; |
| 81 // use RT flag bit because in GL it makes the texture be bottom-
up | 81 // use RT flag bit because in GL it makes the texture be bottom-
up |
| 82 desc.fFlags = i ? kRenderTarget_GrSurfaceFlag : | 82 desc.fFlags = i ? kRenderTarget_GrSurfaceFlag : |
| 83 kNone_GrSurfaceFlags; | 83 kNone_GrSurfaceFlags; |
| 84 desc.fConfig = kSkia8888_GrPixelConfig; | 84 desc.fConfig = kSkia8888_GrPixelConfig; |
| 85 desc.fWidth = 2 * S; | 85 desc.fWidth = 2 * S; |
| 86 desc.fHeight = 2 * S; | 86 desc.fHeight = 2 * S; |
| 87 GrTexture* texture = ctx->createTexture(desc, false, gTextureDat
a.get(), 0); | 87 GrTexture* texture = ctx->textureProvider()->createTexture( |
| 88 desc, false, gTextureData.get(), 0); |
| 88 | 89 |
| 89 if (!texture) { | 90 if (!texture) { |
| 90 return; | 91 return; |
| 91 } | 92 } |
| 92 SkAutoTUnref<GrTexture> au(texture); | 93 SkAutoTUnref<GrTexture> au(texture); |
| 93 | 94 |
| 94 // setup new clip | 95 // setup new clip |
| 95 GrClip clip(SkRect::MakeWH(2*S, 2*S)); | 96 GrClip clip(SkRect::MakeWH(2*S, 2*S)); |
| 96 | 97 |
| 97 GrPaint paint; | 98 GrPaint paint; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 136 }; | 137 }; |
| 137 | 138 |
| 138 ////////////////////////////////////////////////////////////////////////////// | 139 ////////////////////////////////////////////////////////////////////////////// |
| 139 | 140 |
| 140 static GM* MyFactory(void*) { return new TexDataGM; } | 141 static GM* MyFactory(void*) { return new TexDataGM; } |
| 141 static GMRegistry reg(MyFactory); | 142 static GMRegistry reg(MyFactory); |
| 142 | 143 |
| 143 } | 144 } |
| 144 | 145 |
| 145 #endif | 146 #endif |
| OLD | NEW |