aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/ProcessorTest.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-03-15 10:42:12 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-03-15 15:20:40 +0000
commit296b1ccf9b8e9c8b945645efcbaa9c71c7135f58 (patch)
treee8085e48ed8cd2a3b66316e95215f5b06f39bf50 /tests/ProcessorTest.cpp
parente0d4fbac00f240603e725b50d58d89048fd8b21f (diff)
Retract GrContext from src/gpu/effects
Change-Id: Iceb7263098286bafb2605ef17d1fe6bb25d71e97 Reviewed-on: https://skia-review.googlesource.com/9693 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'tests/ProcessorTest.cpp')
-rw-r--r--tests/ProcessorTest.cpp9
1 files changed, 6 insertions, 3 deletions
diff --git a/tests/ProcessorTest.cpp b/tests/ProcessorTest.cpp
index a99e5324ec..e2eeeb939b 100644
--- a/tests/ProcessorTest.cpp
+++ b/tests/ProcessorTest.cpp
@@ -256,10 +256,13 @@ static GrColor texel_color(int i, int j) {
static GrColor4f texel_color4f(int i, int j) { return GrColor4f::FromGrColor(texel_color(i, j)); }
-void test_draw_op(GrContext* context, GrRenderTargetContext* rtc, sk_sp<GrFragmentProcessor> fp,
+void test_draw_op(GrRenderTargetContext* rtc, sk_sp<GrFragmentProcessor> fp,
sk_sp<GrTextureProxy> inputDataProxy) {
+ GrResourceProvider* resourceProvider = rtc->resourceProvider();
+
GrPaint paint;
- paint.addColorTextureProcessor(context, std::move(inputDataProxy), nullptr, SkMatrix::I());
+ paint.addColorTextureProcessor(resourceProvider, std::move(inputDataProxy),
+ nullptr, SkMatrix::I());
paint.addColorFragmentProcessor(std::move(fp));
paint.setPorterDuffXPFactory(SkBlendMode::kSrc);
GrPipelineBuilder pb(std::move(paint), GrAAType::kNone);
@@ -337,7 +340,7 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ProcessorOptimizationValidationTest, repor
!fp->compatibleWithCoverageAsAlpha()) {
continue;
}
- test_draw_op(context, rtc.get(), fp, dataProxy);
+ test_draw_op(rtc.get(), fp, dataProxy);
memset(rgbaData.get(), 0x0, sizeof(GrColor) * 256 * 256);
rtc->readPixels(
SkImageInfo::Make(256, 256, kRGBA_8888_SkColorType, kPremul_SkAlphaType),