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 // TODO(markdittmer): This shouldn't be necessary. | 5 // TODO(markdittmer): This shouldn't be necessary. |
6 // Ensure that X11 headers don't poison environment before macro headers are | 6 // Ensure that X11 headers don't poison environment before macro headers are |
7 // loaded. | 7 // loaded. |
8 // | 8 // |
9 // In particular, X11/Xlib.h defines "Status", which is the name of an enum | 9 // In particular, X11/Xlib.h defines "Status", which is the name of an enum |
10 // defined in "base/tracked_objects.h", which is eventually required by | 10 // defined in "base/tracked_objects.h", which is eventually required by |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 uint32_t textures_per_buffer, | 230 uint32_t textures_per_buffer, |
231 const gfx::Size& dimensions, | 231 const gfx::Size& dimensions, |
232 uint32_t texture_target) { | 232 uint32_t texture_target) { |
233 if (dimensions.width() > media::limits::kMaxDimension || | 233 if (dimensions.width() > media::limits::kMaxDimension || |
234 dimensions.height() > media::limits::kMaxDimension || | 234 dimensions.height() > media::limits::kMaxDimension || |
235 dimensions.GetArea() > media::limits::kMaxCanvas) { | 235 dimensions.GetArea() > media::limits::kMaxCanvas) { |
236 NotifyError(media::VideoDecodeAccelerator::PLATFORM_FAILURE); | 236 NotifyError(media::VideoDecodeAccelerator::PLATFORM_FAILURE); |
237 return; | 237 return; |
238 } | 238 } |
239 if (!Send(new AcceleratedVideoDecoderHostMsg_ProvidePictureBuffers( | 239 if (!Send(new AcceleratedVideoDecoderHostMsg_ProvidePictureBuffers( |
240 host_route_id_, requested_num_of_buffers, textures_per_buffer, | 240 host_route_id_, video_decode_accelerator_->GetOutputFormat(), |
241 dimensions, texture_target))) { | 241 requested_num_of_buffers, textures_per_buffer, dimensions, |
| 242 texture_target))) { |
242 DLOG(ERROR) << "Send(AcceleratedVideoDecoderHostMsg_ProvidePictureBuffers) " | 243 DLOG(ERROR) << "Send(AcceleratedVideoDecoderHostMsg_ProvidePictureBuffers) " |
243 << "failed"; | 244 << "failed"; |
244 } | 245 } |
245 texture_dimensions_ = dimensions; | 246 texture_dimensions_ = dimensions; |
246 textures_per_buffer_ = textures_per_buffer; | 247 textures_per_buffer_ = textures_per_buffer; |
247 texture_target_ = texture_target; | 248 texture_target_ = texture_target; |
248 } | 249 } |
249 | 250 |
250 void GpuVideoDecodeAccelerator::DismissPictureBuffer( | 251 void GpuVideoDecodeAccelerator::DismissPictureBuffer( |
251 int32_t picture_buffer_id) { | 252 int32_t picture_buffer_id) { |
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
525 GLenum target = texture_ref->texture()->target(); | 526 GLenum target = texture_ref->texture()->target(); |
526 gpu::gles2::TextureManager* texture_manager = | 527 gpu::gles2::TextureManager* texture_manager = |
527 stub_->decoder()->GetContextGroup()->texture_manager(); | 528 stub_->decoder()->GetContextGroup()->texture_manager(); |
528 DCHECK(!texture_ref->texture()->IsLevelCleared(target, 0)); | 529 DCHECK(!texture_ref->texture()->IsLevelCleared(target, 0)); |
529 texture_manager->SetLevelCleared(texture_ref.get(), target, 0, true); | 530 texture_manager->SetLevelCleared(texture_ref.get(), target, 0, true); |
530 } | 531 } |
531 uncleared_textures_.erase(it); | 532 uncleared_textures_.erase(it); |
532 } | 533 } |
533 | 534 |
534 } // namespace media | 535 } // namespace media |
OLD | NEW |