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

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: Fixed lint errors. 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
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..31c7181fba5648eede27fb90ece4fe0e3f91d518 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,11 @@ namespace gles2 {
// Traces GPU Commands.
class GPUTracer {
public:
- static scoped_ptr<GPUTracer> Create();
+ static scoped_ptr<GPUTracer> Create(
+ base::WeakPtr<gles2::GLES2Decoder> decoder);
- GPUTracer() {}
- virtual ~GPUTracer() {}
+ explicit GPUTracer(base::WeakPtr<gles2::GLES2Decoder> decoder);
+ virtual ~GPUTracer();
// Begin a trace.
virtual bool Begin(const std::string& name) = 0;
@@ -36,6 +38,8 @@ class GPUTracer {
// Returns empty string if no current open trace.
virtual const std::string& CurrentName() const = 0;
+ base::WeakPtr<gles2::GLES2Decoder> decoder_;
+
private:
DISALLOW_COPY_AND_ASSIGN(GPUTracer);
};

Powered by Google App Engine
This is Rietveld 408576698