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

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

Issue 490233002: VaapiVideoAccelerator: make Vaapi accelerator work with ozone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Enable vaapi_h264_decoder_unittest on Ozone Created 6 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
(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 VaapiPictureProvider to produce output
7 // pictures.
8
9 #ifndef CONTENT_COMMON_GPU_MEDIA_VAAPI_PICTURE_PROVIDER_X11_H_
10 #define CONTENT_COMMON_GPU_MEDIA_VAAPI_PICTURE_PROVIDER_X11_H_
11
12 #include "base/callback.h"
13 #include "content/common/gpu/media/vaapi_picture_provider.h"
14 #include "content/common/gpu/media/vaapi_wrapper.h"
15 #include "third_party/libva/va/va.h"
16 #include "ui/gfx/size.h"
17 #include "ui/gl/gl_bindings.h"
18 #include "ui/gl/gl_context_glx.h"
19
20 namespace content {
21
22 // Implementation of the VaapiPictureProvider for the X11 backed
23 // chromium.
24 class X11VaapiPictureProvider : public VaapiPictureProvider {
25 public:
26 X11VaapiPictureProvider(
27 scoped_refptr<VaapiWrapper> vaapi_wrapper,
28 gfx::GLContextGLX* glx_context,
29 const base::Callback<bool(void)> make_context_current);
30 virtual ~X11VaapiPictureProvider();
31
32 protected:
33 virtual linked_ptr<VaapiPictureProvider::Picture> AllocatePicture(
34 int32 picture_buffer_id,
35 uint32 texture_id,
36 const gfx::Size& size) override;
37
38 private:
39 virtual bool Initialize() override;
40
41 gfx::GLContextGLX* glx_context_;
42 base::Callback<bool(void)> make_context_current_;
43
44 Display* x_display_;
45 GLXFBConfig fb_config_;
46
47 scoped_refptr<VaapiWrapper> vaapi_wrapper_;
48
49 DISALLOW_COPY_AND_ASSIGN(X11VaapiPictureProvider);
50 };
51
52 } // namespace content
53
54 #endif // CONTENT_COMMON_GPU_MEDIA_VAAPI_PICTURE_PROVIDER_X11_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698