Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(928)

Issue 11817011: cc: add RingBuffer class for timestamp storing in FrameRateCounter (Closed)

Created:
7 years, 11 months ago by egraether
Modified:
7 years, 11 months ago
CC:
chromium-reviews, cc-bugs_chromium.org
Base URL:
http://git.chromium.org/chromium/src.git@master
Visibility:
Public.

Description

This change makes the timestamp saving functionality of the FrameRateCounter reuseable by abstracting it to a new RingBuffer class. BUG= Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=177083

Patch Set 1 #

Total comments: 7

Patch Set 2 : switched to FrameRateCounter has a RingBuffer #

Total comments: 9

Patch Set 3 : added DCHECKS for wrong buffer reads and divide by 0 #

Total comments: 5

Patch Set 4 : size_t for buffer #

Patch Set 5 : Rebase to 176236 #

Patch Set 6 : removed size_t to fix tests #

Total comments: 1

Patch Set 7 : size_t for buffer size, index and loops #

Total comments: 1

Patch Set 8 : Rebase to 176679 #

Patch Set 9 : fixing scroll test #

Patch Set 10 : cleaner test fix #

Unified diffs Side-by-side diffs Delta from patch set Stats (+116 lines, -65 lines) Patch
M cc/cc.gyp View 1 2 3 4 5 1 chunk +1 line, -0 lines 0 comments Download
M cc/frame_rate_counter.h View 1 2 3 4 5 6 3 chunks +11 lines, -16 lines 0 comments Download
M cc/frame_rate_counter.cc View 1 2 3 4 5 6 7 8 9 4 chunks +44 lines, -43 lines 0 comments Download
M cc/heads_up_display_layer_impl.cc View 1 2 3 4 5 6 7 8 9 2 chunks +4 lines, -3 lines 0 comments Download
M cc/layer_tree_host_impl.cc View 1 2 3 4 5 6 7 2 chunks +1 line, -3 lines 0 comments Download
A cc/ring_buffer.h View 1 2 3 4 5 6 1 chunk +55 lines, -0 lines 0 comments Download

Messages

