diff options
author | vmpstr@chromium.org <vmpstr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-19 07:01:41 +0000 |
---|---|---|
committer | vmpstr@chromium.org <vmpstr@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2014-06-19 07:01:41 +0000 |
commit | 53e3d37817e69f084d1c3ed8d6390f11b1cc543c (patch) | |
tree | c165d83f02c29e59dfe20c3c881b0d7d0b2a10a2 /cc | |
parent | 53f369074309748b6c7eb3ed5699778e4f0a894d (diff) | |
download | chromium_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')
-rw-r--r-- | cc/output/delegating_renderer.cc | 18 | ||||
-rw-r--r-- | cc/output/delegating_renderer.h | 4 | ||||
-rw-r--r-- | cc/output/gl_renderer.cc | 11 | ||||
-rw-r--r-- | cc/output/gl_renderer.h | 4 | ||||
-rw-r--r-- | cc/output/renderer.h | 4 | ||||
-rw-r--r-- | cc/output/software_renderer.h | 4 | ||||
-rw-r--r-- | cc/resources/tile_manager.cc | 48 | ||||
-rw-r--r-- | cc/resources/tile_manager.h | 9 | ||||
-rw-r--r-- | cc/resources/tile_manager_unittest.cc | 45 | ||||
-rw-r--r-- | cc/test/fake_layer_tree_host_impl_client.h | 1 | ||||
-rw-r--r-- | cc/test/test_context_support.cc | 3 | ||||
-rw-r--r-- | cc/test/test_context_support.h | 2 | ||||
-rw-r--r-- | cc/trees/layer_tree_host_impl.cc | 47 | ||||
-rw-r--r-- | cc/trees/layer_tree_host_impl.h | 9 | ||||
-rw-r--r-- | cc/trees/layer_tree_host_impl_unittest.cc | 1 | ||||
-rw-r--r-- | cc/trees/single_thread_proxy.cc | 15 | ||||
-rw-r--r-- | cc/trees/single_thread_proxy.h | 1 | ||||
-rw-r--r-- | cc/trees/thread_proxy.cc | 19 | ||||
-rw-r--r-- | cc/trees/thread_proxy.h | 1 |
19 files changed, 0 insertions, 246 deletions
diff --git a/cc/output/delegating_renderer.cc b/cc/output/delegating_renderer.cc index 68c29e5..75c3b63 100644 --- a/cc/output/delegating_renderer.cc +++ b/cc/output/delegating_renderer.cc @@ -146,22 +146,4 @@ void DelegatingRenderer::DidChangeVisibility() { context_provider->ContextSupport()->SetSurfaceVisible(visible()); } -void DelegatingRenderer::SendManagedMemoryStats(size_t bytes_visible, - size_t bytes_visible_and_nearby, - size_t bytes_allocated) { - ContextProvider* context_provider = output_surface_->context_provider(); - if (!context_provider) { - // In the software path each child process manages its memory separately, - // so memory stats don't have to be sent anywhere. - return; - } - gpu::ManagedMemoryStats stats; - stats.bytes_required = bytes_visible; - stats.bytes_nice_to_have = bytes_visible_and_nearby; - stats.bytes_allocated = bytes_allocated; - stats.backbuffer_requested = false; - - context_provider->ContextSupport()->SendManagedMemoryStats(stats); -} - } // namespace cc diff --git a/cc/output/delegating_renderer.h b/cc/output/delegating_renderer.h index 2649bcb..10d95ce 100644 --- a/cc/output/delegating_renderer.h +++ b/cc/output/delegating_renderer.h @@ -39,10 +39,6 @@ class CC_EXPORT DelegatingRenderer : public Renderer { virtual bool IsContextLost() OVERRIDE; - virtual void SendManagedMemoryStats(size_t bytes_visible, - size_t bytes_visible_and_nearby, - size_t bytes_allocated) OVERRIDE; - private: DelegatingRenderer(RendererClient* client, const LayerTreeSettings* settings, diff --git a/cc/output/gl_renderer.cc b/cc/output/gl_renderer.cc index 80e866d..68bc291 100644 --- a/cc/output/gl_renderer.cc +++ b/cc/output/gl_renderer.cc @@ -387,17 +387,6 @@ void GLRenderer::DidChangeVisibility() { context_support_->SetSurfaceVisible(visible()); } -void GLRenderer::SendManagedMemoryStats(size_t bytes_visible, - size_t bytes_visible_and_nearby, - size_t bytes_allocated) { - gpu::ManagedMemoryStats stats; - stats.bytes_required = bytes_visible; - stats.bytes_nice_to_have = bytes_visible_and_nearby; - stats.bytes_allocated = bytes_allocated; - stats.backbuffer_requested = !is_backbuffer_discarded_; - context_support_->SendManagedMemoryStats(stats); -} - void GLRenderer::ReleaseRenderPassTextures() { render_pass_textures_.clear(); } void GLRenderer::DiscardPixels(bool has_external_stencil_test, diff --git a/cc/output/gl_renderer.h b/cc/output/gl_renderer.h index ee989d3..b798d55 100644 --- a/cc/output/gl_renderer.h +++ b/cc/output/gl_renderer.h @@ -67,10 +67,6 @@ class CC_EXPORT GLRenderer : public DirectRenderer { virtual bool IsContextLost() OVERRIDE; - virtual void SendManagedMemoryStats(size_t bytes_visible, - size_t bytes_visible_and_nearby, - size_t bytes_allocated) OVERRIDE; - static void DebugGLCall(gpu::gles2::GLES2Interface* gl, const char* command, const char* file, diff --git a/cc/output/renderer.h b/cc/output/renderer.h index c702209..af77cbb 100644 --- a/cc/output/renderer.h +++ b/cc/output/renderer.h @@ -77,10 +77,6 @@ class CC_EXPORT Renderer { bool visible() const { return visible_; } void SetVisible(bool visible); - virtual void SendManagedMemoryStats(size_t bytes_visible, - size_t bytes_visible_and_nearby, - size_t bytes_allocated) = 0; - protected: explicit Renderer(RendererClient* client, const LayerTreeSettings* settings) : client_(client), settings_(settings), visible_(true) {} diff --git a/cc/output/software_renderer.h b/cc/output/software_renderer.h index 4eaa8e9..5c9fef0 100644 --- a/cc/output/software_renderer.h +++ b/cc/output/software_renderer.h @@ -37,10 +37,6 @@ class CC_EXPORT SoftwareRenderer : public DirectRenderer { virtual const RendererCapabilitiesImpl& Capabilities() const OVERRIDE; virtual void Finish() OVERRIDE; virtual void SwapBuffers(const CompositorFrameMetadata& metadata) OVERRIDE; - virtual void SendManagedMemoryStats( - size_t bytes_visible, - size_t bytes_visible_and_nearby, - size_t bytes_allocated) OVERRIDE {} virtual void ReceiveSwapBuffersAck( const CompositorFrameAck& ack) OVERRIDE; virtual void DiscardBackbuffer() OVERRIDE; diff --git a/cc/resources/tile_manager.cc b/cc/resources/tile_manager.cc index b1cc1aec..d508f6a 100644 --- a/cc/resources/tile_manager.cc +++ b/cc/resources/tile_manager.cc @@ -371,8 +371,6 @@ TileManager::TileManager( prioritized_tiles_dirty_(false), all_tiles_that_need_to_be_rasterized_have_memory_(true), all_tiles_required_for_activation_have_memory_(true), - memory_required_bytes_(0), - memory_nice_to_have_bytes_(0), bytes_releasable_(0), resources_releasable_(0), ever_exceeded_memory_budget_(false), @@ -532,10 +530,6 @@ void TileManager::DidFinishRunningTasksRequiredForActivation() { void TileManager::GetTilesWithAssignedBins(PrioritizedTileSet* tiles) { TRACE_EVENT0("cc", "TileManager::GetTilesWithAssignedBins"); - // Compute new stats to be return by GetMemoryStats(). - memory_required_bytes_ = 0; - memory_nice_to_have_bytes_ = 0; - const TileMemoryLimitPolicy memory_policy = global_state_.memory_limit_policy; const TreePriority tree_priority = global_state_.tree_priority; @@ -579,18 +573,6 @@ void TileManager::GetTilesWithAssignedBins(PrioritizedTileSet* tiles) { if (!tile_is_ready_to_draw && pending_is_non_ideal) pending_bin = NEVER_BIN; - if (!tile_is_ready_to_draw || tile_version.requires_resource()) { - // The bin that the tile would have if the GPU memory manager had - // a maximally permissive policy, send to the GPU memory manager - // to determine policy. - ManagedTileBin gpu_memmgr_stats_bin = std::min(active_bin, pending_bin); - if ((gpu_memmgr_stats_bin == NOW_BIN) || - (gpu_memmgr_stats_bin == NOW_AND_READY_TO_DRAW_BIN)) - memory_required_bytes_ += BytesConsumedIfAllocated(tile); - if (gpu_memmgr_stats_bin != NEVER_BIN) - memory_nice_to_have_bytes_ += BytesConsumedIfAllocated(tile); - } - ManagedTileBin tree_bin[NUM_TREES]; tree_bin[ACTIVE_TREE] = kBinPolicyMap[memory_policy][active_bin]; tree_bin[PENDING_TREE] = kBinPolicyMap[memory_policy][pending_bin]; @@ -712,21 +694,10 @@ bool TileManager::UpdateVisibleTiles() { return did_initialize_visible_tile; } -void TileManager::GetMemoryStats(size_t* memory_required_bytes, - size_t* memory_nice_to_have_bytes, - size_t* memory_allocated_bytes, - size_t* memory_used_bytes) const { - *memory_required_bytes = memory_required_bytes_; - *memory_nice_to_have_bytes = memory_nice_to_have_bytes_; - *memory_allocated_bytes = resource_pool_->total_memory_usage_bytes(); - *memory_used_bytes = resource_pool_->acquired_memory_usage_bytes(); -} - scoped_ptr<base::Value> TileManager::BasicStateAsValue() const { scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); state->SetInteger("tile_count", tiles_.size()); state->Set("global_state", global_state_.AsValue().release()); - state->Set("memory_requirements", GetMemoryRequirementsAsValue().release()); return state.PassAs<base::Value>(); } @@ -738,25 +709,6 @@ scoped_ptr<base::Value> TileManager::AllTilesAsValue() const { return state.PassAs<base::Value>(); } -scoped_ptr<base::Value> TileManager::GetMemoryRequirementsAsValue() const { - scoped_ptr<base::DictionaryValue> requirements(new base::DictionaryValue()); - - size_t memory_required_bytes; - size_t memory_nice_to_have_bytes; - size_t memory_allocated_bytes; - size_t memory_used_bytes; - GetMemoryStats(&memory_required_bytes, - &memory_nice_to_have_bytes, - &memory_allocated_bytes, - &memory_used_bytes); - requirements->SetInteger("memory_required_bytes", memory_required_bytes); - requirements->SetInteger("memory_nice_to_have_bytes", - memory_nice_to_have_bytes); - requirements->SetInteger("memory_allocated_bytes", memory_allocated_bytes); - requirements->SetInteger("memory_used_bytes", memory_used_bytes); - return requirements.PassAs<base::Value>(); -} - void TileManager::AssignGpuMemoryToTiles( PrioritizedTileSet* tiles, TileVector* tiles_that_need_to_be_rasterized) { diff --git a/cc/resources/tile_manager.h b/cc/resources/tile_manager.h index 30f4730..5ad8091 100644 --- a/cc/resources/tile_manager.h +++ b/cc/resources/tile_manager.h @@ -187,11 +187,6 @@ class CC_EXPORT TileManager : public RasterizerClient, scoped_ptr<base::Value> BasicStateAsValue() const; scoped_ptr<base::Value> AllTilesAsValue() const; - void GetMemoryStats(size_t* memory_required_bytes, - size_t* memory_nice_to_have_bytes, - size_t* memory_allocated_bytes, - size_t* memory_used_bytes) const; - const MemoryHistory::Entry& memory_stats_from_last_assign() const { return memory_stats_from_last_assign_; } @@ -288,7 +283,6 @@ class CC_EXPORT TileManager : public RasterizerClient, scoped_refptr<ImageDecodeTask> CreateImageDecodeTask(Tile* tile, SkPixelRef* pixel_ref); scoped_refptr<RasterTask> CreateRasterTask(Tile* tile); - scoped_ptr<base::Value> GetMemoryRequirementsAsValue() const; void UpdatePrioritizedTileSetIfNeeded(); bool IsReadyToActivate() const; @@ -309,9 +303,6 @@ class CC_EXPORT TileManager : public RasterizerClient, bool all_tiles_that_need_to_be_rasterized_have_memory_; bool all_tiles_required_for_activation_have_memory_; - size_t memory_required_bytes_; - size_t memory_nice_to_have_bytes_; - size_t bytes_releasable_; size_t resources_releasable_; diff --git a/cc/resources/tile_manager_unittest.cc b/cc/resources/tile_manager_unittest.cc index 4beae8f..f894c4f 100644 --- a/cc/resources/tile_manager_unittest.cc +++ b/cc/resources/tile_manager_unittest.cc @@ -418,51 +418,6 @@ TEST_P(TileManagerTest, TotalOOMMemoryToNewContent) { EXPECT_EQ(10, AssignedMemoryCount(pending_tree_tiles)); } -TEST_P(TileManagerTest, RespectMemoryLimit) { - if (UsingResourceLimit()) - return; - - Initialize(5, ALLOW_ANYTHING, SMOOTHNESS_TAKES_PRIORITY); - - // We use double the tiles since the hard-limit is double. - TileVector large_tiles = - CreateTiles(10, TilePriorityForNowBin(), TilePriority()); - - size_t memory_required_bytes; - size_t memory_nice_to_have_bytes; - size_t memory_allocated_bytes; - size_t memory_used_bytes; - - tile_manager()->AssignMemoryToTiles(global_state_); - tile_manager()->GetMemoryStats(&memory_required_bytes, - &memory_nice_to_have_bytes, - &memory_allocated_bytes, - &memory_used_bytes); - // Allocated bytes should never be more than the memory limit. - EXPECT_LE(memory_allocated_bytes, global_state_.hard_memory_limit_in_bytes); - - // Finish raster of large tiles. - tile_manager()->UpdateVisibleTiles(); - - // Remove all large tiles. This will leave the memory currently - // used by these tiles as unused when AssignMemoryToTiles() is called. - large_tiles.clear(); - - // Create a new set of tiles using a different size. These tiles - // can use the memory currently assigned to the large tiles but - // they can't use the same resources as the size doesn't match. - TileVector small_tiles = CreateTilesWithSize( - 10, TilePriorityForNowBin(), TilePriority(), gfx::Size(128, 128)); - - tile_manager()->AssignMemoryToTiles(global_state_); - tile_manager()->GetMemoryStats(&memory_required_bytes, - &memory_nice_to_have_bytes, - &memory_allocated_bytes, - &memory_used_bytes); - // Allocated bytes should never be more than the memory limit. - EXPECT_LE(memory_allocated_bytes, global_state_.hard_memory_limit_in_bytes); -} - // If true, the max tile limit should be applied as bytes; if false, // as num_resources_limit. INSTANTIATE_TEST_CASE_P(TileManagerTests, diff --git a/cc/test/fake_layer_tree_host_impl_client.h b/cc/test/fake_layer_tree_host_impl_client.h index 2f33b7a..1499047 100644 --- a/cc/test/fake_layer_tree_host_impl_client.h +++ b/cc/test/fake_layer_tree_host_impl_client.h @@ -36,7 +36,6 @@ class FakeLayerTreeHostImplClient : public LayerTreeHostImplClient { 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/test/test_context_support.cc b/cc/test/test_context_support.cc index 9c34d68..d5bfcd3 100644 --- a/cc/test/test_context_support.cc +++ b/cc/test/test_context_support.cc @@ -40,9 +40,6 @@ void TestContextSupport::SetSurfaceVisible(bool visible) { } } -void TestContextSupport::SendManagedMemoryStats( - const gpu::ManagedMemoryStats& stats) {} - void TestContextSupport::CallAllSyncPointCallbacks() { for (size_t i = 0; i < sync_point_callbacks_.size(); ++i) { base::MessageLoop::current()->PostTask( diff --git a/cc/test/test_context_support.h b/cc/test/test_context_support.h index 7162b21..adacf06 100644 --- a/cc/test/test_context_support.h +++ b/cc/test/test_context_support.h @@ -23,8 +23,6 @@ class TestContextSupport : public gpu::ContextSupport { 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 Swap() OVERRIDE; virtual void PartialSwapBuffers(const gfx::Rect& sub_buffer) OVERRIDE; virtual void SetSwapBuffersCompleteCallback( 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( |