 Chromium Code Reviews
 Chromium Code Reviews Issue 2270463002:
  Add OzoneGLImpl interface.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master
    
  
    Issue 2270463002:
  Add OzoneGLImpl interface.  (Closed) 
  Base URL: https://chromium.googlesource.com/chromium/src.git@master| Index: ui/gl/init/ozone_util.cc | 
| diff --git a/ui/gl/init/ozone_util.cc b/ui/gl/init/ozone_util.cc | 
| new file mode 100644 | 
| index 0000000000000000000000000000000000000000..d4a37f67d0a8a1aa9d1d46e11857a1ff8109c432 | 
| --- /dev/null | 
| +++ b/ui/gl/init/ozone_util.cc | 
| @@ -0,0 +1,31 @@ | 
| +// Copyright 2016 The Chromium Authors. All rights reserved. | 
| +// Use of this source code is governed by a BSD-style license that can be | 
| +// found in the LICENSE file. | 
| + | 
| +#include "ui/gl/init/ozone_util.h" | 
| + | 
| +#include "ui/ozone/public/ozone_platform.h" | 
| + | 
| +namespace gl { | 
| + | 
| +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.
 | 
| + return ui::OzonePlatform::GetInstance()->GetSurfaceFactoryOzone(); | 
| +} | 
| + | 
| +bool HasGLOzone(GLImplementation impl) { | 
| + return GetSurfaceFactory()->GetGLOzone(impl) != nullptr; | 
| +} | 
| + | 
| +bool HasGLOzone() { | 
| + return HasGLOzone(GetGLImplementation()); | 
| +} | 
| + | 
| +ui::GLOzone* GetGLOzone(GLImplementation impl) { | 
| + return GetSurfaceFactory()->GetGLOzone(impl); | 
| +} | 
| + | 
| +ui::GLOzone* GetGLOzone() { | 
| + return GetGLOzone(GetGLImplementation()); | 
| +} | 
| + | 
| +} // namespace gl |