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

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

Issue 2190353003: Delete old Ozone surface creation API. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase. Created 4 years, 4 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 | « ui/ozone/common/egl_util.h ('k') | ui/ozone/ozone.gyp » ('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 #include "ui/gl/egl_util.h" 8 #include "ui/gl/egl_util.h"
9 #include "ui/gl/gl_bindings.h" 9 #include "ui/gl/gl_bindings.h"
10 10
(...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after
79 79
80 EGLConfig config; 80 EGLConfig config;
81 if (!eglChooseConfig(display, attributes, &config, 1, &num_configs)) { 81 if (!eglChooseConfig(display, attributes, &config, 1, &num_configs)) {
82 LOG(ERROR) << "eglChooseConfig failed with error " 82 LOG(ERROR) << "eglChooseConfig failed with error "
83 << GetLastEGLErrorString(); 83 << GetLastEGLErrorString();
84 return nullptr; 84 return nullptr;
85 } 85 }
86 return config; 86 return config;
87 } 87 }
88 88
89 void* /* EGLConfig */ ChooseEGLConfig(const EglConfigCallbacks& egl,
90 const int32_t* attributes) {
91 void* config;
92 int32_t num_configs;
93 if (!egl.choose_config.Run(attributes, nullptr, 0, &num_configs)) {
94 LOG(ERROR) << "eglChooseConfig failed with error "
95 << egl.get_last_error_string.Run();
96 return nullptr;
97 }
98
99 if (num_configs == 0) {
100 LOG(ERROR) << "No suitable EGL configs found.";
101 return nullptr;
102 }
103
104 if (!egl.choose_config.Run(attributes, &config, 1, &num_configs)) {
105 LOG(ERROR) << "eglChooseConfig failed with error "
106 << egl.get_last_error_string.Run();
107 return nullptr;
108 }
109 return config;
110 }
111
112 } // namespace ui 89 } // namespace ui
OLDNEW
« no previous file with comments | « ui/ozone/common/egl_util.h ('k') | ui/ozone/ozone.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698