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

Side by Side Diff: content/browser/renderer_host/media/gpu_memory_buffer_tracker.h

Issue 2343423003: Extract nested and private classes from VideoCaptureBufferPool (Closed)
Patch Set: Merge branch 'master' into BufferPoolRefactor Created 4 years, 3 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
(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 "content/browser/renderer_host/media/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 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<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_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698