aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/PrimitiveProcessorTest.cpp
diff options
context:
space:
mode:
authorGravatar robertphillips <robertphillips@google.com>2016-06-06 06:16:20 -0700
committerGravatar Commit bot <commit-bot@chromium.org>2016-06-06 06:16:21 -0700
commit55fdcccf01d49173bc731024b4283d3a3ea9150a (patch)
tree1980bd38220c48296bc0d3a9683314e8152c2347 /tests/PrimitiveProcessorTest.cpp
parent401e77cfe126eea1a12bd81410871fdb80739283 (diff)
Remove GrRenderTarget from GrPipelineBuilder
This used to be "Declassify GrClipMaskManager and Remove GrRenderTarget and GrDrawTarget from GrPipelineBuilder" but has been split into: https://codereview.chromium.org/1993263002/ (Make GrAppliedClip friendless) https://codereview.chromium.org/1997773002/ (Retract GrRenderTarget from GLProgramsTest) https://codereview.chromium.org/1993403002/ (GrSWMaskHelper and GrSoftwarePathRenderer only need the textureProvider (not GrContext)) https://codereview.chromium.org/2004433002/ (Retract GrRenderTarget from GrTestTarget) https://codereview.chromium.org/2015333002/ (Change parameters to GrPipelineBuilder's ctor) https://codereview.chromium.org/2035823002/ (Make GrClipMaskManager stateless and push GrPipelineBuilder construction downstack) GOLD_TRYBOT_URL= https://gold.skia.org/search2?unt=true&query=source_type%3Dgm&master=false&issue=1988923002 Review-Url: https://codereview.chromium.org/1988923002
Diffstat (limited to 'tests/PrimitiveProcessorTest.cpp')
-rw-r--r--tests/PrimitiveProcessorTest.cpp11
1 files changed, 5 insertions, 6 deletions
diff --git a/tests/PrimitiveProcessorTest.cpp b/tests/PrimitiveProcessorTest.cpp
index c2ab05c4fb..5ef49942ba 100644
--- a/tests/PrimitiveProcessorTest.cpp
+++ b/tests/PrimitiveProcessorTest.cpp
@@ -104,9 +104,9 @@ private:
DEF_GPUTEST_FOR_ALL_GL_CONTEXTS(VertexAttributeCount, reporter, ctxInfo) {
GrContext* context = ctxInfo.grContext();
- sk_sp<GrDrawContext> dc(context->newDrawContext(SkBackingFit::kApprox,
- 1, 1, kRGBA_8888_GrPixelConfig));
- if (!dc) {
+ sk_sp<GrDrawContext> drawContext(context->newDrawContext(SkBackingFit::kApprox,
+ 1, 1, kRGBA_8888_GrPixelConfig));
+ if (!drawContext) {
ERRORF(reporter, "Could not create draw context.");
return;
}
@@ -123,10 +123,9 @@ DEF_GPUTEST_FOR_ALL_GL_CONTEXTS(VertexAttributeCount, reporter, ctxInfo) {
#endif
SkAutoTUnref<GrDrawBatch> batch;
GrPipelineBuilder pb;
- pb.setRenderTarget(dc->accessRenderTarget());
// This one should succeed.
batch.reset(new Batch(attribCnt));
- dc->drawContextPriv().testingOnly_drawBatch(pb, batch);
+ drawContext->drawContextPriv().testingOnly_drawBatch(pb, batch);
context->flush();
#if GR_GPU_STATS
REPORTER_ASSERT(reporter, context->getGpu()->stats()->numDraws() == 1);
@@ -135,7 +134,7 @@ DEF_GPUTEST_FOR_ALL_GL_CONTEXTS(VertexAttributeCount, reporter, ctxInfo) {
context->resetGpuStats();
// This one should fail.
batch.reset(new Batch(attribCnt+1));
- dc->drawContextPriv().testingOnly_drawBatch(pb, batch);
+ drawContext->drawContextPriv().testingOnly_drawBatch(pb, batch);
context->flush();
#if GR_GPU_STATS
REPORTER_ASSERT(reporter, context->getGpu()->stats()->numDraws() == 0);