diff options
author | 2016-10-28 13:25:24 -0400 | |
---|---|---|
committer | 2016-10-28 18:35:06 +0000 | |
commit | c7635fa374b87711e5ccd8222957a8fbdc772f7b (patch) | |
tree | c739d7303f25450cfca3f148458cec509bfa4e8a /include/private/GrRenderTargetProxy.h | |
parent | 57a98fc4d595875ca75f906acec8ba508dcb5248 (diff) |
Make GrDrawContext be GrRenderTargetProxy-backed
This is split out of https://codereview.chromium.org/2215323003/ (Start using RenderTargetProxy (omnibus))
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=3841
CQ_INCLUDE_TRYBOTS=master.client.skia.android:Test-Android-Clang-Nexus5-GPU-Adreno330-arm-Debug-GN_Android-Trybot
Change-Id: I1a47f19ed1ac0c249e6ccac8db74095d7f456db4
Reviewed-on: https://skia-review.googlesource.com/3841
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'include/private/GrRenderTargetProxy.h')
-rw-r--r-- | include/private/GrRenderTargetProxy.h | 19 |
1 files changed, 12 insertions, 7 deletions
diff --git a/include/private/GrRenderTargetProxy.h b/include/private/GrRenderTargetProxy.h index 59fed598e1..7d36bf642d 100644 --- a/include/private/GrRenderTargetProxy.h +++ b/include/private/GrRenderTargetProxy.h @@ -9,7 +9,6 @@ #define GrRenderTargetProxy_DEFINED #include "GrRenderTarget.h" -#include "GrRenderTargetPriv.h" #include "GrSurfaceProxy.h" #include "GrTypes.h" @@ -41,7 +40,7 @@ public: * For our purposes, "Mixed Sampled" means the stencil buffer is multisampled but the color * buffer is not. */ - bool isMixedSampled() const { return fFlags & GrRenderTargetPriv::Flags::kMixedSampled; } + bool isMixedSampled() const { return fFlags & GrRenderTarget::Flags::kMixedSampled; } /** * "Unified Sampled" means the stencil and color buffers are both multisampled. @@ -58,7 +57,13 @@ public: */ int numColorSamples() const { return this->isMixedSampled() ? 0 : fDesc.fSampleCnt; } - GrRenderTargetPriv::Flags testingOnly_getFlags() const; + GrRenderTarget::Flags testingOnly_getFlags() const; + + GrRenderTargetOpList* getLastRenderTargetOpList() { + return (GrRenderTargetOpList*) this->getLastOpList(); + } + + SkDEBUGCODE(void validate(GrContext*) const;) private: // Deferred version @@ -67,16 +72,16 @@ private: // Wrapped version GrRenderTargetProxy(const GrCaps&, sk_sp<GrRenderTarget> rt); - // For wrapped render targets we store it here. - // For deferred proxies we will fill this in when we need to instantiate the deferred resource - sk_sp<GrRenderTarget> fTarget; + // For wrapped render targets the actual GrRenderTarget is stored in the GrIORefProxy class. + // For deferred proxies that pointer is filled in when we need to instantiate the + // deferred resource. // These don't usually get computed until the render target is instantiated, but the render // target proxy may need to answer queries about it before then. And since in the deferred case // we know the newly created render target will be internal, we are able to precompute what the // flags will ultimately end up being. In the wrapped case we just copy the wrapped // rendertarget's info here. - GrRenderTargetPriv::Flags fFlags; + GrRenderTarget::Flags fFlags; typedef GrSurfaceProxy INHERITED; }; |