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

Side by Side Diff: tests/ImageFilterCacheTest.cpp

Issue 2163343002: Adding color space to SkSpecialImage (Closed) Base URL: https://skia.googlesource.com/skia.git@colorspace-on-image
Patch Set: Fix compile after rebase Created 4 years, 5 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 | « src/gpu/SkGpuDevice.cpp ('k') | tests/SpecialImageTest.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 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
215 215
216 sk_sp<GrTexture> srcTexture(create_texture(ctxInfo.grContext())); 216 sk_sp<GrTexture> srcTexture(create_texture(ctxInfo.grContext()));
217 if (!srcTexture) { 217 if (!srcTexture) {
218 return; 218 return;
219 } 219 }
220 220
221 const SkIRect& full = SkIRect::MakeWH(kFullSize, kFullSize); 221 const SkIRect& full = SkIRect::MakeWH(kFullSize, kFullSize);
222 222
223 sk_sp<SkSpecialImage> fullImg(SkSpecialImage::MakeFromGpu(full, 223 sk_sp<SkSpecialImage> fullImg(SkSpecialImage::MakeFromGpu(full,
224 kNeedNewImageUniqu eID_SpecialImage, 224 kNeedNewImageUniqu eID_SpecialImage,
225 srcTexture)); 225 srcTexture, nullpt r));
226 226
227 const SkIRect& subset = SkIRect::MakeXYWH(kPad, kPad, kSmallerSize, kSmaller Size); 227 const SkIRect& subset = SkIRect::MakeXYWH(kPad, kPad, kSmallerSize, kSmaller Size);
228 228
229 sk_sp<SkSpecialImage> subsetImg(SkSpecialImage::MakeFromGpu(subset, 229 sk_sp<SkSpecialImage> subsetImg(SkSpecialImage::MakeFromGpu(subset,
230 kNeedNewImageUni queID_SpecialImage, 230 kNeedNewImageUni queID_SpecialImage,
231 srcTexture)); 231 srcTexture, null ptr));
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
OLDNEW
« no previous file with comments | « src/gpu/SkGpuDevice.cpp ('k') | tests/SpecialImageTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698