Reenable Wdeprecated-copy-dtor

Change-Id: Id28ed827c4a896805c6d4eead339146fdd49e35f
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/359560
Reviewed-by: Mike Klein <mtklein@google.com>
Commit-Queue: Brian Salomon <bsalomon@google.com>
diff --git a/gn/BUILD.gn b/gn/BUILD.gn
index 2ba4b45..b36852a 100644
--- a/gn/BUILD.gn
+++ b/gn/BUILD.gn
@@ -499,8 +499,8 @@
       "-Wdeprecated-attributes",
       "-Wdeprecated-comma-subscript",
       "-Wdeprecated-copy",
+      "-Wdeprecated-copy-dtor",
 
-      #"-Wdeprecated-copy-dtor",
       #"-Wdeprecated-declarations",
       "-Wdeprecated-dynamic-exception-spec",
       "-Wdeprecated-enum-compare",
diff --git a/include/core/SkBBHFactory.h b/include/core/SkBBHFactory.h
index 5a7b06e..2507d0f 100644
--- a/include/core/SkBBHFactory.h
+++ b/include/core/SkBBHFactory.h
@@ -15,8 +15,6 @@
 
 class SkBBoxHierarchy : public SkRefCnt {
 public:
-    SkBBoxHierarchy() {}
-
     struct Metadata {
         bool isDraw;  // The corresponding SkRect bounds a draw command, not a pure state change.
     };
@@ -36,6 +34,11 @@
      * Return approximate size in memory of *this.
      */
     virtual size_t bytesUsed() const = 0;
+
+protected:
+    SkBBoxHierarchy() = default;
+    SkBBoxHierarchy(const SkBBoxHierarchy&) = delete;
+    SkBBoxHierarchy& operator=(const SkBBoxHierarchy&) = delete;
 };
 
 class SK_API SkBBHFactory {
@@ -45,6 +48,11 @@
      */
     virtual sk_sp<SkBBoxHierarchy> operator()() const = 0;
     virtual ~SkBBHFactory() {}
+
+protected:
+    SkBBHFactory() = default;
+    SkBBHFactory(const SkBBHFactory&) = delete;
+    SkBBHFactory& operator=(const SkBBHFactory&) = delete;
 };
 
 class SK_API SkRTreeFactory : public SkBBHFactory {
diff --git a/include/core/SkDeferredDisplayListRecorder.h b/include/core/SkDeferredDisplayListRecorder.h
index 74430c3..b8f0410 100644
--- a/include/core/SkDeferredDisplayListRecorder.h
+++ b/include/core/SkDeferredDisplayListRecorder.h
@@ -122,6 +122,9 @@
                                           PromiseImageTextureContext textureContexts[]);
 
 private:
+    SkDeferredDisplayListRecorder(const SkDeferredDisplayListRecorder&) = delete;
+    SkDeferredDisplayListRecorder& operator=(const SkDeferredDisplayListRecorder&) = delete;
+
     bool init();
 
     const SkSurfaceCharacterization             fCharacterization;
diff --git a/include/core/SkExecutor.h b/include/core/SkExecutor.h
index 823882b..88e2ca6 100644
--- a/include/core/SkExecutor.h
+++ b/include/core/SkExecutor.h
@@ -31,6 +31,11 @@
 
     // If it makes sense for this executor, use this thread to execute work for a little while.
     virtual void borrow() {}
+
+protected:
+    SkExecutor() = default;
+    SkExecutor(const SkExecutor&) = delete;
+    SkExecutor& operator=(const SkExecutor&) = delete;
 };
 
 #endif//SkExecutor_DEFINED
diff --git a/include/core/SkPicture.h b/include/core/SkPicture.h
index ebac1c9..f09f8dd 100644
--- a/include/core/SkPicture.h
+++ b/include/core/SkPicture.h
@@ -90,16 +90,9 @@
     */
     class SK_API AbortCallback {
     public:
-
-        /** Has no effect.
-
-            @return  abstract class cannot be instantiated
-        */
-        AbortCallback() {}
-
         /** Has no effect.
         */
-        virtual ~AbortCallback() {}
+        virtual ~AbortCallback() = default;
 
         /** Stops SkPicture playback when some condition is met. A subclass of
             AbortCallback provides an override for abort() that can stop SkPicture::playback.
@@ -116,6 +109,11 @@
         example: https://fiddle.skia.org/c/@Picture_AbortCallback_abort
         */
         virtual bool abort() = 0;
+
+    protected:
+        AbortCallback() = default;
+        AbortCallback(const AbortCallback&) = delete;
+        AbortCallback& operator=(const AbortCallback&) = delete;
     };
 
     /** Replays the drawing commands on the specified canvas. In the case that the
diff --git a/include/core/SkRasterHandleAllocator.h b/include/core/SkRasterHandleAllocator.h
index 7735da9..ad7c379 100644
--- a/include/core/SkRasterHandleAllocator.h
+++ b/include/core/SkRasterHandleAllocator.h
@@ -35,7 +35,7 @@
  */
 class SK_API SkRasterHandleAllocator {
 public:
-    virtual ~SkRasterHandleAllocator() {}
+    virtual ~SkRasterHandleAllocator() = default;
 
     // The value that is returned to clients of the canvas that has this allocator installed.
     typedef void* Handle;
@@ -78,6 +78,11 @@
     static std::unique_ptr<SkCanvas> MakeCanvas(std::unique_ptr<SkRasterHandleAllocator>,
                                                 const SkImageInfo&, const Rec* rec = nullptr);
 
+protected:
+    SkRasterHandleAllocator() = default;
+    SkRasterHandleAllocator(const SkRasterHandleAllocator&) = delete;
+    SkRasterHandleAllocator& operator=(const SkRasterHandleAllocator&) = delete;
+
 private:
     friend class SkBitmapDevice;
 
diff --git a/include/core/SkTraceMemoryDump.h b/include/core/SkTraceMemoryDump.h
index 10f28b4..a1613f1 100644
--- a/include/core/SkTraceMemoryDump.h
+++ b/include/core/SkTraceMemoryDump.h
@@ -84,7 +84,10 @@
     virtual bool shouldDumpWrappedObjects() const { return true; }
 
 protected:
-    virtual ~SkTraceMemoryDump() { }
+    virtual ~SkTraceMemoryDump() = default;
+    SkTraceMemoryDump() = default;
+    SkTraceMemoryDump(const SkTraceMemoryDump&) = delete;
+    SkTraceMemoryDump& operator=(const SkTraceMemoryDump&) = delete;
 };
 
 #endif
