Index: src/gpu/GrDrawTarget.h |
=================================================================== |
--- src/gpu/GrDrawTarget.h (revision 8365) |
+++ src/gpu/GrDrawTarget.h (working copy) |
@@ -7,7 +7,6 @@ |
*/ |
- |
#ifndef GrDrawTarget_DEFINED |
#define GrDrawTarget_DEFINED |
@@ -24,6 +23,7 @@ |
#include "SkXfermode.h" |
class GrClipData; |
+class GrDrawTargetCaps; |
class GrPath; |
class GrVertexBuffer; |
class SkStrokeRec; |
@@ -35,55 +35,6 @@ |
public: |
SK_DECLARE_INST_COUNT(GrDrawTarget) |
- /** |
- * Represents the draw target capabilities. |
- */ |
- class Caps : public SkRefCnt { |
- public: |
- SK_DECLARE_INST_COUNT(Caps) |
- |
- Caps() { this->reset(); } |
- Caps(const Caps& c) { *this = c; } |
- Caps& operator= (const Caps& c); |
- |
- virtual void reset(); |
- virtual void print() const; |
- |
- bool eightBitPaletteSupport() const { return f8BitPaletteSupport; } |
- bool npotTextureTileSupport() const { return fNPOTTextureTileSupport; } |
- 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 pathStencilingSupport() const { return fPathStencilingSupport; } |
- |
- int maxRenderTargetSize() const { return fMaxRenderTargetSize; } |
- int maxTextureSize() const { return fMaxTextureSize; } |
- // Will be 0 if MSAA is not supported |
- int maxSampleCount() const { return fMaxSampleCount; } |
- protected: |
- |
- bool f8BitPaletteSupport : 1; |
- bool fNPOTTextureTileSupport : 1; |
- bool fTwoSidedStencilSupport : 1; |
- bool fStencilWrapOpsSupport : 1; |
- bool fHWAALineSupport : 1; |
- bool fShaderDerivativeSupport : 1; |
- bool fGeometryShaderSupport : 1; |
- bool fDualSourceBlendingSupport : 1; |
- bool fBufferLockSupport : 1; |
- bool fPathStencilingSupport : 1; |
- |
- int fMaxRenderTargetSize; |
- int fMaxTextureSize; |
- int fMaxSampleCount; |
- |
- typedef SkRefCnt INHERITED; |
- }; |
- |
/////////////////////////////////////////////////////////////////////////// |
// The context may not be fully constructed and should not be used during GrDrawTarget |
@@ -94,7 +45,7 @@ |
/** |
* Gets the capabilities of the draw target. |
*/ |
- const Caps* caps() const { return fCaps.get(); } |
+ const GrDrawTargetCaps* caps() const { return fCaps.get(); } |
/** |
* Sets the current clip to the region specified by clip. All draws will be |
@@ -665,7 +616,7 @@ |
} |
// Subclass must initialize this in its constructor. |
- SkAutoTUnref<const Caps> fCaps; |
+ SkAutoTUnref<const GrDrawTargetCaps> fCaps; |
/** |
* Used to communicate draws to subclass's onDraw function. |