From 2d86b9236f5c502d9bf33aeb33e1fc865fb19914 Mon Sep 17 00:00:00 2001 From: "tfarina@chromium.org" Date: Sat, 13 Oct 2012 16:57:47 +0000 Subject: cc: Own CCTimer by scoped_ptr instead of using OwnPtr. BUG=154451 TEST=cc_unittests R=enne@chromium.org,jamesr@chromium.org Review URL: https://codereview.chromium.org/11118002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@161766 0039d316-1c4b-4281-b951-d872f2087c98 --- cc/delay_based_time_source.cc | 5 ++--- cc/delay_based_time_source.h | 3 ++- cc/texture_update_controller.cc | 16 ++++++++-------- cc/texture_update_controller.h | 4 ++-- cc/timer.h | 2 +- 5 files changed, 15 insertions(+), 15 deletions(-) (limited to 'cc') diff --git a/cc/delay_based_time_source.cc b/cc/delay_based_time_source.cc index 6e34a07..be0b10b 100644 --- a/cc/delay_based_time_source.cc +++ b/cc/delay_based_time_source.cc @@ -26,8 +26,7 @@ const double doubleTickThreshold = 0.25; const double intervalChangeThreshold = 0.25; const double phaseChangeThreshold = 0.25; -} - +} // namespace PassRefPtr CCDelayBasedTimeSource::create(base::TimeDelta interval, CCThread* thread) { @@ -229,4 +228,4 @@ void CCDelayBasedTimeSource::postNextTickTask(base::TimeTicks now) m_currentParameters = m_nextParameters; } -} +} // namespace cc diff --git a/cc/delay_based_time_source.h b/cc/delay_based_time_source.h index bf183f7..c82963d 100644 --- a/cc/delay_based_time_source.h +++ b/cc/delay_based_time_source.h @@ -75,5 +75,6 @@ protected: CCTimer m_timer; }; -} +} // namespace cc + #endif // CCDelayBasedTimeSource_h diff --git a/cc/texture_update_controller.cc b/cc/texture_update_controller.cc index 59ac548..f255c1b 100644 --- a/cc/texture_update_controller.cc +++ b/cc/texture_update_controller.cc @@ -16,21 +16,21 @@ namespace { // Number of partial updates we allow. -static const size_t partialTextureUpdatesMax = 12; +const size_t partialTextureUpdatesMax = 12; // Measured in seconds. -static const double textureUpdateTickRate = 0.004; +const double textureUpdateTickRate = 0.004; // Measured in seconds. -static const double uploaderBusyTickRate = 0.001; +const double uploaderBusyTickRate = 0.001; // Flush interval when performing texture uploads. -static const int textureUploadFlushPeriod = 4; +const int textureUploadFlushPeriod = 4; // Number of blocking update intervals to allow. -static const size_t maxBlockingUpdateIntervals = 4; +const size_t maxBlockingUpdateIntervals = 4; -} // anonymous namespace +} // namespace namespace cc { @@ -48,7 +48,7 @@ size_t CCTextureUpdateController::maxFullUpdatesPerTick(TextureUploader* uploade CCTextureUpdateController::CCTextureUpdateController(CCTextureUpdateControllerClient* client, CCThread* thread, PassOwnPtr queue, CCResourceProvider* resourceProvider, TextureUploader* uploader) : m_client(client) - , m_timer(adoptPtr(new CCTimer(thread, this))) + , m_timer(new CCTimer(thread, this)) , m_queue(queue) , m_resourceProvider(resourceProvider) , m_uploader(uploader) @@ -194,4 +194,4 @@ void CCTextureUpdateController::updateMoreTexturesNow() m_resourceProvider->shallowFlushIfSupported(); } -} +} // namespace cc diff --git a/cc/texture_update_controller.h b/cc/texture_update_controller.h index 74bb8ca..3eb629f 100644 --- a/cc/texture_update_controller.h +++ b/cc/texture_update_controller.h @@ -59,7 +59,7 @@ protected: void updateMoreTexturesNow(); CCTextureUpdateControllerClient* m_client; - OwnPtr m_timer; + scoped_ptr m_timer; OwnPtr m_queue; bool m_contentsTexturesPurged; CCResourceProvider* m_resourceProvider; @@ -72,6 +72,6 @@ private: DISALLOW_COPY_AND_ASSIGN(CCTextureUpdateController); }; -} +} // namespace cc #endif // CCTextureUpdateController_h diff --git a/cc/timer.h b/cc/timer.h index 9424aef..58d50dd 100644 --- a/cc/timer.h +++ b/cc/timer.h @@ -36,6 +36,6 @@ private: CCTimerTask* m_task; // weak pointer }; -} // namespace cc +} // namespace cc #endif -- cgit v1.1