diff options
author | Robert Phillips <robertphillips@google.com> | 2016-12-14 12:04:46 +0000 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-12-14 12:05:06 +0000 |
commit | d316e77c1e1967b439a9a6c11146c54e367bff71 (patch) | |
tree | fbf7d3740c39507cdb2aad0267c2d96cd3d98bec /tests/EGLImageTest.cpp | |
parent | 2e018f548d76b0688f9873c683cffc681fec40ec (diff) |
Revert "Add a deferred copy surface (take 2)"
This reverts commit 398487a850431cf495330d4023607df5305a311f.
Reason for revert: See if this is causing the roll failure
Original change's description:
> Add a deferred copy surface (take 2)
>
> This CL forces all GrSurface copies to go through a GrSurfaceContext (rather than GrContext).
>
> There is a bit of goofiness going on here until read/writePixels is also consolidated in GrSurfaceContext and a proxy-backed SkImage/SkSurface is added.
>
> This is a reland of https://skia-review.googlesource.com/c/5773/ (Add a deferred copy surface)
>
> Change-Id: Ide560f569aede5e622420dc2f30eef76357d69f4
> Reviewed-on: https://skia-review.googlesource.com/5939
> Reviewed-by: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Salomon <bsalomon@google.com>
> Commit-Queue: Robert Phillips <robertphillips@google.com>
>
TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com,reviews@skia.org
NOPRESUBMIT=true
NOTREECHECKS=true
NOTRY=true
Change-Id: I1ef40f0d5fb0bca62031f94f10eb18acd753e913
Reviewed-on: https://skia-review.googlesource.com/6024
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'tests/EGLImageTest.cpp')
-rw-r--r-- | tests/EGLImageTest.cpp | 13 |
1 files changed, 4 insertions, 9 deletions
diff --git a/tests/EGLImageTest.cpp b/tests/EGLImageTest.cpp index 0dcacf9b6b..f78a0ea02a 100644 --- a/tests/EGLImageTest.cpp +++ b/tests/EGLImageTest.cpp @@ -10,7 +10,6 @@ #include "GrContext.h" #include "GrContextFactory.h" #include "GrShaderCaps.h" -#include "GrSurfaceContext.h" #include "gl/GrGLGpu.h" #include "gl/GrGLUtil.h" #include "gl/GLTestContext.h" @@ -41,7 +40,7 @@ static void cleanup(GLTestContext* glctx0, GrGLuint texID0, GLTestContext* glctx } static void test_read_pixels(skiatest::Reporter* reporter, GrContext* context, - GrSurface* externalTexture, uint32_t expectedPixelValues[]) { + GrTexture* externalTexture, uint32_t expectedPixelValues[]) { int pixelCnt = externalTexture->width() * externalTexture->height(); SkAutoTMalloc<uint32_t> pixels(pixelCnt); memset(pixels.get(), 0, sizeof(uint32_t)*pixelCnt); @@ -77,13 +76,9 @@ static void test_copy_surface(skiatest::Reporter* reporter, GrContext* context, copyDesc.fWidth = externalTexture->width(); copyDesc.fHeight = externalTexture->height(); copyDesc.fFlags = kRenderTarget_GrSurfaceFlag; - - sk_sp<GrSurfaceProxy> copy(GrSurfaceProxy::TestCopy(context, copyDesc, - externalTexture, SkBudgeted::kYes)); - - GrSurface* copySurf = copy->instantiate(context->textureProvider()); - - test_read_pixels(reporter, context, copySurf, expectedPixelValues); + sk_sp<GrTexture> copy(context->textureProvider()->createTexture(copyDesc, SkBudgeted::kYes)); + context->copySurface(copy.get(), externalTexture); + test_read_pixels(reporter, context, copy.get(), expectedPixelValues); } DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(EGLImageTest, reporter, ctxInfo) { |