| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2014 Google Inc. | 3 * Copyright 2014 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 if (nullptr == rt) { | 71 if (nullptr == rt) { |
| 72 return; | 72 return; |
| 73 } | 73 } |
| 74 GrContext* context = rt->getContext(); | 74 GrContext* context = rt->getContext(); |
| 75 if (nullptr == context) { | 75 if (nullptr == context) { |
| 76 skiagm::GM::DrawGpuOnlyMessage(canvas); | 76 skiagm::GM::DrawGpuOnlyMessage(canvas); |
| 77 return; | 77 return; |
| 78 } | 78 } |
| 79 | 79 |
| 80 GrTestTarget tt; | 80 GrTestTarget tt; |
| 81 context->getTestTarget(&tt); | 81 context->getTestTarget(&tt, rt); |
| 82 if (nullptr == tt.target()) { | 82 if (nullptr == tt.target()) { |
| 83 SkDEBUGFAIL("Couldn't get Gr test target."); | 83 SkDEBUGFAIL("Couldn't get Gr test target."); |
| 84 return; | 84 return; |
| 85 } | 85 } |
| 86 | 86 |
| 87 SkAutoTUnref<GrTexture> texture[3]; | 87 SkAutoTUnref<GrTexture> texture[3]; |
| 88 texture[0].reset(GrRefCachedBitmapTexture(context, fBmp[0], | 88 texture[0].reset(GrRefCachedBitmapTexture(context, fBmp[0], |
| 89 GrTextureParams::ClampBilerp()
)); | 89 GrTextureParams::ClampBilerp()
)); |
| 90 texture[1].reset(GrRefCachedBitmapTexture(context, fBmp[1], | 90 texture[1].reset(GrRefCachedBitmapTexture(context, fBmp[1], |
| 91 GrTextureParams::ClampBilerp()
)); | 91 GrTextureParams::ClampBilerp()
)); |
| (...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 private: | 139 private: |
| 140 SkBitmap fBmp[3]; | 140 SkBitmap fBmp[3]; |
| 141 | 141 |
| 142 typedef GM INHERITED; | 142 typedef GM INHERITED; |
| 143 }; | 143 }; |
| 144 | 144 |
| 145 DEF_GM(return new YUVtoRGBEffect;) | 145 DEF_GM(return new YUVtoRGBEffect;) |
| 146 } | 146 } |
| 147 | 147 |
| 148 #endif | 148 #endif |
| OLD | NEW |