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 "content/common/gpu/media/va_surface.h" | 5 #include "media/gpu/va_surface.h" |
6 #include "content/common/gpu/media/vaapi_tfp_picture.h" | 6 #include "media/gpu/vaapi_tfp_picture.h" |
7 #include "content/common/gpu/media/vaapi_wrapper.h" | 7 #include "media/gpu/vaapi_wrapper.h" |
8 #include "ui/gfx/x/x11_types.h" | 8 #include "ui/gfx/x/x11_types.h" |
9 #include "ui/gl/gl_bindings.h" | 9 #include "ui/gl/gl_bindings.h" |
10 #include "ui/gl/gl_image_glx.h" | 10 #include "ui/gl/gl_image_glx.h" |
11 #include "ui/gl/scoped_binders.h" | 11 #include "ui/gl/scoped_binders.h" |
12 | 12 |
13 namespace content { | 13 namespace media { |
14 | 14 |
15 VaapiTFPPicture::VaapiTFPPicture( | 15 VaapiTFPPicture::VaapiTFPPicture( |
16 const scoped_refptr<VaapiWrapper>& vaapi_wrapper, | 16 const scoped_refptr<VaapiWrapper>& vaapi_wrapper, |
17 const MakeGLContextCurrentCallback& make_context_current_cb, | 17 const MakeGLContextCurrentCallback& make_context_current_cb, |
18 int32_t picture_buffer_id, | 18 int32_t picture_buffer_id, |
19 uint32_t texture_id, | 19 uint32_t texture_id, |
20 const gfx::Size& size) | 20 const gfx::Size& size) |
21 : VaapiPicture(picture_buffer_id, texture_id, size), | 21 : VaapiPicture(picture_buffer_id, texture_id, size), |
22 vaapi_wrapper_(vaapi_wrapper), | 22 vaapi_wrapper_(vaapi_wrapper), |
23 make_context_current_cb_(make_context_current_cb), | 23 make_context_current_cb_(make_context_current_cb), |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
70 bool VaapiTFPPicture::DownloadFromSurface( | 70 bool VaapiTFPPicture::DownloadFromSurface( |
71 const scoped_refptr<VASurface>& va_surface) { | 71 const scoped_refptr<VASurface>& va_surface) { |
72 return vaapi_wrapper_->PutSurfaceIntoPixmap(va_surface->id(), x_pixmap_, | 72 return vaapi_wrapper_->PutSurfaceIntoPixmap(va_surface->id(), x_pixmap_, |
73 va_surface->size()); | 73 va_surface->size()); |
74 } | 74 } |
75 | 75 |
76 scoped_refptr<gl::GLImage> VaapiTFPPicture::GetImageToBind() { | 76 scoped_refptr<gl::GLImage> VaapiTFPPicture::GetImageToBind() { |
77 return nullptr; | 77 return nullptr; |
78 } | 78 } |
79 | 79 |
80 } // namespace content | 80 } // namespace media |
OLD | NEW |