From 293d696fcfb9f1c83019c4b15c4864cd6649ed78 Mon Sep 17 00:00:00 2001 From: Robert Phillips Date: Tue, 13 Dec 2016 18:48:08 +0000 Subject: Revert "Add a deferred copy surface" This reverts commit 4431de6af930a8638c194b072558ea3a4b79d908. Reason for revert: ANGLE errors (at the very least) Original change's description: > Add a deferred copy surface > > 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. > > Change-Id: Iab1867668d8146a766201158a251b9174438ee2b > Reviewed-on: https://skia-review.googlesource.com/5773 > Reviewed-by: Brian Osman > Reviewed-by: Robert Phillips > Commit-Queue: Robert Phillips > TBR=bsalomon@google.com,robertphillips@google.com,brianosman@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Change-Id: I61408d9e306b9b1ab32f93ab086e95184e12857f Reviewed-on: https://skia-review.googlesource.com/5938 Commit-Queue: Robert Phillips Reviewed-by: Robert Phillips --- tests/EGLImageTest.cpp | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'tests/EGLImageTest.cpp') 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 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 copy(GrSurfaceProxy::TestCopy(context, copyDesc, - externalTexture, SkBudgeted::kYes)); - - GrSurface* copySurf = copy->instantiate(context->textureProvider()); - - test_read_pixels(reporter, context, copySurf, expectedPixelValues); + sk_sp 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) { -- cgit v1.2.3