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_egl.h" | 10 #include "ui/gl/gl_context_egl.h" |
(...skipping 42 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
53 return InitializeGLSurface(new GLSurfaceStub); | 53 return InitializeGLSurface(new GLSurfaceStub); |
54 default: | 54 default: |
55 NOTREACHED(); | 55 NOTREACHED(); |
56 } | 56 } |
57 return nullptr; | 57 return nullptr; |
58 } | 58 } |
59 | 59 |
60 } // namespace | 60 } // namespace |
61 | 61 |
62 std::vector<GLImplementation> GetAllowedGLImplementations() { | 62 std::vector<GLImplementation> GetAllowedGLImplementations() { |
63 ui::OzonePlatform::InitializeForGPU(); | |
rjkroege
2016/09/12 20:39:12
So I don't want this here for a variety of reasons
| |
64 return GetSurfaceFactoryOzone()->GetAllowedGLImplementations(); | 63 return GetSurfaceFactoryOzone()->GetAllowedGLImplementations(); |
65 } | 64 } |
66 | 65 |
67 bool GetGLWindowSystemBindingInfo(GLWindowSystemBindingInfo* info) { | 66 bool GetGLWindowSystemBindingInfo(GLWindowSystemBindingInfo* info) { |
68 if (HasGLOzone()) | 67 if (HasGLOzone()) |
69 return GetGLOzone()->GetGLWindowSystemBindingInfo(info); | 68 return GetGLOzone()->GetGLWindowSystemBindingInfo(info); |
70 | 69 |
71 // TODO(kylechar): This is deprecated and can be removed once all Ozone | 70 // TODO(kylechar): This is deprecated and can be removed once all Ozone |
72 // platforms use GLOzone instead. | 71 // platforms use GLOzone instead. |
73 switch (GetGLImplementation()) { | 72 switch (GetGLImplementation()) { |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
141 return CreateDefaultOffscreenGLSurface(size); | 140 return CreateDefaultOffscreenGLSurface(size); |
142 | 141 |
143 // TODO(kylechar): This is deprecated and can be removed once all Ozone | 142 // TODO(kylechar): This is deprecated and can be removed once all Ozone |
144 // platforms use GLOzone instead. | 143 // platforms use GLOzone instead. |
145 return GetSurfaceFactoryOzone()->CreateOffscreenGLSurface( | 144 return GetSurfaceFactoryOzone()->CreateOffscreenGLSurface( |
146 GetGLImplementation(), size); | 145 GetGLImplementation(), size); |
147 } | 146 } |
148 | 147 |
149 } // namespace init | 148 } // namespace init |
150 } // namespace gl | 149 } // namespace gl |
OLD | NEW |