diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/effects/SkArithmeticMode_gpu.h | 2 | ||||
-rw-r--r-- | src/gpu/GrAAConvexPathRenderer.cpp | 2 | ||||
-rw-r--r-- | src/gpu/GrAAHairLinePathRenderer.cpp | 2 | ||||
-rw-r--r-- | src/gpu/GrBufferAllocPool.cpp | 2 | ||||
-rw-r--r-- | src/gpu/GrClipMaskManager.cpp | 2 | ||||
-rwxr-xr-x | src/gpu/GrContext.cpp | 2 | ||||
-rw-r--r-- | src/gpu/GrCoordTransform.cpp | 2 | ||||
-rw-r--r-- | src/gpu/GrDrawTarget.cpp | 2 | ||||
-rw-r--r-- | src/gpu/GrDrawTargetCaps.h | 237 | ||||
-rw-r--r-- | src/gpu/GrGpu.cpp | 2 | ||||
-rw-r--r-- | src/gpu/GrPathRendererChain.cpp | 2 | ||||
-rw-r--r-- | src/gpu/GrPipeline.cpp | 2 | ||||
-rw-r--r-- | src/gpu/GrPipelineBuilder.h | 2 | ||||
-rw-r--r-- | src/gpu/GrSWMaskHelper.cpp | 2 | ||||
-rw-r--r-- | src/gpu/GrStencilAndCoverPathRenderer.cpp | 3 | ||||
-rw-r--r-- | src/gpu/GrTexture.cpp | 2 | ||||
-rw-r--r-- | src/gpu/effects/GrBezierEffect.h | 2 | ||||
-rw-r--r-- | src/gpu/effects/GrConvexPolyEffect.h | 2 | ||||
-rw-r--r-- | src/gpu/effects/GrCoverageSetOpXP.cpp | 2 | ||||
-rw-r--r-- | src/gpu/effects/GrCustomXfermodePriv.h | 2 | ||||
-rw-r--r-- | src/gpu/effects/GrDashingEffect.cpp | 2 | ||||
-rw-r--r-- | src/gpu/effects/GrPorterDuffXferProcessor.cpp | 2 | ||||
-rw-r--r-- | src/gpu/gl/GrGLCaps.h | 2 |
23 files changed, 23 insertions, 259 deletions
diff --git a/src/effects/SkArithmeticMode_gpu.h b/src/effects/SkArithmeticMode_gpu.h index a8e32ab03a..cbf32ff9cb 100644 --- a/src/effects/SkArithmeticMode_gpu.h +++ b/src/effects/SkArithmeticMode_gpu.h @@ -12,8 +12,8 @@ #if SK_SUPPORT_GPU +#include "GrCaps.h" #include "GrCoordTransform.h" -#include "GrDrawTargetCaps.h" #include "GrFragmentProcessor.h" #include "GrTextureAccess.h" #include "GrTypes.h" diff --git a/src/gpu/GrAAConvexPathRenderer.cpp b/src/gpu/GrAAConvexPathRenderer.cpp index dbf2979aac..5d08aa5c99 100644 --- a/src/gpu/GrAAConvexPathRenderer.cpp +++ b/src/gpu/GrAAConvexPathRenderer.cpp @@ -12,9 +12,9 @@ #include "GrBatch.h" #include "GrBatchTarget.h" #include "GrBatchTest.h" +#include "GrCaps.h" #include "GrContext.h" #include "GrDefaultGeoProcFactory.h" -#include "GrDrawTargetCaps.h" #include "GrGeometryProcessor.h" #include "GrInvariantOutput.h" #include "GrPathUtils.h" diff --git a/src/gpu/GrAAHairLinePathRenderer.cpp b/src/gpu/GrAAHairLinePathRenderer.cpp index 6dcf063974..b7cb237436 100644 --- a/src/gpu/GrAAHairLinePathRenderer.cpp +++ b/src/gpu/GrAAHairLinePathRenderer.cpp @@ -10,9 +10,9 @@ #include "GrBatch.h" #include "GrBatchTarget.h" #include "GrBatchTest.h" +#include "GrCaps.h" #include "GrContext.h" #include "GrDefaultGeoProcFactory.h" -#include "GrDrawTargetCaps.h" #include "GrIndexBuffer.h" #include "GrPathUtils.h" #include "GrPipelineBuilder.h" diff --git a/src/gpu/GrBufferAllocPool.cpp b/src/gpu/GrBufferAllocPool.cpp index b1a87b883e..db19a5b540 100644 --- a/src/gpu/GrBufferAllocPool.cpp +++ b/src/gpu/GrBufferAllocPool.cpp @@ -8,7 +8,7 @@ #include "GrBufferAllocPool.h" -#include "GrDrawTargetCaps.h" +#include "GrCaps.h" #include "GrGpu.h" #include "GrIndexBuffer.h" #include "GrTypes.h" diff --git a/src/gpu/GrClipMaskManager.cpp b/src/gpu/GrClipMaskManager.cpp index 15677fc18d..6850515f1c 100644 --- a/src/gpu/GrClipMaskManager.cpp +++ b/src/gpu/GrClipMaskManager.cpp @@ -9,7 +9,7 @@ #include "GrAAConvexPathRenderer.h" #include "GrAAHairLinePathRenderer.h" #include "GrAARectRenderer.h" -#include "GrDrawTargetCaps.h" +#include "GrCaps.h" #include "GrPaint.h" #include "GrPathRenderer.h" #include "GrRenderTarget.h" diff --git a/src/gpu/GrContext.cpp b/src/gpu/GrContext.cpp index 342fb2175e..f4ca6c480e 100755 --- a/src/gpu/GrContext.cpp +++ b/src/gpu/GrContext.cpp @@ -14,10 +14,10 @@ #include "GrBatchFontCache.h" #include "GrBatchTarget.h" #include "GrBatchTest.h" +#include "GrCaps.h" #include "GrDefaultGeoProcFactory.h" #include "GrGpuResource.h" #include "GrGpuResourcePriv.h" -#include "GrDrawTargetCaps.h" #include "GrGpu.h" #include "GrImmediateDrawTarget.h" #include "GrIndexBuffer.h" diff --git a/src/gpu/GrCoordTransform.cpp b/src/gpu/GrCoordTransform.cpp index 19c4ce197c..596a94bbdf 100644 --- a/src/gpu/GrCoordTransform.cpp +++ b/src/gpu/GrCoordTransform.cpp @@ -6,8 +6,8 @@ */ #include "GrCoordTransform.h" +#include "GrCaps.h" #include "GrContext.h" -#include "GrDrawTargetCaps.h" #include "GrGpu.h" void GrCoordTransform::reset(GrCoordSet sourceCoords, const SkMatrix& m, const GrTexture* texture, diff --git a/src/gpu/GrDrawTarget.cpp b/src/gpu/GrDrawTarget.cpp index 35a19e4e24..20288a9916 100644 --- a/src/gpu/GrDrawTarget.cpp +++ b/src/gpu/GrDrawTarget.cpp @@ -9,8 +9,8 @@ #include "GrDrawTarget.h" #include "GrBatch.h" +#include "GrCaps.h" #include "GrContext.h" -#include "GrDrawTargetCaps.h" #include "GrPath.h" #include "GrPipeline.h" #include "GrMemoryPool.h" diff --git a/src/gpu/GrDrawTargetCaps.h b/src/gpu/GrDrawTargetCaps.h deleted file mode 100644 index 3381bd36b4..0000000000 --- a/src/gpu/GrDrawTargetCaps.h +++ /dev/null @@ -1,237 +0,0 @@ - -/* - * Copyright 2013 Google Inc. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ -#ifndef GrCaps_DEFINED -#define GrCaps_DEFINED - -#include "GrTypes.h" -#include "GrTypesPriv.h" -#include "GrShaderVar.h" -#include "SkRefCnt.h" -#include "SkString.h" - -class GrShaderCaps : public SkRefCnt { -public: - SK_DECLARE_INST_COUNT(GrShaderCaps) - - /** Info about shader variable precision within a given shader stage. That is, this info - is relevant to a float (or vecNf) variable declared with a GrSLPrecision - in a given GrShaderType. The info here is hoisted from the OpenGL spec. */ - struct PrecisionInfo { - PrecisionInfo() { - fLogRangeLow = 0; - fLogRangeHigh = 0; - fBits = 0; - } - - /** Is this precision level allowed in the shader stage? */ - bool supported() const { return 0 != fBits; } - - bool operator==(const PrecisionInfo& that) const { - return fLogRangeLow == that.fLogRangeLow && fLogRangeHigh == that.fLogRangeHigh && - fBits == that.fBits; - } - bool operator!=(const PrecisionInfo& that) const { return !(*this == that); } - - /** floor(log2(|min_value|)) */ - int fLogRangeLow; - /** floor(log2(|max_value|)) */ - int fLogRangeHigh; - /** Number of bits of precision. As defined in OpenGL (with names modified to reflect this - struct) : - """ - If the smallest representable value greater than 1 is 1 + e, then fBits will - contain floor(log2(e)), and every value in the range [2^fLogRangeLow, - 2^fLogRangeHigh] can be represented to at least one part in 2^fBits. - """ - */ - int fBits; - }; - - GrShaderCaps() { - this->reset(); - } - virtual ~GrShaderCaps() {} - GrShaderCaps(const GrShaderCaps& other) : INHERITED() { - *this = other; - } - GrShaderCaps& operator= (const GrShaderCaps&); - - virtual void reset(); - virtual SkString dump() const; - - bool shaderDerivativeSupport() const { return fShaderDerivativeSupport; } - bool geometryShaderSupport() const { return fGeometryShaderSupport; } - bool pathRenderingSupport() const { return fPathRenderingSupport; } - bool dstReadInShaderSupport() const { return fDstReadInShaderSupport; } - bool dualSourceBlendingSupport() const { return fDualSourceBlendingSupport; } - bool mixedSamplesSupport() const { return fMixedSamplesSupport; } - - /** - * Get the precision info for a variable of type kFloat_GrSLType, kVec2f_GrSLType, etc in a - * given shader type. If the shader type is not supported or the precision level is not - * supported in that shader type then the returned struct will report false when supported() is - * called. - */ - const PrecisionInfo& getFloatShaderPrecisionInfo(GrShaderType shaderType, - GrSLPrecision precision) const { - return fFloatPrecisions[shaderType][precision]; - }; - - /** - * Is there any difference between the float shader variable precision types? If this is true - * then unless the shader type is not supported, any call to getFloatShaderPrecisionInfo() would - * report the same info for all precisions in all shader types. - */ - bool floatPrecisionVaries() const { return fShaderPrecisionVaries; } - -protected: - bool fShaderDerivativeSupport : 1; - bool fGeometryShaderSupport : 1; - bool fPathRenderingSupport : 1; - bool fDstReadInShaderSupport : 1; - bool fDualSourceBlendingSupport : 1; - bool fMixedSamplesSupport : 1; - - bool fShaderPrecisionVaries; - PrecisionInfo fFloatPrecisions[kGrShaderTypeCount][kGrSLPrecisionCount]; - -private: - typedef SkRefCnt INHERITED; -}; - -/** - * Represents the capabilities of a GrContext. - */ -class GrCaps : public SkRefCnt { -public: - SK_DECLARE_INST_COUNT(GrCaps) - - GrCaps() { - fShaderCaps.reset(NULL); - this->reset(); - } - GrCaps(const GrCaps& other) : INHERITED() { - *this = other; - } - virtual ~GrCaps() {} - GrCaps& operator= (const GrCaps&); - - virtual void reset(); - virtual SkString dump() const; - - GrShaderCaps* shaderCaps() const { return fShaderCaps; } - - 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 discardRenderTargetSupport() const { return fDiscardRenderTargetSupport; } -#if GR_FORCE_GPU_TRACE_DEBUGGING - bool gpuTracingSupport() const { return true; } -#else - bool gpuTracingSupport() const { return fGpuTracingSupport; } -#endif - bool compressedTexSubImageSupport() const { return fCompressedTexSubImageSupport; } - bool oversizedStencilSupport() const { return fOversizedStencilSupport; } - bool textureBarrierSupport() const { return fTextureBarrierSupport; } - - bool useDrawInsteadOfClear() const { return fUseDrawInsteadOfClear; } - - /** - * Indicates the capabilities of the fixed function blend unit. - */ - enum BlendEquationSupport { - kBasic_BlendEquationSupport, //<! Support to select the operator that - // combines src and dst terms. - kAdvanced_BlendEquationSupport, //<! Additional fixed function support for specific - // SVG/PDF blend modes. Requires blend barriers. - kAdvancedCoherent_BlendEquationSupport, //<! Advanced blend equation support that does not - // require blend barriers, and permits overlap. - - kLast_BlendEquationSupport = kAdvancedCoherent_BlendEquationSupport - }; - - BlendEquationSupport blendEquationSupport() const { return fBlendEquationSupport; } - - bool advancedBlendEquationSupport() const { - return fBlendEquationSupport >= kAdvanced_BlendEquationSupport; - } - - bool advancedCoherentBlendEquationSupport() const { - return kAdvancedCoherent_BlendEquationSupport == fBlendEquationSupport; - } - - /** - * 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 - // recycled in the texture cache. This is to prevent ghosting by drivers - // (in particular for deferred architectures). - bool reuseScratchTextures() const { return fReuseScratchTextures; } - - int maxRenderTargetSize() const { return fMaxRenderTargetSize; } - int maxTextureSize() const { return fMaxTextureSize; } - // Will be 0 if MSAA is not supported - int maxSampleCount() const { return fMaxSampleCount; } - - bool isConfigRenderable(GrPixelConfig config, bool withMSAA) const { - SkASSERT(kGrPixelConfigCnt > config); - return fConfigRenderSupport[config][withMSAA]; - } - - bool isConfigTexturable(GrPixelConfig config) const { - SkASSERT(kGrPixelConfigCnt > config); - return fConfigTextureSupport[config]; - } - -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; - // Driver workaround - bool fUseDrawInsteadOfClear : 1; - - BlendEquationSupport fBlendEquationSupport; - uint32_t fMapBufferFlags; - - int fMaxRenderTargetSize; - int fMaxTextureSize; - int fMaxSampleCount; - - // The first entry for each config is without msaa and the second is with. - bool fConfigRenderSupport[kGrPixelConfigCnt][2]; - bool fConfigTextureSupport[kGrPixelConfigCnt]; - -private: - typedef SkRefCnt INHERITED; -}; - -#endif diff --git a/src/gpu/GrGpu.cpp b/src/gpu/GrGpu.cpp index b7d362c2fa..7fc1491eca 100644 --- a/src/gpu/GrGpu.cpp +++ b/src/gpu/GrGpu.cpp @@ -9,8 +9,8 @@ #include "GrGpu.h" +#include "GrCaps.h" #include "GrContext.h" -#include "GrDrawTargetCaps.h" #include "GrGpuResourcePriv.h" #include "GrIndexBuffer.h" #include "GrResourceCache.h" diff --git a/src/gpu/GrPathRendererChain.cpp b/src/gpu/GrPathRendererChain.cpp index 915bdd263f..bc74e2f4f7 100644 --- a/src/gpu/GrPathRendererChain.cpp +++ b/src/gpu/GrPathRendererChain.cpp @@ -9,9 +9,9 @@ #include "GrPathRendererChain.h" +#include "GrCaps.h" #include "GrContext.h" #include "GrDefaultPathRenderer.h" -#include "GrDrawTargetCaps.h" #include "GrGpu.h" GrPathRendererChain::GrPathRendererChain(GrContext* context) diff --git a/src/gpu/GrPipeline.cpp b/src/gpu/GrPipeline.cpp index 5feac78fc9..f17f402b4d 100644 --- a/src/gpu/GrPipeline.cpp +++ b/src/gpu/GrPipeline.cpp @@ -7,8 +7,8 @@ #include "GrPipeline.h" +#include "GrCaps.h" #include "GrBatch.h" -#include "GrDrawTargetCaps.h" #include "GrGpu.h" #include "GrPipelineBuilder.h" #include "GrProcOptInfo.h" diff --git a/src/gpu/GrPipelineBuilder.h b/src/gpu/GrPipelineBuilder.h index b48a1b4b1f..447a981f3a 100644 --- a/src/gpu/GrPipelineBuilder.h +++ b/src/gpu/GrPipelineBuilder.h @@ -9,8 +9,8 @@ #define GrPipelineBuilder_DEFINED #include "GrBlend.h" +#include "GrCaps.h" #include "GrClip.h" -#include "GrDrawTargetCaps.h" #include "GrGpuResourceRef.h" #include "GrFragmentStage.h" #include "GrProcOptInfo.h" diff --git a/src/gpu/GrSWMaskHelper.cpp b/src/gpu/GrSWMaskHelper.cpp index 223f62fd95..aa922ca170 100644 --- a/src/gpu/GrSWMaskHelper.cpp +++ b/src/gpu/GrSWMaskHelper.cpp @@ -8,7 +8,7 @@ #include "GrSWMaskHelper.h" #include "GrPipelineBuilder.h" -#include "GrDrawTargetCaps.h" +#include "GrCaps.h" #include "GrGpu.h" #include "SkData.h" diff --git a/src/gpu/GrStencilAndCoverPathRenderer.cpp b/src/gpu/GrStencilAndCoverPathRenderer.cpp index cfab836297..a6992df75e 100644 --- a/src/gpu/GrStencilAndCoverPathRenderer.cpp +++ b/src/gpu/GrStencilAndCoverPathRenderer.cpp @@ -8,8 +8,9 @@ #include "GrStencilAndCoverPathRenderer.h" +#include "GrCaps.h" #include "GrContext.h" -#include "GrDrawTargetCaps.h" +#include "GrGpu.h" #include "GrPath.h" #include "GrRenderTarget.h" #include "GrResourceProvider.h" diff --git a/src/gpu/GrTexture.cpp b/src/gpu/GrTexture.cpp index dfa5626d1b..33b8687017 100644 --- a/src/gpu/GrTexture.cpp +++ b/src/gpu/GrTexture.cpp @@ -7,7 +7,7 @@ */ #include "GrContext.h" -#include "GrDrawTargetCaps.h" +#include "GrCaps.h" #include "GrGpu.h" #include "GrResourceKey.h" #include "GrRenderTarget.h" diff --git a/src/gpu/effects/GrBezierEffect.h b/src/gpu/effects/GrBezierEffect.h index d335c7115a..161a2ebf70 100644 --- a/src/gpu/effects/GrBezierEffect.h +++ b/src/gpu/effects/GrBezierEffect.h @@ -8,7 +8,7 @@ #ifndef GrBezierEffect_DEFINED #define GrBezierEffect_DEFINED -#include "GrDrawTargetCaps.h" +#include "GrCaps.h" #include "GrProcessor.h" #include "GrGeometryProcessor.h" #include "GrInvariantOutput.h" diff --git a/src/gpu/effects/GrConvexPolyEffect.h b/src/gpu/effects/GrConvexPolyEffect.h index ba9456dc13..d1fdd0fe03 100644 --- a/src/gpu/effects/GrConvexPolyEffect.h +++ b/src/gpu/effects/GrConvexPolyEffect.h @@ -8,7 +8,7 @@ #ifndef GrConvexPolyEffect_DEFINED #define GrConvexPolyEffect_DEFINED -#include "GrDrawTargetCaps.h" +#include "GrCaps.h" #include "GrFragmentProcessor.h" #include "GrProcessor.h" #include "GrTypesPriv.h" diff --git a/src/gpu/effects/GrCoverageSetOpXP.cpp b/src/gpu/effects/GrCoverageSetOpXP.cpp index 8c4f0bcd5f..cb7f4974be 100644 --- a/src/gpu/effects/GrCoverageSetOpXP.cpp +++ b/src/gpu/effects/GrCoverageSetOpXP.cpp @@ -7,8 +7,8 @@ */ #include "effects/GrCoverageSetOpXP.h" +#include "GrCaps.h" #include "GrColor.h" -#include "GrDrawTargetCaps.h" #include "GrProcessor.h" #include "GrProcOptInfo.h" #include "gl/GrGLXferProcessor.h" diff --git a/src/gpu/effects/GrCustomXfermodePriv.h b/src/gpu/effects/GrCustomXfermodePriv.h index 295de26a4d..ff4b64c90c 100644 --- a/src/gpu/effects/GrCustomXfermodePriv.h +++ b/src/gpu/effects/GrCustomXfermodePriv.h @@ -8,8 +8,8 @@ #ifndef GrCustomXfermodePriv_DEFINED #define GrCustomXfermodePriv_DEFINED +#include "GrCaps.h" #include "GrCoordTransform.h" -#include "GrDrawTargetCaps.h" #include "GrFragmentProcessor.h" #include "GrTextureAccess.h" #include "GrXferProcessor.h" diff --git a/src/gpu/effects/GrDashingEffect.cpp b/src/gpu/effects/GrDashingEffect.cpp index 8331fc7046..e3e6c07084 100644 --- a/src/gpu/effects/GrDashingEffect.cpp +++ b/src/gpu/effects/GrDashingEffect.cpp @@ -10,12 +10,12 @@ #include "GrBatch.h" #include "GrBatchTarget.h" #include "GrBatchTest.h" +#include "GrCaps.h" #include "GrGeometryProcessor.h" #include "GrContext.h" #include "GrCoordTransform.h" #include "GrDefaultGeoProcFactory.h" #include "GrDrawTarget.h" -#include "GrDrawTargetCaps.h" #include "GrInvariantOutput.h" #include "GrProcessor.h" #include "GrStrokeInfo.h" diff --git a/src/gpu/effects/GrPorterDuffXferProcessor.cpp b/src/gpu/effects/GrPorterDuffXferProcessor.cpp index 424fbbf36b..43cdc400cc 100644 --- a/src/gpu/effects/GrPorterDuffXferProcessor.cpp +++ b/src/gpu/effects/GrPorterDuffXferProcessor.cpp @@ -8,7 +8,7 @@ #include "effects/GrPorterDuffXferProcessor.h" #include "GrBlend.h" -#include "GrDrawTargetCaps.h" +#include "GrCaps.h" #include "GrProcessor.h" #include "GrProcOptInfo.h" #include "GrTypes.h" diff --git a/src/gpu/gl/GrGLCaps.h b/src/gpu/gl/GrGLCaps.h index 5503576b2c..a4d60e2bdc 100644 --- a/src/gpu/gl/GrGLCaps.h +++ b/src/gpu/gl/GrGLCaps.h @@ -9,7 +9,7 @@ #ifndef GrGLCaps_DEFINED #define GrGLCaps_DEFINED -#include "GrDrawTargetCaps.h" +#include "GrCaps.h" #include "GrGLStencilAttachment.h" #include "SkChecksum.h" #include "SkTHash.h" |