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 "media/filters/gpu_video_decoder.h" | 5 #include "media/filters/gpu_video_decoder.h" |
6 | 6 |
7 #include <algorithm> | 7 #include <algorithm> |
8 | 8 |
9 #include "base/bind.h" | 9 #include "base/bind.h" |
10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
459 BindToCurrentLoop(base::Bind(&GpuVideoDecoder::ReleaseMailbox, | 459 BindToCurrentLoop(base::Bind(&GpuVideoDecoder::ReleaseMailbox, |
460 weak_factory_.GetWeakPtr(), | 460 weak_factory_.GetWeakPtr(), |
461 factories_, | 461 factories_, |
462 picture.picture_buffer_id(), | 462 picture.picture_buffer_id(), |
463 pb.texture_id())), | 463 pb.texture_id())), |
464 pb.size(), | 464 pb.size(), |
465 visible_rect, | 465 visible_rect, |
466 natural_size, | 466 natural_size, |
467 timestamp, | 467 timestamp, |
468 base::Bind(&ReadPixelsSync, factories_, pb.texture_id(), visible_rect))); | 468 base::Bind(&ReadPixelsSync, factories_, pb.texture_id(), visible_rect))); |
| 469 frame->set_allow_overlay(picture.allow_overlay()); |
469 CHECK_GT(available_pictures_, 0); | 470 CHECK_GT(available_pictures_, 0); |
470 --available_pictures_; | 471 --available_pictures_; |
471 bool inserted = | 472 bool inserted = |
472 picture_buffers_at_display_.insert(std::make_pair( | 473 picture_buffers_at_display_.insert(std::make_pair( |
473 picture.picture_buffer_id(), | 474 picture.picture_buffer_id(), |
474 pb.texture_id())).second; | 475 pb.texture_id())).second; |
475 DCHECK(inserted); | 476 DCHECK(inserted); |
476 | 477 |
477 DeliverFrame(frame); | 478 DeliverFrame(frame); |
478 } | 479 } |
(...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
628 DLOG(ERROR) << "VDA Error: " << error; | 629 DLOG(ERROR) << "VDA Error: " << error; |
629 DestroyVDA(); | 630 DestroyVDA(); |
630 } | 631 } |
631 | 632 |
632 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() | 633 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() |
633 const { | 634 const { |
634 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); | 635 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); |
635 } | 636 } |
636 | 637 |
637 } // namespace media | 638 } // namespace media |
OLD | NEW |