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

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

Issue 1432963003: [Ozone] Extends the lifetime of VaapiWrapper (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years 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_
(...skipping 12 matching lines...) Expand all
23 class GLImageGLX; 23 class GLImageGLX;
24 } 24 }
25 25
26 namespace content { 26 namespace content {
27 27
28 class VaapiWrapper; 28 class VaapiWrapper;
29 29
30 // Implementation of VaapiPicture for the X11 backed chromium. 30 // Implementation of VaapiPicture for the X11 backed chromium.
31 class VaapiTFPPicture : public VaapiPicture { 31 class VaapiTFPPicture : public VaapiPicture {
32 public: 32 public:
33 VaapiTFPPicture(VaapiWrapper* vaapi_wrapper, 33 VaapiTFPPicture(const scoped_refptr<VaapiWrapper>& vaapi_wrapper,
34 const base::Callback<bool(void)> make_context_current, 34 const base::Callback<bool(void)> make_context_current,
35 int32 picture_buffer_id, 35 int32 picture_buffer_id,
36 uint32 texture_id, 36 uint32 texture_id,
37 const gfx::Size& size); 37 const gfx::Size& size);
38 38
39 ~VaapiTFPPicture() override; 39 ~VaapiTFPPicture() override;
40 40
41 bool Initialize() override; 41 bool Initialize() override;
42 42
43 bool DownloadFromSurface(const scoped_refptr<VASurface>& va_surface) override; 43 bool DownloadFromSurface(const scoped_refptr<VASurface>& va_surface) override;
44 44
45 scoped_refptr<gl::GLImage> GetImageToBind() override; 45 scoped_refptr<gl::GLImage> GetImageToBind() override;
46 46
47 private: 47 private:
48 VaapiWrapper* vaapi_wrapper_; // Not owned. 48 scoped_refptr<VaapiWrapper> vaapi_wrapper_;
49 49
50 base::Callback<bool(void)> make_context_current_; 50 base::Callback<bool(void)> make_context_current_;
51 Display* x_display_; 51 Display* x_display_;
52 52
53 Pixmap x_pixmap_; 53 Pixmap x_pixmap_;
54 scoped_refptr<gl::GLImageGLX> glx_image_; 54 scoped_refptr<gl::GLImageGLX> glx_image_;
55 55
56 DISALLOW_COPY_AND_ASSIGN(VaapiTFPPicture); 56 DISALLOW_COPY_AND_ASSIGN(VaapiTFPPicture);
57 }; 57 };
58 58
59 } // namespace content 59 } // namespace content
60 60
61 #endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_TFP_PICTURE_H_ 61 #endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_TFP_PICTURE_H_
OLDNEW
« no previous file with comments | « content/common/gpu/media/vaapi_picture.cc ('k') | content/common/gpu/media/vaapi_tfp_picture.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698