OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #include "Test.h" | 8 #include "Test.h" |
9 | 9 |
10 #include "SkBitmap.h" | 10 #include "SkBitmap.h" |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
177 | 177 |
178 static GrTexture* create_texture(GrContext* context) { | 178 static GrTexture* create_texture(GrContext* context) { |
179 SkBitmap srcBM = create_bm(); | 179 SkBitmap srcBM = create_bm(); |
180 | 180 |
181 GrSurfaceDesc desc; | 181 GrSurfaceDesc desc; |
182 desc.fConfig = kSkia8888_GrPixelConfig; | 182 desc.fConfig = kSkia8888_GrPixelConfig; |
183 desc.fFlags = kNone_GrSurfaceFlags; | 183 desc.fFlags = kNone_GrSurfaceFlags; |
184 desc.fWidth = kFullSize; | 184 desc.fWidth = kFullSize; |
185 desc.fHeight = kFullSize; | 185 desc.fHeight = kFullSize; |
186 | 186 |
187 return context->textureProvider()->createTexture(desc, SkBudgeted::kNo, srcB
M.getPixels(), 0); | 187 return context->textureProvider()->createTexture(desc, false, srcBM.getPixel
s(), 0); |
188 } | 188 } |
189 | 189 |
190 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ImageFilterCache_ImageBackedGPU, reporter, co
ntext) { | 190 DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ImageFilterCache_ImageBackedGPU, reporter, co
ntext) { |
191 SkAutoTUnref<GrTexture> srcTexture(create_texture(context)); | 191 SkAutoTUnref<GrTexture> srcTexture(create_texture(context)); |
192 if (!srcTexture) { | 192 if (!srcTexture) { |
193 return; | 193 return; |
194 } | 194 } |
195 | 195 |
196 GrBackendTextureDesc backendDesc; | 196 GrBackendTextureDesc backendDesc; |
197 backendDesc.fConfig = kSkia8888_GrPixelConfig; | 197 backendDesc.fConfig = kSkia8888_GrPixelConfig; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 kNeedNewImageUni
queID_SpecialImage, | 230 kNeedNewImageUni
queID_SpecialImage, |
231 srcTexture)); | 231 srcTexture)); |
232 | 232 |
233 test_find_existing(reporter, fullImg, subsetImg); | 233 test_find_existing(reporter, fullImg, subsetImg); |
234 test_dont_find_if_diff_key(reporter, fullImg, subsetImg); | 234 test_dont_find_if_diff_key(reporter, fullImg, subsetImg); |
235 test_internal_purge(reporter, fullImg); | 235 test_internal_purge(reporter, fullImg); |
236 test_explicit_purging(reporter, fullImg, subsetImg); | 236 test_explicit_purging(reporter, fullImg, subsetImg); |
237 } | 237 } |
238 #endif | 238 #endif |
239 | 239 |
OLD | NEW |