| OLD | NEW |
| 1 // Copyright 2016 The Chromium Authors. All rights reserved. | 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 | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "ui/gl/init/gl_factory.h" | 5 #include "ui/gl/init/gl_factory.h" |
| 6 | 6 |
| 7 #include "base/logging.h" | 7 #include "base/logging.h" |
| 8 #include "base/trace_event/trace_event.h" | 8 #include "base/trace_event/trace_event.h" |
| 9 #include "ui/gl/gl_context.h" | 9 #include "ui/gl/gl_context.h" |
| 10 #include "ui/gl/gl_context_stub.h" | 10 #include "ui/gl/gl_context_stub.h" |
| 11 #include "ui/gl/gl_implementation.h" | 11 #include "ui/gl/gl_implementation.h" |
| 12 #include "ui/gl/gl_share_group.h" | 12 #include "ui/gl/gl_share_group.h" |
| 13 #include "ui/gl/gl_surface.h" | 13 #include "ui/gl/gl_surface.h" |
| 14 #include "ui/gl/gl_surface_stub.h" | 14 #include "ui/gl/gl_surface_stub.h" |
| 15 #include "ui/gl/init/ozone_util.h" | 15 #include "ui/gl/init/ozone_util.h" |
| 16 | 16 |
| 17 namespace gl { | 17 namespace gl { |
| 18 namespace init { | 18 namespace init { |
| 19 | 19 |
| 20 std::vector<GLImplementation> GetAllowedGLImplementations() { | 20 std::vector<GLImplementation> GetAllowedGLImplementations() { |
| 21 ui::OzonePlatform::InitializeForGPU(); | 21 DCHECK(GetSurfaceFactoryOzone()); |
| 22 return GetSurfaceFactoryOzone()->GetAllowedGLImplementations(); | 22 return GetSurfaceFactoryOzone()->GetAllowedGLImplementations(); |
| 23 } | 23 } |
| 24 | 24 |
| 25 bool GetGLWindowSystemBindingInfo(GLWindowSystemBindingInfo* info) { | 25 bool GetGLWindowSystemBindingInfo(GLWindowSystemBindingInfo* info) { |
| 26 if (HasGLOzone()) | 26 if (HasGLOzone()) |
| 27 return GetGLOzone()->GetGLWindowSystemBindingInfo(info); | 27 return GetGLOzone()->GetGLWindowSystemBindingInfo(info); |
| 28 | 28 |
| 29 return false; | 29 return false; |
| 30 } | 30 } |
| 31 | 31 |
| (...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 99 return InitializeGLSurface(new GLSurfaceStub); | 99 return InitializeGLSurface(new GLSurfaceStub); |
| 100 default: | 100 default: |
| 101 NOTREACHED(); | 101 NOTREACHED(); |
| 102 } | 102 } |
| 103 | 103 |
| 104 return nullptr; | 104 return nullptr; |
| 105 } | 105 } |
| 106 | 106 |
| 107 } // namespace init | 107 } // namespace init |
| 108 } // namespace gl | 108 } // namespace gl |
| OLD | NEW |