| 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_picture.h" | 5 #include "media/gpu/vaapi_picture.h" |
| 6 #include "media/gpu/vaapi_wrapper.h" | 6 #include "media/gpu/vaapi_wrapper.h" |
| 7 #include "ui/gl/gl_bindings.h" | 7 #include "ui/gl/gl_bindings.h" |
| 8 #include "ui/gl/gl_implementation.h" | 8 #include "ui/gl/gl_implementation.h" |
| 9 | 9 |
| 10 #if defined(USE_X11) | 10 #if defined(USE_X11) |
| (...skipping 13 matching lines...) Expand all Loading... |
| 24 uint32_t texture_id, | 24 uint32_t texture_id, |
| 25 uint32_t client_texture_id) | 25 uint32_t client_texture_id) |
| 26 : vaapi_wrapper_(vaapi_wrapper), | 26 : vaapi_wrapper_(vaapi_wrapper), |
| 27 make_context_current_cb_(make_context_current_cb), | 27 make_context_current_cb_(make_context_current_cb), |
| 28 bind_image_cb_(bind_image_cb), | 28 bind_image_cb_(bind_image_cb), |
| 29 size_(size), | 29 size_(size), |
| 30 texture_id_(texture_id), | 30 texture_id_(texture_id), |
| 31 client_texture_id_(client_texture_id), | 31 client_texture_id_(client_texture_id), |
| 32 picture_buffer_id_(picture_buffer_id) {} | 32 picture_buffer_id_(picture_buffer_id) {} |
| 33 | 33 |
| 34 VaapiPicture::~VaapiPicture() {} | 34 VaapiPicture::~VaapiPicture() { |
| 35 DCHECK_CALLED_ON_VALID_SEQUENCE(sequence_checker_); |
| 36 } |
| 35 | 37 |
| 36 // static | 38 // static |
| 37 linked_ptr<VaapiPicture> VaapiPicture::CreatePicture( | 39 linked_ptr<VaapiPicture> VaapiPicture::CreatePicture( |
| 38 const scoped_refptr<VaapiWrapper>& vaapi_wrapper, | 40 const scoped_refptr<VaapiWrapper>& vaapi_wrapper, |
| 39 const MakeGLContextCurrentCallback& make_context_current_cb, | 41 const MakeGLContextCurrentCallback& make_context_current_cb, |
| 40 const BindGLImageCallback& bind_image_cb, | 42 const BindGLImageCallback& bind_image_cb, |
| 41 int32_t picture_buffer_id, | 43 int32_t picture_buffer_id, |
| 42 const gfx::Size& size, | 44 const gfx::Size& size, |
| 43 uint32_t texture_id, | 45 uint32_t texture_id, |
| 44 uint32_t client_texture_id) { | 46 uint32_t client_texture_id) { |
| (...skipping 18 matching lines...) Expand all Loading... |
| 63 // static | 65 // static |
| 64 uint32_t VaapiPicture::GetGLTextureTarget() { | 66 uint32_t VaapiPicture::GetGLTextureTarget() { |
| 65 #if defined(USE_OZONE) | 67 #if defined(USE_OZONE) |
| 66 return GL_TEXTURE_EXTERNAL_OES; | 68 return GL_TEXTURE_EXTERNAL_OES; |
| 67 #else | 69 #else |
| 68 return GL_TEXTURE_2D; | 70 return GL_TEXTURE_2D; |
| 69 #endif | 71 #endif |
| 70 } | 72 } |
| 71 | 73 |
| 72 } // namespace media | 74 } // namespace media |
| OLD | NEW |