diff options
author | 2017-04-05 12:45:52 +0000 | |
---|---|---|
committer | 2017-04-05 12:46:02 +0000 | |
commit | 171cc5fc87ede62712923f5a01db58059a027700 (patch) | |
tree | 7cdad3bf4c252d43badcc9ce6442f9a2368dadb3 /tests/ReadWriteAlphaTest.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/ReadWriteAlphaTest.cpp')
-rw-r--r-- | tests/ReadWriteAlphaTest.cpp | 13 |
1 files changed, 5 insertions, 8 deletions
diff --git a/tests/ReadWriteAlphaTest.cpp b/tests/ReadWriteAlphaTest.cpp index 2a68191a2d..ac34b9dc32 100644 --- a/tests/ReadWriteAlphaTest.cpp +++ b/tests/ReadWriteAlphaTest.cpp @@ -159,10 +159,9 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ReadWriteAlpha, reporter, ctxInfo) { rgbaData[y * X_SIZE + x] = GrColorPackRGBA(6, 7, 8, alphaData[y * X_SIZE + x]); } } - sk_sp<GrTextureProxy> proxy = - GrSurfaceProxy::MakeDeferred(context->resourceProvider(), desc, SkBudgeted::kNo, - rgbaData, 0); - if (!proxy) { + sk_sp<GrTexture> texture( + context->resourceProvider()->createTexture(desc, SkBudgeted::kNo, rgbaData, 0)); + if (!texture) { // We always expect to be able to create a RGBA texture if (!rt && kRGBA_8888_GrPixelConfig == desc.fConfig) { ERRORF(reporter, "Failed to create RGBA texture."); @@ -178,10 +177,8 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ReadWriteAlpha, reporter, ctxInfo) { memset(readback.get(), kClearValue, nonZeroRowBytes * Y_SIZE); // read the texture back - bool result = context->contextPriv().readSurfacePixels( - proxy.get(), nullptr, - 0, 0, desc.fWidth, desc.fHeight, - kAlpha_8_GrPixelConfig, nullptr, + bool result = texture->readPixels(0, 0, desc.fWidth, desc.fHeight, + kAlpha_8_GrPixelConfig, readback.get(), rowBytes); REPORTER_ASSERT_MESSAGE(reporter, result, "8888 readPixels failed"); |