| OLD | NEW |
| (Empty) |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #ifndef CONTENT_BROWSER_RENDERER_HOST_MEDIA_GPU_MEMORY_BUFFER_TRACKER_H_ | |
| 6 #define CONTENT_BROWSER_RENDERER_HOST_MEDIA_GPU_MEMORY_BUFFER_TRACKER_H_ | |
| 7 | |
| 8 #include "media/capture/video/video_capture_buffer_tracker.h" | |
| 9 | |
| 10 namespace content { | |
| 11 | |
| 12 // Tracker specifics for GpuMemoryBuffer. Owns GpuMemoryBuffers and its | |
| 13 // associated pixel dimensions. | |
| 14 class GpuMemoryBufferTracker final : public media::VideoCaptureBufferTracker { | |
| 15 public: | |
| 16 GpuMemoryBufferTracker(); | |
| 17 ~GpuMemoryBufferTracker() override; | |
| 18 | |
| 19 bool Init(const gfx::Size& dimensions, | |
| 20 media::VideoPixelFormat format, | |
| 21 media::VideoPixelStorage storage_type, | |
| 22 base::Lock* lock) override; | |
| 23 | |
| 24 std::unique_ptr<media::VideoCaptureBufferHandle> GetBufferHandle() override; | |
| 25 | |
| 26 bool ShareToProcess(base::ProcessHandle process_handle, | |
| 27 base::SharedMemoryHandle* new_handle) override; | |
| 28 | |
| 29 bool ShareToProcess2(int plane, | |
| 30 base::ProcessHandle process_handle, | |
| 31 gfx::GpuMemoryBufferHandle* new_handle) override; | |
| 32 | |
| 33 private: | |
| 34 friend class GpuMemoryBufferBufferHandle; | |
| 35 | |
| 36 // Owned references to GpuMemoryBuffers. | |
| 37 std::vector<std::unique_ptr<gfx::GpuMemoryBuffer>> gpu_memory_buffers_; | |
| 38 }; | |
| 39 | |
| 40 } // namespace content | |
| 41 | |
| 42 #endif // CONTENT_BROWSER_RENDERER_HOST_MEDIA_GPU_MEMORY_BUFFER_TRACKER_H_ | |
| OLD | NEW |