Add the -Wdeprecated-copy-dtor warning.

This should fix the warning triggering when using Dawn in Skia.

Bug: None
Change-Id: I045ebc87f9e8dbff035920fc6eaa409c2b70d0f2
Reviewed-on: https://dawn-review.googlesource.com/c/dawn/+/30701
Reviewed-by: John Stiles <johnstiles@google.com>
Reviewed-by: dan sinclair <dsinclair@chromium.org>
Commit-Queue: Corentin Wallez <cwallez@chromium.org>
This commit is contained in:
Corentin Wallez
2020-11-03 14:24:05 +00:00
committed by Commit Bot service account
parent 8d248300c4
commit 18c7b0e0b1
11 changed files with 92 additions and 13 deletions

View File

@@ -93,6 +93,9 @@ namespace dawn_native {
Adapter(AdapterBase* impl);
~Adapter();
Adapter(const Adapter& other);
Adapter& operator=(const Adapter& other);
// DEPRECATED: use GetProperties instead.
BackendType GetBackendType() const;
DeviceType GetDeviceType() const;

View File

@@ -30,8 +30,9 @@ namespace dawn_platform {
class DAWN_NATIVE_EXPORT Platform {
public:
virtual ~Platform() {
}
Platform();
virtual ~Platform();
virtual const unsigned char* GetTraceCategoryEnabledFlag(TraceCategory category) = 0;
virtual double MonotonicallyIncreasingTime() = 0;
@@ -46,6 +47,10 @@ namespace dawn_platform {
const unsigned char* argTypes,
const uint64_t* argValues,
unsigned char flags) = 0;
private:
Platform(const Platform&) = delete;
Platform& operator=(const Platform&) = delete;
};
} // namespace dawn_platform

View File

@@ -63,11 +63,12 @@ namespace dawn_wire {
namespace client {
class DAWN_WIRE_EXPORT MemoryTransferService {
public:
MemoryTransferService();
virtual ~MemoryTransferService();
class ReadHandle;
class WriteHandle;
virtual ~MemoryTransferService();
// Create a handle for reading server data.
// This may fail and return nullptr.
virtual ReadHandle* CreateReadHandle(size_t) = 0;
@@ -84,6 +85,9 @@ namespace dawn_wire {
class DAWN_WIRE_EXPORT ReadHandle {
public:
ReadHandle();
virtual ~ReadHandle();
// Get the required serialization size for SerializeCreate
virtual size_t SerializeCreateSize() = 0;
@@ -100,11 +104,17 @@ namespace dawn_wire {
size_t deserializeSize,
const void** data,
size_t* dataLength) = 0;
virtual ~ReadHandle();
private:
ReadHandle(const ReadHandle&) = delete;
ReadHandle& operator=(const ReadHandle&) = delete;
};
class DAWN_WIRE_EXPORT WriteHandle {
public:
WriteHandle();
virtual ~WriteHandle();
// Get the required serialization size for SerializeCreate
virtual size_t SerializeCreateSize() = 0;
@@ -123,8 +133,14 @@ namespace dawn_wire {
// server.
virtual void SerializeFlush(void* serializePointer) = 0;
virtual ~WriteHandle();
private:
WriteHandle(const WriteHandle&) = delete;
WriteHandle& operator=(const WriteHandle&) = delete;
};
private:
MemoryTransferService(const MemoryTransferService&) = delete;
MemoryTransferService& operator=(const MemoryTransferService&) = delete;
};
// Backdoor to get the order of the ProcMap for testing

View File

@@ -52,11 +52,12 @@ namespace dawn_wire {
namespace server {
class DAWN_WIRE_EXPORT MemoryTransferService {
public:
MemoryTransferService();
virtual ~MemoryTransferService();
class ReadHandle;
class WriteHandle;
virtual ~MemoryTransferService();
// Deserialize data to create Read/Write handles. These handles are for the client
// to Read/Write data.
virtual bool DeserializeReadHandle(const void* deserializePointer,
@@ -68,6 +69,9 @@ namespace dawn_wire {
class DAWN_WIRE_EXPORT ReadHandle {
public:
ReadHandle();
virtual ~ReadHandle();
// Get the required serialization size for SerializeInitialData
virtual size_t SerializeInitialDataSize(const void* data, size_t dataLength) = 0;
@@ -76,11 +80,17 @@ namespace dawn_wire {
virtual void SerializeInitialData(const void* data,
size_t dataLength,
void* serializePointer) = 0;
virtual ~ReadHandle();
private:
ReadHandle(const ReadHandle&) = delete;
ReadHandle& operator=(const ReadHandle&) = delete;
};
class DAWN_WIRE_EXPORT WriteHandle {
public:
WriteHandle();
virtual ~WriteHandle();
// Set the target for writes from the client. DeserializeFlush should copy data
// into the target.
void SetTarget(void* data, size_t dataLength);
@@ -89,12 +99,19 @@ namespace dawn_wire {
// client::MemoryTransferService::WriteHandle::SerializeFlush.
virtual bool DeserializeFlush(const void* deserializePointer,
size_t deserializeSize) = 0;
virtual ~WriteHandle();
protected:
void* mTargetData = nullptr;
size_t mDataLength = 0;
private:
WriteHandle(const WriteHandle&) = delete;
WriteHandle& operator=(const WriteHandle&) = delete;
};
private:
MemoryTransferService(const MemoryTransferService&) = delete;
MemoryTransferService& operator=(const MemoryTransferService&) = delete;
};
} // namespace server