| 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 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 110 SkAutoTUnref<GrFragmentProcessor> fp( | 110 SkAutoTUnref<GrFragmentProcessor> fp( |
| 111 GrYUVtoRGBEffect::Create(texture[indices[i][0]], | 111 GrYUVtoRGBEffect::Create(texture[indices[i][0]], |
| 112 texture[indices[i][1]], | 112 texture[indices[i][1]], |
| 113 texture[indices[i][2]], | 113 texture[indices[i][2]], |
| 114 static_cast<SkYUVColorSpace>
(space))); | 114 static_cast<SkYUVColorSpace>
(space))); |
| 115 if (fp) { | 115 if (fp) { |
| 116 SkMatrix viewMatrix; | 116 SkMatrix viewMatrix; |
| 117 viewMatrix.setTranslate(x, y); | 117 viewMatrix.setTranslate(x, y); |
| 118 GrDrawState drawState(viewMatrix); | 118 GrDrawState drawState(viewMatrix); |
| 119 drawState.setRenderTarget(rt); | 119 drawState.setRenderTarget(rt); |
| 120 drawState.setColor(0xffffffff); | |
| 121 drawState.addColorProcessor(fp); | 120 drawState.addColorProcessor(fp); |
| 122 tt.target()->drawSimpleRect(&drawState, renderRect); | 121 tt.target()->drawSimpleRect(&drawState, GrColor_WHITE, rende
rRect); |
| 123 } | 122 } |
| 124 x += renderRect.width() + kTestPad; | 123 x += renderRect.width() + kTestPad; |
| 125 } | 124 } |
| 126 } | 125 } |
| 127 } | 126 } |
| 128 | 127 |
| 129 private: | 128 private: |
| 130 SkBitmap fBmp[3]; | 129 SkBitmap fBmp[3]; |
| 131 | 130 |
| 132 typedef GM INHERITED; | 131 typedef GM INHERITED; |
| 133 }; | 132 }; |
| 134 | 133 |
| 135 DEF_GM( return SkNEW(YUVtoRGBEffect); ) | 134 DEF_GM( return SkNEW(YUVtoRGBEffect); ) |
| 136 } | 135 } |
| 137 | 136 |
| 138 #endif | 137 #endif |
| OLD | NEW |