Chromium Code Reviews| Index: content/common/gpu/media/vaapi_wrapper.cc |
| diff --git a/content/common/gpu/media/vaapi_wrapper.cc b/content/common/gpu/media/vaapi_wrapper.cc |
| index e85293a9a84bb6d5b1fb706e9247a1ae69806ee2..b6fbea738078e9c82bc43c64dd503e01b7a6079a 100644 |
| --- a/content/common/gpu/media/vaapi_wrapper.cc |
| +++ b/content/common/gpu/media/vaapi_wrapper.cc |
| @@ -939,10 +939,9 @@ bool VaapiWrapper::DownloadAndDestroyCodedBuffer(VABufferID buffer_id, |
| return buffer_segment == NULL; |
| } |
| -bool VaapiWrapper::BlitSurface(VASurfaceID va_surface_id_src, |
| - const gfx::Size& src_size, |
| - VASurfaceID va_surface_id_dest, |
| - const gfx::Size& dest_size) { |
| +bool VaapiWrapper::BlitSurface( |
| + const scoped_refptr<VASurface>& va_surface_src, |
|
kalyank
2015/10/21 19:48:41
These changes seem unrelated, can you separate the
william.xie1
2015/10/22 07:35:41
Done.
|
| + const scoped_refptr<VASurface>& va_surface_dest) { |
| base::AutoLock auto_lock(*va_lock_); |
| // Initialize the post processing engine if not already done. |
| @@ -957,13 +956,15 @@ bool VaapiWrapper::BlitSurface(VASurfaceID va_surface_id_src, |
| "Couldn't map vpp buffer", false); |
| memset(pipeline_param, 0, sizeof *pipeline_param); |
| + const gfx::Size src_size = va_surface_src->size(); |
| + const gfx::Size dest_size = va_surface_dest->size(); |
| VARectangle input_region; |
| input_region.x = input_region.y = 0; |
| input_region.width = src_size.width(); |
| input_region.height = src_size.height(); |
| pipeline_param->surface_region = &input_region; |
| - pipeline_param->surface = va_surface_id_src; |
| + pipeline_param->surface = va_surface_src->id(); |
| pipeline_param->surface_color_standard = VAProcColorStandardNone; |
| VARectangle output_region; |
| @@ -972,13 +973,13 @@ bool VaapiWrapper::BlitSurface(VASurfaceID va_surface_id_src, |
| output_region.height = dest_size.height(); |
| pipeline_param->output_region = &output_region; |
| pipeline_param->output_background_color = 0xff000000; |
| - pipeline_param->output_color_standard = VAProcColorStandardNone; |
| + pipeline_param->surface_color_standard = VAProcColorStandardNone; |
| VA_SUCCESS_OR_RETURN(vaUnmapBuffer(va_display_, va_vpp_buffer_id_), |
| "Couldn't unmap vpp buffer", false); |
| VA_SUCCESS_OR_RETURN( |
| - vaBeginPicture(va_display_, va_vpp_context_id_, va_surface_id_dest), |
| + vaBeginPicture(va_display_, va_vpp_context_id_, va_surface_dest->id()), |
| "Couldn't begin picture", false); |
| VA_SUCCESS_OR_RETURN( |