| 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/vaapi_drm_picture.h" |
| 6 |
| 5 #include "base/file_descriptor_posix.h" | 7 #include "base/file_descriptor_posix.h" |
| 6 #include "media/gpu/va_surface.h" | 8 #include "media/gpu/va_surface.h" |
| 7 #include "media/gpu/vaapi_drm_picture.h" | |
| 8 #include "media/gpu/vaapi_wrapper.h" | 9 #include "media/gpu/vaapi_wrapper.h" |
| 9 #include "third_party/libva/va/drm/va_drm.h" | 10 #include "third_party/libva/va/drm/va_drm.h" |
| 10 #include "third_party/libva/va/va.h" | 11 #include "third_party/libva/va/va.h" |
| 11 #include "ui/gfx/gpu_memory_buffer.h" | 12 #include "ui/gfx/gpu_memory_buffer.h" |
| 13 #include "ui/gfx/native_pixmap.h" |
| 12 #include "ui/gl/gl_bindings.h" | 14 #include "ui/gl/gl_bindings.h" |
| 13 #include "ui/gl/scoped_binders.h" | 15 #include "ui/gl/scoped_binders.h" |
| 14 #include "ui/ozone/gl/gl_image_ozone_native_pixmap.h" | 16 #include "ui/ozone/gl/gl_image_ozone_native_pixmap.h" |
| 15 #include "ui/ozone/public/native_pixmap.h" | |
| 16 #include "ui/ozone/public/ozone_platform.h" | 17 #include "ui/ozone/public/ozone_platform.h" |
| 17 #include "ui/ozone/public/surface_factory_ozone.h" | 18 #include "ui/ozone/public/surface_factory_ozone.h" |
| 18 | 19 |
| 19 namespace media { | 20 namespace media { |
| 20 | 21 |
| 21 VaapiDrmPicture::VaapiDrmPicture( | 22 VaapiDrmPicture::VaapiDrmPicture( |
| 22 const scoped_refptr<VaapiWrapper>& vaapi_wrapper, | 23 const scoped_refptr<VaapiWrapper>& vaapi_wrapper, |
| 23 const MakeGLContextCurrentCallback& make_context_current_cb, | 24 const MakeGLContextCurrentCallback& make_context_current_cb, |
| 24 const BindGLImageCallback& bind_image_cb, | 25 const BindGLImageCallback& bind_image_cb, |
| 25 int32_t picture_buffer_id, | 26 int32_t picture_buffer_id, |
| (...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 134 bool VaapiDrmPicture::DownloadFromSurface( | 135 bool VaapiDrmPicture::DownloadFromSurface( |
| 135 const scoped_refptr<VASurface>& va_surface) { | 136 const scoped_refptr<VASurface>& va_surface) { |
| 136 return vaapi_wrapper_->BlitSurface(va_surface, va_surface_); | 137 return vaapi_wrapper_->BlitSurface(va_surface, va_surface_); |
| 137 } | 138 } |
| 138 | 139 |
| 139 bool VaapiDrmPicture::AllowOverlay() const { | 140 bool VaapiDrmPicture::AllowOverlay() const { |
| 140 return true; | 141 return true; |
| 141 } | 142 } |
| 142 | 143 |
| 143 } // namespace media | 144 } // namespace media |
| OLD | NEW |