Chromium Code Reviews

Issue 1348283004: Use MailboxManagerSync on android. (Closed)

Created:
5 years, 3 months ago by cdotstout
Modified:
5 years, 3 months ago
Reviewers:
jamesr, tonyg, iansf
CC:
mojo-reviews_chromium.org, qsr+mojo_chromium.org, yzshen+watch_chromium.org
Base URL:
https://github.com/domokit/mojo.git@master
Target Ref:
refs/heads/master
Project:
mojo
Visibility:
Public.

Description

Use MailboxManagerSync on android. Egl fences seem to be required for proper cross-context synchronization on android/qualcomm. Fixes flickering seen when using surfaces composition on various android devices (domokit/sky_engine#36). R=jamesr@chromium.org Committed: https://chromium.googlesource.com/external/mojo/+/63532259dbe96993cece84f7d86d98a313cccf71

Patch Set 1 #

Total comments: 2

Patch Set 2 : rebased #

Patch Set 3 : use factory to create appropriate mailbox manager #

Total comments: 4

Patch Set 4 : put policy decision into code with ifdef #

Patch Set 5 : add todo comment #

Unified diffs Side-by-side diffs Stats (+62 lines, -6 lines)
M services/gles2/BUILD.gn View 1 chunk +2 lines, -0 lines 0 comments
M services/gles2/command_buffer_driver.h View 1 chunk +1 line, -0 lines 0 comments
M services/gles2/command_buffer_driver.cc View 2 chunks +8 lines, -0 lines 0 comments
M services/gles2/command_buffer_impl.cc View 1 chunk +4 lines, -4 lines 0 comments
M services/gles2/gpu_state.h View 1 chunk +1 line, -1 line 0 comments
M services/gles2/gpu_state.cc View 1 chunk +3 lines, -1 line 0 comments
A services/gles2/mailbox_manager_factory.h View 1 chunk +19 lines, -0 lines 0 comments
A services/gles2/mailbox_manager_factory.cc View 1 chunk +24 lines, -0 lines 0 comments

Messages

Total messages: 14 (1 generated)
cdotstout
Inspired by the in_process_command_buffer implementation.
5 years, 3 months ago (2015-09-17 22:13:36 UTC) #2
tonyg
Nice!! I'm not a good reviewer for the patch, but: - I think you can ...
5 years, 3 months ago (2015-09-17 22:18:02 UTC) #3
jamesr
The failures on linux seem real: [0917/151152:FATAL:texture_definition.cc(258)] Check failed: fals https://codereview.chromium.org/1348283004/diff/1/services/gles2/gpu_state.cc File services/gles2/gpu_state.cc (right): https://codereview.chromium.org/1348283004/diff/1/services/gles2/gpu_state.cc#newcode18 ...
5 years, 3 months ago (2015-09-17 22:23:13 UTC) #4
cdotstout
https://codereview.chromium.org/1348283004/diff/1/services/gles2/gpu_state.cc File services/gles2/gpu_state.cc (right): https://codereview.chromium.org/1348283004/diff/1/services/gles2/gpu_state.cc#newcode18 services/gles2/gpu_state.cc:18: // mailbox_manager_(new gpu::gles2::MailboxManagerImpl) { On 2015/09/17 22:23:13, jamesr wrote: ...
5 years, 3 months ago (2015-09-17 22:31:09 UTC) #5
jamesr
An alternative would be to force virtual contexts on for either this driver or in ...
5 years, 3 months ago (2015-09-17 22:34:12 UTC) #6
jamesr
Try forcing the test in gpu/command_buffer/service/gles2_cmd_decoder.cc for workarounds().use_virtualized_gl_contexts to always evaluate true
5 years, 3 months ago (2015-09-17 22:37:17 UTC) #7
jamesr
Wait, that's the wrong place. I don't remember where we decide to use virtual or ...
5 years, 3 months ago (2015-09-17 22:41:15 UTC) #8
cdotstout
On 2015/09/17 22:41:15, jamesr wrote: > Wait, that's the wrong place. I don't remember where ...
5 years, 3 months ago (2015-09-18 00:12:33 UTC) #9
iansf
I'm glad that you found a solution that doesn't require any glFlush or glFinish calls! ...
5 years, 3 months ago (2015-09-18 00:18:40 UTC) #10
jamesr
I'm 100% fine with having fences between context switches. I'm just slightly worried that it ...
5 years, 3 months ago (2015-09-18 02:28:56 UTC) #11
jamesr
lgtm w/ nits https://codereview.chromium.org/1348283004/diff/40001/services/gles2/BUILD.gn File services/gles2/BUILD.gn (right): https://codereview.chromium.org/1348283004/diff/40001/services/gles2/BUILD.gn#newcode25 services/gles2/BUILD.gn:25: if (is_android) { this probably deserves ...
5 years, 3 months ago (2015-09-18 02:31:35 UTC) #12
cdotstout
Committed patchset #5 (id:80001) manually as 63532259dbe96993cece84f7d86d98a313cccf71 (presubmit successful).
5 years, 3 months ago (2015-09-18 06:03:05 UTC) #13
cdotstout
5 years, 3 months ago (2015-09-18 15:51:40 UTC) #14
Message was sent while issue was closed.
https://codereview.chromium.org/1348283004/diff/40001/services/gles2/BUILD.gn
File services/gles2/BUILD.gn (right):

https://codereview.chromium.org/1348283004/diff/40001/services/gles2/BUILD.gn...
services/gles2/BUILD.gn:25: if (is_android) {
On 2015/09/18 02:31:35, jamesr wrote:
> this probably deserves a comment explaining why the choice of factory depends
on
> is_android

Done.

https://codereview.chromium.org/1348283004/diff/40001/services/gles2/mailbox_...
File services/gles2/mailbox_manager_factory_sync.cc (right):

https://codereview.chromium.org/1348283004/diff/40001/services/gles2/mailbox_...
services/gles2/mailbox_manager_factory_sync.cc:13: return new
gpu::gles2::MailboxManagerSync;
On 2015/09/18 02:31:35, jamesr wrote:
> instead of having separate _sync and _nosync.cc we could just have one with an
> #if defined(OS_ANDROID). i think policy decisions made in code tend to be
easier
> for developers to find than policy decisions made in the build system

Done.

Powered by Google App Engine