summaryrefslogtreecommitdiffstats
path: root/cc
diff options
context:
space:
mode:
authortfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-13 16:57:47 +0000
committertfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2012-10-13 16:57:47 +0000
commit2d86b9236f5c502d9bf33aeb33e1fc865fb19914 (patch)
tree8571637a2d38f45f7a1ce9c9ac69df42bbc04f1c /cc
parente36df000ad8432ab5f15cdd219fa7921dcbf9478 (diff)
downloadchromium_src-2d86b9236f5c502d9bf33aeb33e1fc865fb19914.zip
chromium_src-2d86b9236f5c502d9bf33aeb33e1fc865fb19914.tar.gz
chromium_src-2d86b9236f5c502d9bf33aeb33e1fc865fb19914.tar.bz2
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
Diffstat (limited to 'cc')
-rw-r--r--cc/delay_based_time_source.cc5
-rw-r--r--cc/delay_based_time_source.h3
-rw-r--r--cc/texture_update_controller.cc16
-rw-r--r--cc/texture_update_controller.h4
-rw-r--r--cc/timer.h2
5 files changed, 15 insertions, 15 deletions
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> 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<CCTextureUpdateQueue> 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<CCTimer> m_timer;
+ scoped_ptr<CCTimer> m_timer;
OwnPtr<CCTextureUpdateQueue> 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