| 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 #include <array> | 8 #include <array> |
| 9 #include <utility> | 9 #include <utility> |
| 10 | 10 |
| (...skipping 664 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 675 picture.picture_buffer_id(), pb.client_texture_ids())), | 675 picture.picture_buffer_id(), pb.client_texture_ids())), |
| 676 pb.size(), visible_rect, natural_size, timestamp)); | 676 pb.size(), visible_rect, natural_size, timestamp)); |
| 677 if (!frame) { | 677 if (!frame) { |
| 678 DLOG(ERROR) << "Create frame failed for: " << picture.picture_buffer_id(); | 678 DLOG(ERROR) << "Create frame failed for: " << picture.picture_buffer_id(); |
| 679 NotifyError(VideoDecodeAccelerator::PLATFORM_FAILURE); | 679 NotifyError(VideoDecodeAccelerator::PLATFORM_FAILURE); |
| 680 return; | 680 return; |
| 681 } | 681 } |
| 682 frame->set_color_space(picture.color_space()); | 682 frame->set_color_space(picture.color_space()); |
| 683 if (picture.allow_overlay()) | 683 if (picture.allow_overlay()) |
| 684 frame->metadata()->SetBoolean(VideoFrameMetadata::ALLOW_OVERLAY, true); | 684 frame->metadata()->SetBoolean(VideoFrameMetadata::ALLOW_OVERLAY, true); |
| 685 if (picture.surface_texture()) |
| 686 frame->metadata()->SetBoolean(VideoFrameMetadata::SURFACE_TEXTURE, true); |
| 687 if (picture.wants_promotion_hint()) { |
| 688 frame->metadata()->SetBoolean(VideoFrameMetadata::WANTS_PROMOTION_HINT, |
| 689 true); |
| 690 } |
| 685 #if defined(OS_WIN) | 691 #if defined(OS_WIN) |
| 686 frame->metadata()->SetBoolean(VideoFrameMetadata::DECODER_OWNS_FRAME, true); | 692 frame->metadata()->SetBoolean(VideoFrameMetadata::DECODER_OWNS_FRAME, true); |
| 687 #endif | 693 #endif |
| 688 | 694 |
| 689 if (requires_texture_copy_) | 695 if (requires_texture_copy_) |
| 690 frame->metadata()->SetBoolean(VideoFrameMetadata::COPY_REQUIRED, true); | 696 frame->metadata()->SetBoolean(VideoFrameMetadata::COPY_REQUIRED, true); |
| 691 | 697 |
| 692 CHECK_GT(available_pictures_, 0); | 698 CHECK_GT(available_pictures_, 0); |
| 693 --available_pictures_; | 699 --available_pictures_; |
| 694 | 700 |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 895 } | 901 } |
| 896 return false; | 902 return false; |
| 897 } | 903 } |
| 898 | 904 |
| 899 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() | 905 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() |
| 900 const { | 906 const { |
| 901 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); | 907 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); |
| 902 } | 908 } |
| 903 | 909 |
| 904 } // namespace media | 910 } // namespace media |
| OLD | NEW |