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

Side by Side Diff: content/common/gpu/media/vaapi_picture_provider.cc

Issue 490233002: VaapiVideoAccelerator: make Vaapi accelerator work with ozone (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: More VaapiPictureProviderDrm cleanup Created 6 years, 2 months 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 #include "base/bind.h"
6 #include "base/callback.h"
7 #include "content/common/gpu/media/vaapi_picture_provider.h"
8 #include "content/common/gpu/media/vaapi_wrapper.h"
9 #include "ui/gl/gl_context_glx.h"
10 #if !defined(USE_X11)
11 #include "content/common/gpu/media/vaapi_picture_provider_drm.h"
12 #else
13 #include "content/common/gpu/media/vaapi_picture_provider_x11.h"
14 #endif
15
16 namespace content {
17
18 VaapiPictureProvider::VaapiPictureProvider() {
19 }
20
21 VaapiPictureProvider::~VaapiPictureProvider() {
22 }
23
24 scoped_ptr<VaapiPictureProvider> VaapiPictureProvider::Create(
25 scoped_refptr<VaapiWrapper> vaapi_wrapper,
26 gfx::GLContext* gl_context,
27 const base::Callback<bool(void)> make_context_current) {
28 scoped_ptr<VaapiPictureProvider> provider;
29
30 #if defined(USE_X11)
31 provider.reset(
32 new X11VaapiPictureProvider(vaapi_wrapper,
33 static_cast<gfx::GLContextGLX*>(gl_context),
34 make_context_current));
35 #else
36 provider.reset(
37 new DrmVaapiPictureProvider(vaapi_wrapper, make_context_current));
38 #endif // USE_X11
39
40 if (!provider->Initialize())
41 provider.reset();
42
43 return provider.Pass();
44 }
45
46 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698