| OLD | NEW |
| 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 93 } | 93 } |
| 94 | 94 |
| 95 private: | 95 private: |
| 96 friend class base::RefCountedThreadSafe<ClientBuffer2>; | 96 friend class base::RefCountedThreadSafe<ClientBuffer2>; |
| 97 | 97 |
| 98 virtual ~ClientBuffer2() { | 98 virtual ~ClientBuffer2() { |
| 99 for (auto& buffer : buffers_) | 99 for (auto& buffer : buffers_) |
| 100 buffer->Unmap(); | 100 buffer->Unmap(); |
| 101 } | 101 } |
| 102 | 102 |
| 103 void DestroyGpuMemoryBuffer(const gpu::SyncToken& sync_token) {} | 103 void DestroyGpuMemoryBuffer(uint32 sync_point) {} |
| 104 | 104 |
| 105 const std::vector<gfx::GpuMemoryBufferHandle> handles_; | 105 const std::vector<gfx::GpuMemoryBufferHandle> handles_; |
| 106 const gfx::Size size_; | 106 const gfx::Size size_; |
| 107 ScopedVector<gfx::GpuMemoryBuffer> buffers_; | 107 ScopedVector<gfx::GpuMemoryBuffer> buffers_; |
| 108 uint8* data_[media::VideoFrame::kMaxPlanes]; | 108 uint8* data_[media::VideoFrame::kMaxPlanes]; |
| 109 int32 strides_[media::VideoFrame::kMaxPlanes]; | 109 int32 strides_[media::VideoFrame::kMaxPlanes]; |
| 110 | 110 |
| 111 DISALLOW_COPY_AND_ASSIGN(ClientBuffer2); | 111 DISALLOW_COPY_AND_ASSIGN(ClientBuffer2); |
| 112 }; | 112 }; |
| 113 | 113 |
| (...skipping 446 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 560 double consumer_resource_utilization = -1.0; | 560 double consumer_resource_utilization = -1.0; |
| 561 if (!metadata->GetDouble(media::VideoFrameMetadata::RESOURCE_UTILIZATION, | 561 if (!metadata->GetDouble(media::VideoFrameMetadata::RESOURCE_UTILIZATION, |
| 562 &consumer_resource_utilization)) { | 562 &consumer_resource_utilization)) { |
| 563 consumer_resource_utilization = -1.0; | 563 consumer_resource_utilization = -1.0; |
| 564 } | 564 } |
| 565 | 565 |
| 566 callback_to_io_thread.Run(*release_sync_token, consumer_resource_utilization); | 566 callback_to_io_thread.Run(*release_sync_token, consumer_resource_utilization); |
| 567 } | 567 } |
| 568 | 568 |
| 569 } // namespace content | 569 } // namespace content |
| OLD | NEW |