diff options
author | dcheng <dcheng@chromium.org> | 2014-08-28 11:56:33 -0700 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2014-08-28 18:58:26 +0000 |
commit | fba633145b886957109efd5c0d745c4af45d4d59 (patch) | |
tree | 91bb64400fd740ca85573b72bccc83deec8abdf3 | |
parent | 941dbec971267977fa9dbb92bf72af3b4b772ff2 (diff) | |
download | chromium_src-fba633145b886957109efd5c0d745c4af45d4d59.zip chromium_src-fba633145b886957109efd5c0d745c4af45d4d59.tar.gz chromium_src-fba633145b886957109efd5c0d745c4af45d4d59.tar.bz2 |
Manual fixups in compositor code scoped_refptr operator T* removal.
BUG=110610
Review URL: https://codereview.chromium.org/514123002
Cr-Commit-Position: refs/heads/master@{#292432}
-rw-r--r-- | cc/base/unique_notifier.h | 1 | ||||
-rw-r--r-- | cc/base/unique_notifier_unittest.cc | 2 | ||||
-rw-r--r-- | cc/output/delegating_renderer.cc | 3 | ||||
-rw-r--r-- | cc/output/output_surface_unittest.cc | 2 | ||||
-rw-r--r-- | cc/resources/tile_manager.cc | 2 | ||||
-rw-r--r-- | cc/resources/tile_manager.h | 2 | ||||
-rw-r--r-- | cc/trees/layer_tree_host_impl_unittest.cc | 2 | ||||
-rw-r--r-- | cc/trees/layer_tree_host_unittest_no_message_loop.cc | 4 | ||||
-rw-r--r-- | ui/compositor/layer.cc | 10 |
9 files changed, 16 insertions, 12 deletions
diff --git a/cc/base/unique_notifier.h b/cc/base/unique_notifier.h index 4752f6f..89bfecc 100644 --- a/cc/base/unique_notifier.h +++ b/cc/base/unique_notifier.h @@ -32,6 +32,7 @@ class CC_EXPORT UniqueNotifier { private: void Notify(); + // TODO(dcheng): How come this doesn't need to hold a ref to the task runner? base::SequencedTaskRunner* task_runner_; base::Closure closure_; bool notification_pending_; diff --git a/cc/base/unique_notifier_unittest.cc b/cc/base/unique_notifier_unittest.cc index 8c7b0d1..ec1b83c 100644 --- a/cc/base/unique_notifier_unittest.cc +++ b/cc/base/unique_notifier_unittest.cc @@ -32,7 +32,7 @@ class UniqueNotifierTest : public testing::Test { TEST_F(UniqueNotifierTest, Schedule) { { UniqueNotifier notifier( - base::MessageLoopProxy::current(), + base::MessageLoopProxy::current().get(), base::Bind(&UniqueNotifierTest::Notify, base::Unretained(this))); EXPECT_EQ(0, NotificationCount()); diff --git a/cc/output/delegating_renderer.cc b/cc/output/delegating_renderer.cc index 8a9f461..143596b 100644 --- a/cc/output/delegating_renderer.cc +++ b/cc/output/delegating_renderer.cc @@ -113,8 +113,7 @@ void DelegatingRenderer::ReceiveSwapBuffersAck( } void DelegatingRenderer::DidChangeVisibility() { - scoped_refptr<ContextProvider> context_provider = - output_surface_->context_provider(); + ContextProvider* context_provider = output_surface_->context_provider(); if (!visible()) { TRACE_EVENT0("cc", "DelegatingRenderer::SetVisible dropping resources"); resource_provider_->ReleaseCachedData(); diff --git a/cc/output/output_surface_unittest.cc b/cc/output/output_surface_unittest.cc index 104d423..299baba 100644 --- a/cc/output/output_surface_unittest.cc +++ b/cc/output/output_surface_unittest.cc @@ -153,7 +153,7 @@ TEST_F(OutputSurfaceTestInitializeNewContext3d, Success) { EXPECT_TRUE(output_surface_.InitializeNewContext3d(context_provider_)); EXPECT_TRUE(client_.deferred_initialize_called()); - EXPECT_EQ(context_provider_, output_surface_.context_provider()); + EXPECT_EQ(context_provider_.get(), output_surface_.context_provider()); EXPECT_FALSE(client_.did_lose_output_surface_called()); context_provider_->ContextGL()->LoseContextCHROMIUM( diff --git a/cc/resources/tile_manager.cc b/cc/resources/tile_manager.cc index f3d302b..6abdc46 100644 --- a/cc/resources/tile_manager.cc +++ b/cc/resources/tile_manager.cc @@ -362,7 +362,7 @@ scoped_ptr<TileManager> TileManager::Create( TileManager::TileManager( TileManagerClient* client, - base::SequencedTaskRunner* task_runner, + const scoped_refptr<base::SequencedTaskRunner>& task_runner, ResourcePool* resource_pool, Rasterizer* rasterizer, RenderingStatsInstrumentation* rendering_stats_instrumentation) diff --git a/cc/resources/tile_manager.h b/cc/resources/tile_manager.h index df9325e..89a5ad3 100644 --- a/cc/resources/tile_manager.h +++ b/cc/resources/tile_manager.h @@ -159,7 +159,7 @@ class CC_EXPORT TileManager : public RasterizerClient, protected: TileManager(TileManagerClient* client, - base::SequencedTaskRunner* task_runner, + const scoped_refptr<base::SequencedTaskRunner>& task_runner, ResourcePool* resource_pool, Rasterizer* rasterizer, RenderingStatsInstrumentation* rendering_stats_instrumentation); diff --git a/cc/trees/layer_tree_host_impl_unittest.cc b/cc/trees/layer_tree_host_impl_unittest.cc index d88c2b9..e989e36 100644 --- a/cc/trees/layer_tree_host_impl_unittest.cc +++ b/cc/trees/layer_tree_host_impl_unittest.cc @@ -5659,7 +5659,7 @@ TEST_F(LayerTreeHostImplTestDeferredInitialize, Success) { did_update_renderer_capabilities_ = false; EXPECT_TRUE( output_surface_->InitializeAndSetContext3d(onscreen_context_provider_)); - EXPECT_EQ(onscreen_context_provider_, + EXPECT_EQ(onscreen_context_provider_.get(), host_impl_->output_surface()->context_provider()); EXPECT_TRUE(did_update_renderer_capabilities_); diff --git a/cc/trees/layer_tree_host_unittest_no_message_loop.cc b/cc/trees/layer_tree_host_unittest_no_message_loop.cc index 53a8c87..8027c13 100644 --- a/cc/trees/layer_tree_host_unittest_no_message_loop.cc +++ b/cc/trees/layer_tree_host_unittest_no_message_loop.cc @@ -84,9 +84,9 @@ class LayerTreeHostNoMessageLoopTest // base::DelegateSimpleThread::Delegate override. virtual void Run() OVERRIDE { - ASSERT_FALSE(base::MessageLoopProxy::current()); + ASSERT_FALSE(base::MessageLoopProxy::current().get()); RunTestWithoutMessageLoop(); - EXPECT_FALSE(base::MessageLoopProxy::current()); + EXPECT_FALSE(base::MessageLoopProxy::current().get()); } protected: diff --git a/ui/compositor/layer.cc b/ui/compositor/layer.cc index f3551f7..8e49ccb 100644 --- a/ui/compositor/layer.cc +++ b/ui/compositor/layer.cc @@ -659,10 +659,14 @@ void Layer::SendDamagedRects() { } void Layer::CompleteAllAnimations() { - std::vector<scoped_refptr<LayerAnimator> > animators; + typedef std::vector<scoped_refptr<LayerAnimator> > LayerAnimatorVector; + LayerAnimatorVector animators; CollectAnimators(&animators); - std::for_each(animators.begin(), animators.end(), - std::mem_fun(&LayerAnimator::StopAnimating)); + for (LayerAnimatorVector::const_iterator it = animators.begin(); + it != animators.end(); + ++it) { + (*it)->StopAnimating(); + } } void Layer::SuppressPaint() { |