diff options
Diffstat (limited to 'src/gpu')
-rw-r--r-- | src/gpu/GrAllocPool.cpp | 5 | ||||
-rw-r--r-- | src/gpu/GrAllocPool.h | 7 | ||||
-rwxr-xr-x | src/gpu/GrAllocator.h | 15 | ||||
-rw-r--r-- | src/gpu/GrBufferAllocPool.h | 9 | ||||
-rw-r--r-- | src/gpu/GrClipMaskCache.h | 6 | ||||
-rw-r--r-- | src/gpu/GrClipMaskManager.h | 12 | ||||
-rw-r--r-- | src/gpu/GrDrawState.h | 9 | ||||
-rw-r--r-- | src/gpu/GrDrawTarget.h | 11 | ||||
-rw-r--r-- | src/gpu/GrInOrderDrawBuffer.h | 10 | ||||
-rw-r--r-- | src/gpu/GrPlotMgr.h | 6 | ||||
-rw-r--r-- | src/gpu/GrRedBlackTree.h | 6 | ||||
-rw-r--r-- | src/gpu/GrSWMaskHelper.h | 10 | ||||
-rw-r--r-- | src/gpu/GrTemplates.h | 6 | ||||
-rw-r--r-- | src/gpu/effects/GrTextureStripAtlas.h | 10 | ||||
-rw-r--r-- | src/gpu/gl/GrGLBufferImpl.h | 6 | ||||
-rw-r--r-- | src/gpu/gl/GrGLShaderBuilder.h | 5 | ||||
-rw-r--r-- | src/gpu/gl/GrGpuGL.h | 7 | ||||
-rw-r--r-- | src/gpu/gl/debug/GrFakeRefObj.h | 5 |
18 files changed, 63 insertions, 82 deletions
diff --git a/src/gpu/GrAllocPool.cpp b/src/gpu/GrAllocPool.cpp index dc81ee2d47..127511f164 100644 --- a/src/gpu/GrAllocPool.cpp +++ b/src/gpu/GrAllocPool.cpp @@ -1,4 +1,3 @@ - /* * Copyright 2010 Google Inc. * @@ -6,10 +5,10 @@ * found in the LICENSE file. */ - - #include "GrAllocPool.h" +#include "GrTypes.h" + #define GrAllocPool_MIN_BLOCK_SIZE ((size_t)128) struct GrAllocPool::Block { diff --git a/src/gpu/GrAllocPool.h b/src/gpu/GrAllocPool.h index cf969fe23c..07ba05fd91 100644 --- a/src/gpu/GrAllocPool.h +++ b/src/gpu/GrAllocPool.h @@ -1,4 +1,3 @@ - /* * Copyright 2010 Google Inc. * @@ -6,14 +5,12 @@ * found in the LICENSE file. */ - - #ifndef GrAllocPool_DEFINED #define GrAllocPool_DEFINED -#include "GrNoncopyable.h" +#include "SkTypes.h" -class GrAllocPool : GrNoncopyable { +class GrAllocPool : public SkNoncopyable { public: GrAllocPool(size_t blockSize = 0); ~GrAllocPool(); diff --git a/src/gpu/GrAllocator.h b/src/gpu/GrAllocator.h index c37b119700..57ca03cd32 100755 --- a/src/gpu/GrAllocator.h +++ b/src/gpu/GrAllocator.h @@ -1,4 +1,3 @@ - /* * Copyright 2010 Google Inc. * @@ -6,16 +5,15 @@ * found in the LICENSE file. */ - - #ifndef GrAllocator_DEFINED #define GrAllocator_DEFINED -#include "GrNoncopyable.h" #include "GrConfig.h" +#include "GrTypes.h" #include "SkTArray.h" +#include "SkTypes.h" -class GrAllocator : GrNoncopyable { +class GrAllocator : public SkNoncopyable { public: ~GrAllocator() { reset(); @@ -135,12 +133,11 @@ private: bool fOwnFirstBlock; int fCount; - typedef GrNoncopyable INHERITED; + typedef SkNoncopyable INHERITED; }; template <typename T> -class GrTAllocator : GrNoncopyable { - +class GrTAllocator : public SkNoncopyable { public: virtual ~GrTAllocator() { this->reset(); }; @@ -232,7 +229,7 @@ protected: private: GrAllocator fAllocator; - typedef GrNoncopyable INHERITED; + typedef SkNoncopyable INHERITED; }; template <int N, typename T> class GrSTAllocator : public GrTAllocator<T> { diff --git a/src/gpu/GrBufferAllocPool.h b/src/gpu/GrBufferAllocPool.h index 9758137f4e..809fa5f426 100644 --- a/src/gpu/GrBufferAllocPool.h +++ b/src/gpu/GrBufferAllocPool.h @@ -1,4 +1,3 @@ - /* * Copyright 2010 Google Inc. * @@ -6,15 +5,12 @@ * found in the LICENSE file. */ - - #ifndef GrBufferAllocPool_DEFINED #define GrBufferAllocPool_DEFINED -#include "GrNoncopyable.h" - #include "SkTArray.h" #include "SkTDArray.h" +#include "SkTypes.h" class GrGeometryBuffer; class GrGpu; @@ -31,8 +27,7 @@ class GrGpu; * a number of buffers to preallocate can be specified. These will * be allocated at the min size and kept around until the pool is destroyed. */ -class GrBufferAllocPool : GrNoncopyable { - +class GrBufferAllocPool : public SkNoncopyable { public: /** * Ensures all buffers are unlocked and have all data written to them. diff --git a/src/gpu/GrClipMaskCache.h b/src/gpu/GrClipMaskCache.h index f2b2abd325..97b4b515cc 100644 --- a/src/gpu/GrClipMaskCache.h +++ b/src/gpu/GrClipMaskCache.h @@ -9,8 +9,8 @@ #define GrClipMaskCache_DEFINED #include "GrContext.h" -#include "GrNoncopyable.h" #include "SkClipStack.h" +#include "SkTypes.h" class GrTexture; @@ -18,7 +18,7 @@ class GrTexture; * The stencil buffer stores the last clip path - providing a single entry * "cache". This class provides similar functionality for AA clip paths */ -class GrClipMaskCache : public GrNoncopyable { +class GrClipMaskCache : public SkNoncopyable { public: GrClipMaskCache(); @@ -233,7 +233,7 @@ private: GrContext* fContext; SkDeque fStack; - typedef GrNoncopyable INHERITED; + typedef SkNoncopyable INHERITED; }; #endif // GrClipMaskCache_DEFINED diff --git a/src/gpu/GrClipMaskManager.h b/src/gpu/GrClipMaskManager.h index 2cba4776d9..54b7892a29 100644 --- a/src/gpu/GrClipMaskManager.h +++ b/src/gpu/GrClipMaskManager.h @@ -1,4 +1,3 @@ - /* * Copyright 2012 Google Inc. * @@ -9,9 +8,9 @@ #ifndef GrClipMaskManager_DEFINED #define GrClipMaskManager_DEFINED +#include "GrClipMaskCache.h" #include "GrContext.h" #include "GrDrawState.h" -#include "GrNoncopyable.h" #include "GrReducedClip.h" #include "GrStencil.h" #include "GrTexture.h" @@ -21,14 +20,13 @@ #include "SkPath.h" #include "SkRefCnt.h" #include "SkTLList.h" - -#include "GrClipMaskCache.h" +#include "SkTypes.h" class GrGpu; class GrPathRenderer; class GrPathRendererChain; -class SkPath; class GrTexture; +class SkPath; /** * The clip mask creator handles the generation of the clip mask. If anti @@ -38,7 +36,7 @@ class GrTexture; * mask can be represented as a rectangle then scissoring is used. In all * cases scissoring is used to bound the range of the clip mask. */ -class GrClipMaskManager : public GrNoncopyable { +class GrClipMaskManager : public SkNoncopyable { public: GrClipMaskManager() : fGpu(NULL) @@ -164,7 +162,7 @@ private: StencilClipMode mode, int stencilBitCnt); - typedef GrNoncopyable INHERITED; + typedef SkNoncopyable INHERITED; }; #endif // GrClipMaskManager_DEFINED diff --git a/src/gpu/GrDrawState.h b/src/gpu/GrDrawState.h index bfc15b01cd..6440790c10 100644 --- a/src/gpu/GrDrawState.h +++ b/src/gpu/GrDrawState.h @@ -22,6 +22,7 @@ #include "effects/GrSimpleTextureEffect.h" #include "SkMatrix.h" +#include "SkTypes.h" #include "SkXfermode.h" class GrDrawState : public SkRefCnt { @@ -279,7 +280,7 @@ public: /** * Constructor sets the color to be 'color' which is undone by the destructor. */ - class AutoColorRestore : public ::GrNoncopyable { + class AutoColorRestore : public ::SkNoncopyable { public: AutoColorRestore() : fDrawState(NULL), fOldColor(0) {} @@ -400,7 +401,7 @@ public: * When this object is destroyed it will remove any effects from the draw state that were added * after its constructor. */ - class AutoRestoreEffects : public ::GrNoncopyable { + class AutoRestoreEffects : public ::SkNoncopyable { public: AutoRestoreEffects() : fDrawState(NULL), fColorEffectCnt(0), fCoverageEffectCnt(0) {} @@ -605,7 +606,7 @@ public: * Preconcats the current view matrix and restores the previous view matrix in the destructor. * Effect matrices are automatically adjusted to compensate and adjusted back in the destructor. */ - class AutoViewMatrixRestore : public ::GrNoncopyable { + class AutoViewMatrixRestore : public ::SkNoncopyable { public: AutoViewMatrixRestore() : fDrawState(NULL) {} @@ -659,7 +660,7 @@ public: const GrRenderTarget* getRenderTarget() const { return fRenderTarget.get(); } GrRenderTarget* getRenderTarget() { return fRenderTarget.get(); } - class AutoRenderTargetRestore : public ::GrNoncopyable { + class AutoRenderTargetRestore : public ::SkNoncopyable { public: AutoRenderTargetRestore() : fDrawState(NULL), fSavedTarget(NULL) {} AutoRenderTargetRestore(GrDrawState* ds, GrRenderTarget* newTarget) { diff --git a/src/gpu/GrDrawTarget.h b/src/gpu/GrDrawTarget.h index 5b1954609c..47460ac527 100644 --- a/src/gpu/GrDrawTarget.h +++ b/src/gpu/GrDrawTarget.h @@ -17,6 +17,7 @@ #include "SkPath.h" #include "SkTArray.h" #include "SkTLazy.h" +#include "SkTypes.h" #include "SkXfermode.h" class GrClipData; @@ -472,7 +473,7 @@ public: * // destructor rather than target's current * // GrDrawState. */ - class AutoStateRestore : ::GrNoncopyable { + class AutoStateRestore : public ::SkNoncopyable { public: /** * Default ASR will have no effect unless set() is subsequently called. @@ -525,7 +526,7 @@ public: //////////////////////////////////////////////////////////////////////////// - class AutoReleaseGeometry : ::GrNoncopyable { + class AutoReleaseGeometry : public ::SkNoncopyable { public: AutoReleaseGeometry(GrDrawTarget* target, int vertexCount, @@ -552,7 +553,7 @@ public: //////////////////////////////////////////////////////////////////////////// - class AutoClipRestore : ::GrNoncopyable { + class AutoClipRestore : public ::SkNoncopyable { public: AutoClipRestore(GrDrawTarget* target) { fTarget = target; @@ -577,7 +578,7 @@ public: * Saves the geometry src state at construction and restores in the destructor. It also saves * and then restores the vertex attrib state. */ - class AutoGeometryPush : ::GrNoncopyable { + class AutoGeometryPush : public ::SkNoncopyable { public: AutoGeometryPush(GrDrawTarget* target) : fAttribRestore(target->drawState()) { @@ -597,7 +598,7 @@ public: * Combination of AutoGeometryPush and AutoStateRestore. The vertex attribs will be in default * state regardless of ASRInit value. */ - class AutoGeometryAndStatePush : ::GrNoncopyable { + class AutoGeometryAndStatePush : public ::SkNoncopyable { public: AutoGeometryAndStatePush(GrDrawTarget* target, ASRInit init, diff --git a/src/gpu/GrInOrderDrawBuffer.h b/src/gpu/GrInOrderDrawBuffer.h index dcc5ab7e0b..ca6af3fe8b 100644 --- a/src/gpu/GrInOrderDrawBuffer.h +++ b/src/gpu/GrInOrderDrawBuffer.h @@ -1,4 +1,3 @@ - /* * Copyright 2011 Google Inc. * @@ -6,8 +5,6 @@ * found in the LICENSE file. */ - - #ifndef GrInOrderDrawBuffer_DEFINED #define GrInOrderDrawBuffer_DEFINED @@ -19,6 +16,7 @@ #include "SkClipStack.h" #include "SkStrokeRec.h" #include "SkTemplates.h" +#include "SkTypes.h" class GrGpu; class GrIndexBufferAllocPool; @@ -98,7 +96,7 @@ private: const GrIndexBuffer* fIndexBuffer; }; - struct StencilPath : GrNoncopyable { + struct StencilPath : public ::SkNoncopyable { StencilPath(); SkAutoTUnref<const GrPath> fPath; @@ -106,7 +104,7 @@ private: SkPath::FillType fFill; }; - struct Clear : GrNoncopyable { + struct Clear : public ::SkNoncopyable { Clear() : fRenderTarget(NULL) {} ~Clear() { SkSafeUnref(fRenderTarget); } @@ -115,7 +113,7 @@ private: GrRenderTarget* fRenderTarget; }; - struct CopySurface : GrNoncopyable { + struct CopySurface : public ::SkNoncopyable { SkAutoTUnref<GrSurface> fDst; SkAutoTUnref<GrSurface> fSrc; SkIRect fSrcRect; diff --git a/src/gpu/GrPlotMgr.h b/src/gpu/GrPlotMgr.h index 1fdfa1ffb9..3aa8cf6c8a 100644 --- a/src/gpu/GrPlotMgr.h +++ b/src/gpu/GrPlotMgr.h @@ -1,4 +1,3 @@ - /* * Copyright 2010 Google Inc. * @@ -6,15 +5,14 @@ * found in the LICENSE file. */ - - #ifndef GrPlotMgr_DEFINED #define GrPlotMgr_DEFINED #include "GrTypes.h" #include "GrPoint.h" +#include "SkTypes.h" -class GrPlotMgr : GrNoncopyable { +class GrPlotMgr : public SkNoncopyable { public: GrPlotMgr(int width, int height) { fDim.set(width, height); diff --git a/src/gpu/GrRedBlackTree.h b/src/gpu/GrRedBlackTree.h index 17d2738115..1b2195c4f7 100644 --- a/src/gpu/GrRedBlackTree.h +++ b/src/gpu/GrRedBlackTree.h @@ -1,4 +1,3 @@ - /* * Copyright 2011 Google Inc. * @@ -6,11 +5,10 @@ * found in the LICENSE file. */ - #ifndef GrRedBlackTree_DEFINED #define GrRedBlackTree_DEFINED -#include "GrNoncopyable.h" +#include "SkTypes.h" template <typename T> class GrLess { @@ -36,7 +34,7 @@ public: * will be created and used for all comparisons. */ template <typename T, typename C = GrLess<T> > -class GrRedBlackTree : public GrNoncopyable { +class GrRedBlackTree : public SkNoncopyable { public: /** * Creates an empty tree. diff --git a/src/gpu/GrSWMaskHelper.h b/src/gpu/GrSWMaskHelper.h index fab5eeb4a0..b274e84c66 100644 --- a/src/gpu/GrSWMaskHelper.h +++ b/src/gpu/GrSWMaskHelper.h @@ -9,13 +9,13 @@ #define GrSWMaskHelper_DEFINED #include "GrColor.h" -#include "SkMatrix.h" -#include "GrNoncopyable.h" +#include "GrDrawState.h" #include "SkBitmap.h" #include "SkDraw.h" +#include "SkMatrix.h" #include "SkRasterClip.h" #include "SkRegion.h" -#include "GrDrawState.h" +#include "SkTypes.h" class GrAutoScratchTexture; class GrContext; @@ -38,7 +38,7 @@ class GrDrawTarget; * The result of this process will be the final mask (on the GPU) in the * upper left hand corner of the texture. */ -class GrSWMaskHelper : public GrNoncopyable { +class GrSWMaskHelper : public SkNoncopyable { public: GrSWMaskHelper(GrContext* context) : fContext(context) { @@ -101,7 +101,7 @@ private: SkDraw fDraw; SkRasterClip fRasterClip; - typedef GrNoncopyable INHERITED; + typedef SkNoncopyable INHERITED; }; #endif // GrSWMaskHelper_DEFINED diff --git a/src/gpu/GrTemplates.h b/src/gpu/GrTemplates.h index 69720dc111..5a009dfdf1 100644 --- a/src/gpu/GrTemplates.h +++ b/src/gpu/GrTemplates.h @@ -1,4 +1,3 @@ - /* * Copyright 2010 Google Inc. * @@ -6,11 +5,10 @@ * found in the LICENSE file. */ - #ifndef GrTemplates_DEFINED #define GrTemplates_DEFINED -#include "GrNoncopyable.h" +#include "SkTypes.h" /** * Use to cast a ptr to a different type, and maintain strict-aliasing @@ -37,7 +35,7 @@ template <typename Dst, typename Src> Dst GrTCast(Src src) { * ... * } // fCount is restored */ -template <typename T> class GrAutoTRestore : public GrNoncopyable { +template <typename T> class GrAutoTRestore : public SkNoncopyable { public: GrAutoTRestore() : fPtr(NULL), fVal() {} diff --git a/src/gpu/effects/GrTextureStripAtlas.h b/src/gpu/effects/GrTextureStripAtlas.h index 0148665a4c..d8850f946a 100644 --- a/src/gpu/effects/GrTextureStripAtlas.h +++ b/src/gpu/effects/GrTextureStripAtlas.h @@ -1,4 +1,3 @@ - /* * Copyright 2012 Google Inc. * @@ -9,11 +8,12 @@ #ifndef GrTextureStripAtlas_DEFINED #define GrTextureStripAtlas_DEFINED -#include "SkBitmap.h" +#include "GrBinHashKey.h" #include "GrTHashCache.h" +#include "SkBitmap.h" #include "SkGr.h" #include "SkTDArray.h" -#include "GrBinHashKey.h" +#include "SkTypes.h" /** * Maintains a single large texture whose rows store many textures of a small fixed height, @@ -79,7 +79,7 @@ private: * The state of a single row in our cache, next/prev pointers allow these to be chained * together to represent LRU status */ - struct AtlasRow : public GrNoncopyable { + struct AtlasRow : public SkNoncopyable { AtlasRow() : fKey(kEmptyAtlasRowKey), fLocks(0), fNext(NULL), fPrev(NULL) { } // GenerationID of the bitmap that is represented by this row, 0xffffffff means "empty" uint32_t fKey; @@ -137,7 +137,7 @@ private: // Hash table entry for atlases class AtlasEntry; typedef GrTBinHashKey<AtlasEntry, sizeof(GrTextureStripAtlas::Desc)> AtlasHashKey; - class AtlasEntry : public ::GrNoncopyable { + class AtlasEntry : public ::SkNoncopyable { public: AtlasEntry() : fAtlas(NULL) {} ~AtlasEntry() { SkDELETE(fAtlas); } diff --git a/src/gpu/gl/GrGLBufferImpl.h b/src/gpu/gl/GrGLBufferImpl.h index ce15a98f42..ab2555650f 100644 --- a/src/gpu/gl/GrGLBufferImpl.h +++ b/src/gpu/gl/GrGLBufferImpl.h @@ -8,7 +8,7 @@ #ifndef GrGLBufferImpl_DEFINED #define GrGLBufferImpl_DEFINED -#include "GrNoncopyable.h" +#include "SkTypes.h" #include "gl/GrGLFunctions.h" class GrGpuGL; @@ -17,7 +17,7 @@ class GrGpuGL; * This class serves as the implementation of GrGL*Buffer classes. It was written to avoid code * duplication in those classes. */ -class GrGLBufferImpl : public GrNoncopyable { +class GrGLBufferImpl : public SkNoncopyable { public: struct Desc { bool fIsWrapped; @@ -54,7 +54,7 @@ private: void* fCPUData; void* fLockPtr; - typedef GrNoncopyable INHERITED; + typedef SkNoncopyable INHERITED; }; #endif diff --git a/src/gpu/gl/GrGLShaderBuilder.h b/src/gpu/gl/GrGLShaderBuilder.h index 42df62ac45..5f2983d19d 100644 --- a/src/gpu/gl/GrGLShaderBuilder.h +++ b/src/gpu/gl/GrGLShaderBuilder.h @@ -12,6 +12,7 @@ #include "GrBackendEffectFactory.h" #include "GrColor.h" #include "GrEffect.h" +#include "SkTypes.h" #include "gl/GrGLSL.h" #include "gl/GrGLUniformManager.h" @@ -386,7 +387,7 @@ private: GrGLUniformManager::BuilderUniformArray fUniforms; private: - class CodeStage : GrNoncopyable { + class CodeStage : public SkNoncopyable { public: CodeStage() : fNextIndex(0), fCurrentIndex(-1), fEffect(NULL) {} @@ -405,7 +406,7 @@ private: return fCurrentIndex; } - class AutoStageRestore : GrNoncopyable { + class AutoStageRestore : public SkNoncopyable { public: AutoStageRestore(CodeStage* codeStage, const GrEffectRef* effect) { SkASSERT(NULL != codeStage); diff --git a/src/gpu/gl/GrGpuGL.h b/src/gpu/gl/GrGpuGL.h index 95ae7265f9..b0195bbaed 100644 --- a/src/gpu/gl/GrGpuGL.h +++ b/src/gpu/gl/GrGpuGL.h @@ -10,15 +10,16 @@ #include "GrBinHashKey.h" #include "GrDrawState.h" -#include "GrGpu.h" #include "GrGLContext.h" -#include "GrGLIndexBuffer.h" #include "GrGLIRect.h" +#include "GrGLIndexBuffer.h" #include "GrGLProgram.h" #include "GrGLStencilBuffer.h" #include "GrGLTexture.h" #include "GrGLVertexArray.h" #include "GrGLVertexBuffer.h" +#include "GrGpu.h" +#include "SkTypes.h" #include "../GrTHashCache.h" #ifdef SK_DEVELOPER @@ -170,7 +171,7 @@ private: static bool BlendCoeffReferencesConstant(GrBlendCoeff coeff); - class ProgramCache : public ::GrNoncopyable { + class ProgramCache : public ::SkNoncopyable { public: ProgramCache(GrGpuGL* gpu); ~ProgramCache(); diff --git a/src/gpu/gl/debug/GrFakeRefObj.h b/src/gpu/gl/debug/GrFakeRefObj.h index 7f21c94181..47ec4ee440 100644 --- a/src/gpu/gl/debug/GrFakeRefObj.h +++ b/src/gpu/gl/debug/GrFakeRefObj.h @@ -1,4 +1,3 @@ - /* * Copyright 2012 Google Inc. * @@ -9,8 +8,8 @@ #ifndef GrFakeRefObj_DEFINED #define GrFakeRefObj_DEFINED +#include "SkTypes.h" #include "gl/GrGLInterface.h" -#include "GrNoncopyable.h" //////////////////////////////////////////////////////////////////////////////// // This object is used to track the OpenGL objects. We don't use real @@ -19,7 +18,7 @@ // are tracking in this class are actually OpenGL's references to the objects // not "ours" // Each object also gets a unique globally identifying ID -class GrFakeRefObj : public GrNoncopyable { +class GrFakeRefObj : public SkNoncopyable { public: GrFakeRefObj() : fRef(0) |