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

Unified Diff: gpu/command_buffer/service/gpu_tracer.h

Issue 813573003: Fixed GPU tracing so the categories do not get mixed. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Also export GPUTracer Created 6 years 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
Index: gpu/command_buffer/service/gpu_tracer.h
diff --git a/gpu/command_buffer/service/gpu_tracer.h b/gpu/command_buffer/service/gpu_tracer.h
index 603322079c18e883a00f0787a4b9bf128f70e7bc..8c1f61be6f6d0cfe0c9b571c7e423cb9fbd533ae 100644
--- a/gpu/command_buffer/service/gpu_tracer.h
+++ b/gpu/command_buffer/service/gpu_tracer.h
@@ -51,7 +51,8 @@ struct TraceMarker {
};
// Traces GPU Commands.
-class GPUTracer : public base::SupportsWeakPtr<GPUTracer> {
+class GPU_EXPORT GPUTracer
+ : public base::SupportsWeakPtr<GPUTracer> {
public:
explicit GPUTracer(gles2::GLES2Decoder* decoder);
~GPUTracer();
@@ -73,10 +74,10 @@ class GPUTracer : public base::SupportsWeakPtr<GPUTracer> {
// Retrieve the name of the current open trace.
// Returns empty string if no current open trace.
- const std::string& CurrentCategory() const;
- const std::string& CurrentName() const;
+ const std::string& CurrentCategory(GpuTracerSource source) const;
+ const std::string& CurrentName(GpuTracerSource source) const;
- private:
+ protected:
// Trace Processing.
scoped_refptr<GPUTrace> CreateTrace(const std::string& category,
const std::string& name);
@@ -95,7 +96,6 @@ class GPUTracer : public base::SupportsWeakPtr<GPUTracer> {
gles2::GLES2Decoder* decoder_;
int64 timer_offset_;
- GpuTracerSource last_tracer_source_;
GpuTracerType tracer_type_;
bool gpu_timing_synced_;
@@ -147,11 +147,8 @@ class GPU_EXPORT GPUTrace
bool IsEnabled() { return tracer_type_ != kTracerTypeInvalid; }
- const std::string& category() { return category_; }
- const std::string& name() { return name_; }
-
void Start(bool trace_service);
- void End(bool tracing_service);
+ void End(bool trace_service);
bool IsAvailable();
void Process();

Powered by Google App Engine
This is Rietveld 408576698