summaryrefslogtreecommitdiffstats
path: root/cc/trees
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 /cc/trees
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 'cc/trees')
-rw-r--r--cc/trees/layer_tree_host_impl.cc47
-rw-r--r--cc/trees/layer_tree_host_impl.h9
-rw-r--r--cc/trees/layer_tree_host_impl_unittest.cc1
-rw-r--r--cc/trees/single_thread_proxy.cc15
-rw-r--r--cc/trees/single_thread_proxy.h1
-rw-r--r--cc/trees/thread_proxy.cc19
-rw-r--r--cc/trees/thread_proxy.h1
7 files changed, 0 insertions, 93 deletions
diff --git a/cc/trees/layer_tree_host_impl.cc b/cc/trees/layer_tree_host_impl.cc
index 9b22e48..c3ea500 100644
--- a/cc/trees/layer_tree_host_impl.cc
+++ b/cc/trees/layer_tree_host_impl.cc
@@ -240,9 +240,6 @@ LayerTreeHostImpl::LayerTreeHostImpl(
proxy_->HasImplThread() ? proxy_->ImplThreadTaskRunner()
: proxy_->MainThreadTaskRunner())),
max_memory_needed_bytes_(0),
- last_sent_memory_visible_bytes_(0),
- last_sent_memory_visible_and_nearby_bytes_(0),
- last_sent_memory_use_bytes_(0),
zero_budget_(false),
device_scale_factor_(1.f),
overhang_ui_resource_id_(0),
@@ -350,8 +347,6 @@ void LayerTreeHostImpl::CommitComplete() {
DCHECK(active_tree_->root_layer());
}
- client_->SendManagedMemoryStats();
-
micro_benchmark_controller_.DidCompleteCommit();
}
@@ -425,18 +420,6 @@ void LayerTreeHostImpl::ManageTiles() {
tile_priorities_dirty_ = false;
tile_manager_->ManageTiles(global_tile_state_);
- size_t memory_required_bytes;
- size_t memory_nice_to_have_bytes;
- size_t memory_allocated_bytes;
- size_t memory_used_bytes;
- tile_manager_->GetMemoryStats(&memory_required_bytes,
- &memory_nice_to_have_bytes,
- &memory_allocated_bytes,
- &memory_used_bytes);
- SendManagedMemoryStats(memory_required_bytes,
- memory_nice_to_have_bytes,
- memory_used_bytes);
-
client_->DidManageTiles();
}
@@ -1176,7 +1159,6 @@ void LayerTreeHostImpl::EnforceManagedMemoryPolicy(
client_->OnCanDrawStateChanged(CanDraw());
client_->RenewTreePriority();
}
- client_->SendManagedMemoryStats();
UpdateTileManagerMemoryPolicy(policy);
}
@@ -2904,35 +2886,6 @@ int LayerTreeHostImpl::SourceAnimationFrameNumber() const {
return fps_counter_->current_frame_number();
}
-void LayerTreeHostImpl::SendManagedMemoryStats(
- size_t memory_visible_bytes,
- size_t memory_visible_and_nearby_bytes,
- size_t memory_use_bytes) {
- if (!renderer_)
- return;
-
- // Round the numbers being sent up to the next 8MB, to throttle the rate
- // at which we spam the GPU process.
- static const size_t rounding_step = 8 * 1024 * 1024;
- memory_visible_bytes = RoundUp(memory_visible_bytes, rounding_step);
- memory_visible_and_nearby_bytes = RoundUp(memory_visible_and_nearby_bytes,
- rounding_step);
- memory_use_bytes = RoundUp(memory_use_bytes, rounding_step);
- if (last_sent_memory_visible_bytes_ == memory_visible_bytes &&
- last_sent_memory_visible_and_nearby_bytes_ ==
- memory_visible_and_nearby_bytes &&
- last_sent_memory_use_bytes_ == memory_use_bytes) {
- return;
- }
- last_sent_memory_visible_bytes_ = memory_visible_bytes;
- last_sent_memory_visible_and_nearby_bytes_ = memory_visible_and_nearby_bytes;
- last_sent_memory_use_bytes_ = memory_use_bytes;
-
- renderer_->SendManagedMemoryStats(last_sent_memory_visible_bytes_,
- last_sent_memory_visible_and_nearby_bytes_,
- last_sent_memory_use_bytes_);
-}
-
void LayerTreeHostImpl::AnimateScrollbars(base::TimeTicks time) {
AnimateScrollbarsRecursive(active_tree_->root_layer(), time);
}
diff --git a/cc/trees/layer_tree_host_impl.h b/cc/trees/layer_tree_host_impl.h
index db9c325..3d8a9a2 100644
--- a/cc/trees/layer_tree_host_impl.h
+++ b/cc/trees/layer_tree_host_impl.h
@@ -89,7 +89,6 @@ class LayerTreeHostImplClient {
virtual bool ReduceContentsTextureMemoryOnImplThread(
size_t limit_bytes,
int priority_cutoff) = 0;
- virtual void SendManagedMemoryStats() = 0;
virtual bool IsInsideDraw() = 0;
virtual void RenewTreePriority() = 0;
virtual void PostDelayedScrollbarFadeOnImplThread(
@@ -353,11 +352,6 @@ class CC_EXPORT LayerTreeHostImpl
return !animation_registrar_->active_animation_controllers().empty();
}
- void SendManagedMemoryStats(
- size_t memory_visible_bytes,
- size_t memory_visible_and_nearby_bytes,
- size_t memory_use_bytes);
-
void set_max_memory_needed_bytes(size_t bytes) {
max_memory_needed_bytes_ = bytes;
}
@@ -632,9 +626,6 @@ class CC_EXPORT LayerTreeHostImpl
// manager, if there were no limit on memory usage.
size_t max_memory_needed_bytes_;
- size_t last_sent_memory_visible_bytes_;
- size_t last_sent_memory_visible_and_nearby_bytes_;
- size_t last_sent_memory_use_bytes_;
bool zero_budget_;
// Viewport size passed in from the main thread, in physical pixels. This
diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc
index 600ace7..6c74777 100644
--- a/cc/trees/layer_tree_host_impl_unittest.cc
+++ b/cc/trees/layer_tree_host_impl_unittest.cc
@@ -152,7 +152,6 @@ class LayerTreeHostImplTest : public testing::Test,
current_priority_cutoff_value_ = priority_cutoff;
return reduce_memory_result_;
}
- virtual void SendManagedMemoryStats() OVERRIDE {}
virtual bool IsInsideDraw() OVERRIDE { return false; }
virtual void RenewTreePriority() OVERRIDE {}
virtual void PostDelayedScrollbarFadeOnImplThread(
diff --git a/cc/trees/single_thread_proxy.cc b/cc/trees/single_thread_proxy.cc
index 157ecbe..c254311 100644
--- a/cc/trees/single_thread_proxy.cc
+++ b/cc/trees/single_thread_proxy.cc
@@ -297,21 +297,6 @@ bool SingleThreadProxy::ReduceContentsTextureMemoryOnImplThread(
limit_bytes, priority_cutoff, resource_provider);
}
-void SingleThreadProxy::SendManagedMemoryStats() {
- DCHECK(Proxy::IsImplThread());
- if (!layer_tree_host_impl_)
- return;
- PrioritizedResourceManager* contents_texture_manager =
- layer_tree_host_->contents_texture_manager();
- if (!contents_texture_manager)
- return;
-
- layer_tree_host_impl_->SendManagedMemoryStats(
- contents_texture_manager->MemoryVisibleBytes(),
- contents_texture_manager->MemoryVisibleAndNearbyBytes(),
- contents_texture_manager->MemoryUseBytes());
-}
-
bool SingleThreadProxy::IsInsideDraw() { return inside_draw_; }
void SingleThreadProxy::UpdateRendererCapabilitiesOnImplThread() {
diff --git a/cc/trees/single_thread_proxy.h b/cc/trees/single_thread_proxy.h
index 5de42b5..7ad48b4 100644
--- a/cc/trees/single_thread_proxy.h
+++ b/cc/trees/single_thread_proxy.h
@@ -74,7 +74,6 @@ class CC_EXPORT SingleThreadProxy : public Proxy,
virtual bool ReduceContentsTextureMemoryOnImplThread(
size_t limit_bytes,
int priority_cutoff) OVERRIDE;
- virtual void SendManagedMemoryStats() OVERRIDE;
virtual bool IsInsideDraw() OVERRIDE;
virtual void RenewTreePriority() OVERRIDE {}
virtual void PostDelayedScrollbarFadeOnImplThread(
diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc
index 1eed641..e16adb9 100644
--- a/cc/trees/thread_proxy.cc
+++ b/cc/trees/thread_proxy.cc
@@ -434,25 +434,6 @@ bool ThreadProxy::ReduceContentsTextureMemoryOnImplThread(size_t limit_bytes,
return true;
}
-void ThreadProxy::SendManagedMemoryStats() {
- DCHECK(IsImplThread());
- if (!impl().layer_tree_host_impl)
- return;
- if (!impl().contents_texture_manager)
- return;
-
- // If we are using impl-side painting, then SendManagedMemoryStats is called
- // directly after the tile manager's manage function, and doesn't need to
- // interact with main thread's layer tree.
- if (impl().layer_tree_host_impl->settings().impl_side_painting)
- return;
-
- impl().layer_tree_host_impl->SendManagedMemoryStats(
- impl().contents_texture_manager->MemoryVisibleBytes(),
- impl().contents_texture_manager->MemoryVisibleAndNearbyBytes(),
- impl().contents_texture_manager->MemoryUseBytes());
-}
-
bool ThreadProxy::IsInsideDraw() { return impl().inside_draw; }
void ThreadProxy::SetNeedsRedraw(const gfx::Rect& damage_rect) {
diff --git a/cc/trees/thread_proxy.h b/cc/trees/thread_proxy.h
index 4734778..8d4348e 100644
--- a/cc/trees/thread_proxy.h
+++ b/cc/trees/thread_proxy.h
@@ -198,7 +198,6 @@ class CC_EXPORT ThreadProxy : public Proxy,
virtual bool ReduceContentsTextureMemoryOnImplThread(size_t limit_bytes,
int priority_cutoff)
OVERRIDE;
- virtual void SendManagedMemoryStats() OVERRIDE;
virtual bool IsInsideDraw() OVERRIDE;
virtual void RenewTreePriority() OVERRIDE;
virtual void PostDelayedScrollbarFadeOnImplThread(