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

Unified Diff: tests/ResourceCacheTest.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/RectangleTextureTest.cpp ('k') | tests/SRGBReadWritePixelsTest.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ResourceCacheTest.cpp
diff --git a/tests/ResourceCacheTest.cpp b/tests/ResourceCacheTest.cpp
index 0931876cf13fd6a99e0dbb352b61f711cb3feca8..0ac64edd0758ce104e3354eb8017a8446d4309a0 100644
--- a/tests/ResourceCacheTest.cpp
+++ b/tests/ResourceCacheTest.cpp
@@ -30,7 +30,8 @@ static const int gWidth = 640;
static const int gHeight = 480;
////////////////////////////////////////////////////////////////////////////////
-DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ResourceCacheCache, reporter, context) {
+DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ResourceCacheCache, reporter, ctxInfo) {
+ GrContext* context = ctxInfo.fGrContext;
GrSurfaceDesc desc;
desc.fConfig = kSkia8888_GrPixelConfig;
desc.fFlags = kRenderTarget_GrSurfaceFlag;
@@ -79,7 +80,8 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ResourceCacheCache, reporter, context) {
context->setResourceCacheLimits(oldMaxNum, oldMaxBytes);
}
-DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ResourceCacheStencilBuffers, reporter, context) {
+DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ResourceCacheStencilBuffers, reporter, ctxInfo) {
+ GrContext* context = ctxInfo.fGrContext;
GrSurfaceDesc smallDesc;
smallDesc.fFlags = kRenderTarget_GrSurfaceFlag;
smallDesc.fConfig = kSkia8888_GrPixelConfig;
@@ -186,7 +188,8 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ResourceCacheStencilBuffers, reporter, contex
}
}
-DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ResourceCacheWrappedResources, reporter, context) {
+DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ResourceCacheWrappedResources, reporter, ctxInfo) {
+ GrContext* context = ctxInfo.fGrContext;
GrGpu* gpu = context->getGpu();
// this test is only valid for GL
if (!gpu || !gpu->glContextForTesting()) {
« no previous file with comments | « tests/RectangleTextureTest.cpp ('k') | tests/SRGBReadWritePixelsTest.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698