| 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 picture.picture_buffer_id(), pb.client_texture_ids())), | 672 picture.picture_buffer_id(), pb.client_texture_ids())), |
| 673 pb.size(), visible_rect, natural_size, timestamp)); | 673 pb.size(), visible_rect, natural_size, timestamp)); |
| 674 if (!frame) { | 674 if (!frame) { |
| 675 DLOG(ERROR) << "Create frame failed for: " << picture.picture_buffer_id(); | 675 DLOG(ERROR) << "Create frame failed for: " << picture.picture_buffer_id(); |
| 676 NotifyError(VideoDecodeAccelerator::PLATFORM_FAILURE); | 676 NotifyError(VideoDecodeAccelerator::PLATFORM_FAILURE); |
| 677 return; | 677 return; |
| 678 } | 678 } |
| 679 frame->set_color_space(picture.color_space()); | 679 frame->set_color_space(picture.color_space()); |
| 680 if (picture.allow_overlay()) | 680 if (picture.allow_overlay()) |
| 681 frame->metadata()->SetBoolean(VideoFrameMetadata::ALLOW_OVERLAY, true); | 681 frame->metadata()->SetBoolean(VideoFrameMetadata::ALLOW_OVERLAY, true); |
| 682 if (picture.surface_texture()) |
| 683 frame->metadata()->SetBoolean(VideoFrameMetadata::SURFACE_TEXTURE, true); |
| 682 #if defined(OS_WIN) | 684 #if defined(OS_WIN) |
| 683 frame->metadata()->SetBoolean(VideoFrameMetadata::DECODER_OWNS_FRAME, true); | 685 frame->metadata()->SetBoolean(VideoFrameMetadata::DECODER_OWNS_FRAME, true); |
| 684 #endif | 686 #endif |
| 685 | 687 |
| 686 if (requires_texture_copy_) | 688 if (requires_texture_copy_) |
| 687 frame->metadata()->SetBoolean(VideoFrameMetadata::COPY_REQUIRED, true); | 689 frame->metadata()->SetBoolean(VideoFrameMetadata::COPY_REQUIRED, true); |
| 688 | 690 |
| 689 CHECK_GT(available_pictures_, 0); | 691 CHECK_GT(available_pictures_, 0); |
| 690 --available_pictures_; | 692 --available_pictures_; |
| 691 | 693 |
| (...skipping 200 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 892 } | 894 } |
| 893 return false; | 895 return false; |
| 894 } | 896 } |
| 895 | 897 |
| 896 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() | 898 void GpuVideoDecoder::DCheckGpuVideoAcceleratorFactoriesTaskRunnerIsCurrent() |
| 897 const { | 899 const { |
| 898 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); | 900 DCHECK(factories_->GetTaskRunner()->BelongsToCurrentThread()); |
| 899 } | 901 } |
| 900 | 902 |
| 901 } // namespace media | 903 } // namespace media |
| OLD | NEW |