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

Unified Diff: gpu/ipc/service/gpu_channel.h

Issue 2372593003: Iterative cleanup for GL programs in GPU process (Closed)
Patch Set: fix build Created 4 years, 3 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/program_manager.cc ('k') | gpu/ipc/service/gpu_channel.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/ipc/service/gpu_channel.h
diff --git a/gpu/ipc/service/gpu_channel.h b/gpu/ipc/service/gpu_channel.h
index 84e2279506a30fd59809a55575b09cecaeb3c167..04aa77ad1a739f69b00da8b75a1ef1f43751ce21 100644
--- a/gpu/ipc/service/gpu_channel.h
+++ b/gpu/ipc/service/gpu_channel.h
@@ -9,6 +9,7 @@
#include <stdint.h>
#include <memory>
+#include <queue>
#include <string>
#include "base/containers/hash_tables.h"
@@ -182,6 +183,7 @@ class GPU_EXPORT GpuChannel
private:
friend class TestGpuChannel;
+ friend class GpuChannelDeleter;
bool OnControlMessageReceived(const IPC::Message& msg);
@@ -477,6 +479,20 @@ class GpuChannelMessageQueue
DISALLOW_COPY_AND_ASSIGN(GpuChannelMessageQueue);
};
+// Helper class which stores state related to iterative deletion of a
+// GpuChannel.
+class GpuChannelDeleter {
+ public:
+ GpuChannelDeleter(std::unique_ptr<GpuChannel> channel);
+ ~GpuChannelDeleter();
+
+ bool DeleteWithTimeout(const base::TimeTicks& timeout);
+
+ private:
+ std::unique_ptr<GpuChannel> channel_;
+ std::queue<GpuCommandBufferStub*> pending_stubs_;
+};
+
} // namespace gpu
#endif // GPU_IPC_SERVICE_GPU_CHANNEL_H_
« no previous file with comments | « gpu/command_buffer/service/program_manager.cc ('k') | gpu/ipc/service/gpu_channel.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698