aboutsummaryrefslogtreecommitdiffhomepage
path: root/include
diff options
context:
space:
mode:
authorGravatar Ben Wagner <bungeman@google.com>2018-07-16 17:44:06 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-07-17 21:39:51 +0000
commitd5148e331436b69e3de1a35d4bfa8492e89b3cce (patch)
treefdf0a1dc5c8347ea75d57b0ed55af835f3a31d40 /include
parent21a99d42c34f44dac4a71cace9572dc244cad583 (diff)
Move SkNoncopyable to include/private.
Change-Id: I62f60ea52faeebddecacf03d9429ac3f7c516b8e Reviewed-on: https://skia-review.googlesource.com/141823 Commit-Queue: Ben Wagner <bungeman@google.com> Reviewed-by: Ben Wagner <bungeman@google.com>
Diffstat (limited to 'include')
-rw-r--r--include/codec/SkCodec.h1
-rw-r--r--include/core/SkColorSpaceXform.h1
-rw-r--r--include/core/SkDeque.h1
-rw-r--r--include/core/SkDrawLooper.h1
-rw-r--r--include/core/SkPictureRecorder.h1
-rw-r--r--include/core/SkTypeface.h1
-rw-r--r--include/core/SkTypes.h19
-rw-r--r--include/encode/SkEncoder.h3
-rw-r--r--include/gpu/GrGpuResource.h1
-rw-r--r--include/private/GrSurfaceProxy.h1
-rw-r--r--include/private/GrSurfaceProxyRef.h1
-rw-r--r--include/private/SkAtomics.h1
-rw-r--r--include/private/SkChecksum.h1
-rw-r--r--include/private/SkMessageBus.h1
-rw-r--r--include/private/SkNoncopyable.h30
-rw-r--r--include/private/SkTInternalLList.h1
-rw-r--r--include/utils/SkCamera.h1
-rw-r--r--include/utils/SkInterpolator.h1
18 files changed, 47 insertions, 20 deletions
diff --git a/include/codec/SkCodec.h b/include/codec/SkCodec.h
index 36f557e603..37f01fd4ba 100644
--- a/include/codec/SkCodec.h
+++ b/include/codec/SkCodec.h
@@ -8,6 +8,7 @@
#ifndef SkCodec_DEFINED
#define SkCodec_DEFINED
+#include "../private/SkNoncopyable.h"
#include "../private/SkTemplates.h"
#include "../private/SkEncodedInfo.h"
#include "SkCodecAnimation.h"
diff --git a/include/core/SkColorSpaceXform.h b/include/core/SkColorSpaceXform.h
index bb838a264e..39c83d6c12 100644
--- a/include/core/SkColorSpaceXform.h
+++ b/include/core/SkColorSpaceXform.h
@@ -8,6 +8,7 @@
#ifndef SkColorSpaceXform_DEFINED
#define SkColorSpaceXform_DEFINED
+#include "../private/SkNoncopyable.h"
#include "SkImageInfo.h"
class SkColorSpace;
diff --git a/include/core/SkDeque.h b/include/core/SkDeque.h
index a00e3c2dfe..43023b8f5d 100644
--- a/include/core/SkDeque.h
+++ b/include/core/SkDeque.h
@@ -10,6 +10,7 @@
#ifndef SkDeque_DEFINED
#define SkDeque_DEFINED
+#include "../private/SkNoncopyable.h"
#include "SkTypes.h"
/*
diff --git a/include/core/SkDrawLooper.h b/include/core/SkDrawLooper.h
index fb7def7878..c6b2d6682c 100644
--- a/include/core/SkDrawLooper.h
+++ b/include/core/SkDrawLooper.h
@@ -10,6 +10,7 @@
#ifndef SkDrawLooper_DEFINED
#define SkDrawLooper_DEFINED
+#include "../private/SkNoncopyable.h"
#include "SkBlurTypes.h"
#include "SkFlattenable.h"
#include "SkPoint.h"
diff --git a/include/core/SkPictureRecorder.h b/include/core/SkPictureRecorder.h
index cadd193afc..d28544c48c 100644
--- a/include/core/SkPictureRecorder.h
+++ b/include/core/SkPictureRecorder.h
@@ -8,6 +8,7 @@
#ifndef SkPictureRecorder_DEFINED
#define SkPictureRecorder_DEFINED
+#include "../private/SkNoncopyable.h"
#include "SkBBHFactory.h"
#include "SkPicture.h"
#include "SkRefCnt.h"
diff --git a/include/core/SkTypeface.h b/include/core/SkTypeface.h
index 51f339ccfa..5604ce9c94 100644
--- a/include/core/SkTypeface.h
+++ b/include/core/SkTypeface.h
@@ -8,6 +8,7 @@
#ifndef SkTypeface_DEFINED
#define SkTypeface_DEFINED
+#include "../private/SkNoncopyable.h"
#include "../private/SkOnce.h"
#include "../private/SkWeakRefCnt.h"
#include "SkFontArguments.h"
diff --git a/include/core/SkTypes.h b/include/core/SkTypes.h
index be51e20bac..01480509d6 100644
--- a/include/core/SkTypes.h
+++ b/include/core/SkTypes.h
@@ -237,23 +237,4 @@ enum class SkBackingFit {
kExact
};
-////////////////////////////////////////////////////////////////////////////////
-
-/** \class SkNoncopyable
-
- SkNoncopyable is the base class for objects that do not want to
- be copied. It hides its copy-constructor and its assignment-operator.
-*/
-class SK_API SkNoncopyable {
-public:
- SkNoncopyable() = default;
-
- SkNoncopyable(SkNoncopyable&&) = default;
- SkNoncopyable& operator =(SkNoncopyable&&) = default;
-
-private:
- SkNoncopyable(const SkNoncopyable&) = delete;
- SkNoncopyable& operator=(const SkNoncopyable&) = delete;
-};
-
#endif
diff --git a/include/encode/SkEncoder.h b/include/encode/SkEncoder.h
index 3acfb97108..1b4f5594f5 100644
--- a/include/encode/SkEncoder.h
+++ b/include/encode/SkEncoder.h
@@ -8,8 +8,9 @@
#ifndef SkEncoder_DEFINED
#define SkEncoder_DEFINED
-#include "SkPixmap.h"
+#include "../private/SkNoncopyable.h"
#include "../private/SkTemplates.h"
+#include "SkPixmap.h"
class SK_API SkEncoder : SkNoncopyable {
public:
diff --git a/include/gpu/GrGpuResource.h b/include/gpu/GrGpuResource.h
index 38545dd821..57e52b4e78 100644
--- a/include/gpu/GrGpuResource.h
+++ b/include/gpu/GrGpuResource.h
@@ -9,6 +9,7 @@
#define GrGpuResource_DEFINED
#include "../private/GrTypesPriv.h"
+#include "../private/SkNoncopyable.h"
#include "GrResourceKey.h"
class GrContext;
diff --git a/include/private/GrSurfaceProxy.h b/include/private/GrSurfaceProxy.h
index 9499edfde3..94626265ac 100644
--- a/include/private/GrSurfaceProxy.h
+++ b/include/private/GrSurfaceProxy.h
@@ -8,6 +8,7 @@
#ifndef GrSurfaceProxy_DEFINED
#define GrSurfaceProxy_DEFINED
+#include "../private/SkNoncopyable.h"
#include "GrGpuResource.h"
#include "GrSurface.h"
diff --git a/include/private/GrSurfaceProxyRef.h b/include/private/GrSurfaceProxyRef.h
index 2319357251..38d5827614 100644
--- a/include/private/GrSurfaceProxyRef.h
+++ b/include/private/GrSurfaceProxyRef.h
@@ -8,6 +8,7 @@
#ifndef GrSurfaceProxyRef_DEFINED
#define GrSurfaceProxyRef_DEFINED
+#include "../private/SkNoncopyable.h"
#include "GrTypesPriv.h"
class GrSurfaceProxy;
diff --git a/include/private/SkAtomics.h b/include/private/SkAtomics.h
index 56272e25e6..075d4c0695 100644
--- a/include/private/SkAtomics.h
+++ b/include/private/SkAtomics.h
@@ -9,6 +9,7 @@
#define SkAtomics_DEFINED
// This file is not part of the public Skia API.
+#include "../private/SkNoncopyable.h"
#include "SkTypes.h"
#include <atomic>
diff --git a/include/private/SkChecksum.h b/include/private/SkChecksum.h
index 8a04c89ae7..fceb86bc30 100644
--- a/include/private/SkChecksum.h
+++ b/include/private/SkChecksum.h
@@ -8,6 +8,7 @@
#ifndef SkChecksum_DEFINED
#define SkChecksum_DEFINED
+#include "../private/SkNoncopyable.h"
#include "SkString.h"
#include "SkTLogic.h"
#include "SkTypes.h"
diff --git a/include/private/SkMessageBus.h b/include/private/SkMessageBus.h
index 418235d68e..9fe060d12f 100644
--- a/include/private/SkMessageBus.h
+++ b/include/private/SkMessageBus.h
@@ -8,6 +8,7 @@
#ifndef SkMessageBus_DEFINED
#define SkMessageBus_DEFINED
+#include "../private/SkNoncopyable.h"
#include "SkMutex.h"
#include "SkOnce.h"
#include "SkTArray.h"
diff --git a/include/private/SkNoncopyable.h b/include/private/SkNoncopyable.h
new file mode 100644
index 0000000000..518b3eeb92
--- /dev/null
+++ b/include/private/SkNoncopyable.h
@@ -0,0 +1,30 @@
+/*
+ * Copyright 2006 The Android Open Source Project
+ *
+ * Use of this source code is governed by a BSD-style license that can be
+ * found in the LICENSE file.
+ */
+
+#ifndef SkNoncopyable_DEFINED
+#define SkNoncopyable_DEFINED
+
+#include "SkTypes.h"
+
+/** \class SkNoncopyable
+
+ SkNoncopyable is the base class for objects that do not want to
+ be copied. It hides its copy-constructor and its assignment-operator.
+*/
+class SK_API SkNoncopyable {
+public:
+ SkNoncopyable() = default;
+
+ SkNoncopyable(SkNoncopyable&&) = default;
+ SkNoncopyable& operator =(SkNoncopyable&&) = default;
+
+private:
+ SkNoncopyable(const SkNoncopyable&) = delete;
+ SkNoncopyable& operator=(const SkNoncopyable&) = delete;
+};
+
+#endif
diff --git a/include/private/SkTInternalLList.h b/include/private/SkTInternalLList.h
index 2f43f1c1eb..547befe694 100644
--- a/include/private/SkTInternalLList.h
+++ b/include/private/SkTInternalLList.h
@@ -8,6 +8,7 @@
#ifndef SkTInternalLList_DEFINED
#define SkTInternalLList_DEFINED
+#include "../private/SkNoncopyable.h"
#include "SkTypes.h"
/**
diff --git a/include/utils/SkCamera.h b/include/utils/SkCamera.h
index db7235f0b8..405ae5a8df 100644
--- a/include/utils/SkCamera.h
+++ b/include/utils/SkCamera.h
@@ -10,6 +10,7 @@
#ifndef SkCamera_DEFINED
#define SkCamera_DEFINED
+#include "../private/SkNoncopyable.h"
#include "SkMatrix.h"
class SkCanvas;
diff --git a/include/utils/SkInterpolator.h b/include/utils/SkInterpolator.h
index f426263be7..7eedb4f25d 100644
--- a/include/utils/SkInterpolator.h
+++ b/include/utils/SkInterpolator.h
@@ -9,6 +9,7 @@
#ifndef SkInterpolator_DEFINED
#define SkInterpolator_DEFINED
+#include "../private/SkNoncopyable.h"
#include "../private/SkTo.h"
#include "SkScalar.h"