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

Side by Side Diff: content/browser/renderer_host/media/video_capture_buffer_tracker_factory.cc

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 #include "content/browser/renderer_host/media/video_capture_buffer_tracker_facto ry.h"
6
7 #include "base/memory/ptr_util.h"
8
9 #include "content/browser/renderer_host/media/gpu_memory_buffer_tracker.h"
10 #include "content/browser/renderer_host/media/shared_memory_buffer_tracker.h"
11
12 namespace content {
13
14 // static
15 std::unique_ptr<VideoCaptureBufferTracker>
16 VideoCaptureBufferTrackerFactory::CreateTracker(
17 media::VideoPixelStorage storage) {
18 switch (storage) {
19 case media::PIXEL_STORAGE_GPUMEMORYBUFFER:
20 return base::MakeUnique<GpuMemoryBufferTracker>();
21 case media::PIXEL_STORAGE_CPU:
22 return base::MakeUnique<SharedMemoryBufferTracker>();
23 }
24 NOTREACHED();
25 return std::unique_ptr<VideoCaptureBufferTracker>();
26 }
27
28 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698