OLD | NEW |
---|---|
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 #ifndef MEDIA_RENDERERS_MOCK_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ | 5 #ifndef MEDIA_RENDERERS_MOCK_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ |
6 #define MEDIA_RENDERERS_MOCK_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ | 6 #define MEDIA_RENDERERS_MOCK_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ |
7 | 7 |
8 #include "base/memory/scoped_ptr.h" | 8 #include "base/memory/scoped_ptr.h" |
9 #include "base/single_thread_task_runner.h" | 9 #include "base/single_thread_task_runner.h" |
10 #include "media/renderers/gpu_video_accelerator_factories.h" | 10 #include "media/renderers/gpu_video_accelerator_factories.h" |
(...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
45 MOCK_METHOD0(GetVideoEncodeAcceleratorSupportedProfiles, | 45 MOCK_METHOD0(GetVideoEncodeAcceleratorSupportedProfiles, |
46 VideoEncodeAccelerator::SupportedProfiles()); | 46 VideoEncodeAccelerator::SupportedProfiles()); |
47 | 47 |
48 scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( | 48 scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( |
49 const gfx::Size& size, | 49 const gfx::Size& size, |
50 gfx::BufferFormat format, | 50 gfx::BufferFormat format, |
51 gfx::BufferUsage usage) override; | 51 gfx::BufferUsage usage) override; |
52 | 52 |
53 bool ShouldUseGpuMemoryBuffersForVideoFrames() const override; | 53 bool ShouldUseGpuMemoryBuffersForVideoFrames() const override; |
54 unsigned ImageTextureTarget() override; | 54 unsigned ImageTextureTarget() override; |
55 VideoPixelFormat VideoFramePixelFormat() override { | |
56 return video_pixel_format_; | |
57 }; | |
55 MOCK_METHOD0(IsTextureRGSupported, bool()); | 58 MOCK_METHOD0(IsTextureRGSupported, bool()); |
56 MOCK_METHOD0(GetGLES2Interface, gpu::gles2::GLES2Interface*()); | 59 MOCK_METHOD0(GetGLES2Interface, gpu::gles2::GLES2Interface*()); |
57 | 60 |
58 scoped_ptr<base::SharedMemory> CreateSharedMemory(size_t size) override; | 61 scoped_ptr<base::SharedMemory> CreateSharedMemory(size_t size) override; |
59 | 62 |
60 scoped_ptr<VideoDecodeAccelerator> CreateVideoDecodeAccelerator() override; | 63 scoped_ptr<VideoDecodeAccelerator> CreateVideoDecodeAccelerator() override; |
61 | 64 |
62 scoped_ptr<VideoEncodeAccelerator> CreateVideoEncodeAccelerator() override; | 65 scoped_ptr<VideoEncodeAccelerator> CreateVideoEncodeAccelerator() override; |
63 | 66 |
67 VideoPixelFormat video_pixel_format_ = PIXEL_FORMAT_I420; | |
xhwang
2015/08/21 20:53:07
make it private?
Daniele Castagna
2015/08/21 21:28:18
Done.
| |
68 | |
64 private: | 69 private: |
65 ~MockGpuVideoAcceleratorFactories() override; | 70 ~MockGpuVideoAcceleratorFactories() override; |
66 | 71 |
67 DISALLOW_COPY_AND_ASSIGN(MockGpuVideoAcceleratorFactories); | 72 DISALLOW_COPY_AND_ASSIGN(MockGpuVideoAcceleratorFactories); |
68 }; | 73 }; |
69 | 74 |
70 } // namespace media | 75 } // namespace media |
71 | 76 |
72 #endif // MEDIA_RENDERERS_MOCK_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ | 77 #endif // MEDIA_RENDERERS_MOCK_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ |
OLD | NEW |