| 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 73 if (nullptr == rt) { | 73 if (nullptr == rt) { |
| 74 return; | 74 return; |
| 75 } | 75 } |
| 76 GrContext* context = rt->getContext(); | 76 GrContext* context = rt->getContext(); |
| 77 if (nullptr == context) { | 77 if (nullptr == context) { |
| 78 skiagm::GM::DrawGpuOnlyMessage(canvas); | 78 skiagm::GM::DrawGpuOnlyMessage(canvas); |
| 79 return; | 79 return; |
| 80 } | 80 } |
| 81 | 81 |
| 82 GrTestTarget tt; | 82 GrTestTarget tt; |
| 83 context->getTestTarget(&tt); | 83 context->getTestTarget(&tt, rt); |
| 84 if (nullptr == tt.target()) { | 84 if (nullptr == tt.target()) { |
| 85 SkDEBUGFAIL("Couldn't get Gr test target."); | 85 SkDEBUGFAIL("Couldn't get Gr test target."); |
| 86 return; | 86 return; |
| 87 } | 87 } |
| 88 | 88 |
| 89 SkAutoTUnref<GrTexture> texture(GrRefCachedBitmapTexture(context, fBmp, | 89 SkAutoTUnref<GrTexture> texture(GrRefCachedBitmapTexture(context, fBmp, |
| 90 GrTextureParams
::ClampNoFilter())); | 90 GrTextureParams
::ClampNoFilter())); |
| 91 if (!texture) { | 91 if (!texture) { |
| 92 return; | 92 return; |
| 93 } | 93 } |
| (...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 152 }; | 152 }; |
| 153 | 153 |
| 154 // Windows builds did not like SkScalar initialization in class :( | 154 // Windows builds did not like SkScalar initialization in class :( |
| 155 const SkScalar TextureDomainEffect::kDrawPad = 10.f; | 155 const SkScalar TextureDomainEffect::kDrawPad = 10.f; |
| 156 const SkScalar TextureDomainEffect::kTestPad = 10.f; | 156 const SkScalar TextureDomainEffect::kTestPad = 10.f; |
| 157 | 157 |
| 158 DEF_GM(return new TextureDomainEffect;) | 158 DEF_GM(return new TextureDomainEffect;) |
| 159 } | 159 } |
| 160 | 160 |
| 161 #endif | 161 #endif |
| OLD | NEW |