Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(96)

Side by Side Diff: content/renderer/media/video_capture_impl.cc

Issue 2101943004: content: Change auto to not deduce raw pointers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase/update Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 // 4 //
5 // Notes about usage of this object by VideoCaptureImplManager. 5 // Notes about usage of this object by VideoCaptureImplManager.
6 // 6 //
7 // VideoCaptureImplManager access this object by using a Unretained() 7 // VideoCaptureImplManager access this object by using a Unretained()
8 // binding and tasks on the IO thread. It is then important that 8 // binding and tasks on the IO thread. It is then important that
9 // VideoCaptureImpl never post task to itself. All operations must be 9 // VideoCaptureImpl never post task to itself. All operations must be
10 // synchronous. 10 // synchronous.
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 uint8_t* data(int plane) const { return data_[plane]; } 78 uint8_t* data(int plane) const { return data_[plane]; }
79 int32_t stride(int plane) const { return strides_[plane]; } 79 int32_t stride(int plane) const { return strides_[plane]; }
80 std::vector<gfx::GpuMemoryBufferHandle> gpu_memory_buffer_handles() { 80 std::vector<gfx::GpuMemoryBufferHandle> gpu_memory_buffer_handles() {
81 return handles_; 81 return handles_;
82 } 82 }
83 83
84 private: 84 private:
85 friend class base::RefCountedThreadSafe<ClientBuffer2>; 85 friend class base::RefCountedThreadSafe<ClientBuffer2>;
86 86
87 virtual ~ClientBuffer2() { 87 virtual ~ClientBuffer2() {
88 for (auto& buffer : buffers_) 88 for (auto* buffer : buffers_)
89 buffer->Unmap(); 89 buffer->Unmap();
90 } 90 }
91 91
92 void DestroyGpuMemoryBuffer(const gpu::SyncToken& sync_token) {} 92 void DestroyGpuMemoryBuffer(const gpu::SyncToken& sync_token) {}
93 93
94 const std::vector<gfx::GpuMemoryBufferHandle> handles_; 94 const std::vector<gfx::GpuMemoryBufferHandle> handles_;
95 const gfx::Size size_; 95 const gfx::Size size_;
96 ScopedVector<gfx::GpuMemoryBuffer> buffers_; 96 ScopedVector<gfx::GpuMemoryBuffer> buffers_;
97 uint8_t* data_[media::VideoFrame::kMaxPlanes]; 97 uint8_t* data_[media::VideoFrame::kMaxPlanes];
98 int32_t strides_[media::VideoFrame::kMaxPlanes]; 98 int32_t strides_[media::VideoFrame::kMaxPlanes];
(...skipping 471 matching lines...) Expand 10 before | Expand all | Expand 10 after
570 double consumer_resource_utilization = -1.0; 570 double consumer_resource_utilization = -1.0;
571 if (!metadata->GetDouble(media::VideoFrameMetadata::RESOURCE_UTILIZATION, 571 if (!metadata->GetDouble(media::VideoFrameMetadata::RESOURCE_UTILIZATION,
572 &consumer_resource_utilization)) { 572 &consumer_resource_utilization)) {
573 consumer_resource_utilization = -1.0; 573 consumer_resource_utilization = -1.0;
574 } 574 }
575 575
576 callback_to_io_thread.Run(*release_sync_token, consumer_resource_utilization); 576 callback_to_io_thread.Run(*release_sync_token, consumer_resource_utilization);
577 } 577 }
578 578
579 } // namespace content 579 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698