aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Robert Phillips <robertphillips@google.com>2017-08-10 08:44:49 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-08-10 12:47:25 +0000
commit65048139bd26c8edbc6796f220e79b6c848151d7 (patch)
tree3870d39758c3bd26843c754c3d491999632528d2 /include
parent2ef3b0fe3a02513cf0fea519bb67027a6809b7a8 (diff)
Remove accessRenderTarget calls in service of binding stencil buffer
Change-Id: Ifca6e21c619a0433ecf0b8699d92661f8c3068a8 Reviewed-on: https://skia-review.googlesource.com/31243 Commit-Queue: Robert Phillips <robertphillips@google.com> Reviewed-by: Brian Salomon <bsalomon@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/private/GrRenderTargetProxy.h8
-rw-r--r--include/private/GrSurfaceProxy.h4
2 files changed, 10 insertions, 2 deletions
diff --git a/include/private/GrRenderTargetProxy.h b/include/private/GrRenderTargetProxy.h
index 0bfa294c3c..4794eff4e5 100644
--- a/include/private/GrRenderTargetProxy.h
+++ b/include/private/GrRenderTargetProxy.h
@@ -35,6 +35,12 @@ public:
: GrFSAAType::kUnifiedMSAA;
}
+ /*
+ * When instantiated does this proxy require a stencil buffer?
+ */
+ void setNeedsStencil() { fNeedsStencil = true; }
+ bool needsStencil() const { return fNeedsStencil; }
+
/**
* Returns the number of samples/pixel in the stencil buffer (Zero if non-MSAA).
*/
@@ -74,6 +80,8 @@ private:
size_t onUninstantiatedGpuMemorySize() const override;
int fSampleCnt;
+ bool fNeedsStencil;
+
// 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.
diff --git a/include/private/GrSurfaceProxy.h b/include/private/GrSurfaceProxy.h
index efd078a1c3..21438f6540 100644
--- a/include/private/GrSurfaceProxy.h
+++ b/include/private/GrSurfaceProxy.h
@@ -372,11 +372,11 @@ protected:
virtual sk_sp<GrSurface> createSurface(GrResourceProvider*) const = 0;
void assign(sk_sp<GrSurface> surface);
- sk_sp<GrSurface> createSurfaceImpl(GrResourceProvider*, int sampleCnt,
+ sk_sp<GrSurface> createSurfaceImpl(GrResourceProvider*, int sampleCnt, bool needsStencil,
GrSurfaceFlags flags, bool isMipMapped,
SkDestinationSurfaceColorMode mipColorMode) const;
- bool instantiateImpl(GrResourceProvider* resourceProvider, int sampleCnt,
+ bool instantiateImpl(GrResourceProvider* resourceProvider, int sampleCnt, bool needsStencil,
GrSurfaceFlags flags, bool isMipMapped,
SkDestinationSurfaceColorMode mipColorMode);