aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/PrimitiveProcessorTest.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'tests/PrimitiveProcessorTest.cpp')
-rw-r--r--tests/PrimitiveProcessorTest.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/PrimitiveProcessorTest.cpp b/tests/PrimitiveProcessorTest.cpp
index 36709f8694..3a76e6c5e0 100644
--- a/tests/PrimitiveProcessorTest.cpp
+++ b/tests/PrimitiveProcessorTest.cpp
@@ -14,6 +14,7 @@
#include "GrContextPriv.h"
#include "GrGeometryProcessor.h"
#include "GrGpu.h"
+#include "GrMemoryPool.h"
#include "GrOpFlushState.h"
#include "GrRenderTargetContext.h"
#include "GrRenderTargetContextPriv.h"
@@ -31,7 +32,7 @@ public:
const char* name() const override { return "Dummy Op"; }
- static std::unique_ptr<GrDrawOp> Make(int numAttribs) {
+ static std::unique_ptr<GrDrawOp> Make(GrContext* context, int numAttribs) {
return std::unique_ptr<GrDrawOp>(new Op(numAttribs));
}
@@ -45,6 +46,8 @@ public:
}
private:
+ friend class ::GrOpMemoryPool;
+
Op(int numAttribs) : INHERITED(ClassID()), fNumAttribs(numAttribs) {
this->setBounds(SkRect::MakeWH(1.f, 1.f), HasAABloat::kNo, IsZeroArea::kNo);
}
@@ -140,14 +143,14 @@ DEF_GPUTEST_FOR_ALL_CONTEXTS(VertexAttributeCount, reporter, ctxInfo) {
GrPaint grPaint;
// This one should succeed.
- renderTargetContext->priv().testingOnly_addDrawOp(Op::Make(attribCnt));
+ renderTargetContext->priv().testingOnly_addDrawOp(Op::Make(context, attribCnt));
context->flush();
#if GR_GPU_STATS
REPORTER_ASSERT(reporter, gpu->stats()->numDraws() == 1);
REPORTER_ASSERT(reporter, gpu->stats()->numFailedDraws() == 0);
#endif
context->contextPriv().resetGpuStats();
- renderTargetContext->priv().testingOnly_addDrawOp(Op::Make(attribCnt + 1));
+ renderTargetContext->priv().testingOnly_addDrawOp(Op::Make(context, attribCnt + 1));
context->flush();
#if GR_GPU_STATS
REPORTER_ASSERT(reporter, gpu->stats()->numDraws() == 0);