diff options
Diffstat (limited to 'tests')
-rw-r--r-- | tests/GrSurfaceTest.cpp | 2 | ||||
-rw-r--r-- | tests/ImageFilterCacheTest.cpp | 3 | ||||
-rw-r--r-- | tests/ProcessorTest.cpp | 3 | ||||
-rw-r--r-- | tests/ProxyConversionTest.cpp | 6 | ||||
-rw-r--r-- | tests/ProxyRefTest.cpp | 3 | ||||
-rw-r--r-- | tests/ProxyTest.cpp | 7 | ||||
-rw-r--r-- | tests/ReadWriteAlphaTest.cpp | 2 | ||||
-rw-r--r-- | tests/ResourceCacheTest.cpp | 2 | ||||
-rw-r--r-- | tests/SRGBMipMapTest.cpp | 1 | ||||
-rw-r--r-- | tests/SpecialImageTest.cpp | 3 | ||||
-rw-r--r-- | tests/SurfaceTest.cpp | 6 |
11 files changed, 14 insertions, 24 deletions
diff --git a/tests/GrSurfaceTest.cpp b/tests/GrSurfaceTest.cpp index f1d6a269bc..d67f1038fc 100644 --- a/tests/GrSurfaceTest.cpp +++ b/tests/GrSurfaceTest.cpp @@ -184,7 +184,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(InitialTextureClear, reporter, context_info) if (!tex) { continue; } - auto proxy = GrSurfaceProxy::MakeWrapped(std::move(tex), desc.fOrigin); + auto proxy = GrSurfaceProxy::MakeWrapped(std::move(tex)); auto texCtx = context->contextPriv().makeWrappedSurfaceContext( std::move(proxy), nullptr); SkImageInfo info = SkImageInfo::Make( diff --git a/tests/ImageFilterCacheTest.cpp b/tests/ImageFilterCacheTest.cpp index 86ecb15f6e..d718181758 100644 --- a/tests/ImageFilterCacheTest.cpp +++ b/tests/ImageFilterCacheTest.cpp @@ -190,9 +190,8 @@ static sk_sp<GrTextureProxy> create_proxy(GrResourceProvider* resourceProvider) SkBitmap srcBM = create_bm(); GrSurfaceDesc desc; - desc.fFlags = kNone_GrSurfaceFlags; - desc.fOrigin = kTopLeft_GrSurfaceOrigin; desc.fConfig = kRGBA_8888_GrPixelConfig; + desc.fFlags = kNone_GrSurfaceFlags; desc.fWidth = kFullSize; desc.fHeight = kFullSize; diff --git a/tests/ProcessorTest.cpp b/tests/ProcessorTest.cpp index eac6aab274..fd025a0cb4 100644 --- a/tests/ProcessorTest.cpp +++ b/tests/ProcessorTest.cpp @@ -302,10 +302,9 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ProcessorOptimizationValidationTest, repor sk_sp<GrRenderTargetContext> rtc = context->makeDeferredRenderTargetContext( SkBackingFit::kExact, 256, 256, kRGBA_8888_GrPixelConfig, nullptr); GrSurfaceDesc desc; - desc.fFlags = kRenderTarget_GrSurfaceFlag; - desc.fOrigin = kBottomLeft_GrSurfaceOrigin; desc.fWidth = 256; desc.fHeight = 256; + desc.fFlags = kRenderTarget_GrSurfaceFlag; desc.fConfig = kRGBA_8888_GrPixelConfig; sk_sp<GrTextureProxy> proxies[2]; diff --git a/tests/ProxyConversionTest.cpp b/tests/ProxyConversionTest.cpp index 23ca695d42..513b680045 100644 --- a/tests/ProxyConversionTest.cpp +++ b/tests/ProxyConversionTest.cpp @@ -29,7 +29,7 @@ static sk_sp<GrSurfaceProxy> make_wrapped_FBO0(GrResourceProvider* provider, sk_sp<GrRenderTarget> defaultFBO(provider->wrapBackendRenderTarget(backendRT, desc.fOrigin)); SkASSERT(!defaultFBO->asTexture()); - return GrSurfaceProxy::MakeWrapped(std::move(defaultFBO), desc.fOrigin); + return GrSurfaceProxy::MakeWrapped(std::move(defaultFBO)); } static sk_sp<GrSurfaceProxy> make_wrapped_offscreen_rt(GrResourceProvider* provider, @@ -40,7 +40,7 @@ static sk_sp<GrSurfaceProxy> make_wrapped_offscreen_rt(GrResourceProvider* provi sk_sp<GrTexture> tex(provider->createTexture(desc, budgeted)); - return GrSurfaceProxy::MakeWrapped(std::move(tex), desc.fOrigin); + return GrSurfaceProxy::MakeWrapped(std::move(tex)); } static sk_sp<GrSurfaceProxy> make_wrapped_texture(GrResourceProvider* provider, @@ -48,7 +48,7 @@ static sk_sp<GrSurfaceProxy> make_wrapped_texture(GrResourceProvider* provider, SkBudgeted budgeted) { sk_sp<GrTexture> tex(provider->createTexture(desc, budgeted)); - return GrSurfaceProxy::MakeWrapped(std::move(tex), desc.fOrigin); + return GrSurfaceProxy::MakeWrapped(std::move(tex)); } // Test converting between RenderTargetProxies and TextureProxies for wrapped diff --git a/tests/ProxyRefTest.cpp b/tests/ProxyRefTest.cpp index 3648122652..04510b3e7f 100644 --- a/tests/ProxyRefTest.cpp +++ b/tests/ProxyRefTest.cpp @@ -80,14 +80,13 @@ static sk_sp<GrTextureProxy> make_deferred(GrContext* context) { static sk_sp<GrTextureProxy> make_wrapped(GrContext* context) { GrSurfaceDesc desc; desc.fFlags = kRenderTarget_GrSurfaceFlag; - desc.fOrigin = kBottomLeft_GrSurfaceOrigin; desc.fWidth = kWidthHeight; desc.fHeight = kWidthHeight; desc.fConfig = kRGBA_8888_GrPixelConfig; sk_sp<GrTexture> tex(context->resourceProvider()->createTexture(desc, SkBudgeted::kNo)); - return GrSurfaceProxy::MakeWrapped(std::move(tex), desc.fOrigin); + return GrSurfaceProxy::MakeWrapped(std::move(tex)); } DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ProxyRefTest, reporter, ctxInfo) { diff --git a/tests/ProxyTest.cpp b/tests/ProxyTest.cpp index 547d3b2ce3..dd1f4cbe43 100644 --- a/tests/ProxyTest.cpp +++ b/tests/ProxyTest.cpp @@ -236,8 +236,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(WrappedProxyTest, reporter, ctxInfo) { sk_sp<GrRenderTarget> defaultFBO( provider->wrapBackendRenderTarget(backendRT, origin)); - sk_sp<GrSurfaceProxy> sProxy(GrSurfaceProxy::MakeWrapped(defaultFBO, - origin)); + sk_sp<GrSurfaceProxy> sProxy(GrSurfaceProxy::MakeWrapped(defaultFBO)); check_surface(reporter, sProxy.get(), origin, kWidthHeight, kWidthHeight, config, defaultFBO->uniqueID(), SkBudgeted::kNo); @@ -253,7 +252,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(WrappedProxyTest, reporter, ctxInfo) { tex = provider->createTexture(desc, budgeted); sk_sp<GrRenderTarget> rt(sk_ref_sp(tex->asRenderTarget())); - sk_sp<GrSurfaceProxy> sProxy(GrSurfaceProxy::MakeWrapped(rt, origin)); + sk_sp<GrSurfaceProxy> sProxy(GrSurfaceProxy::MakeWrapped(rt)); check_surface(reporter, sProxy.get(), origin, kWidthHeight, kWidthHeight, config, rt->uniqueID(), budgeted); @@ -268,7 +267,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(WrappedProxyTest, reporter, ctxInfo) { tex = provider->createTexture(desc, budgeted); } - sk_sp<GrSurfaceProxy> sProxy(GrSurfaceProxy::MakeWrapped(tex, origin)); + sk_sp<GrSurfaceProxy> sProxy(GrSurfaceProxy::MakeWrapped(tex)); check_surface(reporter, sProxy.get(), origin, kWidthHeight, kWidthHeight, config, tex->uniqueID(), budgeted); check_texture(reporter, provider, sProxy->asTextureProxy(), diff --git a/tests/ReadWriteAlphaTest.cpp b/tests/ReadWriteAlphaTest.cpp index 2e5a1dc12d..344400cca7 100644 --- a/tests/ReadWriteAlphaTest.cpp +++ b/tests/ReadWriteAlphaTest.cpp @@ -50,7 +50,6 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ReadWriteAlpha, reporter, ctxInfo) { { GrSurfaceDesc desc; desc.fFlags = kNone_GrSurfaceFlags; - desc.fOrigin = kTopLeft_GrSurfaceOrigin; desc.fConfig = kAlpha_8_GrPixelConfig; // it is a single channel texture desc.fWidth = X_SIZE; desc.fHeight = Y_SIZE; @@ -154,7 +153,6 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(ReadWriteAlpha, reporter, ctxInfo) { for (int rt = 0; rt < 2; ++rt) { GrSurfaceDesc desc; desc.fFlags = rt ? kRenderTarget_GrSurfaceFlag : kNone_GrSurfaceFlags; - desc.fOrigin = rt ? kBottomLeft_GrSurfaceOrigin : kTopLeft_GrSurfaceOrigin; desc.fConfig = config; desc.fWidth = X_SIZE; desc.fHeight = Y_SIZE; diff --git a/tests/ResourceCacheTest.cpp b/tests/ResourceCacheTest.cpp index 58cf583ed3..3cfa157924 100644 --- a/tests/ResourceCacheTest.cpp +++ b/tests/ResourceCacheTest.cpp @@ -1673,8 +1673,6 @@ static sk_sp<GrTextureProxy> make_mipmap_proxy(GrResourceProvider* provider, GrSurfaceDesc desc; desc.fFlags = flags; - desc.fOrigin = (flags & kRenderTarget_GrSurfaceFlag) ? kBottomLeft_GrSurfaceOrigin - : kTopLeft_GrSurfaceOrigin; desc.fWidth = width; desc.fHeight = height; desc.fConfig = kRGBA_8888_GrPixelConfig; diff --git a/tests/SRGBMipMapTest.cpp b/tests/SRGBMipMapTest.cpp index 07332e4282..8d035e1589 100644 --- a/tests/SRGBMipMapTest.cpp +++ b/tests/SRGBMipMapTest.cpp @@ -124,7 +124,6 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(SRGBMipMaps, reporter, ctxInfo) { // Create our test texture GrSurfaceDesc desc; desc.fFlags = kNone_GrSurfaceFlags; - desc.fOrigin = kTopLeft_GrSurfaceOrigin; desc.fConfig = kSRGBA_8888_GrPixelConfig; desc.fWidth = texS; desc.fHeight = texS; diff --git a/tests/SpecialImageTest.cpp b/tests/SpecialImageTest.cpp index 3574f38129..70d6fd4b38 100644 --- a/tests/SpecialImageTest.cpp +++ b/tests/SpecialImageTest.cpp @@ -301,9 +301,8 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(SpecialImage_DeferredGpu, reporter, ctxInfo) SkBitmap bm = create_bm(); GrSurfaceDesc desc; - desc.fFlags = kNone_GrSurfaceFlags; - desc.fOrigin = kTopLeft_GrSurfaceOrigin; desc.fConfig = kSkia8888_GrPixelConfig; + desc.fFlags = kNone_GrSurfaceFlags; desc.fWidth = kFullSize; desc.fHeight = kFullSize; diff --git a/tests/SurfaceTest.cpp b/tests/SurfaceTest.cpp index 797750f3b1..5249b3d562 100644 --- a/tests/SurfaceTest.cpp +++ b/tests/SurfaceTest.cpp @@ -599,7 +599,7 @@ static sk_sp<SkSurface> create_gpu_surface_backend_texture( backendHandle); sk_sp<SkSurface> surface = SkSurface::MakeFromBackendTexture(context, backendTex, - kTopLeft_GrSurfaceOrigin, sampleCnt, + kDefault_GrSurfaceOrigin, sampleCnt, nullptr, nullptr); if (!surface) { context->getGpu()->deleteTestingOnlyBackendTexture(backendHandle); @@ -625,7 +625,7 @@ static sk_sp<SkSurface> create_gpu_surface_backend_texture_as_render_target( kRGBA_8888_GrPixelConfig, backendHandle); sk_sp<SkSurface> surface = SkSurface::MakeFromBackendTextureAsRenderTarget( - context, backendTex, kTopLeft_GrSurfaceOrigin, sampleCnt, nullptr, nullptr); + context, backendTex, kDefault_GrSurfaceOrigin, sampleCnt, nullptr, nullptr); if (!surface) { context->getGpu()->deleteTestingOnlyBackendTexture(backendHandle); @@ -907,7 +907,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(SurfaceCreationWithColorSpace_Gpu, reporter, backendHandle); return SkSurface::MakeFromBackendTexture(context, backendTex, - kTopLeft_GrSurfaceOrigin, 0, + kDefault_GrSurfaceOrigin, 0, sk_ref_sp(info.colorSpace()), nullptr); }; |