| 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 #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 | |
| OLD | NEW |