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

Side by Side Diff: ui/ozone/common/egl_util.cc

Issue 750593003: Ozone X11 platform Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: cleanup leftover stuff Created 6 years 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 | « ui/ozone/common/egl_util.h ('k') | ui/ozone/ozone.gni » ('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 2014 The Chromium Authors. All rights reserved. 1 // Copyright 2014 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/ozone/common/egl_util.h" 5 #include "ui/ozone/common/egl_util.h"
6 6
7 #include "base/files/file_path.h" 7 #include "base/files/file_path.h"
8 8
9 namespace ui { 9 namespace ui {
10 namespace { 10 namespace {
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
55 return false; 55 return false;
56 } 56 }
57 57
58 set_gl_get_proc_address.Run(get_proc_address); 58 set_gl_get_proc_address.Run(get_proc_address);
59 add_gl_library.Run(egl_library); 59 add_gl_library.Run(egl_library);
60 add_gl_library.Run(gles_library); 60 add_gl_library.Run(gles_library);
61 61
62 return true; 62 return true;
63 } 63 }
64 64
65 void* ChooseEGLConfig(const SurfaceFactoryOzone::EglConfigInfo& egl,
66 const int32* attributes) {
67 void* config;
68 int32 num_configs;
69 if (!egl.choose_config.Run(attributes, NULL, 0, &num_configs)) {
70 LOG(ERROR) << "eglChooseConfig failed with error "
71 << egl.get_last_error_string.Run();
72 return nullptr;
73 }
74
75 if (num_configs == 0) {
76 LOG(ERROR) << "No suitable EGL configs found.";
77 return nullptr;
78 }
79
80 if (!egl.choose_config.Run(attributes, &config, 1, &num_configs)) {
81 LOG(ERROR) << "eglChooseConfig failed with error "
82 << egl.get_last_error_string.Run();
83 return nullptr;
84 }
85 return config;
86 }
87
65 } // namespace ui 88 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/common/egl_util.h ('k') | ui/ozone/ozone.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698