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

Unified Diff: gpu/command_buffer/service/texture_manager.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.cc ('k') | gpu/command_buffer_service.gypi » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/texture_manager.cc
diff --git a/gpu/command_buffer/service/texture_manager.cc b/gpu/command_buffer/service/texture_manager.cc
index 1bce4948bab4498d66e1d86e61a57243830a66c7..82fab48c1c09beca5f3e784dfd76a7f9658b1407 100644
--- a/gpu/command_buffer/service/texture_manager.cc
+++ b/gpu/command_buffer/service/texture_manager.cc
@@ -13,6 +13,7 @@
#include "base/bits.h"
#include "base/lazy_instance.h"
+#include "base/metrics/histogram_macros.h"
#include "base/strings/stringprintf.h"
#include "base/thread_task_runner_handle.h"
#include "base/trace_event/memory_dump_manager.h"
@@ -2262,6 +2263,13 @@ void TextureManager::DoTexImage(
}
}
GLenum error = ERRORSTATE_PEEK_GL_ERROR(error_state, function_name);
+ if (args.command_type == DoTexImageArguments::kTexImage3D) {
+ UMA_HISTOGRAM_CUSTOM_ENUMERATION("GPU.Error.TexImage3D", error,
+ GetAllGLErrors());
+ } else {
+ UMA_HISTOGRAM_CUSTOM_ENUMERATION("GPU.Error.TexImage2D", error,
+ GetAllGLErrors());
+ }
if (error == GL_NO_ERROR) {
SetLevelInfo(
texture_ref, args.target, args.level, args.internal_format, args.width,
« no previous file with comments | « gpu/command_buffer/service/gl_utils.cc ('k') | gpu/command_buffer_service.gypi » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698