| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/common/gpu/media/vaapi_wrapper.h" | 5 #include "content/common/gpu/media/vaapi_wrapper.h" |
| 6 | 6 |
| 7 #include <dlfcn.h> | 7 #include <dlfcn.h> |
| 8 | 8 |
| 9 #include "base/bind.h" | 9 #include "base/bind.h" |
| 10 #include "base/callback_helpers.h" | 10 #include "base/callback_helpers.h" |
| (...skipping 956 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 967 pipeline_param->surface = va_surface_src->id(); | 967 pipeline_param->surface = va_surface_src->id(); |
| 968 pipeline_param->surface_color_standard = VAProcColorStandardNone; | 968 pipeline_param->surface_color_standard = VAProcColorStandardNone; |
| 969 | 969 |
| 970 VARectangle output_region; | 970 VARectangle output_region; |
| 971 output_region.x = output_region.y = 0; | 971 output_region.x = output_region.y = 0; |
| 972 output_region.width = dest_size.width(); | 972 output_region.width = dest_size.width(); |
| 973 output_region.height = dest_size.height(); | 973 output_region.height = dest_size.height(); |
| 974 pipeline_param->output_region = &output_region; | 974 pipeline_param->output_region = &output_region; |
| 975 pipeline_param->output_background_color = 0xff000000; | 975 pipeline_param->output_background_color = 0xff000000; |
| 976 pipeline_param->output_color_standard = VAProcColorStandardNone; | 976 pipeline_param->output_color_standard = VAProcColorStandardNone; |
| 977 pipeline_param->filter_flags = VA_FILTER_SCALING_HQ; |
| 977 | 978 |
| 978 VA_SUCCESS_OR_RETURN(vaUnmapBuffer(va_display_, va_vpp_buffer_id_), | 979 VA_SUCCESS_OR_RETURN(vaUnmapBuffer(va_display_, va_vpp_buffer_id_), |
| 979 "Couldn't unmap vpp buffer", false); | 980 "Couldn't unmap vpp buffer", false); |
| 980 | 981 |
| 981 VA_SUCCESS_OR_RETURN( | 982 VA_SUCCESS_OR_RETURN( |
| 982 vaBeginPicture(va_display_, va_vpp_context_id_, va_surface_dest->id()), | 983 vaBeginPicture(va_display_, va_vpp_context_id_, va_surface_dest->id()), |
| 983 "Couldn't begin picture", false); | 984 "Couldn't begin picture", false); |
| 984 | 985 |
| 985 VA_SUCCESS_OR_RETURN( | 986 VA_SUCCESS_OR_RETURN( |
| 986 vaRenderPicture(va_display_, va_vpp_context_id_, &va_vpp_buffer_id_, 1), | 987 vaRenderPicture(va_display_, va_vpp_context_id_, &va_vpp_buffer_id_, 1), |
| (...skipping 163 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1150 drm_fd_.reset(HANDLE_EINTR(dup(fd))); | 1151 drm_fd_.reset(HANDLE_EINTR(dup(fd))); |
| 1151 } | 1152 } |
| 1152 #endif // USE_OZONE | 1153 #endif // USE_OZONE |
| 1153 | 1154 |
| 1154 bool VaapiWrapper::VADisplayState::VAAPIVersionLessThan(int major, int minor) { | 1155 bool VaapiWrapper::VADisplayState::VAAPIVersionLessThan(int major, int minor) { |
| 1155 return (major_version_ < major) || | 1156 return (major_version_ < major) || |
| 1156 (major_version_ == major && minor_version_ < minor); | 1157 (major_version_ == major && minor_version_ < minor); |
| 1157 } | 1158 } |
| 1158 | 1159 |
| 1159 } // namespace content | 1160 } // namespace content |
| OLD | NEW |