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

Issue 2387333003: cc: Set sync token on resource even if context is lost. (Closed)

Created:
4 years, 2 months ago by sunnyps
Modified:
4 years, 2 months ago
Reviewers:
danakj, brianderson
CC:
chromium-reviews, cc-bugs_chromium.org
Target Ref:
refs/pending/heads/master
Project:
chromium
Visibility:
Public.

Description

cc: Set sync token on resource even if context is lost. If the gpu process crashes the worker context will return null sync tokens which the resource write lock ignores. It's possible for the compositor context to not detect the gpu process crash until much later. Until then the scheduler might initiate a draw which will crash when DCHECKing that resources being sent have sync tokens. This CL also enables sync tokens for LayerTreeTests by default and includes some minor cleanup in LayerTreeHostTestContext. R=brianderson@chromium.org,danakj@chromium.org BUG=645736 CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_precise_blink_rel Committed: https://crrev.com/e9fd952d2b376783ae04864e5fcdec647cf2942e Cr-Commit-Position: refs/heads/master@{#423720}

Patch Set 1 #

Total comments: 2

Patch Set 2 : test #

Total comments: 17

Patch Set 3 : danakj's review #

Total comments: 4
Unified diffs Side-by-side diffs Delta from patch set Stats (+91 lines, -62 lines) Patch
M cc/resources/resource_provider.h View 1 2 2 chunks +2 lines, -0 lines 0 comments Download
M cc/resources/resource_provider.cc View 1 2 2 chunks +5 lines, -1 line 0 comments Download
M cc/test/test_compositor_frame_sink.h View 1 2 1 chunk +2 lines, -0 lines 0 comments Download
M cc/test/test_compositor_frame_sink.cc View 1 2 4 chunks +9 lines, -9 lines 0 comments Download
M cc/test/test_web_graphics_context_3d.cc View 1 1 chunk +4 lines, -0 lines 0 comments Download
M cc/trees/layer_tree_host_unittest_context.cc View 1 2 8 chunks +69 lines, -52 lines 4 comments Download

Dependent Patchsets:

Messages

Total messages: 34 (20 generated)
sunnyps
PTAL
4 years, 2 months ago (2016-10-05 00:36:40 UTC) #3
danakj
Can we unit test? https://codereview.chromium.org/2387333003/diff/1/cc/resources/resource_provider.cc File cc/resources/resource_provider.cc (right): https://codereview.chromium.org/2387333003/diff/1/cc/resources/resource_provider.cc#newcode1127 cc/resources/resource_provider.cc:1127: if (set_sync_token_) { Explain this ...
4 years, 2 months ago (2016-10-05 01:44:05 UTC) #10
sunnyps
Added a test which required enabling sync tokens in tests (see thread on graphics-dev). Also ...
4 years, 2 months ago (2016-10-06 02:45:06 UTC) #12
danakj
https://codereview.chromium.org/2387333003/diff/20001/cc/resources/resource_provider.cc File cc/resources/resource_provider.cc (right): https://codereview.chromium.org/2387333003/diff/20001/cc/resources/resource_provider.cc#newcode1104 cc/resources/resource_provider.cc:1104: set_sync_token_(false), nit: has_sync_token_ https://codereview.chromium.org/2387333003/diff/20001/cc/resources/resource_provider.cc#newcode1127 cc/resources/resource_provider.cc:1127: if (set_sync_token_) Can you ...
4 years, 2 months ago (2016-10-06 20:50:35 UTC) #15
sunnyps
Addressed comments, PTAL. https://codereview.chromium.org/2387333003/diff/20001/cc/resources/resource_provider.cc File cc/resources/resource_provider.cc (right): https://codereview.chromium.org/2387333003/diff/20001/cc/resources/resource_provider.cc#newcode1104 cc/resources/resource_provider.cc:1104: set_sync_token_(false), On 2016/10/06 20:50:35, danakj wrote: ...
4 years, 2 months ago (2016-10-06 21:31:53 UTC) #19
danakj
The code LGTM, but one q. https://codereview.chromium.org/2387333003/diff/40001/cc/trees/layer_tree_host_unittest_context.cc File cc/trees/layer_tree_host_unittest_context.cc (right): https://codereview.chromium.org/2387333003/diff/40001/cc/trees/layer_tree_host_unittest_context.cc#newcode1618 cc/trees/layer_tree_host_unittest_context.cc:1618: // state e.g. ...
4 years, 2 months ago (2016-10-06 22:09:04 UTC) #21
sunnyps
Thanks! https://codereview.chromium.org/2387333003/diff/40001/cc/trees/layer_tree_host_unittest_context.cc File cc/trees/layer_tree_host_unittest_context.cc (right): https://codereview.chromium.org/2387333003/diff/40001/cc/trees/layer_tree_host_unittest_context.cc#newcode1618 cc/trees/layer_tree_host_unittest_context.cc:1618: // state e.g. null sync tokens but that ...
4 years, 2 months ago (2016-10-06 22:29:21 UTC) #22
danakj
https://codereview.chromium.org/2387333003/diff/40001/cc/trees/layer_tree_host_unittest_context.cc File cc/trees/layer_tree_host_unittest_context.cc (right): https://codereview.chromium.org/2387333003/diff/40001/cc/trees/layer_tree_host_unittest_context.cc#newcode1618 cc/trees/layer_tree_host_unittest_context.cc:1618: // state e.g. null sync tokens but that shouldn't ...
4 years, 2 months ago (2016-10-06 22:47:42 UTC) #25
sunnyps
On 2016/10/06 22:47:42, danakj wrote: > https://codereview.chromium.org/2387333003/diff/40001/cc/trees/layer_tree_host_unittest_context.cc > File cc/trees/layer_tree_host_unittest_context.cc (right): > > https://codereview.chromium.org/2387333003/diff/40001/cc/trees/layer_tree_host_unittest_context.cc#newcode1618 > ...
4 years, 2 months ago (2016-10-06 22:54:52 UTC) #26
commit-bot: I haz the power
CQ is trying da patch. Follow status at https://chromium-cq-status.appspot.com/v2/patch-status/codereview.chromium.org/2387333003/40001
4 years, 2 months ago (2016-10-06 22:55:48 UTC) #28
danakj
https://codereview.chromium.org/2387333003/diff/40001/cc/trees/layer_tree_host_unittest_context.cc File cc/trees/layer_tree_host_unittest_context.cc (right): https://codereview.chromium.org/2387333003/diff/40001/cc/trees/layer_tree_host_unittest_context.cc#newcode100 cc/trees/layer_tree_host_unittest_context.cc:100: TestContextProvider::Create(std::move(compositor_context3d)), Can you explicitly point out that the context ...
4 years, 2 months ago (2016-10-06 22:59:59 UTC) #29
danakj
On Thu, Oct 6, 2016 at 3:54 PM, <sunnyps@chromium.org> wrote: > On 2016/10/06 22:47:42, danakj ...
4 years, 2 months ago (2016-10-06 23:00:23 UTC) #30
commit-bot: I haz the power
Committed patchset #3 (id:40001)
4 years, 2 months ago (2016-10-06 23:03:49 UTC) #32
commit-bot: I haz the power
4 years, 2 months ago (2016-10-06 23:05:03 UTC) #34
Message was sent while issue was closed.
Patchset 3 (id:??) landed as
https://crrev.com/e9fd952d2b376783ae04864e5fcdec647cf2942e
Cr-Commit-Position: refs/heads/master@{#423720}

Powered by Google App Engine
This is Rietveld 408576698