| 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 430 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 441 weak_this_, | 441 weak_this_, |
| 442 picture.picture_buffer_id()))), | 442 picture.picture_buffer_id()))), |
| 443 decoder_texture_target_, | 443 decoder_texture_target_, |
| 444 pb.size(), | 444 pb.size(), |
| 445 visible_rect, | 445 visible_rect, |
| 446 natural_size, | 446 natural_size, |
| 447 timestamp, | 447 timestamp, |
| 448 base::Bind(&GpuVideoAcceleratorFactories::ReadPixels, | 448 base::Bind(&GpuVideoAcceleratorFactories::ReadPixels, |
| 449 factories_, | 449 factories_, |
| 450 pb.texture_id(), | 450 pb.texture_id(), |
| 451 decoder_texture_target_, | |
| 452 gfx::Size(visible_rect.width(), visible_rect.height())), | 451 gfx::Size(visible_rect.width(), visible_rect.height())), |
| 453 base::Closure())); | 452 base::Closure())); |
| 454 CHECK_GT(available_pictures_, 0); | 453 CHECK_GT(available_pictures_, 0); |
| 455 --available_pictures_; | 454 --available_pictures_; |
| 456 bool inserted = | 455 bool inserted = |
| 457 picture_buffers_at_display_.insert(picture.picture_buffer_id()).second; | 456 picture_buffers_at_display_.insert(picture.picture_buffer_id()).second; |
| 458 DCHECK(inserted); | 457 DCHECK(inserted); |
| 459 | 458 |
| 460 EnqueueFrameAndTriggerFrameDelivery(frame); | 459 EnqueueFrameAndTriggerFrameDelivery(frame); |
| 461 } | 460 } |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 607 | 606 |
| 608 state_ = kError; | 607 state_ = kError; |
| 609 | 608 |
| 610 if (!pending_decode_cb_.is_null()) { | 609 if (!pending_decode_cb_.is_null()) { |
| 611 base::ResetAndReturn(&pending_decode_cb_).Run(kDecodeError, NULL); | 610 base::ResetAndReturn(&pending_decode_cb_).Run(kDecodeError, NULL); |
| 612 return; | 611 return; |
| 613 } | 612 } |
| 614 } | 613 } |
| 615 | 614 |
| 616 } // namespace media | 615 } // namespace media |
| OLD | NEW |