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

Side by Side Diff: ui/gl/init/ozone_util.cc

Issue 2270463002: Add OzoneGLImpl interface. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rename. Created 4 years, 3 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 2016 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 "ui/gl/init/ozone_util.h"
6
7 #include "ui/ozone/public/ozone_platform.h"
8
9 namespace gl {
10
11 ui::SurfaceFactoryOzone* GetSurfaceFactory() {
rjkroege 2016/08/26 19:55:53 you could make a lot of this inline
kylechar 2016/08/29 15:38:14 Done.
12 return ui::OzonePlatform::GetInstance()->GetSurfaceFactoryOzone();
13 }
14
15 bool HasGLOzone(GLImplementation impl) {
16 return GetSurfaceFactory()->GetGLOzone(impl) != nullptr;
17 }
18
19 bool HasGLOzone() {
20 return HasGLOzone(GetGLImplementation());
21 }
22
23 ui::GLOzone* GetGLOzone(GLImplementation impl) {
24 return GetSurfaceFactory()->GetGLOzone(impl);
25 }
26
27 ui::GLOzone* GetGLOzone() {
28 return GetGLOzone(GetGLImplementation());
29 }
30
31 } // namespace gl
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698