OLD | NEW |
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2012 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_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ | 5 #ifndef CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ |
6 #define CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ | 6 #define CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <vector> | 9 #include <vector> |
10 | 10 |
(...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 | 97 |
98 // Called on IO thread when |filter_| has been removed. | 98 // Called on IO thread when |filter_| has been removed. |
99 void OnFilterRemoved(); | 99 void OnFilterRemoved(); |
100 | 100 |
101 // Sets the texture to cleared. | 101 // Sets the texture to cleared. |
102 void SetTextureCleared(const media::Picture& picture); | 102 void SetTextureCleared(const media::Picture& picture); |
103 | 103 |
104 // Helper for replying to the creation request. | 104 // Helper for replying to the creation request. |
105 void SendCreateDecoderReply(IPC::Message* message, bool succeeded); | 105 void SendCreateDecoderReply(IPC::Message* message, bool succeeded); |
106 | 106 |
| 107 // Helper to bind |image| to the texture specified by |client_texture_id|. |
| 108 void BindImage(uint32 client_texture_id, |
| 109 uint32 texture_target, |
| 110 scoped_refptr<gfx::GLImage> image); |
| 111 |
107 // Route ID to communicate with the host. | 112 // Route ID to communicate with the host. |
108 int32 host_route_id_; | 113 int32 host_route_id_; |
109 | 114 |
110 // Unowned pointer to the underlying GpuCommandBufferStub. |this| is | 115 // Unowned pointer to the underlying GpuCommandBufferStub. |this| is |
111 // registered as a DestuctionObserver of |stub_| and will self-delete when | 116 // registered as a DestuctionObserver of |stub_| and will self-delete when |
112 // |stub_| is destroyed. | 117 // |stub_| is destroyed. |
113 GpuCommandBufferStub* stub_; | 118 GpuCommandBufferStub* stub_; |
114 | 119 |
115 // The underlying VideoDecodeAccelerator. | 120 // The underlying VideoDecodeAccelerator. |
116 scoped_ptr<media::VideoDecodeAccelerator> video_decode_accelerator_; | 121 scoped_ptr<media::VideoDecodeAccelerator> video_decode_accelerator_; |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
148 | 153 |
149 // A map from picture buffer ID to TextureRef that have not been cleared. | 154 // A map from picture buffer ID to TextureRef that have not been cleared. |
150 std::map<int32, scoped_refptr<gpu::gles2::TextureRef> > uncleared_textures_; | 155 std::map<int32, scoped_refptr<gpu::gles2::TextureRef> > uncleared_textures_; |
151 | 156 |
152 DISALLOW_IMPLICIT_CONSTRUCTORS(GpuVideoDecodeAccelerator); | 157 DISALLOW_IMPLICIT_CONSTRUCTORS(GpuVideoDecodeAccelerator); |
153 }; | 158 }; |
154 | 159 |
155 } // namespace content | 160 } // namespace content |
156 | 161 |
157 #endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ | 162 #endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ |
OLD | NEW |