diff options
author | 2018-04-26 16:31:38 -0400 | |
---|---|---|
committer | 2018-04-26 21:44:43 +0000 | |
commit | a070ed7fccd8bc9c5f314e1a4ac090c497862836 (patch) | |
tree | ecc4a4e13087343c756472d77385f46b20149653 /include/gpu | |
parent | 848271111d6982fc0666fb195da1d9d8d279746e (diff) |
Add InternalSurfaceFlag so we know if RenderTargetProxys and RenderTargets use GL FBO 0.
Bug: skia:7748
Change-Id: I2fda3cde12ccdef19fe06ff287a8024b58d28ef0
Reviewed-on: https://skia-review.googlesource.com/124048
Commit-Queue: Greg Daniel <egdaniel@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'include/gpu')
-rw-r--r-- | include/gpu/GrContext.h | 4 | ||||
-rw-r--r-- | include/gpu/GrSurface.h | 8 |
2 files changed, 11 insertions, 1 deletions
diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h index e8f8acc3cf..1acd30c127 100644 --- a/include/gpu/GrContext.h +++ b/include/gpu/GrContext.h @@ -388,13 +388,15 @@ public: * with this characterization will be replayed into * @param isMipMapped Will the surface the DDL will be replayed into have space * allocated for mipmaps? + * @param willUseGLFBO0 Will the surface the DDL will be replayed into be backed by GL + * FBO 0. This flag is only valid if using an GL backend. */ SkSurfaceCharacterization createCharacterization( size_t cacheMaxResourceBytes, const SkImageInfo& ii, const GrBackendFormat& backendFormat, int sampleCount, GrSurfaceOrigin origin, const SkSurfaceProps& surfaceProps, - bool isMipMapped); + bool isMipMapped, bool willUseGLFBO0 = false); const GrCaps* caps() const { return fCaps.get(); } sk_sp<const GrCaps> refCaps() const { return fCaps; } diff --git a/include/gpu/GrSurface.h b/include/gpu/GrSurface.h index 46d3945de4..4ddc5d14cc 100644 --- a/include/gpu/GrSurface.h +++ b/include/gpu/GrSurface.h @@ -91,6 +91,14 @@ protected: return fSurfaceFlags & GrInternalSurfaceFlags::kWindowRectsSupport; } + void setGLRTFBOIDIs0() { + SkASSERT(this->asRenderTarget()); + fSurfaceFlags |= GrInternalSurfaceFlags::kGLRTFBOIDIs0; + } + bool glRTFBOIDis0() const { + return fSurfaceFlags & GrInternalSurfaceFlags::kGLRTFBOIDIs0; + } + // Methods made available via GrSurfacePriv bool hasPendingRead() const; bool hasPendingWrite() const; |