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

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: Missing modifications in video accelerators 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 #if !defined(USE_X11)
Pawel Osciak 2014/10/08 08:17:22 Conditionally compiled headers should go below the
llandwerlin-old 2014/10/08 09:31:17 Acknowledged.
9 #include "content/common/gpu/media/vaapi_picture_provider_drm.h"
10 #else
11 #include "content/common/gpu/media/vaapi_picture_provider_x11.h"
12 #endif
13 #include "ui/gl/gl_context_glx.h"
14
15 namespace content {
16
17 VaapiPictureProvider::~VaapiPictureProvider() {
18 }
19
20 scoped_ptr<VaapiPictureProvider> VaapiPictureProvider::Create(
21 VADisplay va_display,
22 gfx::GLContext* gl_context,
23 const base::Callback<bool(void)> make_context_current) {
24 scoped_ptr<VaapiPictureProvider> provider;
25
26 #if defined(USE_X11)
27 provider.reset(
28 new X11VaapiPictureProvider(va_display,
29 static_cast<gfx::GLContextGLX*>(gl_context),
30 make_context_current));
31 #else
32 provider.reset(new DrmVaapiPictureProvider(va_display, make_context_current));
33 #endif // USE_X11
34
35 if (!provider->Initialize())
36 provider.reset();
37
38 return provider.Pass();
39 }
40
41 } // namespace content
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698