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/ref_counted.h" | 8 #include "base/memory/ref_counted.h" |
9 #include "base/memory/scoped_ptr.h" | 9 #include "base/memory/scoped_ptr.h" |
10 #include "base/single_thread_task_runner.h" | 10 #include "base/single_thread_task_runner.h" |
(...skipping 13 matching lines...) Expand all Loading... |
24 explicit MockGpuVideoAcceleratorFactories(gpu::gles2::GLES2Interface* gles2); | 24 explicit MockGpuVideoAcceleratorFactories(gpu::gles2::GLES2Interface* gles2); |
25 ~MockGpuVideoAcceleratorFactories() override; | 25 ~MockGpuVideoAcceleratorFactories() override; |
26 | 26 |
27 bool IsGpuVideoAcceleratorEnabled() override; | 27 bool IsGpuVideoAcceleratorEnabled() override; |
28 // CreateVideo{Decode,Encode}Accelerator returns scoped_ptr, which the mocking | 28 // CreateVideo{Decode,Encode}Accelerator returns scoped_ptr, which the mocking |
29 // framework does not want. Trampoline them. | 29 // framework does not want. Trampoline them. |
30 MOCK_METHOD0(DoCreateVideoDecodeAccelerator, VideoDecodeAccelerator*()); | 30 MOCK_METHOD0(DoCreateVideoDecodeAccelerator, VideoDecodeAccelerator*()); |
31 MOCK_METHOD0(DoCreateVideoEncodeAccelerator, VideoEncodeAccelerator*()); | 31 MOCK_METHOD0(DoCreateVideoEncodeAccelerator, VideoEncodeAccelerator*()); |
32 | 32 |
33 MOCK_METHOD5(CreateTextures, | 33 MOCK_METHOD5(CreateTextures, |
34 bool(int32 count, | 34 bool(int32_t count, |
35 const gfx::Size& size, | 35 const gfx::Size& size, |
36 std::vector<uint32>* texture_ids, | 36 std::vector<uint32_t>* texture_ids, |
37 std::vector<gpu::Mailbox>* texture_mailboxes, | 37 std::vector<gpu::Mailbox>* texture_mailboxes, |
38 uint32 texture_target)); | 38 uint32_t texture_target)); |
39 MOCK_METHOD1(DeleteTexture, void(uint32 texture_id)); | 39 MOCK_METHOD1(DeleteTexture, void(uint32_t texture_id)); |
40 MOCK_METHOD1(WaitSyncToken, void(const gpu::SyncToken& sync_token)); | 40 MOCK_METHOD1(WaitSyncToken, void(const gpu::SyncToken& sync_token)); |
41 MOCK_METHOD0(GetTaskRunner, scoped_refptr<base::SingleThreadTaskRunner>()); | 41 MOCK_METHOD0(GetTaskRunner, scoped_refptr<base::SingleThreadTaskRunner>()); |
42 MOCK_METHOD0(GetVideoDecodeAcceleratorCapabilities, | 42 MOCK_METHOD0(GetVideoDecodeAcceleratorCapabilities, |
43 VideoDecodeAccelerator::Capabilities()); | 43 VideoDecodeAccelerator::Capabilities()); |
44 MOCK_METHOD0(GetVideoEncodeAcceleratorSupportedProfiles, | 44 MOCK_METHOD0(GetVideoEncodeAcceleratorSupportedProfiles, |
45 VideoEncodeAccelerator::SupportedProfiles()); | 45 VideoEncodeAccelerator::SupportedProfiles()); |
46 | 46 |
47 scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( | 47 scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( |
48 const gfx::Size& size, | 48 const gfx::Size& size, |
49 gfx::BufferFormat format, | 49 gfx::BufferFormat format, |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 VideoPixelFormat video_frame_output_format_ = PIXEL_FORMAT_I420; | 82 VideoPixelFormat video_frame_output_format_ = PIXEL_FORMAT_I420; |
83 | 83 |
84 bool fail_to_allocate_gpu_memory_buffer_ = false; | 84 bool fail_to_allocate_gpu_memory_buffer_ = false; |
85 | 85 |
86 gpu::gles2::GLES2Interface* gles2_; | 86 gpu::gles2::GLES2Interface* gles2_; |
87 }; | 87 }; |
88 | 88 |
89 } // namespace media | 89 } // namespace media |
90 | 90 |
91 #endif // MEDIA_RENDERERS_MOCK_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ | 91 #endif // MEDIA_RENDERERS_MOCK_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ |
OLD | NEW |