diff options
author | joshualitt <joshualitt@chromium.org> | 2015-06-18 11:07:09 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2015-06-18 11:07:09 -0700 |
commit | c69fe20ef35df0776b179cbd5ce4d1bdc0ba4090 (patch) | |
tree | 3b4709eece1c6d8a504aa2e66f2df0422259a724 /include | |
parent | 1e23736f59f64b88b595cec488352bcc0b3b8406 (diff) |
Work around for nexus 6 TexSubImage issue
BUG=skia:
Review URL: https://codereview.chromium.org/1173203005
Diffstat (limited to 'include')
-rw-r--r-- | include/gpu/GrCaps.h | 26 | ||||
-rw-r--r-- | include/gpu/GrContextOptions.h | 6 |
2 files changed, 20 insertions, 12 deletions
diff --git a/include/gpu/GrCaps.h b/include/gpu/GrCaps.h index 54969c5933..c5789fc0dc 100644 --- a/include/gpu/GrCaps.h +++ b/include/gpu/GrCaps.h @@ -133,6 +133,9 @@ public: bool textureBarrierSupport() const { return fTextureBarrierSupport; } bool useDrawInsteadOfClear() const { return fUseDrawInsteadOfClear; } + bool useDrawInsteadOfPartialTextureWrite() const { + return fUseDrawInsteadOfPartialTextureWrite; + } /** * Indicates the capabilities of the fixed function blend unit. @@ -220,18 +223,19 @@ protected: SkAutoTUnref<GrShaderCaps> fShaderCaps; - bool fNPOTTextureTileSupport : 1; - bool fMipMapSupport : 1; - bool fTwoSidedStencilSupport : 1; - bool fStencilWrapOpsSupport : 1; - bool fDiscardRenderTargetSupport : 1; - bool fReuseScratchTextures : 1; - bool fGpuTracingSupport : 1; - bool fCompressedTexSubImageSupport : 1; - bool fOversizedStencilSupport : 1; - bool fTextureBarrierSupport : 1; + bool fNPOTTextureTileSupport : 1; + bool fMipMapSupport : 1; + bool fTwoSidedStencilSupport : 1; + bool fStencilWrapOpsSupport : 1; + bool fDiscardRenderTargetSupport : 1; + bool fReuseScratchTextures : 1; + bool fGpuTracingSupport : 1; + bool fCompressedTexSubImageSupport : 1; + bool fOversizedStencilSupport : 1; + bool fTextureBarrierSupport : 1; // Driver workaround - bool fUseDrawInsteadOfClear : 1; + bool fUseDrawInsteadOfClear : 1; + bool fUseDrawInsteadOfPartialTextureWrite : 1; BlendEquationSupport fBlendEquationSupport; uint32_t fAdvBlendEqBlacklist; diff --git a/include/gpu/GrContextOptions.h b/include/gpu/GrContextOptions.h index 057bc83d19..95b153fe61 100644 --- a/include/gpu/GrContextOptions.h +++ b/include/gpu/GrContextOptions.h @@ -17,7 +17,8 @@ struct GrContextOptions { , fMaxTextureSizeOverride(SK_MaxS32) , fMinTextureSizeOverride(0) , fSuppressDualSourceBlending(false) - , fGeometryBufferMapThreshold(-1) {} + , fGeometryBufferMapThreshold(-1) + , fUseDrawInsteadOfPartialTextureWrite(false) {} // EXPERIMENTAL // May be removed in the future, or may become standard depending @@ -39,6 +40,9 @@ struct GrContextOptions { buffers to CPU memory in order to update them. A value of -1 means the GrContext should deduce the optimal value for this platform. */ int fGeometryBufferMapThreshold; + + /** some gpus have problems with partial texture writes */ + bool fUseDrawInsteadOfPartialTextureWrite; }; #endif |