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

Unified Diff: content/common/gpu/gpu_channel.cc

Issue 9289052: Adding GpuMemoryManager to track GpuCommandBufferStub visibility and last_used_time and dictate mem… (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Changing to use gpu_memory_allocation.h file so it lands first Created 8 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: content/common/gpu/gpu_channel.cc
diff --git a/content/common/gpu/gpu_channel.cc b/content/common/gpu/gpu_channel.cc
index b9d4e05a5f69b40cad01578f4bf8338a8428afd8..87b061168653a0a60c249398732000111c0c8055 100644
--- a/content/common/gpu/gpu_channel.cc
+++ b/content/common/gpu/gpu_channel.cc
@@ -211,6 +211,15 @@ GpuCommandBufferStub* GpuChannel::LookupCommandBuffer(int32 route_id) {
return stubs_.Lookup(route_id);
}
+std::vector<GpuCommandBufferStub*> GpuChannel::GetCommandBuffers() {
nduca 2012/01/27 10:10:13 Better to return the stubmap and let the code upst
Ken Russell (switch to Gerrit) 2012/01/27 19:21:24 Returning the StubMap would expose more implementa
mmocny 2012/01/27 19:51:33 I had it that way at first, but this was cleaner.
+ std::vector<GpuCommandBufferStub*> ret;
+ for (StubMap::Iterator<GpuCommandBufferStub> it(&stubs_);
+ !it.IsAtEnd(); it.Advance()) {
+ ret.push_back(it.GetCurrentValue());
+ }
+ return ret;
+}
+
bool GpuChannel::OnControlMessageReceived(const IPC::Message& msg) {
// Always use IPC_MESSAGE_HANDLER_DELAY_REPLY for synchronous message handlers
// here. This is so the reply can be delayed if the scheduler is unscheduled.

Powered by Google App Engine
This is Rietveld 408576698