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

Side by Side Diff: tests/PrimitiveProcessorTest.cpp

Issue 2351753002: Revert of Stop flattening GrCoordTransforms in parent GrFragmentProcessors. (Closed)
Patch Set: Created 4 years, 3 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 unified diff | Download patch
« no previous file with comments | « src/gpu/vk/GrVkPipelineState.cpp ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2016 Google Inc. 2 * Copyright 2016 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 // This is a GPU-backend specific test. It relies on static intializers to work 8 // This is a GPU-backend specific test. It relies on static intializers to work
9 9
10 #include "SkTypes.h" 10 #include "SkTypes.h"
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 63
64 GrGLSLPrimitiveProcessor* createGLSLInstance(const GrGLSLCaps&) cons t override { 64 GrGLSLPrimitiveProcessor* createGLSLInstance(const GrGLSLCaps&) cons t override {
65 class GLSLGP : public GrGLSLGeometryProcessor { 65 class GLSLGP : public GrGLSLGeometryProcessor {
66 public: 66 public:
67 void onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) override { 67 void onEmitCode(EmitArgs& args, GrGPArgs* gpArgs) override {
68 const GP& gp = args.fGP.cast<GP>(); 68 const GP& gp = args.fGP.cast<GP>();
69 args.fVaryingHandler->emitAttributes(gp); 69 args.fVaryingHandler->emitAttributes(gp);
70 this->setupPosition(args.fVertBuilder, gpArgs, gp.fAttri bs[0].fName); 70 this->setupPosition(args.fVertBuilder, gpArgs, gp.fAttri bs[0].fName);
71 } 71 }
72 void setData(const GrGLSLProgramDataManager& pdman, 72 void setData(const GrGLSLProgramDataManager& pdman,
73 const GrPrimitiveProcessor& primProc, 73 const GrPrimitiveProcessor& primProc) override {}
74 FPCoordTransformIter&&) override {}
75 }; 74 };
76 return new GLSLGP(); 75 return new GLSLGP();
77 } 76 }
78 void getGLSLProcessorKey(const GrGLSLCaps&, 77 void getGLSLProcessorKey(const GrGLSLCaps&,
79 GrProcessorKeyBuilder* builder) const overr ide { 78 GrProcessorKeyBuilder* builder) const overr ide {
80 builder->add32(this->numAttribs()); 79 builder->add32(this->numAttribs());
81 } 80 }
82 81
83 private: 82 private:
84 SkTArray<SkString> fAttribNames; 83 SkTArray<SkString> fAttribNames;
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
132 // This one should fail. 131 // This one should fail.
133 batch.reset(new Batch(attribCnt+1)); 132 batch.reset(new Batch(attribCnt+1));
134 drawContext->drawContextPriv().testingOnly_drawBatch(grPaint, batch); 133 drawContext->drawContextPriv().testingOnly_drawBatch(grPaint, batch);
135 context->flush(); 134 context->flush();
136 #if GR_GPU_STATS 135 #if GR_GPU_STATS
137 REPORTER_ASSERT(reporter, context->getGpu()->stats()->numDraws() == 0); 136 REPORTER_ASSERT(reporter, context->getGpu()->stats()->numDraws() == 0);
138 REPORTER_ASSERT(reporter, context->getGpu()->stats()->numFailedDraws() == 1) ; 137 REPORTER_ASSERT(reporter, context->getGpu()->stats()->numFailedDraws() == 1) ;
139 #endif 138 #endif
140 } 139 }
141 #endif 140 #endif
OLDNEW
« no previous file with comments | « src/gpu/vk/GrVkPipelineState.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698