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

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: Minor updates, working on tests 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 ffbbc3c1e6838567360d97fb71855492c88b6d59..dff4db6e5140acf332dcc8ac567fe234260ed91d 100644
--- a/content/common/gpu/gpu_channel.cc
+++ b/content/common/gpu/gpu_channel.cc
@@ -135,6 +135,19 @@ bool GpuChannel::Send(IPC::Message* message) {
return channel_->Send(message);
}
+void GpuChannel::AppendAllCommandBufferStubs(
+ std::vector<GpuMemoryManageableCommandBufferStub*>& stubs_with_surface,
+ std::vector<GpuMemoryManageableCommandBufferStub*>& stubs_without_surface) {
+ for (StubMap::Iterator<GpuCommandBufferStub> it(&stubs_);
+ !it.IsAtEnd(); it.Advance()) {
+ GpuMemoryManageableCommandBufferStub* stub = it.GetCurrentValue();
+ if (stub->surface_state().surface_id == 0)
+ stubs_without_surface.push_back(stub);
+ else
+ stubs_with_surface.push_back(stub);
+ }
+}
+
bool GpuChannel::IsScheduled() {
for (StubMap::Iterator<GpuCommandBufferStub> it(&stubs_);
!it.IsAtEnd();

Powered by Google App Engine
This is Rietveld 408576698