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

Side by Side Diff: gpu/command_buffer/service/gl_utils.cc

Issue 2317363005: Add basic GL functionality to the passthrough command buffer. (Closed)
Patch Set: Handle bind_generates_resource Created 4 years, 3 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/command_buffer/service/gl_utils.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder.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 (c) 2016 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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 "gpu/command_buffer/service/gl_utils.h" 5 #include "gpu/command_buffer/service/gl_utils.h"
6 6
7 #include "base/metrics/histogram.h" 7 #include "base/metrics/histogram.h"
8 #include "gpu/command_buffer/common/capabilities.h" 8 #include "gpu/command_buffer/common/capabilities.h"
9 #include "gpu/command_buffer/service/feature_info.h" 9 #include "gpu/command_buffer/service/feature_info.h"
10 #include "ui/gl/gl_version_info.h" 10 #include "ui/gl/gl_version_info.h"
(...skipping 158 matching lines...) Expand 10 before | Expand all | Expand 10 after
169 caps->major_version = 3; 169 caps->major_version = 3;
170 caps->minor_version = 0; 170 caps->minor_version = 0;
171 } 171 }
172 if (feature_info->feature_flags().multisampled_render_to_texture || 172 if (feature_info->feature_flags().multisampled_render_to_texture ||
173 feature_info->feature_flags().chromium_framebuffer_multisample || 173 feature_info->feature_flags().chromium_framebuffer_multisample ||
174 feature_info->IsES3Enabled()) { 174 feature_info->IsES3Enabled()) {
175 glGetIntegerv(GL_MAX_SAMPLES, &caps->max_samples); 175 glGetIntegerv(GL_MAX_SAMPLES, &caps->max_samples);
176 } 176 }
177 } 177 }
178 178
179 bool CheckUniqueAndNonNullIds(GLsizei n, const GLuint* client_ids) {
180 if (n <= 0)
181 return true;
182 std::unordered_set<uint32_t> unique_ids(client_ids, client_ids + n);
183 return (unique_ids.size() == static_cast<size_t>(n)) &&
184 (unique_ids.find(0) == unique_ids.end());
185 }
186
179 } // namespace gles2 187 } // namespace gles2
180 } // namespace gpu 188 } // namespace gpu
OLDNEW
« no previous file with comments | « gpu/command_buffer/service/gl_utils.h ('k') | gpu/command_buffer/service/gles2_cmd_decoder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698