| 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 48 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 59 } | 59 } |
| 60 } | 60 } |
| 61 | 61 |
| 62 void onDraw(SkCanvas* canvas) SK_OVERRIDE { | 62 void onDraw(SkCanvas* canvas) SK_OVERRIDE { |
| 63 GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget
(); | 63 GrRenderTarget* rt = canvas->internal_private_accessTopLayerRenderTarget
(); |
| 64 if (NULL == rt) { | 64 if (NULL == rt) { |
| 65 return; | 65 return; |
| 66 } | 66 } |
| 67 GrContext* context = rt->getContext(); | 67 GrContext* context = rt->getContext(); |
| 68 if (NULL == context) { | 68 if (NULL == context) { |
| 69 this->drawGpuOnlyMessage(canvas); |
| 69 return; | 70 return; |
| 70 } | 71 } |
| 71 | 72 |
| 72 GrTestTarget tt; | 73 GrTestTarget tt; |
| 73 context->getTestTarget(&tt); | 74 context->getTestTarget(&tt); |
| 74 if (NULL == tt.target()) { | 75 if (NULL == tt.target()) { |
| 75 SkDEBUGFAIL("Couldn't get Gr test target."); | 76 SkDEBUGFAIL("Couldn't get Gr test target."); |
| 76 return; | 77 return; |
| 77 } | 78 } |
| 78 | 79 |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 124 private: | 125 private: |
| 125 SkBitmap fBmp[3]; | 126 SkBitmap fBmp[3]; |
| 126 | 127 |
| 127 typedef GM INHERITED; | 128 typedef GM INHERITED; |
| 128 }; | 129 }; |
| 129 | 130 |
| 130 DEF_GM( return SkNEW(YUVtoRGBEffect); ) | 131 DEF_GM( return SkNEW(YUVtoRGBEffect); ) |
| 131 } | 132 } |
| 132 | 133 |
| 133 #endif | 134 #endif |
| OLD | NEW |