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

Unified Diff: tests/WritePixelsTest.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/TextureStorageAllocator.cpp ('k') | tools/gpu/GrContextFactory.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/WritePixelsTest.cpp
diff --git a/tests/WritePixelsTest.cpp b/tests/WritePixelsTest.cpp
index 6dda6ff89ee70f7beec92c40ad5d3962e7417d1e..669d885c96fb35d86b8add7baf8df4627592f404 100644
--- a/tests/WritePixelsTest.cpp
+++ b/tests/WritePixelsTest.cpp
@@ -406,7 +406,7 @@ DEF_TEST(WritePixels, reporter) {
}
}
#if SK_SUPPORT_GPU
-DEF_GPUTEST_FOR_RENDERING_CONTEXTS(WritePixels_Gpu, reporter, context) {
+DEF_GPUTEST_FOR_RENDERING_CONTEXTS(WritePixels_Gpu, reporter, ctxInfo) {
for (auto& origin : { kTopLeft_GrSurfaceOrigin, kBottomLeft_GrSurfaceOrigin }) {
GrSurfaceDesc desc;
desc.fFlags = kRenderTarget_GrSurfaceFlag;
@@ -414,8 +414,8 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(WritePixels_Gpu, reporter, context) {
desc.fHeight = DEV_H;
desc.fConfig = kSkia8888_GrPixelConfig;
desc.fOrigin = origin;
- SkAutoTUnref<GrTexture> texture(context->textureProvider()->createTexture(desc,
- SkBudgeted::kNo));
+ SkAutoTUnref<GrTexture> texture(
+ ctxInfo.fGrContext->textureProvider()->createTexture(desc, SkBudgeted::kNo));
auto surface(SkSurface::MakeRenderTargetDirect(texture->asRenderTarget()));
test_write_pixels(reporter, surface.get());
}
« no previous file with comments | « tests/TextureStorageAllocator.cpp ('k') | tools/gpu/GrContextFactory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698