aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/PrimitiveProcessorTest.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2018-01-19 11:51:20 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-01-19 18:03:03 +0000
commitf440cecbfdf1910104f36aedd0e963da2ae8b6a8 (patch)
tree5fe6182f2a5f23b9d76fffee386359b7f5c5aa9b /tests/PrimitiveProcessorTest.cpp
parente58260031e28a687b940fe3a5747927872d892e8 (diff)
Move more internal methods from GrContext to GrContextPriv
TBR=bsalomon@google.com Change-Id: Ia8cf0e0d30451c69bc7a08215aafa6abe6e0ddbe Reviewed-on: https://skia-review.googlesource.com/97080 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Greg Daniel <egdaniel@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