Remove GrTestTarget
Change-Id: I4d2e1aa54732ff75b44a197255035c0e04548219
Reviewed-on: https://skia-review.googlesource.com/7327
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
diff --git a/tests/TessellatingPathRendererTests.cpp b/tests/TessellatingPathRendererTests.cpp
index b03db18..90d2ba5 100644
--- a/tests/TessellatingPathRendererTests.cpp
+++ b/tests/TessellatingPathRendererTests.cpp
@@ -5,12 +5,12 @@
* found in the LICENSE file.
*/
+#include "Test.h"
+
#include "SkPath.h"
#if SK_SUPPORT_GPU
#include "GrContext.h"
-#include "GrTest.h"
-#include "Test.h"
#include "ops/GrTessellatingPathRenderer.h"
/*
@@ -249,7 +249,7 @@
return path;
}
-static void test_path(GrRenderTargetContext* renderTargetContext, GrResourceProvider* rp,
+static void test_path(GrResourceProvider* rp, GrRenderTargetContext* renderTargetContext,
const SkPath& path) {
GrTessellatingPathRenderer tess;
@@ -272,37 +272,36 @@
}
DEF_GPUTEST_FOR_ALL_CONTEXTS(TessellatingPathRendererTests, reporter, ctxInfo) {
- sk_sp<GrRenderTargetContext> rtc(ctxInfo.grContext()->makeRenderTargetContext(
- SkBackingFit::kApprox,
- 800, 800,
- kRGBA_8888_GrPixelConfig,
- nullptr,
- 0,
- kTopLeft_GrSurfaceOrigin));
+ GrContext* ctx = ctxInfo.grContext();
+ sk_sp<GrRenderTargetContext> rtc(ctx->makeRenderTargetContext(SkBackingFit::kApprox,
+ 800, 800,
+ kRGBA_8888_GrPixelConfig,
+ nullptr,
+ 0,
+ kTopLeft_GrSurfaceOrigin));
if (!rtc) {
return;
}
- GrTestTarget tt;
- ctxInfo.grContext()->getTestTarget(&tt, rtc);
- GrResourceProvider* rp = tt.resourceProvider();
+ GrResourceProvider* rp = ctx->resourceProvider();
- test_path(rtc.get(), rp, create_path_0());
- test_path(rtc.get(), rp, create_path_1());
- test_path(rtc.get(), rp, create_path_2());
- test_path(rtc.get(), rp, create_path_3());
- test_path(rtc.get(), rp, create_path_4());
- test_path(rtc.get(), rp, create_path_5());
- test_path(rtc.get(), rp, create_path_6());
- test_path(rtc.get(), rp, create_path_7());
- test_path(rtc.get(), rp, create_path_8());
- test_path(rtc.get(), rp, create_path_9());
- test_path(rtc.get(), rp, create_path_10());
- test_path(rtc.get(), rp, create_path_11());
- test_path(rtc.get(), rp, create_path_12());
- test_path(rtc.get(), rp, create_path_13());
- test_path(rtc.get(), rp, create_path_14());
- test_path(rtc.get(), rp, create_path_15());
- test_path(rtc.get(), rp, create_path_16());
+ ctx->flush();
+ test_path(rp, rtc.get(), create_path_0());
+ test_path(rp, rtc.get(), create_path_1());
+ test_path(rp, rtc.get(), create_path_2());
+ test_path(rp, rtc.get(), create_path_3());
+ test_path(rp, rtc.get(), create_path_4());
+ test_path(rp, rtc.get(), create_path_5());
+ test_path(rp, rtc.get(), create_path_6());
+ test_path(rp, rtc.get(), create_path_7());
+ test_path(rp, rtc.get(), create_path_8());
+ test_path(rp, rtc.get(), create_path_9());
+ test_path(rp, rtc.get(), create_path_10());
+ test_path(rp, rtc.get(), create_path_11());
+ test_path(rp, rtc.get(), create_path_12());
+ test_path(rp, rtc.get(), create_path_13());
+ test_path(rp, rtc.get(), create_path_14());
+ test_path(rp, rtc.get(), create_path_15());
+ test_path(rp, rtc.get(), create_path_16());
}
#endif