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

Unified Diff: gpu/command_buffer/service/gl_utils.cc

Issue 1563613002: Add GL error usage metrics for glTexImage* APIs (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: local -> uma Created 4 years, 11 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/texture_manager.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
new file mode 100644
index 0000000000000000000000000000000000000000..bb8ce4b013d601c51b63b3ba9861eedadd8b04cb
--- /dev/null
+++ b/gpu/command_buffer/service/gl_utils.cc
@@ -0,0 +1,26 @@
+// Copyright (c) 2016 The Chromium Authors. All rights reserved.
+// Use of this source code is governed by a BSD-style license that can be
+// found in the LICENSE file.
+
+#include "gpu/command_buffer/service/gl_utils.h"
+
+#include "base/metrics/histogram.h"
+
+namespace gpu {
+namespace gles2 {
+
+std::vector<int> GetAllGLErrors() {
+ int gl_errors[] = {
+ GL_NO_ERROR,
+ GL_INVALID_ENUM,
+ GL_INVALID_VALUE,
+ GL_INVALID_OPERATION,
+ GL_INVALID_FRAMEBUFFER_OPERATION,
+ GL_OUT_OF_MEMORY,
+ };
+ return base::CustomHistogram::ArrayToCustomRanges(gl_errors,
+ arraysize(gl_errors));
+}
+
+} // namespace gles2
+} // namespace gpu
« no previous file with comments | « gpu/command_buffer/service/gl_utils.h ('k') | gpu/command_buffer/service/texture_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698