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

Issue 384513003: Remove RequestAnimationFrame from mojo, add delayed tasks to RunLoop (Closed)

Created:
6 years, 5 months ago by jamesr
Modified:
6 years, 5 months ago
CC:
chromium-reviews, qsr+mojo_chromium.org, viettrungluu+watch_chromium.org, yzshen+watch_chromium.org, abarth-chromium, Aaron Boodman, darin (slow to review), ben+mojo_chromium.org, cc-bugs_chromium.org
Project:
chromium
Visibility:
Public.

Description

Remove RequestAnimationFrame from mojo, add delayed tasks to RunLoop Having a RequestAnimationFrame API on CommandBuffer makes no sense - the context itself has nothing to do with scheduling and may not even be swapping onscreen. The spinning cube app was using this API as a way to get delayed tasks without depending on base - basically posttask-via-mojo-message. This adds basic delayed task support to the public RunLoop and uses that instead. This only supports posting tasks from the thread that owns the runloop. We can expand as needed. The mojo RunLoop attempts to interleave delayed tasks with handle handlers, like base's MessageLoop. Committed: https://src.chromium.org/viewvc/chrome?view=rev&revision=285560

Patch Set 1 #

Patch Set 2 : #

Patch Set 3 : rebase #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+146 lines, -145 lines) Patch
M mojo/apps/js/bindings/gl/context.cc View 1 chunk +0 lines, -1 line 0 comments Download
M mojo/cc/context_provider_mojo.cc View 1 1 chunk +0 lines, -1 line 0 comments Download
M mojo/examples/pepper_container_app/graphics_3d_resource.h View 1 chunk +0 lines, -1 line 0 comments Download
M mojo/examples/pepper_container_app/graphics_3d_resource.cc View 2 chunks +0 lines, -5 lines 0 comments Download
M mojo/examples/sample_app/gles2_client_impl.h View 1 2 chunks +3 lines, -6 lines 0 comments Download
M mojo/examples/sample_app/gles2_client_impl.cc View 1 7 chunks +36 lines, -34 lines 1 comment Download
M mojo/gles2/command_buffer_client_impl.h View 1 2 chunks +0 lines, -5 lines 0 comments Download
M mojo/gles2/command_buffer_client_impl.cc View 1 3 chunks +0 lines, -13 lines 0 comments Download
M mojo/gles2/gles2_context.h View 2 chunks +0 lines, -5 lines 0 comments Download
M mojo/gles2/gles2_context.cc View 2 chunks +0 lines, -12 lines 0 comments Download
M mojo/gles2/gles2_support_impl.h View 1 chunk +0 lines, -3 lines 0 comments Download
M mojo/gles2/gles2_support_impl.cc View 2 chunks +0 lines, -10 lines 0 comments Download
M mojo/public/c/gles2/gles2.h View 1 chunk +0 lines, -5 lines 0 comments Download
M mojo/public/c/gles2/gles2_types.h View 1 chunk +0 lines, -1 line 0 comments Download
M mojo/public/cpp/bindings/callback.h View 1 1 chunk +2 lines, -0 lines 0 comments Download
M mojo/public/cpp/bindings/callback.h.pump View 1 1 chunk +2 lines, -0 lines 0 comments Download
A mojo/public/cpp/utility/DEPS View 1 1 chunk +3 lines, -0 lines 0 comments Download
M mojo/public/cpp/utility/lib/run_loop.cc View 1 5 chunks +50 lines, -4 lines 0 comments Download
M mojo/public/cpp/utility/run_loop.h View 1 4 chunks +27 lines, -0 lines 0 comments Download
M mojo/public/cpp/utility/tests/run_loop_unittest.cc View 1 1 chunk +23 lines, -0 lines 0 comments Download
M mojo/public/gles2/gles2_private.h View 1 chunk +0 lines, -3 lines 0 comments Download
M mojo/public/gles2/gles2_private.cc View 2 chunks +0 lines, -12 lines 0 comments Download
M mojo/services/gles2/command_buffer.mojom View 1 chunk +0 lines, -7 lines 0 comments Download
M mojo/services/gles2/command_buffer_impl.h View 1 3 chunks +0 lines, -6 lines 0 comments Download
M mojo/services/gles2/command_buffer_impl.cc View 1 1 chunk +0 lines, -11 lines 0 comments Download

Messages

Total messages: 11 (0 generated)
jamesr
6 years, 5 months ago (2014-07-24 23:43:14 UTC) #1
piman
Thank you. LGTM!
6 years, 5 months ago (2014-07-25 01:09:57 UTC) #2
darin (slow to review)
LGTM
6 years, 5 months ago (2014-07-25 02:46:06 UTC) #3
darin (slow to review)
https://codereview.chromium.org/384513003/diff/40001/mojo/examples/sample_app/gles2_client_impl.cc File mojo/examples/sample_app/gles2_client_impl.cc (right): https://codereview.chromium.org/384513003/diff/40001/mojo/examples/sample_app/gles2_client_impl.cc#newcode117 mojo/examples/sample_app/gles2_client_impl.cc:117: mojo::RunLoop::current()->PostDelayedTask(mojo::Closure(DrawRunnable(this)), actually, what ensures that |this| remains valid when ...
6 years, 5 months ago (2014-07-25 02:47:50 UTC) #4
jamesr
The CQ bit was checked by jamesr@chromium.org
6 years, 5 months ago (2014-07-25 02:48:12 UTC) #5
jamesr
The CQ bit was unchecked by jamesr@chromium.org
6 years, 5 months ago (2014-07-25 02:48:14 UTC) #6
jamesr
On 2014/07/25 02:47:50, darin wrote: > https://codereview.chromium.org/384513003/diff/40001/mojo/examples/sample_app/gles2_client_impl.cc > File mojo/examples/sample_app/gles2_client_impl.cc (right): > > https://codereview.chromium.org/384513003/diff/40001/mojo/examples/sample_app/gles2_client_impl.cc#newcode117 > ...
6 years, 5 months ago (2014-07-25 02:51:31 UTC) #7
jamesr
The CQ bit was checked by jamesr@chromium.org
6 years, 5 months ago (2014-07-25 02:52:20 UTC) #8
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-status.appspot.com/cq/jamesr@chromium.org/384513003/40001
6 years, 5 months ago (2014-07-25 02:53:14 UTC) #9
commit-bot: I haz the power
FYI, CQ is re-trying this CL (attempt #1). The failing builders are: win_chromium_x64_rel on tryserver.chromium ...
6 years, 5 months ago (2014-07-25 09:24:34 UTC) #10
commit-bot: I haz the power
6 years, 5 months ago (2014-07-25 10:52:27 UTC) #11
Message was sent while issue was closed.
Change committed as 285560

Powered by Google App Engine
This is Rietveld 408576698