summaryrefslogtreecommitdiffstats
path: root/content/common/gpu
diff options
context:
space:
mode:
authorvmpstr@chromium.org <vmpstr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-19 07:01:41 +0000
committervmpstr@chromium.org <vmpstr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-19 07:01:41 +0000
commit53e3d37817e69f084d1c3ed8d6390f11b1cc543c (patch)
treec165d83f02c29e59dfe20c3c881b0d7d0b2a10a2 /content/common/gpu
parent53f369074309748b6c7eb3ed5699778e4f0a894d (diff)
downloadchromium_src-53e3d37817e69f084d1c3ed8d6390f11b1cc543c.zip
chromium_src-53e3d37817e69f084d1c3ed8d6390f11b1cc543c.tar.gz
chromium_src-53e3d37817e69f084d1c3ed8d6390f11b1cc543c.tar.bz2
Removed ManagedMemoryStats.
As of r277056, the gpu memory manager is no longer using managed memory stats produced. This patch removes the managed memory stats calculation from the tile manager. As well, this patch removes ununsed gpu managed memory stats plumbing. BUG=377065 Review URL: https://codereview.chromium.org/342483007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@278294 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common/gpu')
-rw-r--r--content/common/gpu/client/command_buffer_proxy_impl.cc9
-rw-r--r--content/common/gpu/client/command_buffer_proxy_impl.h2
-rw-r--r--content/common/gpu/gpu_command_buffer_stub.cc11
-rw-r--r--content/common/gpu/gpu_command_buffer_stub.h1
-rw-r--r--content/common/gpu/gpu_memory_manager.cc7
-rw-r--r--content/common/gpu/gpu_memory_manager.h3
-rw-r--r--content/common/gpu/gpu_memory_manager_client.cc5
-rw-r--r--content/common/gpu/gpu_memory_manager_client.h1
-rw-r--r--content/common/gpu/gpu_memory_manager_unittest.cc13
-rw-r--r--content/common/gpu/gpu_messages.h12
10 files changed, 0 insertions, 64 deletions
diff --git a/content/common/gpu/client/command_buffer_proxy_impl.cc b/content/common/gpu/client/command_buffer_proxy_impl.cc
index 44453df..4dd189c 100644
--- a/content/common/gpu/client/command_buffer_proxy_impl.cc
+++ b/content/common/gpu/client/command_buffer_proxy_impl.cc
@@ -441,15 +441,6 @@ void CommandBufferProxyImpl::SetSurfaceVisible(bool visible) {
Send(new GpuCommandBufferMsg_SetSurfaceVisible(route_id_, visible));
}
-void CommandBufferProxyImpl::SendManagedMemoryStats(
- const gpu::ManagedMemoryStats& stats) {
- if (last_state_.error != gpu::error::kNoError)
- return;
-
- Send(new GpuCommandBufferMsg_SendClientManagedMemoryStats(route_id_,
- stats));
-}
-
bool CommandBufferProxyImpl::ProduceFrontBuffer(const gpu::Mailbox& mailbox) {
if (last_state_.error != gpu::error::kNoError)
return false;
diff --git a/content/common/gpu/client/command_buffer_proxy_impl.h b/content/common/gpu/client/command_buffer_proxy_impl.h
index 9f2ff4f..ca262b1 100644
--- a/content/common/gpu/client/command_buffer_proxy_impl.h
+++ b/content/common/gpu/client/command_buffer_proxy_impl.h
@@ -113,8 +113,6 @@ class CommandBufferProxyImpl
virtual void SignalQuery(uint32 query,
const base::Closure& callback) OVERRIDE;
virtual void SetSurfaceVisible(bool visible) OVERRIDE;
- virtual void SendManagedMemoryStats(const gpu::ManagedMemoryStats& stats)
- OVERRIDE;
virtual void Echo(const base::Closure& callback) OVERRIDE;
virtual uint32 CreateStreamTexture(uint32 texture_id) OVERRIDE;
diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/gpu_command_buffer_stub.cc
index 3795fa7..37f50a8 100644
--- a/content/common/gpu/gpu_command_buffer_stub.cc
+++ b/content/common/gpu/gpu_command_buffer_stub.cc
@@ -235,8 +235,6 @@ bool GpuCommandBufferStub::OnMessageReceived(const IPC::Message& message) {
OnSignalSyncPoint)
IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_SignalQuery,
OnSignalQuery)
- IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_SendClientManagedMemoryStats,
- OnReceivedClientManagedMemoryStats)
IPC_MESSAGE_HANDLER(
GpuCommandBufferMsg_SetClientHasMemoryAllocationChangedCallback,
OnSetClientHasMemoryAllocationChangedCallback)
@@ -902,15 +900,6 @@ void GpuCommandBufferStub::OnSignalQuery(uint32 query_id, uint32 id) {
}
-void GpuCommandBufferStub::OnReceivedClientManagedMemoryStats(
- const gpu::ManagedMemoryStats& stats) {
- TRACE_EVENT0(
- "gpu",
- "GpuCommandBufferStub::OnReceivedClientManagedMemoryStats");
- if (memory_manager_client_state_)
- memory_manager_client_state_->SetManagedMemoryStats(stats);
-}
-
void GpuCommandBufferStub::OnSetClientHasMemoryAllocationChangedCallback(
bool has_callback) {
TRACE_EVENT0(
diff --git a/content/common/gpu/gpu_command_buffer_stub.h b/content/common/gpu/gpu_command_buffer_stub.h
index 214cb97..f660f1d 100644
--- a/content/common/gpu/gpu_command_buffer_stub.h
+++ b/content/common/gpu/gpu_command_buffer_stub.h
@@ -197,7 +197,6 @@ class GpuCommandBufferStub
void OnSignalSyncPointAck(uint32 id);
void OnSignalQuery(uint32 query, uint32 id);
- void OnReceivedClientManagedMemoryStats(const gpu::ManagedMemoryStats& stats);
void OnSetClientHasMemoryAllocationChangedCallback(bool has_callback);
void OnRegisterGpuMemoryBuffer(int32 id,
diff --git a/content/common/gpu/gpu_memory_manager.cc b/content/common/gpu/gpu_memory_manager.cc
index 7937ea1..9a23375 100644
--- a/content/common/gpu/gpu_memory_manager.cc
+++ b/content/common/gpu/gpu_memory_manager.cc
@@ -20,7 +20,6 @@
#include "gpu/command_buffer/common/gpu_memory_allocation.h"
#include "gpu/command_buffer/service/gpu_switches.h"
-using gpu::ManagedMemoryStats;
using gpu::MemoryAllocation;
namespace content {
@@ -208,12 +207,6 @@ void GpuMemoryManager::SetClientStateVisible(
ScheduleManage(visible ? kScheduleManageNow : kScheduleManageLater);
}
-void GpuMemoryManager::SetClientStateManagedMemoryStats(
- GpuMemoryManagerClientState* client_state,
- const ManagedMemoryStats& stats) {
- // TODO(ccameron): delete this from the full stack.
-}
-
uint64 GpuMemoryManager::GetClientMemoryUsage(
const GpuMemoryManagerClient* client) const {
TrackingGroupMap::const_iterator tracking_group_it =
diff --git a/content/common/gpu/gpu_memory_manager.h b/content/common/gpu/gpu_memory_manager.h
index 83d344f..0c847e9 100644
--- a/content/common/gpu/gpu_memory_manager.h
+++ b/content/common/gpu/gpu_memory_manager.h
@@ -140,9 +140,6 @@ class CONTENT_EXPORT GpuMemoryManager :
// GpuMemoryManagerClientState interface
void SetClientStateVisible(
GpuMemoryManagerClientState* client_state, bool visible);
- void SetClientStateManagedMemoryStats(
- GpuMemoryManagerClientState* client_state,
- const gpu::ManagedMemoryStats& stats);
void OnDestroyClientState(GpuMemoryManagerClientState* client);
// Add or remove a client from its clients list (visible, nonvisible, or
diff --git a/content/common/gpu/gpu_memory_manager_client.cc b/content/common/gpu/gpu_memory_manager_client.cc
index ec4a990..30d5434 100644
--- a/content/common/gpu/gpu_memory_manager_client.cc
+++ b/content/common/gpu/gpu_memory_manager_client.cc
@@ -31,9 +31,4 @@ void GpuMemoryManagerClientState::SetVisible(bool visible) {
memory_manager_->SetClientStateVisible(this, visible);
}
-void GpuMemoryManagerClientState::SetManagedMemoryStats(
- const gpu::ManagedMemoryStats& stats) {
- memory_manager_->SetClientStateManagedMemoryStats(this, stats);
-}
-
} // namespace content
diff --git a/content/common/gpu/gpu_memory_manager_client.h b/content/common/gpu/gpu_memory_manager_client.h
index ab20f41..2058e46 100644
--- a/content/common/gpu/gpu_memory_manager_client.h
+++ b/content/common/gpu/gpu_memory_manager_client.h
@@ -48,7 +48,6 @@ class CONTENT_EXPORT GpuMemoryManagerClientState {
public:
~GpuMemoryManagerClientState();
void SetVisible(bool visible);
- void SetManagedMemoryStats(const gpu::ManagedMemoryStats& stats);
private:
friend class GpuMemoryManager;
diff --git a/content/common/gpu/gpu_memory_manager_unittest.cc b/content/common/gpu/gpu_memory_manager_unittest.cc
index 42c3941..cf9e7cf 100644
--- a/content/common/gpu/gpu_memory_manager_unittest.cc
+++ b/content/common/gpu/gpu_memory_manager_unittest.cc
@@ -11,7 +11,6 @@
#include "testing/gtest/include/gtest/gtest.h"
using gpu::MemoryAllocation;
-using gpu::ManagedMemoryStats;
#if defined(COMPILER_GCC)
namespace BASE_HASH_NAMESPACE {
@@ -150,10 +149,6 @@ class FakeClient : public GpuMemoryManagerClient {
client_state_->SetVisible(visible);
}
- void SetManagedMemoryStats(const ManagedMemoryStats& stats) {
- client_state_->SetManagedMemoryStats(stats);
- }
-
uint64 BytesWhenVisible() const {
return allocation_.bytes_limit_when_visible;
}
@@ -206,14 +201,6 @@ class GpuMemoryManagerTest : public testing::Test {
memmgr_.Manage();
}
- void SetClientStats(
- FakeClient* client,
- uint64 required,
- uint64 nicetohave) {
- client->SetManagedMemoryStats(
- ManagedMemoryStats(required, nicetohave, 0, false));
- }
-
GpuMemoryManager memmgr_;
};
diff --git a/content/common/gpu/gpu_messages.h b/content/common/gpu/gpu_messages.h
index bd7a5d6..169270e 100644
--- a/content/common/gpu/gpu_messages.h
+++ b/content/common/gpu/gpu_messages.h
@@ -222,13 +222,6 @@ IPC_STRUCT_TRAITS_BEGIN(gpu::MemoryAllocation)
IPC_STRUCT_TRAITS_MEMBER(priority_cutoff_when_visible)
IPC_STRUCT_TRAITS_END()
-IPC_STRUCT_TRAITS_BEGIN(gpu::ManagedMemoryStats)
- IPC_STRUCT_TRAITS_MEMBER(bytes_required)
- IPC_STRUCT_TRAITS_MEMBER(bytes_nice_to_have)
- IPC_STRUCT_TRAITS_MEMBER(bytes_allocated)
- IPC_STRUCT_TRAITS_MEMBER(backbuffer_requested)
-IPC_STRUCT_TRAITS_END()
-
IPC_STRUCT_TRAITS_BEGIN(gfx::GLSurfaceHandle)
IPC_STRUCT_TRAITS_MEMBER(handle)
IPC_STRUCT_TRAITS_MEMBER(transport_type)
@@ -608,11 +601,6 @@ IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_SetSurfaceVisible, bool /* visible */)
IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_SetMemoryAllocation,
gpu::MemoryAllocation /* allocation */)
-// Sent to stub from the proxy with statistics on managed memory usage and
-// requirements.
-IPC_MESSAGE_ROUTED1(GpuCommandBufferMsg_SendClientManagedMemoryStats,
- gpu::ManagedMemoryStats /* stats */)
-
// Sent to stub when proxy is assigned a memory allocation changed callback.
IPC_MESSAGE_ROUTED1(
GpuCommandBufferMsg_SetClientHasMemoryAllocationChangedCallback,