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

Unified Diff: tests/ImageFilterCacheTest.cpp

Issue 1860593002: One signature for creating unit tests that run on premade GrContexts (Closed) Base URL: https://skia.googlesource.com/skia.git@try_no_native
Patch Set: another guess to fix windows Created 4 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « tests/GrTextureMipMapInvalidationTest.cpp ('k') | tests/ImageFilterTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ImageFilterCacheTest.cpp
diff --git a/tests/ImageFilterCacheTest.cpp b/tests/ImageFilterCacheTest.cpp
index 89c6dcf6aa972b96012945e82d65995e58528523..cd159f19431f2991c6e56ba77853a9060af7de81 100644
--- a/tests/ImageFilterCacheTest.cpp
+++ b/tests/ImageFilterCacheTest.cpp
@@ -187,8 +187,8 @@ static GrTexture* create_texture(GrContext* context) {
return context->textureProvider()->createTexture(desc, SkBudgeted::kNo, srcBM.getPixels(), 0);
}
-DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ImageFilterCache_ImageBackedGPU, reporter, context) {
- SkAutoTUnref<GrTexture> srcTexture(create_texture(context));
+DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ImageFilterCache_ImageBackedGPU, reporter, ctxInfo) {
+ SkAutoTUnref<GrTexture> srcTexture(create_texture(ctxInfo.fGrContext));
if (!srcTexture) {
return;
}
@@ -200,7 +200,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ImageFilterCache_ImageBackedGPU, reporter, co
backendDesc.fHeight = kFullSize;
backendDesc.fSampleCnt = 0;
backendDesc.fTextureHandle = srcTexture->getTextureHandle();
- sk_sp<SkImage> srcImage(SkImage::MakeFromTexture(context, backendDesc, kPremul_SkAlphaType));
+ sk_sp<SkImage> srcImage(SkImage::MakeFromTexture(ctxInfo.fGrContext, backendDesc, kPremul_SkAlphaType));
if (!srcImage) {
return;
}
@@ -208,9 +208,9 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ImageFilterCache_ImageBackedGPU, reporter, co
test_image_backed(reporter, srcImage);
}
-DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ImageFilterCache_GPUBacked, reporter, context) {
+DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ImageFilterCache_GPUBacked, reporter, ctxInfo) {
- SkAutoTUnref<GrTexture> srcTexture(create_texture(context));
+ SkAutoTUnref<GrTexture> srcTexture(create_texture(ctxInfo.fGrContext));
if (!srcTexture) {
return;
}
« 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