OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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/gpu/vt_video_decode_accelerator_mac.h" | 5 #include "media/gpu/vt_video_decode_accelerator_mac.h" |
6 | 6 |
7 #include <CoreVideo/CoreVideo.h> | 7 #include <CoreVideo/CoreVideo.h> |
8 #include <OpenGL/CGLIOSurface.h> | 8 #include <OpenGL/CGLIOSurface.h> |
9 #include <OpenGL/gl.h> | 9 #include <OpenGL/gl.h> |
10 #include <stddef.h> | 10 #include <stddef.h> |
(...skipping 834 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
845 DCHECK(gpu_thread_checker_.CalledOnValidThread()); | 845 DCHECK(gpu_thread_checker_.CalledOnValidThread()); |
846 | 846 |
847 for (const PictureBuffer& picture : pictures) { | 847 for (const PictureBuffer& picture : pictures) { |
848 DCHECK(!picture_info_map_.count(picture.id())); | 848 DCHECK(!picture_info_map_.count(picture.id())); |
849 assigned_picture_ids_.insert(picture.id()); | 849 assigned_picture_ids_.insert(picture.id()); |
850 available_picture_ids_.push_back(picture.id()); | 850 available_picture_ids_.push_back(picture.id()); |
851 DCHECK_LE(1u, picture.internal_texture_ids().size()); | 851 DCHECK_LE(1u, picture.internal_texture_ids().size()); |
852 DCHECK_LE(1u, picture.texture_ids().size()); | 852 DCHECK_LE(1u, picture.texture_ids().size()); |
853 picture_info_map_.insert(std::make_pair( | 853 picture_info_map_.insert(std::make_pair( |
854 picture.id(), | 854 picture.id(), |
855 base::WrapUnique(new PictureInfo(picture.internal_texture_ids()[0], | 855 base::MakeUnique<PictureInfo>(picture.internal_texture_ids()[0], |
856 picture.texture_ids()[0])))); | 856 picture.texture_ids()[0]))); |
857 } | 857 } |
858 | 858 |
859 // Pictures are not marked as uncleared until after this method returns, and | 859 // Pictures are not marked as uncleared until after this method returns, and |
860 // they will be broken if they are used before that happens. So, schedule | 860 // they will be broken if they are used before that happens. So, schedule |
861 // future work after that happens. | 861 // future work after that happens. |
862 gpu_task_runner_->PostTask( | 862 gpu_task_runner_->PostTask( |
863 FROM_HERE, | 863 FROM_HERE, |
864 base::Bind(&VTVideoDecodeAccelerator::ProcessWorkQueues, weak_this_)); | 864 base::Bind(&VTVideoDecodeAccelerator::ProcessWorkQueues, weak_this_)); |
865 } | 865 } |
866 | 866 |
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1143 SupportedProfile profile; | 1143 SupportedProfile profile; |
1144 profile.profile = supported_profile; | 1144 profile.profile = supported_profile; |
1145 profile.min_resolution.SetSize(16, 16); | 1145 profile.min_resolution.SetSize(16, 16); |
1146 profile.max_resolution.SetSize(4096, 2160); | 1146 profile.max_resolution.SetSize(4096, 2160); |
1147 profiles.push_back(profile); | 1147 profiles.push_back(profile); |
1148 } | 1148 } |
1149 return profiles; | 1149 return profiles; |
1150 } | 1150 } |
1151 | 1151 |
1152 } // namespace media | 1152 } // namespace media |
OLD | NEW |