| 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 857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 868 void VTVideoDecodeAccelerator::AssignPictureBuffers( | 868 void VTVideoDecodeAccelerator::AssignPictureBuffers( |
| 869 const std::vector<PictureBuffer>& pictures) { | 869 const std::vector<PictureBuffer>& pictures) { |
| 870 DVLOG(1) << __func__; | 870 DVLOG(1) << __func__; |
| 871 DCHECK(gpu_task_runner_->BelongsToCurrentThread()); | 871 DCHECK(gpu_task_runner_->BelongsToCurrentThread()); |
| 872 | 872 |
| 873 for (const PictureBuffer& picture : pictures) { | 873 for (const PictureBuffer& picture : pictures) { |
| 874 DVLOG(3) << "AssignPictureBuffer(" << picture.id() << ")"; | 874 DVLOG(3) << "AssignPictureBuffer(" << picture.id() << ")"; |
| 875 DCHECK(!picture_info_map_.count(picture.id())); | 875 DCHECK(!picture_info_map_.count(picture.id())); |
| 876 assigned_picture_ids_.insert(picture.id()); | 876 assigned_picture_ids_.insert(picture.id()); |
| 877 available_picture_ids_.push_back(picture.id()); | 877 available_picture_ids_.push_back(picture.id()); |
| 878 DCHECK_LE(1u, picture.internal_texture_ids().size()); | 878 DCHECK_LE(1u, picture.client_texture_ids().size()); |
| 879 DCHECK_LE(1u, picture.texture_ids().size()); | 879 DCHECK_LE(1u, picture.service_texture_ids().size()); |
| 880 picture_info_map_.insert(std::make_pair( | 880 picture_info_map_.insert(std::make_pair( |
| 881 picture.id(), | 881 picture.id(), |
| 882 base::MakeUnique<PictureInfo>(picture.internal_texture_ids()[0], | 882 base::MakeUnique<PictureInfo>(picture.client_texture_ids()[0], |
| 883 picture.texture_ids()[0]))); | 883 picture.service_texture_ids()[0]))); |
| 884 } | 884 } |
| 885 | 885 |
| 886 // Pictures are not marked as uncleared until after this method returns, and | 886 // Pictures are not marked as uncleared until after this method returns, and |
| 887 // they will be broken if they are used before that happens. So, schedule | 887 // they will be broken if they are used before that happens. So, schedule |
| 888 // future work after that happens. | 888 // future work after that happens. |
| 889 gpu_task_runner_->PostTask( | 889 gpu_task_runner_->PostTask( |
| 890 FROM_HERE, | 890 FROM_HERE, |
| 891 base::Bind(&VTVideoDecodeAccelerator::ProcessWorkQueues, weak_this_)); | 891 base::Bind(&VTVideoDecodeAccelerator::ProcessWorkQueues, weak_this_)); |
| 892 } | 892 } |
| 893 | 893 |
| (...skipping 292 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1186 SupportedProfile profile; | 1186 SupportedProfile profile; |
| 1187 profile.profile = supported_profile; | 1187 profile.profile = supported_profile; |
| 1188 profile.min_resolution.SetSize(16, 16); | 1188 profile.min_resolution.SetSize(16, 16); |
| 1189 profile.max_resolution.SetSize(4096, 2160); | 1189 profile.max_resolution.SetSize(4096, 2160); |
| 1190 profiles.push_back(profile); | 1190 profiles.push_back(profile); |
| 1191 } | 1191 } |
| 1192 return profiles; | 1192 return profiles; |
| 1193 } | 1193 } |
| 1194 | 1194 |
| 1195 } // namespace media | 1195 } // namespace media |
| OLD | NEW |