diff --git a/include/effects/SkLayerDrawLooper.h b/include/effects/SkLayerDrawLooper.h
index ea35048..1e875b5 100644
--- a/include/effects/SkLayerDrawLooper.h
+++ b/include/effects/SkLayerDrawLooper.h
@@ -119,6 +119,7 @@
     class SK_API Builder {
     public:
         Builder();
+
         ~Builder();
 
         /**
@@ -148,6 +149,9 @@
         sk_sp<SkDrawLooper> detach();
 
     private:
+        Builder(const Builder&) = delete;
+        Builder& operator=(const Builder&) = delete;
+
         Rec* fRecs;
         Rec* fTopRec;
         int  fCount;
diff --git a/include/gpu/GrContextOptions.h b/include/gpu/GrContextOptions.h
index 5745193..2d69558 100644
--- a/include/gpu/GrContextOptions.h
+++ b/include/gpu/GrContextOptions.h
@@ -44,7 +44,7 @@
      */
     class SK_API PersistentCache {
     public:
-        virtual ~PersistentCache() {}
+        virtual ~PersistentCache() = default;
 
         /**
          * Returns the data for the key if it exists in the cache, otherwise returns null.
@@ -52,6 +52,11 @@
         virtual sk_sp<SkData> load(const SkData& key) = 0;
 
         virtual void store(const SkData& key, const SkData& data) = 0;
+
+    protected:
+        PersistentCache() = default;
+        PersistentCache(const PersistentCache&) = delete;
+        PersistentCache& operator=(const PersistentCache&) = delete;
     };
 
     /**
@@ -61,8 +66,14 @@
      */
     class SK_API ShaderErrorHandler {
     public:
-        virtual ~ShaderErrorHandler() {}
+        virtual ~ShaderErrorHandler() = default;
+
         virtual void compileError(const char* shader, const char* errors) = 0;
+
+    protected:
+        ShaderErrorHandler() = default;
+        ShaderErrorHandler(const ShaderErrorHandler&) = delete;
+        ShaderErrorHandler& operator=(const ShaderErrorHandler&) = delete;
     };
 
     GrContextOptions() {}
diff --git a/include/utils/SkEventTracer.h b/include/utils/SkEventTracer.h
index 03e9d55..4ef6160 100644
--- a/include/utils/SkEventTracer.h
+++ b/include/utils/SkEventTracer.h
@@ -36,7 +36,7 @@
      */
     static SkEventTracer* GetInstance();
 
-    virtual ~SkEventTracer() { }
+    virtual ~SkEventTracer() = default;
 
     // The pointer returned from GetCategoryGroupEnabled() points to a
     // value with zero or more of the following bits. Used in this class only.
@@ -69,6 +69,11 @@
         updateTraceEventDuration(const uint8_t* categoryEnabledFlag,
                                  const char* name,
                                  SkEventTracer::Handle handle) = 0;
+
+protected:
+    SkEventTracer() = default;
+    SkEventTracer(const SkEventTracer&) = delete;
+    SkEventTracer& operator=(const SkEventTracer&) = delete;
 };
 
 #endif // SkEventTracer_DEFINED
diff --git a/src/core/SkATrace.h b/src/core/SkATrace.h
index eae6d31..db05a6d 100644
--- a/src/core/SkATrace.h
+++ b/src/core/SkATrace.h
@@ -45,6 +45,9 @@
     }
 
 private:
+    SkATrace(const SkATrace&) = delete;
+    SkATrace& operator=(const SkATrace&) = delete;
+
     void (*fBeginSection)(const char*);
     void (*fEndSection)(void);
     bool (*fIsEnabled)(void);
diff --git a/src/core/SkDiscardableMemory.h b/src/core/SkDiscardableMemory.h
index bc00f6e..ade4d71 100644
--- a/src/core/SkDiscardableMemory.h
+++ b/src/core/SkDiscardableMemory.h
@@ -60,6 +60,11 @@
      * after every successful lock call.
      */
     virtual void unlock() = 0;
+
+protected:
+    SkDiscardableMemory() = default;
+    SkDiscardableMemory(const SkDiscardableMemory&) = delete;
+    SkDiscardableMemory& operator=(const SkDiscardableMemory&) = delete;
 };
 
 #endif
diff --git a/src/core/SkTraceEvent.h b/src/core/SkTraceEvent.h
index b4548dd..aef99b0 100644
--- a/src/core/SkTraceEvent.h
+++ b/src/core/SkTraceEvent.h
@@ -346,6 +346,9 @@
   }
 
  private:
+    ScopedTracer(const ScopedTracer&) = delete;
+    ScopedTracer& operator=(const ScopedTracer&) = delete;
+
   // This Data struct workaround is to avoid initializing all the members
   // in Data during construction of this object, since this object is always
   // constructed, even when tracing is disabled. If the members of Data were