OLD | NEW |
(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/gl_initializer.h" |
| 6 |
| 7 #include "base/logging.h" |
| 8 #include "ui/gl/gl_implementation.h" |
| 9 #include "ui/gl/gl_surface_egl.h" |
| 10 |
| 11 namespace gl { |
| 12 namespace init { |
| 13 |
| 14 bool InitializeGLOneOffPlatform() { |
| 15 switch (GetGLImplementation()) { |
| 16 case kGLImplementationEGLGLES2: |
| 17 if (!GLSurfaceEGL::InitializeOneOff()) { |
| 18 LOG(ERROR) << "GLSurfaceEGL::InitializeOneOff failed."; |
| 19 return false; |
| 20 } |
| 21 return true; |
| 22 case kGLImplementationOSMesaGL: |
| 23 case kGLImplementationMockGL: |
| 24 return true; |
| 25 default: |
| 26 return false; |
| 27 } |
| 28 } |
| 29 |
| 30 } // namespace init |
| 31 } // namespace gl |
OLD | NEW |