diff options
author | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-09-18 13:00:55 +0000 |
---|---|---|
committer | commit-bot@chromium.org <commit-bot@chromium.org@2bbb7eff-a529-9590-31e7-b0007b416f81> | 2013-09-18 13:00:55 +0000 |
commit | a0b40280a49a8a43af7929ead3b3489951c58501 (patch) | |
tree | b9b037c113ff7b1094ef7f3ab96fa74d5ccf99fe | |
parent | 0694ea7f6a16e946972b9c625f434e80eb42bb5f (diff) |
Replace uses of GrNoncopyable by SkNoncopyable.
BUG=None
TEST=None, no functional changes.
R=bsalomon@google.com, robertphillips@google.com
Author: tfarina@chromium.org
Review URL: https://chromiumcodereview.appspot.com/23483042
git-svn-id: http://skia.googlecode.com/svn/trunk@11341 2bbb7eff-a529-9590-31e7-b0007b416f81
27 files changed, 78 insertions, 127 deletions
diff --git a/gyp/gpu.gypi b/gyp/gpu.gypi index 1714759335..73e12f8f72 100644 --- a/gyp/gpu.gypi +++ b/gyp/gpu.gypi @@ -20,7 +20,6 @@ '<(skia_include_path)/gpu/GrFontScaler.h', '<(skia_include_path)/gpu/GrGlyph.h', '<(skia_include_path)/gpu/GrKey.h', - '<(skia_include_path)/gpu/GrNoncopyable.h', '<(skia_include_path)/gpu/GrPaint.h', '<(skia_include_path)/gpu/GrPathRendererChain.h', '<(skia_include_path)/gpu/GrPoint.h', diff --git a/gyp/public_headers.gypi b/gyp/public_headers.gypi index 022f679902..569ecc7dee 100644 --- a/gyp/public_headers.gypi +++ b/gyp/public_headers.gypi @@ -44,7 +44,6 @@ 'gpu/GrDrawEffect.h', 'gpu/GrTextContext.h', 'gpu/GrEffect.h', - 'gpu/GrNoncopyable.h', 'gpu/SkGrTexturePixelRef.h', 'gpu/GrTextureAccess.h', 'gpu/GrRect.h', diff --git a/include/gpu/GrBackendEffectFactory.h b/include/gpu/GrBackendEffectFactory.h index 3a39dc0df6..77cf2cc13d 100644 --- a/include/gpu/GrBackendEffectFactory.h +++ b/include/gpu/GrBackendEffectFactory.h @@ -11,7 +11,7 @@ #include "GrTypes.h" #include "SkTemplates.h" #include "SkThread_platform.h" -#include "GrNoncopyable.h" +#include "SkTypes.h" /** Given a GrEffect of a particular type, creates the corresponding graphics-backend-specific effect object. Also tracks equivalence of shaders generated via a key. Each factory instance @@ -28,7 +28,7 @@ class GrGLEffect; class GrGLCaps; class GrDrawEffect; -class GrBackendEffectFactory : public GrNoncopyable { +class GrBackendEffectFactory : public SkNoncopyable { public: typedef uint32_t EffectKey; enum { diff --git a/include/gpu/GrContext.h b/include/gpu/GrContext.h index 42413fb13c..7a42677a85 100644 --- a/include/gpu/GrContext.h +++ b/include/gpu/GrContext.h @@ -8,14 +8,15 @@ #ifndef GrContext_DEFINED #define GrContext_DEFINED -#include "GrColor.h" #include "GrClipData.h" -#include "SkMatrix.h" +#include "GrColor.h" #include "GrPaint.h" #include "GrPathRendererChain.h" #include "GrPoint.h" #include "GrRenderTarget.h" #include "GrTexture.h" +#include "SkMatrix.h" +#include "SkTypes.h" class GrAARectRenderer; class GrAutoScratchTexture; @@ -630,7 +631,7 @@ public: /////////////////////////////////////////////////////////////////////////// // Helpers - class AutoRenderTarget : public ::GrNoncopyable { + class AutoRenderTarget : public ::SkNoncopyable { public: AutoRenderTarget(GrContext* context, GrRenderTarget* target) { fPrevTarget = context->getRenderTarget(); @@ -668,7 +669,7 @@ public: * paint if necessary. Hint: use SkTCopyOnFirstWrite if the AutoMatrix is conditionally * initialized. */ - class AutoMatrix : GrNoncopyable { + class AutoMatrix : public ::SkNoncopyable { public: AutoMatrix() : fContext(NULL) {} @@ -761,7 +762,7 @@ public: SkMatrix fMatrix; }; - class AutoClip : GrNoncopyable { + class AutoClip : public ::SkNoncopyable { public: // This enum exists to require a caller of the constructor to acknowledge that the clip will // initially be wide open. It also could be extended if there are other desirable initial @@ -940,7 +941,7 @@ private: * Gets and locks a scratch texture from a descriptor using either exact or approximate criteria. * Unlocks texture in the destructor. */ -class GrAutoScratchTexture : ::GrNoncopyable { +class GrAutoScratchTexture : public ::SkNoncopyable { public: GrAutoScratchTexture() : fContext(NULL) diff --git a/include/gpu/GrContextFactory.h b/include/gpu/GrContextFactory.h index 3d9f1a386d..389c398c7c 100644 --- a/include/gpu/GrContextFactory.h +++ b/include/gpu/GrContextFactory.h @@ -28,7 +28,7 @@ * factory is destroyed (though the caller can always grab a ref on the returned * GrContext to make it outlive the factory). */ -class GrContextFactory : GrNoncopyable { +class GrContextFactory : public SkNoncopyable { public: /** * Types of GL contexts supported. diff --git a/include/gpu/GrEffect.h b/include/gpu/GrEffect.h index b0d336bc00..78ad28b3ff 100644 --- a/include/gpu/GrEffect.h +++ b/include/gpu/GrEffect.h @@ -10,7 +10,6 @@ #include "GrColor.h" #include "GrEffectUnitTest.h" -#include "GrNoncopyable.h" #include "GrTexture.h" #include "GrTextureAccess.h" #include "GrTypesPriv.h" diff --git a/include/gpu/GrEffectUnitTest.h b/include/gpu/GrEffectUnitTest.h index 78506da197..f0089c9df4 100644 --- a/include/gpu/GrEffectUnitTest.h +++ b/include/gpu/GrEffectUnitTest.h @@ -8,9 +8,9 @@ #ifndef GrEffectUnitTest_DEFINED #define GrEffectUnitTest_DEFINED -#include "GrNoncopyable.h" #include "SkRandom.h" #include "SkTArray.h" +#include "SkTypes.h" class SkMatrix; class GrDrawTargetCaps; @@ -35,7 +35,7 @@ class GrContext; class GrEffectRef; class GrTexture; -class GrEffectTestFactory : GrNoncopyable { +class GrEffectTestFactory : public SkNoncopyable { public: typedef GrEffectRef* (*CreateProc)(SkRandom*, diff --git a/include/gpu/GrNoncopyable.h b/include/gpu/GrNoncopyable.h deleted file mode 100644 index d35f8d7124..0000000000 --- a/include/gpu/GrNoncopyable.h +++ /dev/null @@ -1,28 +0,0 @@ - -/* - * Copyright 2010 Google Inc. - * - * Use of this source code is governed by a BSD-style license that can be - * found in the LICENSE file. - */ - -#ifndef GrNoncopyable_DEFINED -#define GrNoncopyable_DEFINED - -#include "GrTypes.h" - -/** - * Base for classes that want to disallow copying themselves. It makes its - * copy-constructor and assignment operators private (and unimplemented). - */ -class SK_API GrNoncopyable { -public: - GrNoncopyable() {} - -private: - // illegal - GrNoncopyable(const GrNoncopyable&); - GrNoncopyable& operator=(const GrNoncopyable&); -}; - -#endif diff --git a/include/gpu/GrTextureAccess.h b/include/gpu/GrTextureAccess.h index f8bb554326..059800f05b 100644 --- a/include/gpu/GrTextureAccess.h +++ b/include/gpu/GrTextureAccess.h @@ -8,9 +8,9 @@ #ifndef GrTextureAccess_DEFINED #define GrTextureAccess_DEFINED -#include "GrNoncopyable.h" #include "SkRefCnt.h" #include "SkShader.h" +#include "SkTypes.h" class GrTexture; @@ -112,7 +112,7 @@ private: * key. However, if a GrEffect uses different swizzles based on its input then it must * consider that variation in its key-generation. */ -class GrTextureAccess : GrNoncopyable { +class GrTextureAccess : public SkNoncopyable { public: /** * A default GrTextureAccess must have reset() called on it in a GrEffect subclass's @@ -182,7 +182,7 @@ private: uint32_t fSwizzleMask; char fSwizzle[5]; - typedef GrNoncopyable INHERITED; + typedef SkNoncopyable INHERITED; }; #endif 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) |