summaryrefslogtreecommitdiffstats
path: root/cc/resources
diff options
context:
space:
mode:
authorvmpstr <vmpstr@chromium.org>2016-02-24 17:55:38 -0800
committerCommit bot <commit-bot@chromium.org>2016-02-25 01:56:41 +0000
commit6aaeb2eea626993638a204284e61bfc2916f9804 (patch)
tree06fe7b4687849447b015fce4f02d8e503a71cd62 /cc/resources
parentae3b7c85a92790c252c470f6fe0c772e5c5959ca (diff)
downloadchromium_src-6aaeb2eea626993638a204284e61bfc2916f9804.zip
chromium_src-6aaeb2eea626993638a204284e61bfc2916f9804.tar.gz
chromium_src-6aaeb2eea626993638a204284e61bfc2916f9804.tar.bz2
cc: Add out-of-line copy ctors for complex classes.
This patch adds out of line copy constructors for classes that our clang-plugin considers heavy. This is an effort to enable copy constructor checks by default. BUG=436357 R=enne@chromium.org, dcheng@chromium.org, thakis@chromium.org CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel Review URL: https://codereview.chromium.org/1732573002 Cr-Commit-Position: refs/heads/master@{#377462}
Diffstat (limited to 'cc/resources')
-rw-r--r--cc/resources/resource_provider.cc4
-rw-r--r--cc/resources/resource_provider.h2
-rw-r--r--cc/resources/transferable_resource.cc3
-rw-r--r--cc/resources/transferable_resource.h1
-rw-r--r--cc/resources/ui_resource_bitmap.cc2
-rw-r--r--cc/resources/ui_resource_bitmap.h1
-rw-r--r--cc/resources/video_resource_updater.cc6
-rw-r--r--cc/resources/video_resource_updater.h2
8 files changed, 21 insertions, 0 deletions
diff --git a/cc/resources/resource_provider.cc b/cc/resources/resource_provider.cc
index 2878e30..d7fcee7 100644
--- a/cc/resources/resource_provider.cc
+++ b/cc/resources/resource_provider.cc
@@ -321,6 +321,8 @@ ResourceProvider::Resource::Resource(const SharedBitmapId& bitmap_id,
shared_bitmap(NULL),
gpu_memory_buffer(NULL) {}
+ResourceProvider::Resource::Resource(const Resource& other) = default;
+
void ResourceProvider::Resource::set_mailbox(const TextureMailbox& mailbox) {
mailbox_ = mailbox;
if (IsGpuResourceType(type)) {
@@ -375,6 +377,8 @@ void ResourceProvider::Resource::WaitSyncToken(gpu::gles2::GLES2Interface* gl) {
ResourceProvider::Child::Child()
: marked_for_deletion(false), needs_sync_tokens(true) {}
+ResourceProvider::Child::Child(const Child& other) = default;
+
ResourceProvider::Child::~Child() {}
scoped_ptr<ResourceProvider> ResourceProvider::Create(
diff --git a/cc/resources/resource_provider.h b/cc/resources/resource_provider.h
index a033967..0b0caf0 100644
--- a/cc/resources/resource_provider.h
+++ b/cc/resources/resource_provider.h
@@ -518,6 +518,7 @@ class CC_EXPORT ResourceProvider
const gfx::Size& size,
Origin origin,
GLenum filter);
+ Resource(const Resource& other);
bool needs_sync_token() const { return needs_sync_token_; }
@@ -580,6 +581,7 @@ class CC_EXPORT ResourceProvider
struct Child {
Child();
+ Child(const Child& other);
~Child();
ResourceIdMap child_to_parent_map;
diff --git a/cc/resources/transferable_resource.cc b/cc/resources/transferable_resource.cc
index af65ff6..cf463bf 100644
--- a/cc/resources/transferable_resource.cc
+++ b/cc/resources/transferable_resource.cc
@@ -15,6 +15,9 @@ TransferableResource::TransferableResource()
is_software(false),
is_overlay_candidate(false) {}
+TransferableResource::TransferableResource(const TransferableResource& other) =
+ default;
+
TransferableResource::~TransferableResource() {
}
diff --git a/cc/resources/transferable_resource.h b/cc/resources/transferable_resource.h
index 55d2216..ea63441 100644
--- a/cc/resources/transferable_resource.h
+++ b/cc/resources/transferable_resource.h
@@ -24,6 +24,7 @@ typedef std::vector<TransferableResource> TransferableResourceArray;
struct CC_EXPORT TransferableResource {
TransferableResource();
+ TransferableResource(const TransferableResource& other);
~TransferableResource();
ReturnedResource ToReturnedResource() const;
diff --git a/cc/resources/ui_resource_bitmap.cc b/cc/resources/ui_resource_bitmap.cc
index b8fbf31..3acc6dc 100644
--- a/cc/resources/ui_resource_bitmap.cc
+++ b/cc/resources/ui_resource_bitmap.cc
@@ -77,6 +77,8 @@ UIResourceBitmap::UIResourceBitmap(const skia::RefPtr<SkPixelRef>& pixel_ref,
Create(pixel_ref, size, UIResourceBitmap::ETC1);
}
+UIResourceBitmap::UIResourceBitmap(const UIResourceBitmap& other) = default;
+
UIResourceBitmap::~UIResourceBitmap() {}
AutoLockUIResourceBitmap::AutoLockUIResourceBitmap(
diff --git a/cc/resources/ui_resource_bitmap.h b/cc/resources/ui_resource_bitmap.h
index 34e73ee..a90159f 100644
--- a/cc/resources/ui_resource_bitmap.h
+++ b/cc/resources/ui_resource_bitmap.h
@@ -43,6 +43,7 @@ class CC_EXPORT UIResourceBitmap {
UIResourceBitmap(const gfx::Size& size, bool is_opaque);
UIResourceBitmap(const skia::RefPtr<SkPixelRef>& pixel_ref,
const gfx::Size& size);
+ UIResourceBitmap(const UIResourceBitmap& other);
~UIResourceBitmap();
private:
diff --git a/cc/resources/video_resource_updater.cc b/cc/resources/video_resource_updater.cc
index e6827ee..46dbbc9 100644
--- a/cc/resources/video_resource_updater.cc
+++ b/cc/resources/video_resource_updater.cc
@@ -128,6 +128,9 @@ VideoResourceUpdater::PlaneResource::PlaneResource(
plane_index(0u) {
}
+VideoResourceUpdater::PlaneResource::PlaneResource(const PlaneResource& other) =
+ default;
+
bool VideoResourceUpdater::PlaneResourceMatchesUniqueID(
const PlaneResource& plane_resource,
const media::VideoFrame* video_frame,
@@ -152,6 +155,9 @@ VideoFrameExternalResources::VideoFrameExternalResources()
offset(0.0f),
multiplier(1.0f) {}
+VideoFrameExternalResources::VideoFrameExternalResources(
+ const VideoFrameExternalResources& other) = default;
+
VideoFrameExternalResources::~VideoFrameExternalResources() {}
VideoResourceUpdater::VideoResourceUpdater(ContextProvider* context_provider,
diff --git a/cc/resources/video_resource_updater.h b/cc/resources/video_resource_updater.h
index 4e11110..1307be9 100644
--- a/cc/resources/video_resource_updater.h
+++ b/cc/resources/video_resource_updater.h
@@ -69,6 +69,7 @@ class CC_EXPORT VideoFrameExternalResources {
float multiplier;
VideoFrameExternalResources();
+ VideoFrameExternalResources(const VideoFrameExternalResources& other);
~VideoFrameExternalResources();
};
@@ -105,6 +106,7 @@ class CC_EXPORT VideoResourceUpdater
const gfx::Size& resource_size,
ResourceFormat resource_format,
gpu::Mailbox mailbox);
+ PlaneResource(const PlaneResource& other);
};
static bool PlaneResourceMatchesUniqueID(const PlaneResource& plane_resource,