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 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
78 } | 78 } |
79 | 79 |
80 GrTestTarget tt; | 80 GrTestTarget tt; |
81 context->getTestTarget(&tt); | 81 context->getTestTarget(&tt); |
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], nullptr)); | 88 texture[0].reset(GrRefCachedBitmapTexture(context, fBmp[0], |
89 texture[1].reset(GrRefCachedBitmapTexture(context, fBmp[1], nullptr)); | 89 GrTextureParams::ClampBilerp()
)); |
90 texture[2].reset(GrRefCachedBitmapTexture(context, fBmp[2], nullptr)); | 90 texture[1].reset(GrRefCachedBitmapTexture(context, fBmp[1], |
| 91 GrTextureParams::ClampBilerp()
)); |
| 92 texture[2].reset(GrRefCachedBitmapTexture(context, fBmp[2], |
| 93 GrTextureParams::ClampBilerp()
)); |
91 | 94 |
92 if (!texture[0] || !texture[1] || !texture[2]) { | 95 if (!texture[0] || !texture[1] || !texture[2]) { |
93 return; | 96 return; |
94 } | 97 } |
95 | 98 |
96 static const SkScalar kDrawPad = 10.f; | 99 static const SkScalar kDrawPad = 10.f; |
97 static const SkScalar kTestPad = 10.f; | 100 static const SkScalar kTestPad = 10.f; |
98 static const SkScalar kColorSpaceOffset = 36.f; | 101 static const SkScalar kColorSpaceOffset = 36.f; |
99 SkISize sizes[3] = {{YSIZE, YSIZE}, {USIZE, USIZE}, {VSIZE, VSIZE}}; | 102 SkISize sizes[3] = {{YSIZE, YSIZE}, {USIZE, USIZE}, {VSIZE, VSIZE}}; |
100 | 103 |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
136 private: | 139 private: |
137 SkBitmap fBmp[3]; | 140 SkBitmap fBmp[3]; |
138 | 141 |
139 typedef GM INHERITED; | 142 typedef GM INHERITED; |
140 }; | 143 }; |
141 | 144 |
142 DEF_GM(return new YUVtoRGBEffect;) | 145 DEF_GM(return new YUVtoRGBEffect;) |
143 } | 146 } |
144 | 147 |
145 #endif | 148 #endif |
OLD | NEW |