Frame size changes cause black flashes and SubmitCompositorFrame violation spam when UseSurfaceLayerForVideo is enabled. |
|||||||||||||
Issue descriptionWhen playing http://storage.googleapis.com/dalecurtis/frame_size_change.webm On my Nexus 5x + O, I get tons of "[ERROR:compositor_frame_sink_impl.cc(76)] SubmitCompositorFrame failed for LocalSurfaceId(1, 1, 3745...) because Surface invariants violation" 07-25 16:25:50.529 4070 4133 E NdkImageReader: AImageReader_getWindow 07-25 16:25:50.547 4070 4134 I cr_MediaCodecBridge: create MediaCodec video decoder, mime video/x-vnd.on2.vp8 07-25 16:25:50.577 4070 4137 I MediaCodec: MediaCodec will operate in async mode 07-25 16:25:50.579 4070 4137 D SurfaceUtils: connecting to surface 0xcabac808, reason connectToSurface 07-25 16:25:50.579 4070 4137 I MediaCodec: [OMX.qcom.video.decoder.vp8] setting surface generation to 4167681 07-25 16:25:50.580 4070 4137 D SurfaceUtils: disconnecting from surface 0xcabac808, reason connectToSurface(reconnect) 07-25 16:25:50.580 4070 4137 D SurfaceUtils: connecting to surface 0xcabac808, reason connectToSurface(reconnect) 07-25 16:25:50.637 4070 4138 D SurfaceUtils: set up nativeWindow 0xcabac808 for 1920x1080, color 0x7fa30c04, rotation 0, usage 0x42002903 07-25 16:25:50.647 4070 4138 W GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2002000 07-25 16:25:50.653 4070 4138 I chatty : uid=10115(org.chromium.chrome) CodecLooper identical 2 lines 07-25 16:25:50.659 4070 4138 W GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2002000 07-25 16:25:50.676 4070 4138 D SurfaceUtils: set up nativeWindow 0xcabac808 for 160x90, color 0x7fa30c04, rotation 0, usage 0x42002903 07-25 16:25:50.681 4070 4138 W GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2002000 07-25 16:25:50.683 4070 4138 I chatty : uid=10115(org.chromium.chrome) CodecLooper identical 2 lines 07-25 16:25:50.685 4070 4138 W GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2002000 07-25 16:25:50.690 4070 4070 E cr_MediaCodecBridge: format change: 160x90 07-25 16:25:50.692 4070 4138 W GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2002000 07-25 16:25:50.697 4070 4105 D NdkImageReader: acquireImageLocked: Overriding buffer format YUV_420_888 to 0x7fa30c04. 07-25 16:25:50.697 4070 4105 I Adreno : Invalid colorspace 0 07-25 16:25:50.763 4070 4138 D SurfaceUtils: set up nativeWindow 0xcabac808 for 160x120, color 0x7fa30c04, rotation 0, usage 0x42002903 07-25 16:25:50.766 4070 4105 I Adreno : Invalid colorspace 0 07-25 16:25:50.768 4070 4138 W GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2002000 07-25 16:25:50.772 4070 4138 I chatty : uid=10115(org.chromium.chrome) CodecLooper identical 2 lines 07-25 16:25:50.773 4070 4138 W GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2002000 07-25 16:25:50.778 4070 4070 E cr_MediaCodecBridge: format change: 160x120 07-25 16:25:50.782 4070 4138 W GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2002000 07-25 16:25:50.835 3998 3998 E chromium: [ERROR:compositor_frame_sink_impl.cc(76)] SubmitCompositorFrame failed for LocalSurfaceId(1, 1, 3745...) because Surface invariants violation 07-25 16:25:50.852 4070 4105 I Adreno : Invalid colorspace 0 07-25 16:25:50.853 3998 3998 E chromium: [ERROR:compositor_frame_sink_impl.cc(76)] SubmitCompositorFrame failed for LocalSurfaceId(1, 1, 3745...) because Surface invariants violation 07-25 16:25:50.860 4070 4138 D SurfaceUtils: set up nativeWindow 0xcabac808 for 320x180, color 0x7fa30c04, rotation 0, usage 0x42002903 07-25 16:25:50.867 4070 4138 W GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2002000 07-25 16:25:50.871 4070 4138 W GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2002000 07-25 16:25:50.875 3998 3998 E chromium: [ERROR:compositor_frame_sink_impl.cc(76)] SubmitCompositorFrame failed for LocalSurfaceId(1, 1, 3745...) because Surface invariants violation 07-25 16:25:50.876 4070 4138 W GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2002000 07-25 16:25:50.877 4070 4138 I chatty : uid=10115(org.chromium.chrome) CodecLooper identical 1 line 07-25 16:25:50.881 4070 4138 W GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2002000 07-25 16:25:50.881 4070 4070 E cr_MediaCodecBridge: format change: 320x180 07-25 16:25:50.904 3998 3998 E chromium: [ERROR:compositor_frame_sink_impl.cc(76)] SubmitCompositorFrame failed for LocalSurfaceId(1, 1, 3745...) because Surface invariants violation 07-25 16:25:50.911 3998 4003 I zygote : Do partial code cache collection, code=124KB, data=93KB 07-25 16:25:50.912 3998 4003 I zygote : After code cache collection, code=124KB, data=93KB 07-25 16:25:50.912 3998 4003 I zygote : Increasing code cache capacity to 512KB 07-25 16:25:50.914 4070 4105 I Adreno : Invalid colorspace 0 07-25 16:25:50.920 3998 3998 E chromium: [ERROR:compositor_frame_sink_impl.cc(76)] SubmitCompositorFrame failed for LocalSurfaceId(1, 1, 3745...) because Surface invariants violation 07-25 16:25:50.937 3998 3998 E chromium: [ERROR:compositor_frame_sink_impl.cc(76)] SubmitCompositorFrame failed for LocalSurfaceId(1, 1, 3745...) because Surface invariants violation 07-25 16:25:50.967 4070 4138 D SurfaceUtils: set up nativeWindow 0xcabac808 for 320x240, color 0x7fa30c04, rotation 0, usage 0x42002903 07-25 16:25:50.970 4070 4105 I Adreno : Invalid colorspace 0 07-25 16:25:50.974 4070 4138 W GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2002000 07-25 16:25:50.977 4070 4138 I chatty : uid=10115(org.chromium.chrome) CodecLooper identical 3 lines 07-25 16:25:50.983 4070 4138 W GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2002000 07-25 16:25:50.984 4070 4070 E cr_MediaCodecBridge: format change: 320x240 07-25 16:25:50.986 4070 4138 W GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2002000 07-25 16:25:51.000 3998 3998 E chromium: [ERROR:compositor_frame_sink_impl.cc(76)] SubmitCompositorFrame failed for LocalSurfaceId(1, 1, 3745...) because Surface invariants violation 07-25 16:25:51.019 3998 3998 E chromium: [ERROR:compositor_frame_sink_impl.cc(76)] SubmitCompositorFrame failed for LocalSurfaceId(1, 1, 3745...) because Surface invariants violation 07-25 16:25:51.022 4070 4105 I Adreno : Invalid colorspace 0 07-25 16:25:51.028 3998 3998 E chromium: [ERROR:compositor_frame_sink_impl.cc(76)] SubmitCompositorFrame failed for LocalSurfaceId(1, 1, 3745...) because Surface invariants violation 07-25 16:25:51.051 3998 3998 E chromium: [ERROR:compositor_frame_sink_impl.cc(76)] SubmitCompositorFrame failed for LocalSurfaceId(1, 1, 3745...) because Surface invariants violation 07-25 16:25:51.076 4070 4138 D SurfaceUtils: set up nativeWindow 0xcabac808 for 640x360, color 0x7fa30c04, rotation 0, usage 0x42002903 07-25 16:25:51.078 4070 4105 I Adreno : Invalid colorspace 0 07-25 16:25:51.081 4070 4138 W GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2002000 07-25 16:25:51.084 4070 4138 I chatty : uid=10115(org.chromium.chrome) CodecLooper identical 2 lines 07-25 16:25:51.086 4070 4138 W GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2002000 07-25 16:25:51.091 4070 4070 E cr_MediaCodecBridge: format change: 640x360 07-25 16:25:51.092 4070 4138 W GrallocMapperPassthrough: buffer descriptor with invalid usage bits 0x2002000 07-25 16:25:51.109 3998 3998 E chromium: [ERROR:compositor_frame_sink_impl.cc(76)] SubmitCompositorFrame failed for LocalSurfaceId(1, 1, 3745...) because Surface invariants violation 07-25 16:25:51.120 3998 3998 E chromium: [ERROR:compositor_frame_sink_impl.cc(76)] SubmitCompositorFrame failed for LocalSurfaceId(1, 1, 3745...) because Surface invariants violation 07-25 16:25:51.120 4070 4105 I Adreno : Invalid colorspace 0 07-25 16:25:51.152 3998 3998 E chromium: [ERROR:compositor_frame_sink_impl.cc(76)] SubmitCompositorFrame failed for LocalSurfaceId(1, 1, 3745...) because Surface invariants violation
,
Jul 30
Actually I think this is causing black flashes between resolution changes. It's most easily seen here: https://shaka-player-demo.appspot.com/demo/#asset=https://demo.unified-streaming.com/video/tears-of-steel/tears-of-steel.ism/.mpd;lang=en-US;build=compiled Click load and then watch at frame 190 with and without surfaces enabled. Playback may freeze due to issue 868670 if you test ToT, but that should be fixed momentarily.
,
Jul 30
,
Jul 31
,
Jul 31
fsamuel@, it looks like the errors being reported from compositor_frame_sink_impl.cc may be something you know how to best resolve; can you help? Not sure whether this is caused indirectly by the changes from Issue 672962 but I'm blocking the other bug on this one to establish a relationship between them. Unlink if unrelated.
,
Jul 31
Yup, I believe chatted with Mounir or CJ about this before. This is happening because we need to allocate a new LocalSurfaceId (and therefore a new surface) anytime the size changes.
,
Jul 31
,
Jul 31
Issue 866069 has been merged into this issue.
,
Aug 1
,
Aug 1
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/0f644566076fcfa8ce721861122792cfd0bfff18 commit 0f644566076fcfa8ce721861122792cfd0bfff18 Author: Mounir Lamouri <mlamouri@chromium.org> Date: Wed Aug 01 15:29:45 2018 VideoSurfaceLayer: use ChildLocalSurfaceIdAllocator in VideoFrameSubmitter. This allows the submitter to update the LocalSurfaceId (by modifying the child component) before submitting a new frame. The SurfaceLayerBridge will be notified of the change and update its internal surface id. Bug: 868008 Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel Change-Id: Iee17f20c753cc236b9ccce5d5bdfe05fb655b08e Reviewed-on: https://chromium-review.googlesource.com/1157882 Reviewed-by: Fady Samuel <fsamuel@chromium.org> Reviewed-by: Jeremy Roman <jbroman@chromium.org> Commit-Queue: Mounir Lamouri <mlamouri@chromium.org> Cr-Commit-Position: refs/heads/master@{#579812} [modify] https://crrev.com/0f644566076fcfa8ce721861122792cfd0bfff18/third_party/blink/renderer/platform/graphics/video_frame_submitter.cc [modify] https://crrev.com/0f644566076fcfa8ce721861122792cfd0bfff18/third_party/blink/renderer/platform/graphics/video_frame_submitter.h [modify] https://crrev.com/0f644566076fcfa8ce721861122792cfd0bfff18/third_party/blink/renderer/platform/graphics/video_frame_submitter_test.cc
,
Aug 1
,
Aug 1
Did the above end up fixing the black flashes mentioned in c#2 as well?
,
Aug 1
I had a very hard time to see the black frames on the video in c#2 but it seems to be fixed in https://mounirlamouri.github.io/bunny-player/index.html AFAICT. FWIW, the cause should be the same. Either way, I wouldn't mind if you could confirm :)
,
Aug 1
Will double check tomorrow's canary since I probably won't have time to make an android build before then.
,
Aug 1
FWIW, the issue is not specific to Android. Updated the OS's.
,
Aug 2
Your change meets the bar and is auto-approved for M69. Please go ahead and merge the CL to branch 3497 manually. Please contact milestone owner if you have questions. Owners: amineer@(Android), kariahda@(iOS), cindyb@(ChromeOS), govind@(Desktop) For more details visit https://www.chromium.org/issue-tracking/autotriage - Your friendly Sheriffbot
,
Aug 2
Pls merge to M69 branch 3497 ASAP. Thank you.
,
Aug 2
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/8fac0ae1a53959f24ce6d3700af85799500996a0 commit 8fac0ae1a53959f24ce6d3700af85799500996a0 Author: Mounir Lamouri <mlamouri@chromium.org> Date: Thu Aug 02 16:42:13 2018 VideoSurfaceLayer: use ChildLocalSurfaceIdAllocator in VideoFrameSubmitter. This allows the submitter to update the LocalSurfaceId (by modifying the child component) before submitting a new frame. The SurfaceLayerBridge will be notified of the change and update its internal surface id. Bug: 868008 Cq-Include-Trybots: luci.chromium.try:linux_layout_tests_slimming_paint_v2;master.tryserver.blink:linux_trusty_blink_rel Change-Id: Iee17f20c753cc236b9ccce5d5bdfe05fb655b08e Reviewed-on: https://chromium-review.googlesource.com/1157882 Reviewed-by: Fady Samuel <fsamuel@chromium.org> Reviewed-by: Jeremy Roman <jbroman@chromium.org> Commit-Queue: Mounir Lamouri <mlamouri@chromium.org> Cr-Original-Commit-Position: refs/heads/master@{#579812}(cherry picked from commit 0f644566076fcfa8ce721861122792cfd0bfff18) Reviewed-on: https://chromium-review.googlesource.com/1160961 Reviewed-by: Mounir Lamouri <mlamouri@chromium.org> Cr-Commit-Position: refs/branch-heads/3497@{#338} Cr-Branched-From: 271eaf50594eb818c9295dc78d364aea18c82ea8-refs/heads/master@{#576753} [modify] https://crrev.com/8fac0ae1a53959f24ce6d3700af85799500996a0/third_party/blink/renderer/platform/graphics/video_frame_submitter.cc [modify] https://crrev.com/8fac0ae1a53959f24ce6d3700af85799500996a0/third_party/blink/renderer/platform/graphics/video_frame_submitter.h [modify] https://crrev.com/8fac0ae1a53959f24ce6d3700af85799500996a0/third_party/blink/renderer/platform/graphics/video_frame_submitter_test.cc
,
Aug 2
,
Aug 2
Great work Mounir fixing this thorny issue! |
|||||||||||||
►
Sign in to add a comment |
|||||||||||||
Comment 1 by mlamouri@chromium.org
, Jul 27Owner: mlamouri@chromium.org