diff options
author | Robert Phillips <robertphillips@google.com> | 2016-11-04 11:59:10 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2016-11-07 15:56:19 +0000 |
commit | 84a812061f1d16aa6d349ca065bf67d06767bbc2 (patch) | |
tree | 11f467989d4303a1fc62b8b7805547d0b77013fe /tests/ProxyTest.cpp | |
parent | 739c5bf111baf977fe418a24fa00ce260989ee9a (diff) |
Add GrTextureRenderTargetProxy and support switching between RT & Tex Proxies
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=4427
Change-Id: Ie7662299953592f564bb27a4df4ea101f743403e
Reviewed-on: https://skia-review.googlesource.com/4427
Reviewed-by: Brian Salomon <bsalomon@google.com>
Commit-Queue: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'tests/ProxyTest.cpp')
-rw-r--r-- | tests/ProxyTest.cpp | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/tests/ProxyTest.cpp b/tests/ProxyTest.cpp index 6b7ab25a3f..270f7873ab 100644 --- a/tests/ProxyTest.cpp +++ b/tests/ProxyTest.cpp @@ -40,9 +40,6 @@ static void check_rendertarget(skiatest::Reporter* reporter, SkBackingFit fit) { REPORTER_ASSERT(reporter, rtProxy->numStencilSamples() == numSamples); - REPORTER_ASSERT(reporter, rtProxy->asTextureProxy() == nullptr); // for now - REPORTER_ASSERT(reporter, rtProxy->asRenderTargetProxy() == rtProxy); - GrRenderTarget* rt = rtProxy->instantiate(provider); REPORTER_ASSERT(reporter, rt); @@ -69,9 +66,6 @@ static void check_texture(skiatest::Reporter* reporter, GrTextureProvider* provider, GrTextureProxy* texProxy, SkBackingFit fit) { - REPORTER_ASSERT(reporter, texProxy->asTextureProxy() == texProxy); - REPORTER_ASSERT(reporter, texProxy->asRenderTargetProxy() == nullptr); // for now - GrTexture* tex = texProxy->instantiate(provider); REPORTER_ASSERT(reporter, tex); @@ -102,6 +96,7 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(DeferredProxyTest, reporter, ctxInfo) { numSamples <= ctxInfo.grContext()->caps()->maxColorSampleCount(); GrSurfaceDesc desc; + desc.fFlags = kRenderTarget_GrSurfaceFlag; desc.fOrigin = origin; desc.fWidth = widthHeight; desc.fHeight = widthHeight; @@ -119,9 +114,10 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(DeferredProxyTest, reporter, ctxInfo) { numSamples, fit); } + desc.fFlags = kNone_GrSurfaceFlags; desc.fSampleCnt = 0; - sk_sp<GrTextureProxy> texProxy(GrTextureProxy::Make(provider, + sk_sp<GrTextureProxy> texProxy(GrTextureProxy::Make(caps, provider, desc, fit, budgeted)); |