diff options
author | Robert Phillips <robertphillips@google.com> | 2017-04-05 12:45:52 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-04-05 12:46:02 +0000 |
commit | 171cc5fc87ede62712923f5a01db58059a027700 (patch) | |
tree | 7cdad3bf4c252d43badcc9ce6442f9a2368dadb3 /tests/ProcessorTest.cpp | |
parent | 1cfcf2b167754cd3a9158ff6b73407c238c86269 (diff) |
Revert "Rm readPixels from GrSurface & move read/writeSurfacePixels to GrContextPriv"
This reverts commit fb0bd98a43fa11e09705837418167dd72bb4a361.
Reason for revert: ANGLE failures
Original change's description:
> Rm readPixels from GrSurface & move read/writeSurfacePixels to GrContextPriv
>
> This is in service of: https://skia-review.googlesource.com/c/11125/ (Add parallel proxyID to StencilOps & RenderTargetOpList) where I want a better choke point for texture creation to improve discard handling.
>
> Change-Id: If57a7de47edc0853dae7bc61337d9acdc03d63b0
> Reviewed-on: https://skia-review.googlesource.com/11200
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
>
TBR=bsalomon@google.com,robertphillips@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I7241070dc1f9df47181061e07adab141f9857974
Reviewed-on: https://skia-review.googlesource.com/11324
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'tests/ProcessorTest.cpp')
-rw-r--r-- | tests/ProcessorTest.cpp | 25 |
1 files changed, 12 insertions, 13 deletions
diff --git a/tests/ProcessorTest.cpp b/tests/ProcessorTest.cpp index 3eb4e16f20..b8691f2689 100644 --- a/tests/ProcessorTest.cpp +++ b/tests/ProcessorTest.cpp @@ -146,12 +146,12 @@ DEF_GPUTEST_FOR_ALL_CONTEXTS(ProcessorRefTest, reporter, ctxInfo) { desc, SkBackingFit::kExact, SkBudgeted::kYes)); - sk_sp<GrTexture> texture2 = - context->resourceProvider()->createTexture(desc, SkBudgeted::kYes); - sk_sp<GrTexture> texture3 = - context->resourceProvider()->createTexture(desc, SkBudgeted::kYes); - sk_sp<GrTexture> texture4 = - context->resourceProvider()->createTexture(desc, SkBudgeted::kYes); + sk_sp<GrTexture> texture2( + context->resourceProvider()->createTexture(desc, SkBudgeted::kYes)); + sk_sp<GrTexture> texture3( + context->resourceProvider()->createTexture(desc, SkBudgeted::kYes)); + sk_sp<GrTexture> texture4( + context->resourceProvider()->createTexture(desc, SkBudgeted::kYes)); sk_sp<GrBuffer> buffer(texelBufferSupport ? context->resourceProvider()->createBuffer( 1024, GrBufferType::kTexel_GrBufferType, @@ -298,8 +298,6 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ProcessorOptimizationValidationTest, repor desc.fFlags = kRenderTarget_GrSurfaceFlag; desc.fConfig = kRGBA_8888_GrPixelConfig; - sk_sp<GrTextureProxy> proxies[2]; - // Put premul data into the RGBA texture that the test FPs can optionally use. std::unique_ptr<GrColor[]> rgbaData(new GrColor[256 * 256]); for (int y = 0; y < 256; ++y) { @@ -308,8 +306,8 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ProcessorOptimizationValidationTest, repor texel_color(random.nextULessThan(256), random.nextULessThan(256)); } } - proxies[0] = GrSurfaceProxy::MakeDeferred(context->resourceProvider(), desc, SkBudgeted::kYes, - rgbaData.get(), 256 * sizeof(GrColor)); + sk_sp<GrTexture> tex0(context->resourceProvider()->createTexture( + desc, SkBudgeted::kYes, rgbaData.get(), 256 * sizeof(GrColor))); // Put random values into the alpha texture that the test FPs can optionally use. desc.fConfig = kAlpha_8_GrPixelConfig; @@ -319,9 +317,10 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ProcessorOptimizationValidationTest, repor alphaData.get()[256 * y + x] = random.nextULessThan(256); } } - proxies[1] = GrSurfaceProxy::MakeDeferred(context->resourceProvider(), desc, SkBudgeted::kYes, - alphaData.get(), 256); - GrProcessorTestData testData(&random, context, rtc.get(), proxies); + sk_sp<GrTexture> tex1(context->resourceProvider()->createTexture(desc, SkBudgeted::kYes, + alphaData.get(), 256)); + GrTexture* textures[] = {tex0.get(), tex1.get()}; + GrProcessorTestData testData(&random, context, rtc.get(), textures); // Use a different array of premul colors for the output of the fragment processor that preceeds // the fragment processor under test. |