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 <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <map> | 10 #include <map> |
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
115 void OnReset(); | 115 void OnReset(); |
116 void OnDestroy(); | 116 void OnDestroy(); |
117 | 117 |
118 // Called on IO thread when |filter_| has been removed. | 118 // Called on IO thread when |filter_| has been removed. |
119 void OnFilterRemoved(); | 119 void OnFilterRemoved(); |
120 | 120 |
121 // Sets the texture to cleared. | 121 // Sets the texture to cleared. |
122 void SetTextureCleared(const media::Picture& picture); | 122 void SetTextureCleared(const media::Picture& picture); |
123 | 123 |
124 #if (defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)) || defined(OS_MACOSX) | 124 #if (defined(OS_CHROMEOS) && defined(ARCH_CPU_X86_FAMILY)) || defined(OS_MACOSX) |
125 // Helper to bind |image| to the texture specified by |client_texture_id|. If | 125 // Helper to bind |image| to the texture specified by |client_texture_id|. |
126 // |can_bind_to_sampler| is true, then the image may be used as a sampler | |
127 // directly, otherwise a copy to a staging buffer is required. | |
128 void BindImage(uint32_t client_texture_id, | 126 void BindImage(uint32_t client_texture_id, |
129 uint32_t texture_target, | 127 uint32_t texture_target, |
130 scoped_refptr<gl::GLImage> image, | 128 scoped_refptr<gl::GLImage> image); |
131 bool can_bind_to_sampler); | |
132 #endif | 129 #endif |
133 | 130 |
134 // Route ID to communicate with the host. | 131 // Route ID to communicate with the host. |
135 const int32_t host_route_id_; | 132 const int32_t host_route_id_; |
136 | 133 |
137 // Unowned pointer to the underlying GpuCommandBufferStub. |this| is | 134 // Unowned pointer to the underlying GpuCommandBufferStub. |this| is |
138 // registered as a DestuctionObserver of |stub_| and will self-delete when | 135 // registered as a DestuctionObserver of |stub_| and will self-delete when |
139 // |stub_| is destroyed. | 136 // |stub_| is destroyed. |
140 GpuCommandBufferStub* const stub_; | 137 GpuCommandBufferStub* const stub_; |
141 | 138 |
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
175 | 172 |
176 // A map from picture buffer ID to TextureRef that have not been cleared. | 173 // A map from picture buffer ID to TextureRef that have not been cleared. |
177 std::map<int32_t, scoped_refptr<gpu::gles2::TextureRef>> uncleared_textures_; | 174 std::map<int32_t, scoped_refptr<gpu::gles2::TextureRef>> uncleared_textures_; |
178 | 175 |
179 DISALLOW_IMPLICIT_CONSTRUCTORS(GpuVideoDecodeAccelerator); | 176 DISALLOW_IMPLICIT_CONSTRUCTORS(GpuVideoDecodeAccelerator); |
180 }; | 177 }; |
181 | 178 |
182 } // namespace content | 179 } // namespace content |
183 | 180 |
184 #endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ | 181 #endif // CONTENT_COMMON_GPU_MEDIA_GPU_VIDEO_DECODE_ACCELERATOR_H_ |
OLD | NEW |