aboutsummaryrefslogtreecommitdiffhomepage
path: root/modules
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 /modules
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 'modules')
-rw-r--r--modules/skottie/include/Skottie.h5
-rw-r--r--modules/skottie/src/SkottieTool.cpp6
-rw-r--r--modules/sksg/include/SkSGInvalidationController.h6
-rw-r--r--modules/sksg/include/SkSGScene.h13
4 files changed, 16 insertions, 14 deletions
diff --git a/modules/skottie/include/Skottie.h b/modules/skottie/include/Skottie.h
index 54f293c849..428a3a6de0 100644
--- a/modules/skottie/include/Skottie.h
+++ b/modules/skottie/include/Skottie.h
@@ -24,9 +24,12 @@ namespace sksg { class Scene; }
namespace skottie {
-class SK_API ResourceProvider : public SkNoncopyable {
+class SK_API ResourceProvider {
public:
+ ResourceProvider() = default;
virtual ~ResourceProvider() = default;
+ ResourceProvider(const ResourceProvider&) = delete;
+ ResourceProvider& operator=(const ResourceProvider&) = delete;
virtual std::unique_ptr<SkStream> openStream(const char resource[]) const = 0;
};
diff --git a/modules/skottie/src/SkottieTool.cpp b/modules/skottie/src/SkottieTool.cpp
index 5e819b17e9..b62102ab42 100644
--- a/modules/skottie/src/SkottieTool.cpp
+++ b/modules/skottie/src/SkottieTool.cpp
@@ -32,9 +32,11 @@ DEFINE_int32(height, 600, "Render height.");
namespace {
-class Sink : public SkNoncopyable {
+class Sink {
public:
virtual ~Sink() = default;
+ Sink(const Sink&) = delete;
+ Sink& operator=(const Sink&) = delete;
bool handleFrame(const sk_sp<skottie::Animation>& anim, size_t idx) const {
const auto frame_file = SkStringPrintf("0%06d.%s", idx, fExtension.c_str());
@@ -56,8 +58,6 @@ protected:
private:
const SkString fExtension;
-
- using INHERITED = SkNoncopyable;
};
class PNGSink final : public Sink {
diff --git a/modules/sksg/include/SkSGInvalidationController.h b/modules/sksg/include/SkSGInvalidationController.h
index df3857c1fe..d6f7bd3019 100644
--- a/modules/sksg/include/SkSGInvalidationController.h
+++ b/modules/sksg/include/SkSGInvalidationController.h
@@ -21,9 +21,11 @@ namespace sksg {
*
* Tracks dirty regions for repaint.
*/
-class InvalidationController : public SkNoncopyable {
+class InvalidationController {
public:
InvalidationController();
+ InvalidationController(const InvalidationController&) = delete;
+ InvalidationController& operator=(const InvalidationController&) = delete;
void inval(const SkRect&, const SkMatrix& ctm = SkMatrix::I());
@@ -34,8 +36,6 @@ public:
private:
SkTDArray<SkRect> fRects;
SkRect fBounds;
-
- typedef SkNoncopyable INHERITED;
};
} // namespace sksg
diff --git a/modules/sksg/include/SkSGScene.h b/modules/sksg/include/SkSGScene.h
index 2081c1d747..95bee3029b 100644
--- a/modules/sksg/include/SkSGScene.h
+++ b/modules/sksg/include/SkSGScene.h
@@ -24,9 +24,11 @@ class RenderNode;
* Base class for animators.
*
*/
-class Animator : public SkNoncopyable {
+class Animator {
public:
virtual ~Animator();
+ Animator(const Animator&) = delete;
+ Animator& operator=(const Animator&) = delete;
void tick(float t);
@@ -34,9 +36,6 @@ protected:
Animator();
virtual void onTick(float t) = 0;
-
-private:
- using INHERITED = SkNoncopyable;
};
using AnimatorList = std::vector<std::unique_ptr<Animator>>;
@@ -59,10 +58,12 @@ private:
* Provides high-level mehods for driving rendering and animations.
*
*/
-class Scene final : SkNoncopyable {
+class Scene final {
public:
static std::unique_ptr<Scene> Make(sk_sp<RenderNode> root, AnimatorList&& animators);
~Scene();
+ Scene(const Scene&) = delete;
+ Scene& operator=(const Scene&) = delete;
void render(SkCanvas*) const;
void animate(float t);
@@ -76,8 +77,6 @@ private:
const AnimatorList fAnimators;
bool fShowInval = false;
-
- using INHERITED = SkNoncopyable;
};
} // namespace sksg