Per https://chromium-review.googlesource.com/#/c/680135/50/gpu/ipc/in_process_command_buffer.cc@993 it causes problems with movable-only things. Tasks posted in QueueTask are only executed once
FYI, https://docs.google.com/document/d/1puS9pklOsPyk2CCRaCW3ZlEr8z30ruazAIJXHFHdB1s/edit# has detailed explanations about this conversion, including using base::AdaptCallbackForRepeating as a stopgap to wrap a OnceClosure.
This was blocking a different refactoring that I was doing (presubmit fails). Patch is over here: https://chromium-review.googlesource.com/c/chromium/src/+/919245
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/bd345c1f0d8e51f91ddfd8b3f20d7011ac79d41c commit bd345c1f0d8e51f91ddfd8b3f20d7011ac79d41c Author: Jonathan Backer <backer@chromium.org> Date: Wed Feb 14 21:44:23 2018 Switch GpuControl to OnceClosure Had to make GpuTask take both OnceClosure and RepeatingClosure so that FlushOnGpuThread and be descheduled and then called again once it is rescheduled. AFAICT, the other queued callbacks are called once. Bug: 789349 Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel Change-Id: Iaa89c4546436df2e0f5046d8330dbe40d349a93e Reviewed-on: https://chromium-review.googlesource.com/919245 Reviewed-by: Bo <boliu@chromium.org> Reviewed-by: Antoine Labour <piman@chromium.org> Commit-Queue: Jonathan Backer <backer@chromium.org> Cr-Commit-Position: refs/heads/master@{#536827} [modify] https://crrev.com/bd345c1f0d8e51f91ddfd8b3f20d7011ac79d41c/android_webview/browser/deferred_gpu_command_service.cc [modify] https://crrev.com/bd345c1f0d8e51f91ddfd8b3f20d7011ac79d41c/android_webview/browser/deferred_gpu_command_service.h [modify] https://crrev.com/bd345c1f0d8e51f91ddfd8b3f20d7011ac79d41c/gpu/command_buffer/client/client_test_helper.h [modify] https://crrev.com/bd345c1f0d8e51f91ddfd8b3f20d7011ac79d41c/gpu/command_buffer/client/gles2_implementation_unittest.cc [modify] https://crrev.com/bd345c1f0d8e51f91ddfd8b3f20d7011ac79d41c/gpu/command_buffer/client/gpu_control.h [modify] https://crrev.com/bd345c1f0d8e51f91ddfd8b3f20d7011ac79d41c/gpu/command_buffer/service/command_buffer_direct.cc [modify] https://crrev.com/bd345c1f0d8e51f91ddfd8b3f20d7011ac79d41c/gpu/command_buffer/service/command_buffer_direct.h [modify] https://crrev.com/bd345c1f0d8e51f91ddfd8b3f20d7011ac79d41c/gpu/command_buffer/tests/decoder_perftest.cc [modify] https://crrev.com/bd345c1f0d8e51f91ddfd8b3f20d7011ac79d41c/gpu/command_buffer/tests/gl_manager.cc [modify] https://crrev.com/bd345c1f0d8e51f91ddfd8b3f20d7011ac79d41c/gpu/command_buffer/tests/gl_manager.h [modify] https://crrev.com/bd345c1f0d8e51f91ddfd8b3f20d7011ac79d41c/gpu/gles2_conform_support/egl/context.cc [modify] https://crrev.com/bd345c1f0d8e51f91ddfd8b3f20d7011ac79d41c/gpu/gles2_conform_support/egl/context.h [modify] https://crrev.com/bd345c1f0d8e51f91ddfd8b3f20d7011ac79d41c/gpu/ipc/client/command_buffer_proxy_impl.cc [modify] https://crrev.com/bd345c1f0d8e51f91ddfd8b3f20d7011ac79d41c/gpu/ipc/client/command_buffer_proxy_impl.h [modify] https://crrev.com/bd345c1f0d8e51f91ddfd8b3f20d7011ac79d41c/gpu/ipc/gpu_in_process_thread_service.cc [modify] https://crrev.com/bd345c1f0d8e51f91ddfd8b3f20d7011ac79d41c/gpu/ipc/gpu_in_process_thread_service.h [modify] https://crrev.com/bd345c1f0d8e51f91ddfd8b3f20d7011ac79d41c/gpu/ipc/in_process_command_buffer.cc [modify] https://crrev.com/bd345c1f0d8e51f91ddfd8b3f20d7011ac79d41c/gpu/ipc/in_process_command_buffer.h [modify] https://crrev.com/bd345c1f0d8e51f91ddfd8b3f20d7011ac79d41c/ppapi/proxy/ppapi_command_buffer_proxy.cc [modify] https://crrev.com/bd345c1f0d8e51f91ddfd8b3f20d7011ac79d41c/ppapi/proxy/ppapi_command_buffer_proxy.h
Comment 1 by klausw@chromium.org
, Nov 29 2017