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

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

Issue 8953006: Free the command buffer when tabs are switched (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 9 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
« no previous file with comments | « gpu/command_buffer/client/ring_buffer_test.cc ('k') | gpu/command_buffer/service/gpu_scheduler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/command_buffer/service/gpu_scheduler.h
diff --git a/gpu/command_buffer/service/gpu_scheduler.h b/gpu/command_buffer/service/gpu_scheduler.h
index f7fd49eed66fa221aa968b79161b1c065b377b6a..3a33da4028fa412333fbfb1a88d090f83fc6bf68 100644
--- a/gpu/command_buffer/service/gpu_scheduler.h
+++ b/gpu/command_buffer/service/gpu_scheduler.h
@@ -28,8 +28,8 @@ class GpuScheduler
public base::SupportsWeakPtr<GpuScheduler> {
public:
GpuScheduler(CommandBuffer* command_buffer,
- gles2::GLES2Decoder* decoder,
- CommandParser* parser);
+ AsyncAPIInterface* handler,
+ gles2::GLES2Decoder* decoder);
virtual ~GpuScheduler();
@@ -62,6 +62,10 @@ class GpuScheduler
void DeferToFence(base::Closure task);
+ CommandParser* parser() const {
+ return parser_.get();
+ }
+
private:
// Polls the fences, invoking callbacks that were waiting to be triggered
// by them and returns whether all fences were complete.
@@ -72,6 +76,9 @@ class GpuScheduler
// through the ProcessCommands callback.
CommandBuffer* command_buffer_;
+ // The parser uses this to execute commands.
+ AsyncAPIInterface* handler_;
+
// Does not own decoder. TODO(apatrick): The GpuScheduler shouldn't need a
// pointer to the decoder, it is only used to initialize the CommandParser,
// which could be an argument to the constructor, and to determine the
@@ -98,6 +105,8 @@ class GpuScheduler
base::Closure scheduled_callback_;
base::Closure command_processed_callback_;
+
+ DISALLOW_COPY_AND_ASSIGN(GpuScheduler);
};
} // namespace gpu
« no previous file with comments | « gpu/command_buffer/client/ring_buffer_test.cc ('k') | gpu/command_buffer/service/gpu_scheduler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698