aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/PrimitiveProcessorTest.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2018-01-22 10:48:15 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-22 16:53:17 +0000
commitf35fd8d2f26ef7217368d1a09d231ee68ed0cb2f (patch)
tree8c97c1dee833ffed509f0ff106ac75f3f8bf6070 /tests/PrimitiveProcessorTest.cpp
parent3ba3fa72ae2fd4102cff22b947d124f72ce0f880 (diff)
Move more internal methods from GrContext to GrContextPriv (take 3)
Change-Id: Ied630e61cf95780bf85032867e6ce663e1ef9c2f Reviewed-on: https://skia-review.googlesource.com/98000 Reviewed-by: Greg Daniel <egdaniel@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com> Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'tests/PrimitiveProcessorTest.cpp')
-rw-r--r--tests/PrimitiveProcessorTest.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/tests/PrimitiveProcessorTest.cpp b/tests/PrimitiveProcessorTest.cpp
index b8b9e6f3ce..406d5e2104 100644
--- a/tests/PrimitiveProcessorTest.cpp
+++ b/tests/PrimitiveProcessorTest.cpp
@@ -111,6 +111,9 @@ private:
DEF_GPUTEST_FOR_ALL_CONTEXTS(VertexAttributeCount, reporter, ctxInfo) {
GrContext* context = ctxInfo.grContext();
+#if GR_GPU_STATS
+ GrGpu* gpu = context->contextPriv().getGpu();
+#endif
sk_sp<GrRenderTargetContext> renderTargetContext(context->makeDeferredRenderTargetContext(
SkBackingFit::kApprox,
@@ -128,23 +131,23 @@ DEF_GPUTEST_FOR_ALL_CONTEXTS(VertexAttributeCount, reporter, ctxInfo) {
context->flush();
context->resetGpuStats();
#if GR_GPU_STATS
- REPORTER_ASSERT(reporter, context->getGpu()->stats()->numDraws() == 0);
- REPORTER_ASSERT(reporter, context->getGpu()->stats()->numFailedDraws() == 0);
+ REPORTER_ASSERT(reporter, gpu->stats()->numDraws() == 0);
+ REPORTER_ASSERT(reporter, gpu->stats()->numFailedDraws() == 0);
#endif
GrPaint grPaint;
// This one should succeed.
renderTargetContext->priv().testingOnly_addDrawOp(Op::Make(attribCnt));
context->flush();
#if GR_GPU_STATS
- REPORTER_ASSERT(reporter, context->getGpu()->stats()->numDraws() == 1);
- REPORTER_ASSERT(reporter, context->getGpu()->stats()->numFailedDraws() == 0);
+ REPORTER_ASSERT(reporter, gpu->stats()->numDraws() == 1);
+ REPORTER_ASSERT(reporter, gpu->stats()->numFailedDraws() == 0);
#endif
context->resetGpuStats();
renderTargetContext->priv().testingOnly_addDrawOp(Op::Make(attribCnt + 1));
context->flush();
#if GR_GPU_STATS
- REPORTER_ASSERT(reporter, context->getGpu()->stats()->numDraws() == 0);
- REPORTER_ASSERT(reporter, context->getGpu()->stats()->numFailedDraws() == 1);
+ REPORTER_ASSERT(reporter, gpu->stats()->numDraws() == 0);
+ REPORTER_ASSERT(reporter, gpu->stats()->numFailedDraws() == 1);
#endif
}
#endif