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 #include "content/common/gpu/media/gpu_video_decode_accelerator.h" | 5 #include "content/common/gpu/media/gpu_video_decode_accelerator.h" |
6 | 6 |
7 #include <vector> | 7 #include <vector> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/logging.h" | 10 #include "base/logging.h" |
(...skipping 207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
218 | 218 |
219 std::vector<media::PictureBuffer> buffers; | 219 std::vector<media::PictureBuffer> buffers; |
220 for (uint32 i = 0; i < buffer_ids.size(); ++i) { | 220 for (uint32 i = 0; i < buffer_ids.size(); ++i) { |
221 gpu::gles2::TextureManager::TextureInfo* info = | 221 gpu::gles2::TextureManager::TextureInfo* info = |
222 texture_manager->GetTextureInfo(texture_ids[i]); | 222 texture_manager->GetTextureInfo(texture_ids[i]); |
223 if (!info) { | 223 if (!info) { |
224 DLOG(FATAL) << "Failed to find texture id " << texture_ids[i]; | 224 DLOG(FATAL) << "Failed to find texture id " << texture_ids[i]; |
225 NotifyError(media::VideoDecodeAccelerator::INVALID_ARGUMENT); | 225 NotifyError(media::VideoDecodeAccelerator::INVALID_ARGUMENT); |
226 return; | 226 return; |
227 } | 227 } |
228 if (!texture_manager->ClearRenderableLevels(command_decoder, info)) { | 228 texture_manager->SetLevelCleared(info, GL_TEXTURE_2D, 0); |
Ami GONE FROM CHROMIUM
2012/12/11 17:20:01
The texture target may not be GL_TEXTURE_2D (see P
| |
229 DLOG(FATAL) << "Failed to Clear texture id " << texture_ids[i]; | |
230 NotifyError(media::VideoDecodeAccelerator::PLATFORM_FAILURE); | |
231 return; | |
232 } | |
233 uint32 service_texture_id; | 229 uint32 service_texture_id; |
234 if (!command_decoder->GetServiceTextureId( | 230 if (!command_decoder->GetServiceTextureId( |
235 texture_ids[i], &service_texture_id)) { | 231 texture_ids[i], &service_texture_id)) { |
236 DLOG(FATAL) << "Failed to translate texture!"; | 232 DLOG(FATAL) << "Failed to translate texture!"; |
237 NotifyError(media::VideoDecodeAccelerator::PLATFORM_FAILURE); | 233 NotifyError(media::VideoDecodeAccelerator::PLATFORM_FAILURE); |
238 return; | 234 return; |
239 } | 235 } |
240 buffers.push_back(media::PictureBuffer( | 236 buffers.push_back(media::PictureBuffer( |
241 buffer_ids[i], sizes[i], service_texture_id)); | 237 buffer_ids[i], sizes[i], service_texture_id)); |
242 } | 238 } |
(...skipping 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
301 stub_.reset(); | 297 stub_.reset(); |
302 } | 298 } |
303 } | 299 } |
304 | 300 |
305 bool GpuVideoDecodeAccelerator::Send(IPC::Message* message) { | 301 bool GpuVideoDecodeAccelerator::Send(IPC::Message* message) { |
306 DCHECK(sender_); | 302 DCHECK(sender_); |
307 return sender_->Send(message); | 303 return sender_->Send(message); |
308 } | 304 } |
309 | 305 |
310 } // namespace content | 306 } // namespace content |
OLD | NEW |