Total messages: 26 (0 generated)
egraether
I used the RingBuffer as base class, because it was easier to have access to ...
7 years, 11 months ago (2013-01-09 02:04:04 UTC) #1
shawnsingh
Looks great! Below I've added a few minor comments. The only major issue is that ...
7 years, 11 months ago (2013-01-09 20:55:08 UTC) #2
nduca
I'm pretty slamed, so have shawn do the final review if you can. I'm happy ...
7 years, 11 months ago (2013-01-09 21:28:37 UTC) #3
egraether
I switched to FrameRateCounter to having a RingBuffer and rewrote the parts that needed direct ...
7 years, 11 months ago (2013-01-10 02:32:09 UTC) #4
shawnsingh
LGTM !!! There's just a few edge cases that we should get right before landing. ...
7 years, 11 months ago (2013-01-10 21:13:01 UTC) #5
danakj
https://codereview.chromium.org/11817011/diff/6002/cc/ring_buffer.h File cc/ring_buffer.h (right): https://codereview.chromium.org/11817011/diff/6002/cc/ring_buffer.h#newcode26 cc/ring_buffer.h:26: bool IsFilledIndex(unsigned int n) const { On 2013/01/10 21:13:01, ...
7 years, 11 months ago (2013-01-10 23:31:40 UTC) #6
egraether
Resolved the nits. https://codereview.chromium.org/11817011/diff/9003/cc/frame_rate_counter.cc File cc/frame_rate_counter.cc (right): https://codereview.chromium.org/11817011/diff/9003/cc/frame_rate_counter.cc#newcode69 cc/frame_rate_counter.cc:69: DCHECK(delta.InSecondsF() > 0); checking divide by ...
7 years, 11 months ago (2013-01-10 23:38:29 UTC) #7
shawnsingh
On 2013/01/10 23:31:40, danakj wrote: > https://codereview.chromium.org/11817011/diff/6002/cc/ring_buffer.h > File cc/ring_buffer.h (right): > > https://codereview.chromium.org/11817011/diff/6002/cc/ring_buffer.h#newcode26 > ...
7 years, 11 months ago (2013-01-10 23:43:09 UTC) #8
shawnsingh
oops... clicked send too early by mistake. http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml#Integer_Types
7 years, 11 months ago (2013-01-10 23:43:37 UTC) #9
danakj
On Thu, Jan 10, 2013 at 6:43 PM, <shawnsingh@chromium.org> wrote: > oops... clicked send too ...
7 years, 11 months ago (2013-01-11 00:13:39 UTC) #10
shawnsingh
egraether@, based on the chromium addendum that danakj pointed out, let's use size_t where appropriate ...
7 years, 11 months ago (2013-01-11 00:32:46 UTC) #11
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/egraether@chromium.org/11817011/16001
7 years, 11 months ago (2013-01-11 03:04:37 UTC) #12
commit-bot: I haz the power
Sorry for I got bad news for ya. Compile failed with a clobber build on ...
7 years, 11 months ago (2013-01-11 03:53:11 UTC) #13
egraether
https://codereview.chromium.org/11817011/diff/25003/cc/ring_buffer.h File cc/ring_buffer.h (right): https://codereview.chromium.org/11817011/diff/25003/cc/ring_buffer.h#newcode12 cc/ring_buffer.h:12: template<typename T, int size> I removed the size_t again, ...
7 years, 11 months ago (2013-01-11 18:08:22 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/egraether@chromium.org/11817011/25003
7 years, 11 months ago (2013-01-11 18:08:51 UTC) #15
jamesr1
Don't use int for the side of a buffer. On Jan 11, 2013 10:08 AM, ...
7 years, 11 months ago (2013-01-11 19:20:26 UTC) #16
egraether
On 2013/01/11 19:20:26, jamesr1 wrote: > Don't use int for the size of a buffer. ...
7 years, 11 months ago (2013-01-11 19:29:10 UTC) #17
shawnsingh
Not your fault =) Personally I would prefer we get this correct up front, so ...
7 years, 11 months ago (2013-01-11 19:32:37 UTC) #18
egraether
On 2013/01/11 19:32:37, shawnsingh wrote: > Not your fault =) > > Personally I would ...
7 years, 11 months ago (2013-01-11 19:48:41 UTC) #19
danakj
On Fri, Jan 11, 2013 at 2:48 PM, <egraether@chromium.org> wrote: > On 2013/01/11 19:32:37, shawnsingh ...
7 years, 11 months ago (2013-01-11 19:55:48 UTC) #20
nduca
Do the right thing. Throughout.
7 years, 11 months ago (2013-01-11 23:23:34 UTC) #21
egraether
https://chromiumcodereview.appspot.com/11817011/diff/17008/cc/ring_buffer.h File cc/ring_buffer.h (right): https://chromiumcodereview.appspot.com/11817011/diff/17008/cc/ring_buffer.h#newcode12 cc/ring_buffer.h:12: template<typename T, size_t size> Used size_t for buffer size, ...
7 years, 11 months ago (2013-01-11 23:28:06 UTC) #22
shawnsingh
LGTM again; looked primarily at the size_t changes.
7 years, 11 months ago (2013-01-14 18:43:22 UTC) #23
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/egraether@chromium.org/11817011/41002
7 years, 11 months ago (2013-01-14 20:33:30 UTC) #24
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/egraether@chromium.org/11817011/47001
7 years, 11 months ago (2013-01-15 19:38:43 UTC) #25
commit-bot: I haz the power
7 years, 11 months ago (2013-01-16 04:06:19 UTC) #26
Message was sent while issue was closed.
Change committed as 177083

Powered by Google App Engine
This is Rietveld 408576698