Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(216)

Side by Side Diff: tests/ImageFilterCacheTest.cpp

Issue 1734043002: Revert of Move Budgeted enum out of SkSurface, use in GrTextureProvider (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « tests/GrTextureMipMapInvalidationTest.cpp ('k') | tests/ImageFilterTest.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
OLDNEW
« no previous file with comments | « tests/GrTextureMipMapInvalidationTest.cpp ('k') | tests/ImageFilterTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698