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

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

Issue 2749873002: Move Ozone GPU initialization. (Closed)
Patch Set: Fixes. Created 3 years, 9 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
« no previous file with comments | « gpu/ipc/service/gpu_init.cc ('k') | ui/gl/test/gl_image_test_support.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
OLDNEW
« no previous file with comments | « gpu/ipc/service/gpu_init.cc ('k') | ui/gl/test/gl_image_test_support.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698