diff options
Diffstat (limited to 'chromium/third_party/skia/src/gpu/GrDrawTargetCaps.h')
-rw-r--r-- | chromium/third_party/skia/src/gpu/GrDrawTargetCaps.h | 34 |
1 files changed, 30 insertions, 4 deletions
diff --git a/chromium/third_party/skia/src/gpu/GrDrawTargetCaps.h b/chromium/third_party/skia/src/gpu/GrDrawTargetCaps.h index e597e099c94..dcea79e0915 100644 --- a/chromium/third_party/skia/src/gpu/GrDrawTargetCaps.h +++ b/chromium/third_party/skia/src/gpu/GrDrawTargetCaps.h @@ -26,17 +26,34 @@ public: virtual void reset(); virtual SkString dump() const; - bool eightBitPaletteSupport() const { return f8BitPaletteSupport; } bool npotTextureTileSupport() const { return fNPOTTextureTileSupport; } + /** To avoid as-yet-unnecessary complexity we don't allow any partial support of MIP Maps (e.g. + only for POT textures) */ + bool mipMapSupport() const { return fMipMapSupport; } bool twoSidedStencilSupport() const { return fTwoSidedStencilSupport; } bool stencilWrapOpsSupport() const { return fStencilWrapOpsSupport; } bool hwAALineSupport() const { return fHWAALineSupport; } bool shaderDerivativeSupport() const { return fShaderDerivativeSupport; } bool geometryShaderSupport() const { return fGeometryShaderSupport; } bool dualSourceBlendingSupport() const { return fDualSourceBlendingSupport; } - bool bufferLockSupport() const { return fBufferLockSupport; } bool pathRenderingSupport() const { return fPathRenderingSupport; } bool dstReadInShaderSupport() const { return fDstReadInShaderSupport; } + bool discardRenderTargetSupport() const { return fDiscardRenderTargetSupport; } + bool gpuTracingSupport() const { return fGpuTracingSupport; } + + /** + * Indicates whether GPU->CPU memory mapping for GPU resources such as vertex buffers and + * textures allows partial mappings or full mappings. + */ + enum MapFlags { + kNone_MapFlags = 0x0, //<! Cannot map the resource. + + kCanMap_MapFlag = 0x1, //<! The resource can be mapped. Must be set for any of + // the other flags to have meaning.k + kSubset_MapFlag = 0x2, //<! The resource can be partially mapped. + }; + + uint32_t mapBufferFlags() const { return fMapBufferFlags; } // Scratch textures not being reused means that those scratch textures // that we upload to (i.e., don't have a render target) will not be @@ -54,19 +71,27 @@ public: return fConfigRenderSupport[config][withMSAA]; } + bool isConfigTexturable(GrPixelConfig config) const { + SkASSERT(kGrPixelConfigCnt > config); + return fConfigTextureSupport[config]; + } + protected: - bool f8BitPaletteSupport : 1; bool fNPOTTextureTileSupport : 1; + bool fMipMapSupport : 1; bool fTwoSidedStencilSupport : 1; bool fStencilWrapOpsSupport : 1; bool fHWAALineSupport : 1; bool fShaderDerivativeSupport : 1; bool fGeometryShaderSupport : 1; bool fDualSourceBlendingSupport : 1; - bool fBufferLockSupport : 1; bool fPathRenderingSupport : 1; bool fDstReadInShaderSupport : 1; + bool fDiscardRenderTargetSupport: 1; bool fReuseScratchTextures : 1; + bool fGpuTracingSupport : 1; + + uint32_t fMapBufferFlags; int fMaxRenderTargetSize; int fMaxTextureSize; @@ -74,6 +99,7 @@ protected: // The first entry for each config is without msaa and the second is with. bool fConfigRenderSupport[kGrPixelConfigCnt][2]; + bool fConfigTextureSupport[kGrPixelConfigCnt]; typedef SkRefCnt INHERITED; }; |