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 CONTENT_RENDERER_MEDIA_RENDERER_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ | 5 #ifndef CONTENT_RENDERER_MEDIA_RENDERER_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ |
6 #define CONTENT_RENDERER_MEDIA_RENDERER_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ | 6 #define CONTENT_RENDERER_MEDIA_RENDERER_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ |
7 | 7 |
8 #include <vector> | 8 #include <vector> |
9 | 9 |
10 #include "base/basictypes.h" | 10 #include "base/basictypes.h" |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 // Creates textures and produces them into mailboxes. Returns a sync point to | 56 // Creates textures and produces them into mailboxes. Returns a sync point to |
57 // wait on before using the mailboxes, or 0 on failure. | 57 // wait on before using the mailboxes, or 0 on failure. |
58 virtual uint32 CreateTextures(int32 count, | 58 virtual uint32 CreateTextures(int32 count, |
59 const gfx::Size& size, | 59 const gfx::Size& size, |
60 std::vector<uint32>* texture_ids, | 60 std::vector<uint32>* texture_ids, |
61 std::vector<gpu::Mailbox>* texture_mailboxes, | 61 std::vector<gpu::Mailbox>* texture_mailboxes, |
62 uint32 texture_target) OVERRIDE; | 62 uint32 texture_target) OVERRIDE; |
63 virtual void DeleteTexture(uint32 texture_id) OVERRIDE; | 63 virtual void DeleteTexture(uint32 texture_id) OVERRIDE; |
64 virtual void WaitSyncPoint(uint32 sync_point) OVERRIDE; | 64 virtual void WaitSyncPoint(uint32 sync_point) OVERRIDE; |
65 virtual void ReadPixels(uint32 texture_id, | 65 virtual void ReadPixels(uint32 texture_id, |
66 uint32 texture_target, | |
67 const gfx::Size& size, | 66 const gfx::Size& size, |
68 const SkBitmap& pixels) OVERRIDE; | 67 const SkBitmap& pixels) OVERRIDE; |
69 virtual base::SharedMemory* CreateSharedMemory(size_t size) OVERRIDE; | 68 virtual base::SharedMemory* CreateSharedMemory(size_t size) OVERRIDE; |
70 virtual scoped_refptr<base::MessageLoopProxy> GetMessageLoop() OVERRIDE; | 69 virtual scoped_refptr<base::MessageLoopProxy> GetMessageLoop() OVERRIDE; |
71 virtual void Abort() OVERRIDE; | 70 virtual void Abort() OVERRIDE; |
72 virtual bool IsAborted() OVERRIDE; | 71 virtual bool IsAborted() OVERRIDE; |
73 scoped_refptr<RendererGpuVideoAcceleratorFactories> Clone(); | 72 scoped_refptr<RendererGpuVideoAcceleratorFactories> Clone(); |
74 | 73 |
75 protected: | 74 protected: |
76 friend class base::RefCountedThreadSafe<RendererGpuVideoAcceleratorFactories>; | 75 friend class base::RefCountedThreadSafe<RendererGpuVideoAcceleratorFactories>; |
(...skipping 20 matching lines...) Expand all Loading... |
97 media::VideoCodecProfile profile, | 96 media::VideoCodecProfile profile, |
98 media::VideoDecodeAccelerator::Client* client); | 97 media::VideoDecodeAccelerator::Client* client); |
99 void AsyncCreateVideoEncodeAccelerator( | 98 void AsyncCreateVideoEncodeAccelerator( |
100 media::VideoEncodeAccelerator::Client* client); | 99 media::VideoEncodeAccelerator::Client* client); |
101 void AsyncCreateTextures(int32 count, | 100 void AsyncCreateTextures(int32 count, |
102 const gfx::Size& size, | 101 const gfx::Size& size, |
103 uint32 texture_target, | 102 uint32 texture_target, |
104 uint32* sync_point); | 103 uint32* sync_point); |
105 void AsyncDeleteTexture(uint32 texture_id); | 104 void AsyncDeleteTexture(uint32 texture_id); |
106 void AsyncWaitSyncPoint(uint32 sync_point); | 105 void AsyncWaitSyncPoint(uint32 sync_point); |
107 void AsyncReadPixels(uint32 texture_id, | 106 void AsyncReadPixels(uint32 texture_id, const gfx::Size& size); |
108 uint32 texture_target, | |
109 const gfx::Size& size); | |
110 void AsyncDestroyVideoDecodeAccelerator(); | 107 void AsyncDestroyVideoDecodeAccelerator(); |
111 void AsyncDestroyVideoEncodeAccelerator(); | 108 void AsyncDestroyVideoEncodeAccelerator(); |
112 | 109 |
113 scoped_refptr<base::MessageLoopProxy> message_loop_; | 110 scoped_refptr<base::MessageLoopProxy> message_loop_; |
114 scoped_refptr<GpuChannelHost> gpu_channel_host_; | 111 scoped_refptr<GpuChannelHost> gpu_channel_host_; |
115 scoped_refptr<ContextProviderCommandBuffer> context_provider_; | 112 scoped_refptr<ContextProviderCommandBuffer> context_provider_; |
116 | 113 |
117 // For sending requests to allocate shared memory in the Browser process. | 114 // For sending requests to allocate shared memory in the Browser process. |
118 scoped_refptr<ThreadSafeSender> thread_safe_sender_; | 115 scoped_refptr<ThreadSafeSender> thread_safe_sender_; |
119 | 116 |
(...skipping 17 matching lines...) Expand all Loading... |
137 // Textures returned by the CreateTexture() function. | 134 // Textures returned by the CreateTexture() function. |
138 std::vector<uint32> created_textures_; | 135 std::vector<uint32> created_textures_; |
139 std::vector<gpu::Mailbox> created_texture_mailboxes_; | 136 std::vector<gpu::Mailbox> created_texture_mailboxes_; |
140 | 137 |
141 DISALLOW_COPY_AND_ASSIGN(RendererGpuVideoAcceleratorFactories); | 138 DISALLOW_COPY_AND_ASSIGN(RendererGpuVideoAcceleratorFactories); |
142 }; | 139 }; |
143 | 140 |
144 } // namespace content | 141 } // namespace content |
145 | 142 |
146 #endif // CONTENT_RENDERER_MEDIA_RENDERER_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ | 143 #endif // CONTENT_RENDERER_MEDIA_RENDERER_GPU_VIDEO_ACCELERATOR_FACTORIES_H_ |
OLD | NEW |