Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 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 | |
| 3 // found in the LICENSE file. | |
| 4 // | |
| 5 // This file contains an implementation of picture allocation for the | |
| 6 // X11 window system used by VaapiVideoDecodeAccelerator to produce | |
| 7 // output pictures. | |
| 8 | |
| 9 #ifndef CONTENT_COMMON_GPU_MEDIA_VAAPI_TFP_PICTURE_H_ | |
| 10 #define CONTENT_COMMON_GPU_MEDIA_VAAPI_TFP_PICTURE_H_ | |
| 11 | |
| 12 #include "base/callback.h" | |
| 13 #include "base/memory/ref_counted.h" | |
| 14 #include "content/common/gpu/media/vaapi_picture.h" | |
| 15 #include "ui/gfx/size.h" | |
| 16 #include "ui/gl/gl_bindings.h" | |
| 17 | |
| 18 namespace gfx { | |
| 19 class GLImageGLX; | |
| 20 class GLContextGLX; | |
| 21 } | |
| 22 | |
| 23 namespace content { | |
| 24 | |
| 25 class VaapiWrapper; | |
| 26 | |
| 27 // Implementation of VaapiPicture for the X11 backed chromium. | |
| 28 class VaapiTFPPicture : public VaapiPicture { | |
| 29 public: | |
| 30 VaapiTFPPicture(scoped_refptr<VaapiWrapper> vaapi_wrapper, | |
|
Pawel Osciak
2014/12/09 01:19:25
const scoped_refptr<>& please.
llandwerlin-old
2014/12/09 11:19:48
Done.
| |
| 31 gfx::GLContextGLX* glx_context, | |
| 32 const base::Callback<bool(void)> make_context_current, | |
| 33 int32 picture_buffer_id, | |
| 34 uint32 texture_id, | |
| 35 const gfx::Size& size); | |
| 36 | |
| 37 virtual ~VaapiTFPPicture(); | |
| 38 | |
| 39 bool Initialize() override; | |
| 40 | |
| 41 bool DownloadFromSurface(const scoped_refptr<VASurface>& va_surface) override; | |
| 42 | |
| 43 private: | |
| 44 scoped_refptr<VaapiWrapper> vaapi_wrapper_; | |
| 45 | |
| 46 gfx::GLContextGLX* glx_context_; | |
| 47 base::Callback<bool(void)> make_context_current_; | |
| 48 Display* x_display_; | |
| 49 | |
| 50 Pixmap x_pixmap_; | |
| 51 scoped_refptr<gfx::GLImageGLX> glx_image_; | |
| 52 | |
| 53 DISALLOW_COPY_AND_ASSIGN(VaapiTFPPicture); | |
| 54 }; | |
| 55 | |
| 56 } // namespace content | |
| 57 | |
| 58 #endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_TFP_PICTURE_H_ | |
| OLD | NEW |