aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests/PackedConfigsTextureTest.cpp
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-04-05 12:45:52 +0000
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-04-05 12:46:02 +0000
commit171cc5fc87ede62712923f5a01db58059a027700 (patch)
tree7cdad3bf4c252d43badcc9ce6442f9a2368dadb3 /tests/PackedConfigsTextureTest.cpp
parent1cfcf2b167754cd3a9158ff6b73407c238c86269 (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/PackedConfigsTextureTest.cpp')
-rw-r--r--tests/PackedConfigsTextureTest.cpp12
1 files changed, 4 insertions, 8 deletions
diff --git a/tests/PackedConfigsTextureTest.cpp b/tests/PackedConfigsTextureTest.cpp
index 35d9dfc3c5..7a51651e7f 100644
--- a/tests/PackedConfigsTextureTest.cpp
+++ b/tests/PackedConfigsTextureTest.cpp
@@ -15,7 +15,6 @@
#if SK_SUPPORT_GPU
#include "GrContext.h"
-#include "GrContextPriv.h"
#include "GrResourceProvider.h"
#include "GrTexture.h"
@@ -117,13 +116,10 @@ void runTest(skiatest::Reporter* reporter, GrContext* context,
desc.fHeight = DEV_H;
desc.fConfig = config;
desc.fOrigin = 0 == origin ? kTopLeft_GrSurfaceOrigin : kBottomLeft_GrSurfaceOrigin;
- sk_sp<GrTextureProxy> fpProxy = GrSurfaceProxy::MakeDeferred(context->resourceProvider(),
- desc, SkBudgeted::kNo,
- controlPixelData.begin(), 0);
- SkASSERT(fpProxy);
- context->contextPriv().readSurfacePixels(fpProxy.get(), nullptr, 0, 0, DEV_W, DEV_H,
- kRGBA_8888_GrPixelConfig, nullptr,
- readBuffer.begin(), 0);
+ sk_sp<GrTexture> fpTexture(context->resourceProvider()->createTexture(
+ desc, SkBudgeted::kNo, controlPixelData.begin(), 0));
+ SkASSERT(fpTexture);
+ fpTexture->readPixels(0, 0, DEV_W, DEV_H, kRGBA_8888_GrPixelConfig, readBuffer.begin(), 0);
if (kRGBA_4444_GrPixelConfig == config) {
check_4444(reporter, controlPixelData, readBuffer);
} else {