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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/gl_utils.cc
diff --git a/gpu/command_buffer/service/gl_utils.cc b/gpu/command_buffer/service/gl_utils.cc
index 8fca5d4b82b6a118ae9dbdf2b930be28f1935f82..331db1262d34a1e64dedc75901badbc71d179a48 100644
--- a/gpu/command_buffer/service/gl_utils.cc
+++ b/gpu/command_buffer/service/gl_utils.cc
@@ -176,5 +176,13 @@ void PopulateNumericCapabilities(Capabilities* caps,
}
}
+bool CheckUniqueAndNonNullIds(GLsizei n, const GLuint* client_ids) {
+ if (n <= 0)
+ return true;
+ std::unordered_set<uint32_t> unique_ids(client_ids, client_ids + n);
+ return (unique_ids.size() == static_cast<size_t>(n)) &&
+ (unique_ids.find(0) == unique_ids.end());
+}
+
} // namespace gles2
} // namespace gpu
« 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