summaryrefslogtreecommitdiffstats
path: root/content/common/gpu/gpu_memory_manager_client.cc
diff options
context:
space:
mode:
authorjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-29 04:56:29 +0000
committerjamesr@chromium.org <jamesr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-10-29 04:56:29 +0000
commitf44d555f9942ccbb0c88e911a40aeb507ba48872 (patch)
tree81da447c3ec53b05f4a9c8facc87b07c98e66473 /content/common/gpu/gpu_memory_manager_client.cc
parent33aeb08e822ea55a18eb12fdd2364f2fd8af0df6 (diff)
downloadchromium_src-f44d555f9942ccbb0c88e911a40aeb507ba48872.zip
chromium_src-f44d555f9942ccbb0c88e911a40aeb507ba48872.tar.gz
chromium_src-f44d555f9942ccbb0c88e911a40aeb507ba48872.tar.bz2
Move memory allocation/stats structs to gpu:: and remove bazillion copies
This moves the memory allocation / stats structs from content to gpu:: and eliminates many redundant copies of this information in different parts of the stack. This also moves the stats sending and allocation callbacks to gpu::ContextSupport / gpu::GpuControl to get rid of the bounce through WebKit::WebGraphicsContext3D. The new flow for cc to register for memory allocation changes and pass stats to the manager is this: cc:: registers for MemoryAllocationChanged callbacks and sends stats via the gpu::ContextSupport interface. Memory allocations are represented by a gpu::MemoryAllocation struct and memory statistics are sent in a gpu::ManagedMemoryStats struct. The implementation of gpu::ContextSupport (gpu::gles2::GLES2Implementation) forwards the calls to gpu::GpuControl. content::CommandBufferProxyImpl's implementation of these maps the calls to content IPCs that drive the memory manager implementation. This patch gets rid of the following things: *) WebKit::WebGraphicsMemory(Allocation|Stats) go away. These were used only because cc was not able to depend on the previous locations of the allocation/stats structs in content::. Now that these structs are in gpu::, the compositor (which is the only thing using these) can see them directly *) WebGraphicsContext3D::sendManagedMemoryStatsCHROMIUM / setMemoryAllocationChangedCallbackCHROMIUM go away. *) cc:ManagedMemoryPolicy's cutoff fields are now gpu::MemoryAllocation::PriorityCutoff enums instead of an (inconsistently named) copy. *) GpuMemoryAllocationForBrowser goes away and is managed directly in content. gpu::GpuMemoryAllocationForRenderer is renamed to just gpu::MemoryAllocation *) Many proxies and converters go away. cc::ManagedMemoryPolicy sticks around in this patch, even though it's largely the same as gpu::MemoryAllocation, since it's sometimes used by code that doesn't go through the gpu memory allocation path - such as android_webview - and it has some additional state (num_resource_limit) that's not applicable to a general gpu::MemoryAllocation. Chris tells me this struct is due for simplification as well, so maybe it'll make sense to fold it in in a future patch. Diffstat: 53 files changed, 345 insertions(+), 713 deletions(-) BUG=181120 R=piman,ccameron Review URL: https://codereview.chromium.org/45243002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@231527 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common/gpu/gpu_memory_manager_client.cc')
-rw-r--r--content/common/gpu/gpu_memory_manager_client.cc2
1 files changed, 1 insertions, 1 deletions
diff --git a/content/common/gpu/gpu_memory_manager_client.cc b/content/common/gpu/gpu_memory_manager_client.cc
index 26fc95c..0ef3017 100644
--- a/content/common/gpu/gpu_memory_manager_client.cc
+++ b/content/common/gpu/gpu_memory_manager_client.cc
@@ -40,7 +40,7 @@ void GpuMemoryManagerClientState::SetVisible(bool visible) {
}
void GpuMemoryManagerClientState::SetManagedMemoryStats(
- const GpuManagedMemoryStats& stats) {
+ const gpu::ManagedMemoryStats& stats) {
memory_manager_->SetClientStateManagedMemoryStats(this, stats);
}