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

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

Issue 130313002: Make correct GL context current during gpu_tracer processing (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Remove weak ptr use. Handle MakeCurrent fail. Created 6 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/gles2_cmd_decoder.cc ('k') | gpu/command_buffer/service/gpu_tracer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 528887f2a2411d7df56769c2b942b9a284f0ec5f..6a87681666893ed853ff4ea95f4535cd86c474ef 100644
--- a/gpu/command_buffer/service/gpu_tracer.h
+++ b/gpu/command_buffer/service/gpu_tracer.h
@@ -12,6 +12,7 @@
#include "base/memory/scoped_ptr.h"
#include "base/memory/weak_ptr.h"
#include "base/threading/thread.h"
+#include "gpu/command_buffer/service/gles2_cmd_decoder.h"
#include "gpu/gpu_export.h"
#include "ui/gl/gl_bindings.h"
@@ -21,10 +22,10 @@ namespace gles2 {
// Traces GPU Commands.
class GPUTracer {
public:
- static scoped_ptr<GPUTracer> Create();
+ static scoped_ptr<GPUTracer> Create(gles2::GLES2Decoder* decoder);
- GPUTracer() {}
- virtual ~GPUTracer() {}
+ explicit GPUTracer(gles2::GLES2Decoder* decoder);
+ virtual ~GPUTracer();
// Begin a trace.
virtual bool Begin(const std::string& name) = 0;
@@ -36,6 +37,8 @@ class GPUTracer {
// Returns empty string if no current open trace.
virtual const std::string& CurrentName() const = 0;
+ gles2::GLES2Decoder* decoder_;
+
private:
DISALLOW_COPY_AND_ASSIGN(GPUTracer);
};
« no previous file with comments | « gpu/command_buffer/service/gles2_cmd_decoder.cc ('k') | gpu/command_buffer/service/gpu_tracer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698