diff options
author | 2014-04-07 19:34:38 +0000 | |
---|---|---|
committer | 2014-04-07 19:34:38 +0000 | |
commit | e3beb6bd7de7fa211681abbb0be58e80b19885e0 (patch) | |
tree | 0e5a9079910a9f42053b6518f9ba802a258ed46d /src | |
parent | c4df655b37aea7097d3007b299de582ba517ef16 (diff) |
SkNonCopyable should be used with private inheritance.
This is mostly s/public SkNoncopyable/SkNoncopyable/g.
Two classes (SkDrawLooper::Context and SkPicture::OperationList) don't actually work with SkNoncopyable because they introduce a virtual destructor. I added SkNoncopyableVirtual to make them work as intended. Sort of questionable whether they really need to be noncopyable in the first place, but I guess it doesn't hurt to keep the behavior the same.
BUG=skia:
R=reed@google.com, mtklein@google.com
Author: mtklein@chromium.org
Review URL: https://codereview.chromium.org/226183018
git-svn-id: http://skia.googlecode.com/svn/trunk@14081 2bbb7eff-a529-9590-31e7-b0007b416f81
Diffstat (limited to 'src')
-rw-r--r-- | src/core/SkMatrixClipStateMgr.h | 4 | ||||
-rw-r--r-- | src/core/SkSmallAllocator.h | 2 | ||||
-rw-r--r-- | src/core/SkTLList.h | 2 | ||||
-rw-r--r-- | src/gpu/GrAllocPool.h | 2 | ||||
-rw-r--r-- | src/gpu/GrAllocator.h | 4 | ||||
-rw-r--r-- | src/gpu/GrBufferAllocPool.h | 2 | ||||
-rw-r--r-- | src/gpu/GrClipMaskCache.h | 2 | ||||
-rw-r--r-- | src/gpu/GrClipMaskManager.h | 2 | ||||
-rw-r--r-- | src/gpu/GrOrderedSet.h | 2 | ||||
-rw-r--r-- | src/gpu/GrPlotMgr.h | 2 | ||||
-rw-r--r-- | src/gpu/GrRedBlackTree.h | 2 | ||||
-rw-r--r-- | src/gpu/GrSWMaskHelper.h | 2 | ||||
-rw-r--r-- | src/gpu/GrTemplates.h | 2 | ||||
-rw-r--r-- | src/gpu/effects/GrTextureStripAtlas.h | 2 | ||||
-rw-r--r-- | src/gpu/gl/GrGLBufferImpl.h | 2 | ||||
-rw-r--r-- | src/gpu/gl/GrGLShaderBuilder.h | 4 | ||||
-rw-r--r-- | src/gpu/gl/debug/GrFakeRefObj.h | 2 | ||||
-rw-r--r-- | src/pdf/SkPDFFont.h | 4 |
18 files changed, 22 insertions, 22 deletions
diff --git a/src/core/SkMatrixClipStateMgr.h b/src/core/SkMatrixClipStateMgr.h index b227583138..270eacd032 100644 --- a/src/core/SkMatrixClipStateMgr.h +++ b/src/core/SkMatrixClipStateMgr.h @@ -53,7 +53,7 @@ public: static const int32_t kIdentityWideOpenStateID = 0; static const int kIdentityMatID = 0; - class MatrixClipState : public SkNoncopyable { + class MatrixClipState : SkNoncopyable { public: class MatrixInfo { public: @@ -108,7 +108,7 @@ public: typedef SkNoncopyable INHERITED; }; - class ClipInfo : public SkNoncopyable { + class ClipInfo : SkNoncopyable { public: ClipInfo() {} diff --git a/src/core/SkSmallAllocator.h b/src/core/SkSmallAllocator.h index 2eddb510cd..655008b706 100644 --- a/src/core/SkSmallAllocator.h +++ b/src/core/SkSmallAllocator.h @@ -29,7 +29,7 @@ template<typename T> void destroyT(void* ptr) { * object it allocated and freeing its memory. */ template<uint32_t kMaxObjects, size_t kTotalBytes> -class SkSmallAllocator : public SkNoncopyable { +class SkSmallAllocator : SkNoncopyable { public: SkSmallAllocator() : fStorageUsed(0) diff --git a/src/core/SkTLList.h b/src/core/SkTLList.h index aeae3f72ee..e2b9691430 100644 --- a/src/core/SkTLList.h +++ b/src/core/SkTLList.h @@ -28,7 +28,7 @@ inline void* operator new(size_t, SkTLList<T>* list, constructor arguments for type_name. These macros behave like addBefore() and addAfter(). */ template <typename T> -class SkTLList : public SkNoncopyable { +class SkTLList : SkNoncopyable { private: struct Block; struct Node { diff --git a/src/gpu/GrAllocPool.h b/src/gpu/GrAllocPool.h index 07ba05fd91..4fc826569e 100644 --- a/src/gpu/GrAllocPool.h +++ b/src/gpu/GrAllocPool.h @@ -10,7 +10,7 @@ #include "SkTypes.h" -class GrAllocPool : public SkNoncopyable { +class GrAllocPool : SkNoncopyable { public: GrAllocPool(size_t blockSize = 0); ~GrAllocPool(); diff --git a/src/gpu/GrAllocator.h b/src/gpu/GrAllocator.h index 4e47fb1607..a2ad408e07 100644 --- a/src/gpu/GrAllocator.h +++ b/src/gpu/GrAllocator.h @@ -13,7 +13,7 @@ #include "SkTArray.h" #include "SkTypes.h" -class GrAllocator : public SkNoncopyable { +class GrAllocator : SkNoncopyable { public: ~GrAllocator() { reset(); @@ -153,7 +153,7 @@ private: }; template <typename T> -class GrTAllocator : public SkNoncopyable { +class GrTAllocator : SkNoncopyable { public: virtual ~GrTAllocator() { this->reset(); }; diff --git a/src/gpu/GrBufferAllocPool.h b/src/gpu/GrBufferAllocPool.h index 809fa5f426..9a31cc2a9a 100644 --- a/src/gpu/GrBufferAllocPool.h +++ b/src/gpu/GrBufferAllocPool.h @@ -27,7 +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 : public SkNoncopyable { +class GrBufferAllocPool : 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 213e2823e3..b332c7be9b 100644 --- a/src/gpu/GrClipMaskCache.h +++ b/src/gpu/GrClipMaskCache.h @@ -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 SkNoncopyable { +class GrClipMaskCache : SkNoncopyable { public: GrClipMaskCache(); diff --git a/src/gpu/GrClipMaskManager.h b/src/gpu/GrClipMaskManager.h index 17329108b3..260d708fd8 100644 --- a/src/gpu/GrClipMaskManager.h +++ b/src/gpu/GrClipMaskManager.h @@ -36,7 +36,7 @@ class SkPath; * 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 SkNoncopyable { +class GrClipMaskManager : SkNoncopyable { public: GrClipMaskManager() : fGpu(NULL) diff --git a/src/gpu/GrOrderedSet.h b/src/gpu/GrOrderedSet.h index b149dfb0c5..23b9353a51 100644 --- a/src/gpu/GrOrderedSet.h +++ b/src/gpu/GrOrderedSet.h @@ -11,7 +11,7 @@ #include "GrRedBlackTree.h" template <typename T, typename C = GrLess<T> > -class GrOrderedSet : public SkNoncopyable { +class GrOrderedSet : SkNoncopyable { public: /** * Creates an empty set diff --git a/src/gpu/GrPlotMgr.h b/src/gpu/GrPlotMgr.h index 6ea6086b06..8d55ed0b9c 100644 --- a/src/gpu/GrPlotMgr.h +++ b/src/gpu/GrPlotMgr.h @@ -12,7 +12,7 @@ #include "GrPoint.h" #include "SkTypes.h" -class GrPlotMgr : public SkNoncopyable { +class GrPlotMgr : SkNoncopyable { public: GrPlotMgr(int width, int height) { fDim.set(width, height); diff --git a/src/gpu/GrRedBlackTree.h b/src/gpu/GrRedBlackTree.h index 6f57754708..d9b1a049bd 100644 --- a/src/gpu/GrRedBlackTree.h +++ b/src/gpu/GrRedBlackTree.h @@ -40,7 +40,7 @@ public: * will be created and used for all comparisons. */ template <typename T, typename C = GrLess<T> > -class GrRedBlackTree : public SkNoncopyable { +class GrRedBlackTree : SkNoncopyable { public: /** * Creates an empty tree. diff --git a/src/gpu/GrSWMaskHelper.h b/src/gpu/GrSWMaskHelper.h index b274e84c66..697d6f3a49 100644 --- a/src/gpu/GrSWMaskHelper.h +++ b/src/gpu/GrSWMaskHelper.h @@ -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 SkNoncopyable { +class GrSWMaskHelper : SkNoncopyable { public: GrSWMaskHelper(GrContext* context) : fContext(context) { diff --git a/src/gpu/GrTemplates.h b/src/gpu/GrTemplates.h index 5a009dfdf1..2cab132783 100644 --- a/src/gpu/GrTemplates.h +++ b/src/gpu/GrTemplates.h @@ -35,7 +35,7 @@ template <typename Dst, typename Src> Dst GrTCast(Src src) { * ... * } // fCount is restored */ -template <typename T> class GrAutoTRestore : public SkNoncopyable { +template <typename T> class GrAutoTRestore : SkNoncopyable { public: GrAutoTRestore() : fPtr(NULL), fVal() {} diff --git a/src/gpu/effects/GrTextureStripAtlas.h b/src/gpu/effects/GrTextureStripAtlas.h index e06e273e26..5227cc38bd 100644 --- a/src/gpu/effects/GrTextureStripAtlas.h +++ b/src/gpu/effects/GrTextureStripAtlas.h @@ -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 SkNoncopyable { + struct AtlasRow : 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; diff --git a/src/gpu/gl/GrGLBufferImpl.h b/src/gpu/gl/GrGLBufferImpl.h index ab2555650f..148ca1b2ee 100644 --- a/src/gpu/gl/GrGLBufferImpl.h +++ b/src/gpu/gl/GrGLBufferImpl.h @@ -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 SkNoncopyable { +class GrGLBufferImpl : SkNoncopyable { public: struct Desc { bool fIsWrapped; diff --git a/src/gpu/gl/GrGLShaderBuilder.h b/src/gpu/gl/GrGLShaderBuilder.h index fb75d3a7db..233bb524f5 100644 --- a/src/gpu/gl/GrGLShaderBuilder.h +++ b/src/gpu/gl/GrGLShaderBuilder.h @@ -255,7 +255,7 @@ protected: void appendUniformDecls(ShaderVisibility, SkString*) const; private: - class CodeStage : public SkNoncopyable { + class CodeStage : SkNoncopyable { public: CodeStage() : fNextIndex(0), fCurrentIndex(-1), fEffectStage(NULL) {} @@ -274,7 +274,7 @@ private: return fCurrentIndex; } - class AutoStageRestore : public SkNoncopyable { + class AutoStageRestore : SkNoncopyable { public: AutoStageRestore(CodeStage* codeStage, const GrEffectStage* newStage) { SkASSERT(NULL != codeStage); diff --git a/src/gpu/gl/debug/GrFakeRefObj.h b/src/gpu/gl/debug/GrFakeRefObj.h index 47ec4ee440..84ac499c75 100644 --- a/src/gpu/gl/debug/GrFakeRefObj.h +++ b/src/gpu/gl/debug/GrFakeRefObj.h @@ -18,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 SkNoncopyable { +class GrFakeRefObj : SkNoncopyable { public: GrFakeRefObj() : fRef(0) diff --git a/src/pdf/SkPDFFont.h b/src/pdf/SkPDFFont.h index 694c69ac39..68a00f079a 100644 --- a/src/pdf/SkPDFFont.h +++ b/src/pdf/SkPDFFont.h @@ -21,7 +21,7 @@ class SkPaint; class SkPDFCatalog; class SkPDFFont; -class SkPDFGlyphSet : public SkNoncopyable { +class SkPDFGlyphSet : SkNoncopyable { public: SkPDFGlyphSet(); @@ -34,7 +34,7 @@ private: SkBitSet fBitSet; }; -class SkPDFGlyphSetMap : public SkNoncopyable { +class SkPDFGlyphSetMap : SkNoncopyable { public: struct FontGlyphSetPair { FontGlyphSetPair(SkPDFFont* font, SkPDFGlyphSet* glyphSet); |