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 <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 23 matching lines...) Expand all Loading... |
34 MOCK_METHOD0(DoCreateVideoDecodeAccelerator, VideoDecodeAccelerator*()); | 34 MOCK_METHOD0(DoCreateVideoDecodeAccelerator, VideoDecodeAccelerator*()); |
35 MOCK_METHOD0(DoCreateVideoEncodeAccelerator, VideoEncodeAccelerator*()); | 35 MOCK_METHOD0(DoCreateVideoEncodeAccelerator, VideoEncodeAccelerator*()); |
36 | 36 |
37 MOCK_METHOD5(CreateTextures, | 37 MOCK_METHOD5(CreateTextures, |
38 bool(int32_t count, | 38 bool(int32_t count, |
39 const gfx::Size& size, | 39 const gfx::Size& size, |
40 std::vector<uint32_t>* texture_ids, | 40 std::vector<uint32_t>* texture_ids, |
41 std::vector<gpu::Mailbox>* texture_mailboxes, | 41 std::vector<gpu::Mailbox>* texture_mailboxes, |
42 uint32_t texture_target)); | 42 uint32_t texture_target)); |
43 MOCK_METHOD1(DeleteTexture, void(uint32_t texture_id)); | 43 MOCK_METHOD1(DeleteTexture, void(uint32_t texture_id)); |
44 MOCK_METHOD1(WaitSyncToken, void(const gpu::SyncToken& sync_token)); | |
45 MOCK_METHOD0(GetTaskRunner, scoped_refptr<base::SingleThreadTaskRunner>()); | 44 MOCK_METHOD0(GetTaskRunner, scoped_refptr<base::SingleThreadTaskRunner>()); |
46 MOCK_METHOD0(GetVideoDecodeAcceleratorCapabilities, | 45 MOCK_METHOD0(GetVideoDecodeAcceleratorCapabilities, |
47 VideoDecodeAccelerator::Capabilities()); | 46 VideoDecodeAccelerator::Capabilities()); |
48 MOCK_METHOD0(GetVideoEncodeAcceleratorSupportedProfiles, | 47 MOCK_METHOD0(GetVideoEncodeAcceleratorSupportedProfiles, |
49 VideoEncodeAccelerator::SupportedProfiles()); | 48 VideoEncodeAccelerator::SupportedProfiles()); |
50 | 49 |
51 scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( | 50 scoped_ptr<gfx::GpuMemoryBuffer> AllocateGpuMemoryBuffer( |
52 const gfx::Size& size, | 51 const gfx::Size& size, |
53 gfx::BufferFormat format, | 52 gfx::BufferFormat format, |
54 gfx::BufferUsage usage) override; | 53 gfx::BufferUsage usage) override; |
55 | 54 |
56 bool ShouldUseGpuMemoryBuffersForVideoFrames() const override; | 55 bool ShouldUseGpuMemoryBuffersForVideoFrames() const override; |
57 unsigned ImageTextureTarget(gfx::BufferFormat format) override; | 56 unsigned ImageTextureTarget(gfx::BufferFormat format) override; |
58 VideoPixelFormat VideoFrameOutputFormat() override { | 57 VideoPixelFormat VideoFrameOutputFormat() override { |
59 return video_frame_output_format_; | 58 return video_frame_output_format_; |
60 }; | 59 }; |
| 60 void WaitSyncToken(const gpu::SyncToken& sync_token) override {} |
61 | 61 |
62 scoped_ptr<GpuVideoAcceleratorFactories::ScopedGLContextLock> | 62 scoped_ptr<GpuVideoAcceleratorFactories::ScopedGLContextLock> |
63 GetGLContextLock() override; | 63 GetGLContextLock() override; |
64 | 64 |
65 void SetVideoFrameOutputFormat( | 65 void SetVideoFrameOutputFormat( |
66 const VideoPixelFormat video_frame_output_format) { | 66 const VideoPixelFormat video_frame_output_format) { |
67 video_frame_output_format_ = video_frame_output_format; | 67 video_frame_output_format_ = video_frame_output_format; |
68 }; | 68 }; |
69 | 69 |
70 void SetFailToAllocateGpuMemoryBufferForTesting(bool fail) { | 70 void SetFailToAllocateGpuMemoryBufferForTesting(bool fail) { |
(...skipping 17 matching lines...) Expand all Loading... |
88 VideoPixelFormat video_frame_output_format_ = PIXEL_FORMAT_I420; | 88 VideoPixelFormat video_frame_output_format_ = PIXEL_FORMAT_I420; |
89 | 89 |
90 bool fail_to_allocate_gpu_memory_buffer_ = false; | 90 bool fail_to_allocate_gpu_memory_buffer_ = false; |
91 | 91 |
92 gpu::gles2::GLES2Interface* gles2_; | 92 gpu::gles2::GLES2Interface* gles2_; |
93 }; | 93 }; |
94 | 94 |
95 } // namespace media | 95 } // namespace media |
96 | 96 |
97 #endif // MEDIA_RENDERERS_MOCK_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ | 97 #endif // MEDIA_RENDERERS_MOCK_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ |
OLD | NEW |