diff options
author | vmpstr <vmpstr@chromium.org> | 2016-02-26 12:49:07 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-02-26 20:50:19 +0000 |
commit | 9750c9d9a4b7c8b84716facbf16c735ae9b355bf (patch) | |
tree | 9393c9ba347b5499b403c87eaed31e02b91bd673 /media/base | |
parent | 60c10a4ce69ac02dd77c3616e95d2d4f99bd6a29 (diff) | |
download | chromium_src-9750c9d9a4b7c8b84716facbf16c735ae9b355bf.zip chromium_src-9750c9d9a4b7c8b84716facbf16c735ae9b355bf.tar.gz chromium_src-9750c9d9a4b7c8b84716facbf16c735ae9b355bf.tar.bz2 |
media: 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=dalecurtis@chromium.org, dcheng@chromium.org, thakis@chromium.org
Review URL: https://codereview.chromium.org/1731403002
Cr-Commit-Position: refs/heads/master@{#377967}
Diffstat (limited to 'media/base')
-rw-r--r-- | media/base/audio_decoder_config.cc | 3 | ||||
-rw-r--r-- | media/base/audio_decoder_config.h | 2 | ||||
-rw-r--r-- | media/base/audio_shifter.cc | 3 | ||||
-rw-r--r-- | media/base/audio_shifter.h | 1 | ||||
-rw-r--r-- | media/base/audio_video_metadata_extractor.cc | 3 | ||||
-rw-r--r-- | media/base/audio_video_metadata_extractor.h | 1 | ||||
-rw-r--r-- | media/base/bitstream_buffer.cc | 2 | ||||
-rw-r--r-- | media/base/bitstream_buffer.h | 2 | ||||
-rw-r--r-- | media/base/cdm_key_information.cc | 2 | ||||
-rw-r--r-- | media/base/cdm_key_information.h | 1 | ||||
-rw-r--r-- | media/base/key_system_info.cc | 2 | ||||
-rw-r--r-- | media/base/key_system_info.h | 1 | ||||
-rw-r--r-- | media/base/serial_runner.cc | 1 | ||||
-rw-r--r-- | media/base/serial_runner.h | 1 | ||||
-rw-r--r-- | media/base/text_track_config.cc | 2 | ||||
-rw-r--r-- | media/base/text_track_config.h | 1 | ||||
-rw-r--r-- | media/base/video_decoder_config.cc | 3 | ||||
-rw-r--r-- | media/base/video_decoder_config.h | 2 |
18 files changed, 33 insertions, 0 deletions
diff --git a/media/base/audio_decoder_config.cc b/media/base/audio_decoder_config.cc index 9d3f672..3f279f2 100644 --- a/media/base/audio_decoder_config.cc +++ b/media/base/audio_decoder_config.cc @@ -70,6 +70,9 @@ AudioDecoderConfig::AudioDecoderConfig(AudioCodec codec, extra_data, is_encrypted, base::TimeDelta(), 0); } +AudioDecoderConfig::AudioDecoderConfig(const AudioDecoderConfig& other) = + default; + void AudioDecoderConfig::Initialize(AudioCodec codec, SampleFormat sample_format, ChannelLayout channel_layout, diff --git a/media/base/audio_decoder_config.h b/media/base/audio_decoder_config.h index a0e262f..c3489cc 100644 --- a/media/base/audio_decoder_config.h +++ b/media/base/audio_decoder_config.h @@ -68,6 +68,8 @@ class MEDIA_EXPORT AudioDecoderConfig { const std::vector<uint8_t>& extra_data, bool is_encrypted); + AudioDecoderConfig(const AudioDecoderConfig& other); + ~AudioDecoderConfig(); // Resets the internal state of this object. |codec_delay| is in frames. diff --git a/media/base/audio_shifter.cc b/media/base/audio_shifter.cc index c88af3a..6a268d3 100644 --- a/media/base/audio_shifter.cc +++ b/media/base/audio_shifter.cc @@ -82,6 +82,9 @@ AudioShifter::AudioQueueEntry::AudioQueueEntry( audio(audio_.release()) { } +AudioShifter::AudioQueueEntry::AudioQueueEntry(const AudioQueueEntry& other) = + default; + AudioShifter::AudioQueueEntry::~AudioQueueEntry() {} AudioShifter::AudioShifter(base::TimeDelta max_buffer_size, diff --git a/media/base/audio_shifter.h b/media/base/audio_shifter.h index 0156269..3429a2f 100644 --- a/media/base/audio_shifter.h +++ b/media/base/audio_shifter.h @@ -89,6 +89,7 @@ private: struct AudioQueueEntry { AudioQueueEntry(base::TimeTicks target_playout_time_, scoped_ptr<AudioBus> audio_); + AudioQueueEntry(const AudioQueueEntry& other); ~AudioQueueEntry(); base::TimeTicks target_playout_time; linked_ptr<AudioBus> audio; diff --git a/media/base/audio_video_metadata_extractor.cc b/media/base/audio_video_metadata_extractor.cc index 0ba36e1..5b92c15 100644 --- a/media/base/audio_video_metadata_extractor.cc +++ b/media/base/audio_video_metadata_extractor.cc @@ -54,6 +54,9 @@ const int kAttachedImageSizeLimit = 4 * 1024 * 1024; AudioVideoMetadataExtractor::StreamInfo::StreamInfo() {} +AudioVideoMetadataExtractor::StreamInfo::StreamInfo(const StreamInfo& other) = + default; + AudioVideoMetadataExtractor::StreamInfo::~StreamInfo() {} AudioVideoMetadataExtractor::AudioVideoMetadataExtractor() diff --git a/media/base/audio_video_metadata_extractor.h b/media/base/audio_video_metadata_extractor.h index 97f7a5b..4e5906d 100644 --- a/media/base/audio_video_metadata_extractor.h +++ b/media/base/audio_video_metadata_extractor.h @@ -26,6 +26,7 @@ class MEDIA_EXPORT AudioVideoMetadataExtractor { struct StreamInfo { StreamInfo(); + StreamInfo(const StreamInfo& other); ~StreamInfo(); std::string type; TagDictionary tags; diff --git a/media/base/bitstream_buffer.cc b/media/base/bitstream_buffer.cc index 49caf5b..5732981 100644 --- a/media/base/bitstream_buffer.cc +++ b/media/base/bitstream_buffer.cc @@ -23,6 +23,8 @@ BitstreamBuffer::BitstreamBuffer(int32_t id, size_(size), presentation_timestamp_(presentation_timestamp) {} +BitstreamBuffer::BitstreamBuffer(const BitstreamBuffer& other) = default; + BitstreamBuffer::~BitstreamBuffer() {} void BitstreamBuffer::SetDecryptConfig(const DecryptConfig& decrypt_config) { diff --git a/media/base/bitstream_buffer.h b/media/base/bitstream_buffer.h index fe3c8da3..9ceeaf89 100644 --- a/media/base/bitstream_buffer.h +++ b/media/base/bitstream_buffer.h @@ -28,6 +28,8 @@ class MEDIA_EXPORT BitstreamBuffer { size_t size, base::TimeDelta presentation_timestamp); + BitstreamBuffer(const BitstreamBuffer& other); + ~BitstreamBuffer(); void SetDecryptConfig(const DecryptConfig& decrypt_config); diff --git a/media/base/cdm_key_information.cc b/media/base/cdm_key_information.cc index 70d4464..efaed61 100644 --- a/media/base/cdm_key_information.cc +++ b/media/base/cdm_key_information.cc @@ -32,6 +32,8 @@ CdmKeyInformation::CdmKeyInformation(const uint8_t* key_id_data, status(status), system_code(system_code) {} +CdmKeyInformation::CdmKeyInformation(const CdmKeyInformation& other) = default; + CdmKeyInformation::~CdmKeyInformation() { } diff --git a/media/base/cdm_key_information.h b/media/base/cdm_key_information.h index 89c8112..7ed8eff 100644 --- a/media/base/cdm_key_information.h +++ b/media/base/cdm_key_information.h @@ -40,6 +40,7 @@ struct MEDIA_EXPORT CdmKeyInformation { size_t key_id_length, KeyStatus status, uint32_t system_code); + CdmKeyInformation(const CdmKeyInformation& other); ~CdmKeyInformation(); std::vector<uint8_t> key_id; diff --git a/media/base/key_system_info.cc b/media/base/key_system_info.cc index f36104a..da3586d 100644 --- a/media/base/key_system_info.cc +++ b/media/base/key_system_info.cc @@ -9,6 +9,8 @@ namespace media { KeySystemInfo::KeySystemInfo() { } +KeySystemInfo::KeySystemInfo(const KeySystemInfo& other) = default; + KeySystemInfo::~KeySystemInfo() { } diff --git a/media/base/key_system_info.h b/media/base/key_system_info.h index 0a9ba67..fe4dae7 100644 --- a/media/base/key_system_info.h +++ b/media/base/key_system_info.h @@ -28,6 +28,7 @@ namespace media { // the corresponding CDM. struct MEDIA_EXPORT KeySystemInfo { KeySystemInfo(); + KeySystemInfo(const KeySystemInfo& other); ~KeySystemInfo(); std::string key_system; diff --git a/media/base/serial_runner.cc b/media/base/serial_runner.cc index 2e085e3..6cb89cb 100644 --- a/media/base/serial_runner.cc +++ b/media/base/serial_runner.cc @@ -40,6 +40,7 @@ static void RunOnTaskRunner( } SerialRunner::Queue::Queue() {} +SerialRunner::Queue::Queue(const Queue& other) = default; SerialRunner::Queue::~Queue() {} void SerialRunner::Queue::Push(const base::Closure& closure) { diff --git a/media/base/serial_runner.h b/media/base/serial_runner.h index 4847e4c..3adfd64 100644 --- a/media/base/serial_runner.h +++ b/media/base/serial_runner.h @@ -34,6 +34,7 @@ class MEDIA_EXPORT SerialRunner { class MEDIA_EXPORT Queue { public: Queue(); + Queue(const Queue& other); ~Queue(); void Push(const base::Closure& closure); diff --git a/media/base/text_track_config.cc b/media/base/text_track_config.cc index 0d4b11f6..dbd2b2d 100644 --- a/media/base/text_track_config.cc +++ b/media/base/text_track_config.cc @@ -20,6 +20,8 @@ TextTrackConfig::TextTrackConfig(TextKind kind, id_(id) { } +TextTrackConfig::TextTrackConfig(const TextTrackConfig& other) = default; + bool TextTrackConfig::Matches(const TextTrackConfig& config) const { return config.kind() == kind_ && config.label() == label_ && diff --git a/media/base/text_track_config.h b/media/base/text_track_config.h index 58efba4..33128df 100644 --- a/media/base/text_track_config.h +++ b/media/base/text_track_config.h @@ -23,6 +23,7 @@ enum TextKind { class MEDIA_EXPORT TextTrackConfig { public: TextTrackConfig(); + TextTrackConfig(const TextTrackConfig& other); TextTrackConfig(TextKind kind, const std::string& label, const std::string& language, diff --git a/media/base/video_decoder_config.cc b/media/base/video_decoder_config.cc index dfe7254..930ffd9 100644 --- a/media/base/video_decoder_config.cc +++ b/media/base/video_decoder_config.cc @@ -55,6 +55,9 @@ VideoDecoderConfig::VideoDecoderConfig(VideoCodec codec, natural_size, extra_data, is_encrypted); } +VideoDecoderConfig::VideoDecoderConfig(const VideoDecoderConfig& other) = + default; + VideoDecoderConfig::~VideoDecoderConfig() {} void VideoDecoderConfig::Initialize(VideoCodec codec, diff --git a/media/base/video_decoder_config.h b/media/base/video_decoder_config.h index ae9340a..4a192d6 100644 --- a/media/base/video_decoder_config.h +++ b/media/base/video_decoder_config.h @@ -40,6 +40,8 @@ class MEDIA_EXPORT VideoDecoderConfig { const std::vector<uint8_t>& extra_data, bool is_encrypted); + VideoDecoderConfig(const VideoDecoderConfig& other); + ~VideoDecoderConfig(); // Resets the internal state of this object. |