| 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 100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 (effect) { | 115 if (effect) { |
| 116 SkMatrix viewMatrix; | 116 SkMatrix viewMatrix; |
| 117 viewMatrix.setTranslate(x, y); | 117 viewMatrix.setTranslate(x, y); |
| 118 drawState->reset(viewMatrix); | 118 drawState->reset(viewMatrix); |
| 119 drawState->setRenderTarget(rt); | 119 drawState->setRenderTarget(rt); |
| 120 drawState->setColor(0xffffffff); | 120 drawState->setColor(0xffffffff); |
| 121 drawState->addColorEffect(effect, 1); | 121 drawState->addColorEffect(effect); |
| 122 tt.target()->drawSimpleRect(renderRect); | 122 tt.target()->drawSimpleRect(renderRect); |
| 123 } | 123 } |
| 124 x += renderRect.width() + kTestPad; | 124 x += renderRect.width() + kTestPad; |
| 125 } | 125 } |
| 126 } | 126 } |
| 127 | 127 |
| 128 GrUnlockAndUnrefCachedBitmapTexture(texture[0]); | 128 GrUnlockAndUnrefCachedBitmapTexture(texture[0]); |
| 129 GrUnlockAndUnrefCachedBitmapTexture(texture[1]); | 129 GrUnlockAndUnrefCachedBitmapTexture(texture[1]); |
| 130 GrUnlockAndUnrefCachedBitmapTexture(texture[2]); | 130 GrUnlockAndUnrefCachedBitmapTexture(texture[2]); |
| 131 } | 131 } |
| 132 | 132 |
| 133 private: | 133 private: |
| 134 SkBitmap fBmp[3]; | 134 SkBitmap fBmp[3]; |
| 135 | 135 |
| 136 typedef GM INHERITED; | 136 typedef GM INHERITED; |
| 137 }; | 137 }; |
| 138 | 138 |
| 139 DEF_GM( return SkNEW(YUVtoRGBEffect); ) | 139 DEF_GM( return SkNEW(YUVtoRGBEffect); ) |
| 140 } | 140 } |
| 141 | 141 |
| 142 #endif | 142 #endif |
| OLD | NEW |