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

Issue 1746443002: Use Timer in TimedCanvasDrawListener (Closed)

Created:
4 years, 10 months ago by emircan
Modified:
4 years, 9 months ago
CC:
chromium-reviews, blink-reviews
Base URL:
https://chromium.googlesource.com/chromium/src.git@master
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

Use Timer in TimedCanvasDrawListener In the initial implementation, we used postDelayedTask() for repeating tasks in TimedCanvasDrawListener. However, this would introduce drift, jitter and a possible memory leak if tasks in flight prevent the class from being GC'ed. This CL uses UnthrottledTimer instead for the same purposes, which addresses drift and memory leak issues. BUG=589974 TEST=It is very difficult to write a non-flaky Layout Test for this. Therefore, we went with browser test here https://codereview.chromium.org/1692773002/. Committed: https://crrev.com/91f06f9ef435b692f4ed020c2cb619f7e2201848 Cr-Commit-Position: refs/heads/master@{#378616}

Patch Set 1 : #

Total comments: 15

Patch Set 2 : #

Unified diffs Side-by-side diffs Delta from patch set Stats (+9 lines, -9 lines) Patch
M third_party/WebKit/Source/modules/mediacapturefromelement/TimedCanvasDrawListener.h View 1 2 chunks +4 lines, -1 line 0 comments Download
M third_party/WebKit/Source/modules/mediacapturefromelement/TimedCanvasDrawListener.cpp View 1 3 chunks +5 lines, -8 lines 0 comments Download

Messages

Total messages: 21 (11 generated)
emircan
PTAL.
4 years, 10 months ago (2016-02-26 22:29:47 UTC) #5
philipj_slow
LGTM, but would like mcasas@ to always have the final word as the module owner. ...
4 years, 9 months ago (2016-02-29 03:51:26 UTC) #8
mcasas
LGTM w/ nits https://codereview.chromium.org/1746443002/diff/10001/third_party/WebKit/Source/modules/mediacapturefromelement/TimedCanvasDrawListener.cpp File third_party/WebKit/Source/modules/mediacapturefromelement/TimedCanvasDrawListener.cpp (right): https://codereview.chromium.org/1746443002/diff/10001/third_party/WebKit/Source/modules/mediacapturefromelement/TimedCanvasDrawListener.cpp#newcode15 third_party/WebKit/Source/modules/mediacapturefromelement/TimedCanvasDrawListener.cpp:15: , m_frameInterval(1 / frameRate) nit: perhaps ...
4 years, 9 months ago (2016-02-29 17:00:53 UTC) #9
philipj_slow
https://codereview.chromium.org/1746443002/diff/10001/third_party/WebKit/Source/modules/mediacapturefromelement/TimedCanvasDrawListener.cpp File third_party/WebKit/Source/modules/mediacapturefromelement/TimedCanvasDrawListener.cpp (right): https://codereview.chromium.org/1746443002/diff/10001/third_party/WebKit/Source/modules/mediacapturefromelement/TimedCanvasDrawListener.cpp#newcode15 third_party/WebKit/Source/modules/mediacapturefromelement/TimedCanvasDrawListener.cpp:15: , m_frameInterval(1 / frameRate) On 2016/02/29 17:00:53, mcasas wrote: ...
4 years, 9 months ago (2016-02-29 17:39:49 UTC) #10
mcasas
https://codereview.chromium.org/1746443002/diff/10001/third_party/WebKit/Source/modules/mediacapturefromelement/TimedCanvasDrawListener.cpp File third_party/WebKit/Source/modules/mediacapturefromelement/TimedCanvasDrawListener.cpp (right): https://codereview.chromium.org/1746443002/diff/10001/third_party/WebKit/Source/modules/mediacapturefromelement/TimedCanvasDrawListener.cpp#newcode15 third_party/WebKit/Source/modules/mediacapturefromelement/TimedCanvasDrawListener.cpp:15: , m_frameInterval(1 / frameRate) On 2016/02/29 17:39:49, philipj_UTC7 wrote: ...
4 years, 9 months ago (2016-02-29 17:43:17 UTC) #11
hiroshige
lgtm with a nit. https://codereview.chromium.org/1746443002/diff/10001/third_party/WebKit/Source/modules/mediacapturefromelement/TimedCanvasDrawListener.cpp File third_party/WebKit/Source/modules/mediacapturefromelement/TimedCanvasDrawListener.cpp (right): https://codereview.chromium.org/1746443002/diff/10001/third_party/WebKit/Source/modules/mediacapturefromelement/TimedCanvasDrawListener.cpp#newcode8 third_party/WebKit/Source/modules/mediacapturefromelement/TimedCanvasDrawListener.cpp:8: #include "public/platform/WebTaskRunner.h" nit: probably can ...
4 years, 9 months ago (2016-03-01 01:08:56 UTC) #12
emircan
https://codereview.chromium.org/1746443002/diff/10001/third_party/WebKit/Source/modules/mediacapturefromelement/TimedCanvasDrawListener.cpp File third_party/WebKit/Source/modules/mediacapturefromelement/TimedCanvasDrawListener.cpp (right): https://codereview.chromium.org/1746443002/diff/10001/third_party/WebKit/Source/modules/mediacapturefromelement/TimedCanvasDrawListener.cpp#newcode8 third_party/WebKit/Source/modules/mediacapturefromelement/TimedCanvasDrawListener.cpp:8: #include "public/platform/WebTaskRunner.h" On 2016/03/01 01:08:56, hiroshige wrote: > nit: ...
4 years, 9 months ago (2016-03-01 19:02:35 UTC) #14
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/patch-status/1746443002/30001 View timeline at https://chromium-cq-status.appspot.com/patch-timeline/1746443002/30001
4 years, 9 months ago (2016-03-01 22:22:35 UTC) #17
commit-bot: I haz the power
Committed patchset #2 (id:30001)
4 years, 9 months ago (2016-03-02 00:04:21 UTC) #19
commit-bot: I haz the power
4 years, 9 months ago (2016-03-02 00:05:42 UTC) #21
Message was sent while issue was closed.
Patchset 2 (id:??) landed as
https://crrev.com/91f06f9ef435b692f4ed020c2cb619f7e2201848
Cr-Commit-Position: refs/heads/master@{#378616}

Powered by Google App Engine
This is Rietveld 408576698