Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(656)

Side by Side Diff: content/common/gpu/media/vaapi_tfp_picture.h

Issue 1421903006: ui/gl: Move GLImage into gl namespace. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: ozone demo Created 5 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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 // This file contains an implementation of picture allocation for the 5 // This file contains an implementation of picture allocation for the
6 // X11 window system used by VaapiVideoDecodeAccelerator to produce 6 // X11 window system used by VaapiVideoDecodeAccelerator to produce
7 // output pictures. 7 // output pictures.
8 8
9 #ifndef CONTENT_COMMON_GPU_MEDIA_VAAPI_TFP_PICTURE_H_ 9 #ifndef CONTENT_COMMON_GPU_MEDIA_VAAPI_TFP_PICTURE_H_
10 #define CONTENT_COMMON_GPU_MEDIA_VAAPI_TFP_PICTURE_H_ 10 #define CONTENT_COMMON_GPU_MEDIA_VAAPI_TFP_PICTURE_H_
11 11
12 #include "base/callback.h" 12 #include "base/callback.h"
13 #include "base/memory/ref_counted.h" 13 #include "base/memory/ref_counted.h"
14 #include "content/common/gpu/media/vaapi_picture.h" 14 #include "content/common/gpu/media/vaapi_picture.h"
15 #include "ui/gfx/geometry/size.h" 15 #include "ui/gfx/geometry/size.h"
16 #include "ui/gl/gl_bindings.h" 16 #include "ui/gl/gl_bindings.h"
17 17
18 namespace gfx { 18 namespace gfx {
19 class GLContextGLX;
20 }
21
22 namespace gl {
19 class GLImageGLX; 23 class GLImageGLX;
20 class GLContextGLX;
21 } 24 }
22 25
23 namespace content { 26 namespace content {
24 27
25 class VaapiWrapper; 28 class VaapiWrapper;
26 29
27 // Implementation of VaapiPicture for the X11 backed chromium. 30 // Implementation of VaapiPicture for the X11 backed chromium.
28 class VaapiTFPPicture : public VaapiPicture { 31 class VaapiTFPPicture : public VaapiPicture {
29 public: 32 public:
30 VaapiTFPPicture(VaapiWrapper* vaapi_wrapper, 33 VaapiTFPPicture(VaapiWrapper* vaapi_wrapper,
31 const base::Callback<bool(void)> make_context_current, 34 const base::Callback<bool(void)> make_context_current,
32 int32 picture_buffer_id, 35 int32 picture_buffer_id,
33 uint32 texture_id, 36 uint32 texture_id,
34 const gfx::Size& size); 37 const gfx::Size& size);
35 38
36 ~VaapiTFPPicture() override; 39 ~VaapiTFPPicture() override;
37 40
38 bool Initialize() override; 41 bool Initialize() override;
39 42
40 bool DownloadFromSurface(const scoped_refptr<VASurface>& va_surface) override; 43 bool DownloadFromSurface(const scoped_refptr<VASurface>& va_surface) override;
41 44
42 scoped_refptr<gfx::GLImage> GetImageToBind() override; 45 scoped_refptr<gl::GLImage> GetImageToBind() override;
43 46
44 private: 47 private:
45 VaapiWrapper* vaapi_wrapper_; // Not owned. 48 VaapiWrapper* vaapi_wrapper_; // Not owned.
46 49
47 base::Callback<bool(void)> make_context_current_; 50 base::Callback<bool(void)> make_context_current_;
48 Display* x_display_; 51 Display* x_display_;
49 52
50 Pixmap x_pixmap_; 53 Pixmap x_pixmap_;
51 scoped_refptr<gfx::GLImageGLX> glx_image_; 54 scoped_refptr<gl::GLImageGLX> glx_image_;
52 55
53 DISALLOW_COPY_AND_ASSIGN(VaapiTFPPicture); 56 DISALLOW_COPY_AND_ASSIGN(VaapiTFPPicture);
54 }; 57 };
55 58
56 } // namespace content 59 } // namespace content
57 60
58 #endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_TFP_PICTURE_H_ 61 #endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_TFP_PICTURE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698