Chromium Code Reviews| Index: cc/heads_up_display_layer_impl.cc |
| diff --git a/cc/heads_up_display_layer_impl.cc b/cc/heads_up_display_layer_impl.cc |
| index 177f349558981a9a7d302b80ad99d555fb2c584b..07d8e2d8c324b680101dcd91964e87363e148e85 100644 |
| --- a/cc/heads_up_display_layer_impl.cc |
| +++ b/cc/heads_up_display_layer_impl.cc |
| @@ -178,7 +178,7 @@ int HeadsUpDisplayLayerImpl::drawFPSCounter(SkCanvas* canvas, FrameRateCounter* |
| const int fontHeight = m_fontAtlas.get() ? m_fontAtlas->fontHeight() : 0; |
| - const int graphWidth = fpsCounter->timeStampHistorySize() - 3; |
| + const int graphWidth = fpsCounter->bufferSize() - 3; |
| const int graphHeight = 40; |
| const int histogramWidth = 37; |
| @@ -208,9 +208,9 @@ int HeadsUpDisplayLayerImpl::drawFPSCounter(SkCanvas* canvas, FrameRateCounter* |
| void HeadsUpDisplayLayerImpl::drawFPSCounterText(SkCanvas* canvas, SkPaint& paint, FrameRateCounter* fpsCounter, SkRect bounds) |
| { |
| // Update FPS text - not every frame so text is readable |
| - if (base::TimeDelta(fpsCounter->timeStampOfRecentFrame(0) - textUpdateTime).InSecondsF() > 0.25) { |
| + if (base::TimeDelta(fpsCounter->readBuffer(0) - textUpdateTime).InSecondsF() > 0.25) { |
|
shawnsingh
2013/01/09 20:55:09
Personally, as I'm reading the code here, I would
|
| m_averageFPS = fpsCounter->getAverageFPS(); |
| - textUpdateTime = fpsCounter->timeStampOfRecentFrame(0); |
| + textUpdateTime = fpsCounter->readBuffer(0); |
| } |
| // Draw FPS text. |
| @@ -253,8 +253,8 @@ void HeadsUpDisplayLayerImpl::drawFPSCounterGraphAndHistogram(SkCanvas* canvas, |
| double histogram[histogramSize] = {0}; |
| double maxBucketValue = 0; |
| - for (int i = 1; i < fpsCounter->timeStampHistorySize() - 1; ++i) { |
| - base::TimeDelta delta = fpsCounter->timeStampOfRecentFrame(i + 1) - fpsCounter->timeStampOfRecentFrame(i); |
| + for (int i = 1; i < fpsCounter->bufferSize() - 1; ++i) { |
| + base::TimeDelta delta = fpsCounter->readBuffer(i + 1) - fpsCounter->readBuffer(i); |
| // Skip this particular instantaneous frame rate if it is not likely to have been valid. |
| if (!fpsCounter->isBadFrameInterval(delta)) { |