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

Unified Diff: tests/PrimitiveProcessorTest.cpp

Issue 1988923002: Remove GrRenderTarget from GrPipelineBuilder (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: update to ToT Created 4 years, 6 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/GLProgramsTest.cpp ('k') | tools/gpu/GrTest.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/PrimitiveProcessorTest.cpp
diff --git a/tests/PrimitiveProcessorTest.cpp b/tests/PrimitiveProcessorTest.cpp
index c2ab05c4fba7f19f6fc1e8bf103fe469962238e3..5ef49942ba2263dec1235a3f12d42db2405818e0 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);
« no previous file with comments | « tests/GLProgramsTest.cpp ('k') | tools/gpu/GrTest.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698