| 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 661 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 672 } | 672 } |
| 673 frame->set_color_space(picture.color_space()); | 673 frame->set_color_space(picture.color_space()); |
| 674 if (picture.allow_overlay()) | 674 if (picture.allow_overlay()) |
| 675 frame->metadata()->SetBoolean(VideoFrameMetadata::ALLOW_OVERLAY, true); | 675 frame->metadata()->SetBoolean(VideoFrameMetadata::ALLOW_OVERLAY, true); |
| 676 if (picture.surface_texture()) | 676 if (picture.surface_texture()) |
| 677 frame->metadata()->SetBoolean(VideoFrameMetadata::SURFACE_TEXTURE, true); | 677 frame->metadata()->SetBoolean(VideoFrameMetadata::SURFACE_TEXTURE, true); |
| 678 if (picture.wants_promotion_hint()) { | 678 if (picture.wants_promotion_hint()) { |
| 679 frame->metadata()->SetBoolean(VideoFrameMetadata::WANTS_PROMOTION_HINT, | 679 frame->metadata()->SetBoolean(VideoFrameMetadata::WANTS_PROMOTION_HINT, |
| 680 true); | 680 true); |
| 681 } | 681 } |
| 682 #if defined(OS_WIN) | |
| 683 frame->metadata()->SetBoolean(VideoFrameMetadata::DECODER_OWNS_FRAME, true); | |
| 684 #endif | |
| 685 | 682 |
| 686 if (requires_texture_copy_) | 683 if (requires_texture_copy_) |
| 687 frame->metadata()->SetBoolean(VideoFrameMetadata::COPY_REQUIRED, true); | 684 frame->metadata()->SetBoolean(VideoFrameMetadata::COPY_REQUIRED, true); |
| 688 | 685 |
| 689 CHECK_GT(available_pictures_, 0); | 686 CHECK_GT(available_pictures_, 0); |
| 690 --available_pictures_; | 687 --available_pictures_; |
| 691 | 688 |
| 692 bool inserted = picture_buffers_at_display_ | 689 bool inserted = picture_buffers_at_display_ |
| 693 .insert(std::make_pair(picture.picture_buffer_id(), | 690 .insert(std::make_pair(picture.picture_buffer_id(), |
| 694 pb.client_texture_ids())) | 691 pb.client_texture_ids())) |
| (...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 893 } | 890 } |
| 894 return false; | 891 return false; |
| 895 } | 892 } |
| 896 | 893 |
| 897 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() | 894 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() |
| 898 const { | 895 const { |
| 899 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); | 896 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); |
| 900 } | 897 } |
| 901 | 898 |
| 902 } // namespace media | 899 } // namespace media |
| OLD | NEW |