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

Issue 381473004: Use TimeTicks instead of clock() in gpu::CommandBufferHelper (Closed)

Created:
6 years, 5 months ago by hamaji
Modified:
6 years, 5 months ago
Reviewers:
vmiura, jbauman, piman
CC:
chromium-reviews, piman+watch_chromium.org, hidehiko
Project:
chromium
Visibility:
Public.

Description

Use TimeTicks instead of clock() in gpu::CommandBufferHelper clock() returns a processor time, which does not change while a thread is sleeping. So, Flush() would be called less often than you expected. TimeTicks uses a monotonic timer so this would be a better choice than Time because TimeTicks is not affected by host's time settings. BUG=264856 TEST=trybots Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=282593

Patch Set 1 #

Total comments: 7

Patch Set 2 : address comments #

Unified diffs Side-by-side diffs Delta from patch set Stats (+10 lines, -7 lines) Patch
M gpu/command_buffer/client/cmd_buffer_helper.h View 1 3 chunks +4 lines, -3 lines 0 comments Download
M gpu/command_buffer/client/cmd_buffer_helper.cc View 1 4 chunks +6 lines, -4 lines 0 comments Download

Messages

Total messages: 10 (0 generated)
hamaji
I created a patch based on the email thread. What do you think? I'm guessing ...
6 years, 5 months ago (2014-07-09 06:03:15 UTC) #1
piman
https://codereview.chromium.org/381473004/diff/1/gpu/command_buffer/client/cmd_buffer_helper.h File gpu/command_buffer/client/cmd_buffer_helper.h (right): https://codereview.chromium.org/381473004/diff/1/gpu/command_buffer/client/cmd_buffer_helper.h#newcode328 gpu/command_buffer/client/cmd_buffer_helper.h:328: // Using primitive type instead of base::TimeTicks because this ...
6 years, 5 months ago (2014-07-09 20:13:47 UTC) #2
vmiura
https://codereview.chromium.org/381473004/diff/1/gpu/command_buffer/client/cmd_buffer_helper.cc File gpu/command_buffer/client/cmd_buffer_helper.cc (right): https://codereview.chromium.org/381473004/diff/1/gpu/command_buffer/client/cmd_buffer_helper.cc#newcode167 gpu/command_buffer/client/cmd_buffer_helper.cc:167: base::TimeDelta::FromSecondsD(kPeriodicFlushDelay)) { Could we change this to FromMicroseconds to ...
6 years, 5 months ago (2014-07-09 20:18:59 UTC) #3
hamaji
BTW, I checked how often Flush is triggered by adding LOG(ERROR) and run a GL ...
6 years, 5 months ago (2014-07-10 07:00:16 UTC) #4
jbauman
lgtm I only used clock() originally because time() didn't have enough resolution and base/ wasn't ...
6 years, 5 months ago (2014-07-10 22:12:46 UTC) #5
vmiura
lgtm https://codereview.chromium.org/381473004/diff/1/gpu/command_buffer/client/cmd_buffer_helper.cc File gpu/command_buffer/client/cmd_buffer_helper.cc (right): https://codereview.chromium.org/381473004/diff/1/gpu/command_buffer/client/cmd_buffer_helper.cc#newcode167 gpu/command_buffer/client/cmd_buffer_helper.cc:167: base::TimeDelta::FromSecondsD(kPeriodicFlushDelay)) { On 2014/07/10 07:00:16, hamaji wrote: > ...
6 years, 5 months ago (2014-07-10 22:21:25 UTC) #6
hamaji
The CQ bit was checked by hamaji@chromium.org
6 years, 5 months ago (2014-07-11 06:10:57 UTC) #7
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/hamaji@chromium.org/381473004/20001
6 years, 5 months ago (2014-07-11 06:12:02 UTC) #8
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_chromium_rel on tryserver.chromium ...
6 years, 5 months ago (2014-07-11 07:46:49 UTC) #9
commit-bot: I haz the power
6 years, 5 months ago (2014-07-11 09:27:19 UTC) #10
Message was sent while issue was closed.
Change committed as 282593

Powered by Google App Engine
This is Rietveld 408576698