diff options
author | Greg Daniel <egdaniel@google.com> | 2017-04-26 12:19:14 -0400 |
---|---|---|
committer | Skia Commit-Bot <skia-commit-bot@chromium.org> | 2017-04-27 18:15:38 +0000 |
commit | fdd77daedbba3b7c53be74a82fb9fae891b51696 (patch) | |
tree | af2780b3f60109deb860b774eb128487d0134de0 /tests/ProxyTest.cpp | |
parent | a41d48b739c144ee7b36290a9642064bc6cdcd05 (diff) |
Plumb the use of GrBackendRenderTarget throughout Skia
Bug: skia:
Change-Id: Ib99a58d9552f5c7b8d77c09dcc72fa88326c26aa
Reviewed-on: https://skia-review.googlesource.com/14148
Reviewed-by: Brian Salomon <bsalomon@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Commit-Queue: Greg Daniel <egdaniel@google.com>
Diffstat (limited to 'tests/ProxyTest.cpp')
-rw-r--r-- | tests/ProxyTest.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/tests/ProxyTest.cpp b/tests/ProxyTest.cpp index db407d791f..6553b4e94f 100644 --- a/tests/ProxyTest.cpp +++ b/tests/ProxyTest.cpp @@ -10,6 +10,7 @@ #include "Test.h" #if SK_SUPPORT_GPU +#include "GrBackendSurface.h" #include "GrRenderTargetPriv.h" #include "GrRenderTargetProxy.h" #include "GrResourceProvider.h" @@ -20,7 +21,7 @@ static void check_surface(skiatest::Reporter* reporter, GrSurfaceProxy* proxy, GrSurfaceOrigin origin, - int width, int height, + int width, int height, GrPixelConfig config, const GrGpuResource::UniqueID& uniqueID, SkBudgeted budgeted) { @@ -228,17 +229,13 @@ DEF_GPUTEST_FOR_RENDERING_CONTEXTS(WrappedProxyTest, reporter, ctxInfo) { // External on-screen render target. if (renderable && kOpenGL_GrBackend == ctxInfo.backend()) { - GrBackendRenderTargetDesc backendDesc; - backendDesc.fWidth = kWidthHeight; - backendDesc.fHeight = kWidthHeight; - backendDesc.fConfig = config; - backendDesc.fOrigin = origin; - backendDesc.fSampleCnt = numSamples; - backendDesc.fStencilBits = 8; - backendDesc.fRenderTargetHandle = 0; + GrGLFramebufferInfo fboInfo; + fboInfo.fFBOID = 0; + GrBackendRenderTarget backendRT(kWidthHeight, kWidthHeight, numSamples, 8, + config, fboInfo); sk_sp<GrRenderTarget> defaultFBO( - provider->wrapBackendRenderTarget(backendDesc)); + provider->wrapBackendRenderTarget(backendRT, origin)); sk_sp<GrSurfaceProxy> sProxy(GrSurfaceProxy::MakeWrapped(defaultFBO)); check_surface(reporter, sProxy.get(), origin, |