Re: Issue 326995 in chromium: Resizing browser flickers black on all window managers

77 views
Skip to first unread message

chro...@googlecode.com

unread,
Mar 11, 2014, 8:05:00 PM3/11/14
to chromi...@chromium.org

Comment #19 on issue 326995 by dan...@chromium.org: Resizing browser
flickers black on all window managers
http://code.google.com/p/chromium/issues/detail?id=326995

Ya, totally. You can still get some flashing there on the edges, but we
should be able to throttle it. (Sorry WindowMaker.)

--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings

chro...@googlecode.com

unread,
Mar 11, 2014, 8:06:00 PM3/11/14
to chromi...@chromium.org

Comment #20 on issue 326995 by dan...@chromium.org: Resizing browser
flickers black on all window managers
http://code.google.com/p/chromium/issues/detail?id=326995

We could also use a different color than black by setting the XWindow's
background color. I'm sure GTK would use a nicer color from the theme to
make it less jarring.

chro...@googlecode.com

unread,
Mar 11, 2014, 8:11:00 PM3/11/14
to chromi...@chromium.org

Comment #21 on issue 326995 by dan...@chromium.org: Resizing browser
flickers black on all window managers
http://code.google.com/p/chromium/issues/detail?id=326995

(It looks like we use white on gtk chrome stable)

chro...@googlecode.com

unread,
Mar 11, 2014, 8:49:00 PM3/11/14
to chromi...@chromium.org

Comment #22 on issue 326995 by dan...@chromium.org: Resizing browser
flickers black on all window managers
http://code.google.com/p/chromium/issues/detail?id=326995

Ok I have to admit I have no idea how we present to the X window I guess. I
tried setting the background_pixel to WhitePixel in a few places, but that
has no visible change on resize that I can tell.

chro...@googlecode.com

unread,
Mar 11, 2014, 8:55:00 PM3/11/14
to chromi...@chromium.org

Comment #23 on issue 326995 by pi...@chromium.org: Resizing browser
flickers black on all window managers
http://code.google.com/p/chromium/issues/detail?id=326995

We set it to a transparent pixmap (in
DesktopWindowTreeHostX11::InitX11Window), meaning, X won't fill with
anything. It can be good or bad, depending on what the WM draws for the
window frame. If it draws nothing, then we're good. If it draws something,
we may see trails. Not sure if it's better or worse than a solid color.

chro...@googlecode.com

unread,
Mar 11, 2014, 8:59:00 PM3/11/14
to chromi...@chromium.org

Comment #24 on issue 326995 by pi...@chromium.org: Resizing browser
flickers black on all window managers
http://code.google.com/p/chromium/issues/detail?id=326995

In any case, we need to figure out the black flashes, since that's what's
particularly jarring.

chro...@googlecode.com

unread,
Mar 24, 2014, 11:11:42 PM3/24/14
to chromi...@chromium.org

Comment #25 on issue 326995 by pi...@chromium.org: Resizing browser
flickers black on all window managers
http://code.google.com/p/chromium/issues/detail?id=326995

AFAICT the black flashes come from the fact that we switch contexts. I have
a repro outside of chrome, where drawing multiple quads while resizing, and
making the context non-current and then current, results in some quads
missing - the ones drawn earlier, replaced by black.

My explanation is that on glXMakeCurrent, the driver may be looking at the
size of the window and resetting the back buffer if the window changed
size. I'm not convinced the driver is allowed to do that (the spec is very
fuzzy on resizes), but that's definitely not something that's easy to
workaround.

Possibly virtual contexts might help.

chro...@googlecode.com

unread,
Mar 24, 2014, 11:55:05 PM3/24/14
to chromi...@chromium.org

Comment #26 on issue 326995 by pi...@chromium.org: Resizing browser
flickers black on all window managers
http://code.google.com/p/chromium/issues/detail?id=326995

I tried virtual contexts (with a bunch of hacks), there's still a bit of
flashes.

Another option is to always draw to a FBO and blit that FBO on SwapBuffers.
Costs a copy, but maybe we can restrict it to drivers that have the problem?

chro...@googlecode.com

unread,
Mar 25, 2014, 6:53:33 PM3/25/14
to chromi...@chromium.org
Updates:
Cc: k...@chromium.org

Comment #27 on issue 326995 by pi...@chromium.org: Resizing browser
flickers black on all window managers
http://code.google.com/p/chromium/issues/detail?id=326995

I have a minimal patch that makes it better, by going through the "child
window" path that ccameron added for GTK. It gets us most of the benefits
of virtual contexts (and is a prerequisite anyway), and removes most of the
flashes.
However it has a significant impact on performance. The reason is that we
need to create a child window with a different visual, which implies a blit
on swap. That's what gets us the benefits. But the extra blit regresses
webgl aquarium performance from 60 to 45fps on my machine. Likely we'll see
a similar behavior on Maps.

Given this, I'm tempted to punt.

chro...@googlecode.com

unread,
May 21, 2014, 10:12:59 PM5/21/14
to chromi...@chromium.org

Comment #33 on issue 326995 by pi...@chromium.org: Resizing browser
flickers black on all window managers
http://code.google.com/p/chromium/issues/detail?id=326995

Ok, https://codereview.chromium.org/296003010 seems to work, AFAICT without
introducing an extra driver blit.

chro...@googlecode.com

unread,
May 22, 2014, 10:22:21 PM5/22/14
to chromi...@chromium.org
Updates:
Status: Started
Cc: sad...@chromium.org

Comment #36 on issue 326995 by pi...@chromium.org: Resizing browser
flickers black on all window managers
http://code.google.com/p/chromium/issues/detail?id=326995

Well, of course, I forgot to forward the Expose events. Trying to resurrect
ccameron's code for that, but of course the underlying infra is gone.
Trying to surf the #ifdefs issues so that I can grab the X events in the
GPU process.

chro...@googlecode.com

unread,
May 22, 2014, 11:18:00 PM5/22/14
to chromi...@chromium.org

Comment #37 on issue 326995 by pi...@chromium.org: Resizing browser
flickers black on all window managers
http://code.google.com/p/chromium/issues/detail?id=326995

https://codereview.chromium.org/299143002/ should fix the latter.

chro...@googlecode.com

unread,
May 23, 2014, 8:25:19 PM5/23/14
to chromi...@chromium.org

Comment #38 on issue 326995 by bugdro...@chromium.org: Resizing browser
flickers black on all window managers
http://code.google.com/p/chromium/issues/detail?id=326995#c38

------------------------------------------------------------------
r272648 | pi...@chromium.org | 2014-05-24T00:09:19.986452Z

Changed paths:
M
http://src.chromium.org/viewvc/chrome/trunk/src/ui/gl/gl_surface_glx.cc?r1=272648&r2=272647&pathrev=272648
M
http://src.chromium.org/viewvc/chrome/trunk/src/content/gpu/gpu_main.cc?r1=272648&r2=272647&pathrev=272648
M
http://src.chromium.org/viewvc/chrome/trunk/src/ui/gl/gl_surface_glx.h?r1=272648&r2=272647&pathrev=272648
M
http://src.chromium.org/viewvc/chrome/trunk/src/ui/gl/DEPS?r1=272648&r2=272647&pathrev=272648
M
http://src.chromium.org/viewvc/chrome/trunk/src/ui/gl/gl.gyp?r1=272648&r2=272647&pathrev=272648

glx: forward Expose event from child window to parent

r272290 added a child window to GLSurfaceGLX, but it needs to forward
Expose events to the parent.

BUG=326995
R=ccam...@chromium.org, sad...@chromium.org

Review URL: https://codereview.chromium.org/299143002
-----------------------------------------------------------------

chro...@googlecode.com

unread,
May 23, 2014, 8:27:18 PM5/23/14
to chromi...@chromium.org
Updates:
Status: Fixed

Comment #39 on issue 326995 by pi...@chromium.org: Resizing browser
flickers black on all window managers
http://code.google.com/p/chromium/issues/detail?id=326995

(No comment was entered for this change.)

chro...@googlecode.com

unread,
Jun 3, 2014, 7:04:58 PM6/3/14
to chromi...@chromium.org

Comment #43 on issue 326995 by var...@chromium.org: Resizing browser
flickers black on all window managers
http://code.google.com/p/chromium/issues/detail?id=326995

@42: Unity 3d (Ubuntu 12.04).

chro...@googlecode.com

unread,
Jun 13, 2014, 12:24:28 PM6/13/14
to chromi...@chromium.org

Comment #45 on issue 326995 by var...@chromium.org: Resizing browser
flickers black on all window managers
http://code.google.com/p/chromium/issues/detail?id=326995

Still happens for me with 37.0.2041.4 (Official Build 275940) dev.

chro...@googlecode.com

unread,
Jun 13, 2014, 1:34:43 PM6/13/14
to chromi...@chromium.org

Comment #49 on issue 326995 by pkotw...@chromium.org: Resizing browser
flickers black on all window managers
http://code.google.com/p/chromium/issues/detail?id=326995

I see this issue too on Unity. It only occurs when using the "Normal"
Default resize mode.
You can change it via CompizConfig->ResizeWindow->General

chro...@googlecode.com

unread,
Jun 13, 2014, 1:35:42 PM6/13/14
to chromi...@chromium.org

Comment #50 on issue 326995 by var...@chromium.org: Resizing browser
flickers black on all window managers
http://code.google.com/p/chromium/issues/detail?id=326995

about:gpu attached.

Attachments:
gpu.html 35.3 KB

chro...@googlecode.com

unread,
Jun 23, 2014, 8:09:32 PM6/23/14
to chromi...@chromium.org
Updates:
Cc: -e...@chromium.org

Comment #52 on issue 326995 by e...@chromium.org: Resizing browser flickers
(No comment was entered for this change.)

chro...@googlecode.com

unread,
Aug 27, 2014, 3:27:22 PM8/27/14
to chromi...@chromium.org

Comment #53 on issue 326995 by j...@logic-sunrise.com: Resizing browser
flickers black on all window managers
https://code.google.com/p/chromium/issues/detail?id=326995

Same problem here, with 343 nvidia Drivers, Cinnamon and Mint 17 64bits.

chro...@googlecode.com

unread,
Sep 18, 2014, 7:38:48 PM9/18/14
to chromi...@chromium.org

Comment #56 on issue 326995 by dan...@chromium.org: Resizing browser
flickers black on all window managers
https://code.google.com/p/chromium/issues/detail?id=326995

@#54: This bug is about linux-specific code, not Windows. Please file
another bug with your symptoms.

chro...@googlecode.com

unread,
Dec 27, 2014, 3:03:38 PM12/27/14
to chromi...@chromium.org

Comment #57 on issue 326995 by JesseFar...@gmail.com: Resizing browser
flickers black on all window managers
https://code.google.com/p/chromium/issues/detail?id=326995

Same issue. 39.0.2171.95 (64-bit). Attached is my about://gpu. Info says
its using Unity, but I also tried on Mutter using GS with the same issue.
Proprietary Catalyst driver (14.20, 14.501) and open source Radeon driver
(Kernel 3.13, 3.16), still same issue.

Attachments:
gpu.html 36.3 KB

chro...@googlecode.com

unread,
Dec 28, 2014, 7:03:04 PM12/28/14
to chromi...@chromium.org

Comment #58 on issue 326995 by allardpr...@gmail.com: Resizing browser
flickers black on all window managers
https://code.google.com/p/chromium/issues/detail?id=326995

Same issue here, when I start changing the window size it flickers black. I
have this on my Nvidia GPU with 331.113 driver installed on a up to date
Ubuntu 14.04.1.

chro...@googlecode.com

unread,
Mar 9, 2015, 8:06:01 AM3/9/15
to chromi...@chromium.org

Comment #61 on issue 326995 by SIDS...@gmail.com: Resizing browser flickers
Hello I would like to work on this issue, do let me know if you have
details of specific files that may help

chro...@googlecode.com

unread,
May 3, 2015, 5:33:46 PM5/3/15
to chromi...@chromium.org

Comment #62 on issue 326995 by j...@logic-sunrise.com: Resizing browser
flickers black on all window managers
https://code.google.com/p/chromium/issues/detail?id=326995

My god this issue is still here after more than a year. It's a real
nightmare ...

Inter graphic proc, mint 17.1 32 or 64bits : same issue !

chro...@googlecode.com

unread,
Jun 24, 2015, 1:02:16 PM6/24/15
to chromi...@chromium.org

Comment #63 on issue 326995 by idanfo...@fetchrobotics.com: Resizing
browser flickers black on all window managers
https://code.google.com/p/chromium/issues/detail?id=326995

Same issue, gpu info attached.

Attachments:
gpu.html 42.4 KB

chro...@googlecode.com

unread,
Jul 20, 2015, 10:17:03 AM7/20/15
to chromi...@chromium.org

Comment #64 on issue 326995 by futur.fu...@gmail.com: Resizing browser
flickers black on all window managers
https://code.google.com/p/chromium/issues/detail?id=326995

43.0.2357.134 m - still present

chro...@googlecode.com

unread,
Jul 22, 2015, 7:13:23 PM7/22/15
to chromi...@chromium.org

Comment #66 on issue 326995 by pi...@chromium.org: Resizing browser
flickers black on all window managers
https://code.google.com/p/chromium/issues/detail?id=326995

This may be related to issue 442111, at least for a subset of drivers
(opensource radeon?)

chro...@googlecode.com

unread,
Sep 7, 2015, 12:28:49 AM9/7/15
to chromi...@chromium.org

Comment #67 on issue 326995 by teomor...@gmail.com: Resizing browser
flickers black on all window managers
https://code.google.com/p/chromium/issues/detail?id=326995

Just installed Chrome on a new 5930k and I am experiencing the black
flicker in the background. v 45.0.2454.85. CPU overclocked to 4.6.

It seems to work fine on a 4790k with no overclocking.

chro...@googlecode.com

unread,
Oct 9, 2015, 7:54:52 PM10/9/15
to chromi...@chromium.org

Comment #70 on issue 326995 by j...@logic-sunrise.com: Resizing browser
flickers black on all window managers
https://code.google.com/p/chromium/issues/detail?id=326995

Version 45.0.2454.101 Built on Ubuntu 14.04, running on LinuxMint 17.2
(64-bit)

chromium-browser --use_virtualized_gl_contexts=0
Using PPAPI flash.
Gkr-Message: secret service operation failed: The name
org.freedesktop.secrets was not provided by any .service files

chro...@googlecode.com

unread,
Oct 16, 2015, 7:10:21 AM10/16/15
to chromi...@chromium.org

Comment #71 on issue 326995 by to...@chromium.org: Resizing browser
flickers black on all window managers
https://code.google.com/p/chromium/issues/detail?id=326995

Not sure if this is the same issue or not, but on 47.0.2526.16 I am seeing
*really* bad artifacts when resizing windows: the window size lagging
behind the the cursor significantly, black flickering, etc. Screen
recording attached. If it's not related I can file a separate bug. This is
on Goobuntu 14.04 201510TD1-3 with a Quadro 600 (driver version 340.93),
using Unity.

Attachments:
resize_glitch.ogv 5.7 MB

chro...@googlecode.com

unread,
Oct 16, 2015, 7:12:22 AM10/16/15
to chromi...@chromium.org

Comment #72 on issue 326995 by to...@chromium.org: Resizing browser
flickers black on all window managers
https://code.google.com/p/chromium/issues/detail?id=326995

Oh, just to be more specific: I haven't seen this previously on earlier
chrome versions.

chro...@googlecode.com

unread,
Nov 10, 2015, 9:18:13 AM11/10/15
to chromi...@chromium.org

Comment #73 on issue 326995 by mari...@gmail.com: Resizing browser
flickers black on all window managers
https://code.google.com/p/chromium/issues/detail?id=326995

Another one to the mix: I'm experiencing this very same flickering issue
while resizing chromium on the following environment:
* Chrome: 45.0.2454.85
* GNOME Shell-based desktop shell (based on GNOME Shell 3.8)
* Ubuntu-based OS for ARM (32 bit)
* ARMv7 CPU (Amlogic S805) with a Mali 450 GPU
* Propietary Mali drivers for the Mali 400 family

Sorry about the "-based" suffixes introducing some additional uncertainty,
but if it helps I can confirm that I don't get the flashes while resizing
in the same software environment (same versions of chromium, GNOME Shell
and the OS) running on Intel HW.

More specifically, the following similar environment does NOT expose the
issue:

* Chrome: 45.0.2454.85
* GNOME Shell-based desktop shell (based on GNOME Shell 3.8)
* Ubuntu-based OS for Intel (32 bit)
* Intel(R) Celeron(R) CPU N2807 with integrated Intel HD Graphics GPU
* X.org Driver for the i965 chipset (xserver-xorg-video-intel=2.99.917)

It looks like there's definitely a driver-dependant issue going on here.
Any idea?

Also, considering that I have 2 "different-but-similar-enough" environments
where I can reproduce the bug reliably in one of them only, I'm happy to
try any suggestions or experiments you can think of. I'm also happy to
apply patches and rebuild as needed too, so please don't be afraid to
ask! :)

Last, I'm seeing an additional flickering black window on startup too, but
that I'm seeing it in both the ARM and Intel environments so it looks like
a separate bug. I will check if there's one open already and file one
otherwise.

PS: See attached the content of the about:gpu page both for the ARM and
Intel machines

Attachments:
gpu-ARM.html 31.2 KB
gpu-Intel.html 35.7 KB

chro...@googlecode.com

unread,
Nov 10, 2015, 9:57:43 AM11/10/15
to chromi...@chromium.org

Comment #74 on issue 326995 by mari...@gmail.com: Resizing browser
flickers black on all window managers
https://code.google.com/p/chromium/issues/detail?id=326995

> Last, I'm seeing an additional flickering black window on startup too,
> but that I'm seeing it in both the ARM and Intel environments so it looks
> like a separate bug. I will check if there's one open already and file
> one otherwise.

I could not find any bug reporting that issue, so I filed it here:
https://code.google.com/p/chromium/issues/detail?id=554008

I understand it might be related, as in this case, to the fact that
chromium uses the asynchronous X11 protocol, but I still think it's worth
reporting it since the startup experience is pretty annoying on slow
devices.

chro...@googlecode.com

unread,
Nov 10, 2015, 1:50:28 PM11/10/15
to chromi...@chromium.org
Updates:
Labels: Hotlist-Polish

Comment #75 on issue 326995 by dan...@chromium.org: Resizing browser
flickers black on all window managers
https://code.google.com/p/chromium/issues/detail?id=326995

(No comment was entered for this change.)

chro...@googlecode.com

unread,
Nov 13, 2015, 5:47:30 AM11/13/15
to chromi...@chromium.org

Comment #77 on issue 326995 by mari...@gmail.com: Resizing browser
flickers black on all window managers
https://code.google.com/p/chromium/issues/detail?id=326995

Oh! That might explain things: I can see indeed how glxWaitGL() and
glxWaitX() are being used in NativeViewGLSurfaceGLX::Resize(), while no
synchronization routines are present in the EGL implementation of this
method.

I think I will try playing around with eglWaitClient() and eglWaitNative(),
see if I can get any improvement on this regard.

Thanks!

chro...@googlecode.com

unread,
Nov 17, 2015, 7:27:46 AM11/17/15
to chromi...@chromium.org

Comment #78 on issue 326995 by mari...@gmail.com: Resizing browser
flickers black on all window managers
https://code.google.com/p/chromium/issues/detail?id=326995

Quick update on this: I've tried the following patch on my ARM device:
https://gist.github.com/mariospr/3bcee646631be04593cd

Curiously enough, the modifications in ui/gl/gl_surface_egl.cc (adding
eglWaitGL() and eglWaitNative()) did not make any difference, but the
change in desktop_window_tree_host_x11.cc (setting window's bit gravity to
NorthWestGravity) actually did fix the flashing black windows on resizing!

@piman: if I could get your input before filing any specific bug for
EGL+ARM, I'd appreciate. Perhaps this is a matter of changing the window's
bit gravity after all, or perhaps it's still related to the synchronization
you mentioned in the EGL implementation and I'm missing something there
(e.g. it might not be as simple as adding those two eglWait*() calls).

Thanks again!

PS: I've tried the same patch applied in my Intel device and I could not
appreciate any significant change in there: no flashing windows before, no
flashing windows now

chro...@googlecode.com

unread,
Nov 17, 2015, 11:00:15 AM11/17/15
to chromi...@chromium.org

Comment #79 on issue 326995 by pi...@chromium.org: Resizing browser
flickers black on all window managers
https://code.google.com/p/chromium/issues/detail?id=326995

@#78: The key is not only the eglWaitGL / eglWaitNative, but also
significantly the fact that we add a child window (on the GLX side), and
that child window gets resized between the eglWaitGL / eglWaitNative. The
idea being: wait for GL to be done (from the X point of view) -> resize the
child (may affect the back buffer) -> wait for X to be done (from the GL
point of view).

chro...@googlecode.com

unread,
Nov 17, 2015, 11:02:11 AM11/17/15
to chromi...@chromium.org

Comment #81 on issue 326995 by pi...@chromium.org: Resizing browser
flickers black on all window managers
https://code.google.com/p/chromium/issues/detail?id=326995

That said, also setting the gravity sounds like it would help too, so we
can do that.

chro...@googlecode.com

unread,
Nov 17, 2015, 2:50:38 PM11/17/15
to chromi...@chromium.org

Comment #82 on issue 326995 by dan...@chromium.org: Resizing browser
flickers black on all window managers
https://code.google.com/p/chromium/issues/detail?id=326995

Oh, we're using ForgetGravity? Yes, let's use NorthWest please. :)

Do you wanna send a patch for that mariospr?

chro...@googlecode.com

unread,
Nov 18, 2015, 7:06:27 AM11/18/15
to chromi...@chromium.org

Comment #88 on issue 326995 by mari...@gmail.com: Resizing browser
flickers black on all window managers
https://code.google.com/p/chromium/issues/detail?id=326995

Sorry for the late reply, been sucked by another issue most of the time
yesterday.

Anyway, I'm very happy to see this fix has made it upstream in a way or
another, and will be testing it locally now, probably integrating it
downstream right away too.

@danakj: I'd love to have contributed that patch myself, but I'm still
while my company signs the Corporate CLA, and I'm certainly more interested
on getting the issue fixed promptly than on claiming authorship :), so not
a problem at all.

Thank you all!

chro...@googlecode.com

unread,
Nov 18, 2015, 7:40:07 AM11/18/15
to chromi...@chromium.org

Comment #89 on issue 326995 by mari...@gmail.com: Resizing browser
flickers black on all window managers
https://code.google.com/p/chromium/issues/detail?id=326995

> @#78: The key is not only the eglWaitGL / eglWaitNative, but also
> significantly the fact that we add a child window (on the GLX side), and
> that child window gets resized between the eglWaitGL / eglWaitNative. The
> idea being: wait for GL to be done (from the X point of view) -> resize
> the child (may affect the back buffer) -> wait for X to be done (from the
> GL point of view).

Isn't that what my patch in
https://gist.github.com/mariospr/3bcee646631be04593cd should be doing, by
wrapping the call to NativeViewGLSurfaceEGL::Initialize() between
eglWaitGL() and eglWaitNative()?

chro...@googlecode.com

unread,
Nov 18, 2015, 7:41:53 PM11/18/15
to chromi...@chromium.org
Updates:
Labels: -Merge-Review-48 Merge-Approved-48

Comment #90 on issue 326995 by tin...@google.com: Resizing browser flickers
Merge approved for M48 (branch 2564).

chro...@googlecode.com

unread,
Nov 20, 2015, 12:40:53 AM11/20/15
to chromi...@chromium.org

Comment #92 on issue 326995 by bugd...@chromium.org: Resizing browser
flickers black on all window managers
https://code.google.com/p/chromium/issues/detail?id=326995#c92

The following revision refers to this bug:

https://chrome-internal.googlesource.com/bling/chromium.git/+/635fd0ed3af9d0ec78a07170b87fc5f3469dc42e

commit 635fd0ed3af9d0ec78a07170b87fc5f3469dc42e
Author: Antoine Labour <pi...@chromium.org>
Date: Thu Nov 19 00:44:55 2015

chro...@googlecode.com

unread,
Nov 21, 2015, 1:15:48 AM11/21/15
to chromi...@chromium.org

Comment #93 on issue 326995 by pi...@chromium.org: Resizing browser
flickers black on all window managers
https://code.google.com/p/chromium/issues/detail?id=326995

@#89
> Isn't that what my patch in
> https://gist.github.com/mariospr/3bcee646631be04593cd should be doing, by
> wrapping the call to NativeViewGLSurfaceEGL::Initialize() between
> eglWaitGL() and eglWaitNative()?

I don't think your patch creates a child window, like we do on GLX.

The problem I've seen on at least some drivers is that the resize corrupts
not only the front buffer (which may or may not be fixed by the gravity
change), but also the back buffer, in the middle of drawing operations, and
so when we then swap, the corruption appears. Worse, we don't really have a
way to know we need to draw another frame, and so the corruption may last
until something else triggers a redraw.

Having a child window helps, because we control when the resize happens,
and we can do it at the beginning of the frame, before we've drawn
anything, so that all the corruption is fixed up before we swap.

chro...@googlecode.com

unread,
Nov 21, 2015, 6:40:00 AM11/21/15
to chromi...@chromium.org

Comment #94 on issue 326995 by mari...@gmail.com: Resizing browser
flickers black on all window managers
https://code.google.com/p/chromium/issues/detail?id=326995

Oh, I think I misunderstood your previous comment then, this makes more
sense now.

Will take a look to this next week, if possible. Thanks for the
clarification!

chro...@googlecode.com

unread,
Nov 23, 2015, 1:07:34 PM11/23/15
to chromi...@chromium.org

Comment #95 on issue 326995 by mari...@gmail.com: Resizing browser
flickers black on all window managers
https://code.google.com/p/chromium/issues/detail?id=326995

I did a few experiments today adding a child XWindow and got the flashing
going away, even without the gravity change provided by the previous patch
mentioned here.

It's still a very rough (and probably wrong, as this is all pretty new to
me) patch, but I think I would post it here to get some feedback, if
possible:

https://gist.github.com/mariospr/f665d66f3d3f9616b141

One thing I noticed, is that sometimes I get to see garbage in the
browser's window while resizing it, and even some crashes in both chromium
and the X server, so it's definitely not right, but I wonder if the fact
that my ARM driver does NOT provide the EGL_CHROMIUM_sync_control extension
might have something to do with that.

For reference, this is what a test program using eglQueryString() prints on
my device:

EGL Client APIs: OpenGL_ES
EGL Vendor: ARM
EGL Version: 1.4 Linux-r5p2-00rel0
EGL Extensions: EGL_KHR_image EGL_KHR_image_base EGL_KHR_image_pixmap
EGL_EXT_image_dma_buf_import EGL_KHR_gl_texture_2D_image
EGL_KHR_gl_texture_cubemap_image EGL_KHR_gl_renderbuffer_image
EGL_KHR_reusable_sync EGL_KHR_fence_sync
EGL_KHR_swap_buffers_with_damage EGL_EXT_swap_buffers_with_damage
EGL_KHR_lock_surface EGL_KHR_lock_surface2
EGL_EXT_create_context_robustness EGL_ANDROID_blob_cache
EGL_KHR_create_context EGL_KHR_partial_update

Sorry if the patch and/or the information is a bit vague/wrong. Just trying
to get this right to work on my next step to get this working nicely on
these devices :)

chro...@googlecode.com

unread,
Nov 24, 2015, 9:21:59 PM11/24/15
to chromi...@chromium.org

Comment #97 on issue 326995 by mari...@gmail.com: Resizing browser
flickers black on all window managers
https://code.google.com/p/chromium/issues/detail?id=326995

@piman: Thanks for the reply, good to know htat the syncing extension is
not strictly needed after all, I was not sure about that.

About the crashes, I think you're right once again: As Jasper explained on
IRC earlier, we have our own modifications (see [1]) on top of the ARM
driver we're using, which might be in the end reason behind those crashes.

Actually, without any further change to that driver (using it as it is from
the master branch), I've observed the following messages showing up in the
journal output when the X server crashes:

Nov 24 21:34:14 endless kernel: Mali<2>: Executor: Mali page fault
detected at 0x12f13240 from bus id 23 of type read on Mali_PP_MMU_Broadcast
Nov 24 21:34:14 endless kernel: Mali<2>: Mali group: Executing recovery
reset due to job failure
Nov 24 21:34:14 endless kernel: Mali<2>: Mali PP: Hard reset of core
Mali_PP0
Nov 24 21:34:14 endless kernel: Mali<2>: Mali PP: Hard reset of core
Mali_PP1Nov 24 21:34:15 endless gdm-Xorg-:1[1455]: (EE)
Nov 24 21:34:15 endless gdm-Xorg-:1[1455]: (EE) Backtrace:
Nov 24 21:34:15 endless gdm-Xorg-:1[1455]: (EE)
Nov 24 21:34:15 endless gdm-Xorg-:1[1455]: (EE) Segmentation fault at
address 0xb3d86000
Nov 24 21:34:15 endless gdm-Xorg-:1[1455]: (EE)
Nov 24 21:34:15 endless gdm-Xorg-:1[1455]: Fatal server error:
Nov 24 21:34:15 endless gdm-Xorg-:1[1455]: (EE) Caught signal 11
(Segmentation fault). Server aborting
Nov 24 21:34:15 endless gdm-Xorg-:1[1455]: (EE)
Nov 24 21:34:15 endless gdm-Xorg-:1[1455]: (EE)
Nov 24 21:34:15 endless gdm-Xorg-:1[1455]: Please consult the The X.Org
Foundation support
Nov 24 21:34:15 endless gdm-Xorg-:1[1455]: at http://wiki.x.org
Nov 24 21:34:15 endless gdm-Xorg-:1[1455]: for help.
Nov 24 21:34:15 endless gdm-Xorg-:1[1455]: (EE) Please also check the
log file at "/dev/null" for additional information.
Nov 24 21:34:15 endless gdm-Xorg-:1[1455]: (EE)
Nov 24 21:34:15 endless gdm-Xorg-:1[1455]: (EE) Server terminated with
error (1). Closing log file.

...which result in the X server crashing with the following backtrace:

(gdb) bt
#0 __libc_do_syscall () at
../ports/sysdeps/unix/sysv/linux/arm/libc-do-syscall.S:44
#1 0xb6a39f36 in __GI_raise (sig=sig@entry=6) at
../nptl/sysdeps/unix/sysv/linux/raise.c:56
#2 0xb6a3ac3e in __GI_abort () at abort.c:89
#3 0xb6f545d2 in OsAbort () at ../../os/utils.c:1373
#4 0xb6e8e80c in ddxGiveUp (error=EXIT_NO_ERROR,
error@entry=EXIT_ERR_ABORT)
at ../../../../hw/xfree86/common/xf86Init.c:1101
#5 0xb6e8e890 in AbortDDX (error=error@entry=EXIT_ERR_ABORT) at
../../../../hw/xfree86/common/xf86Init.c:1145
#6 0xb6f57fac in AbortServer () at ../../os/log.c:784
#7 0xb6f586c2 in FatalError (f=0xb6f7fa58 "Caught signal %d (%s).
Server
aborting\n") at ../../os/log.c:925
#8 0xb6f5284a in OsSigHandler (signo=245838, sip=0xb6f7fa58,
unused=<optimized out>) at ../../os/osinit.c:147
#9 <signal handler called>
#10 0xb6c79534 in ?? () from /lib/arm-linux-gnueabihf/libpixman-1.so.0
#11 0xb3c70000 in ?? ()
#12 0xb3c70000 in ?? ()


If now I revert the patch from [2], then I can no longer get neither the
crashes in the X server nor those error messages in the journal, which
might suggest that the exchange path is broken somehow.

I'll discuss this tomorrow with my work mate Daniel to see if I can drop
more light on the issue, but so far it's indeed looking better. In the
meanwhile, please let me know if there's anything else you'd like me to
test and/or to change in the patch proposed in my previous comment.

Thanks again!

[1] https://github.com/endlessm/xf86-video-armsoc
[2]
https://github.com/endlessm/xf86-video-armsoc/commit/c878da8fbf2e8bafde27a334513e244dc0b9ad36

chro...@googlecode.com

unread,
Nov 30, 2015, 10:22:03 AM11/30/15
to chromi...@chromium.org

Comment #98 on issue 326995 by ma...@endlessm.com: Resizing browser
flickers black on all window managers
https://code.google.com/p/chromium/issues/detail?id=326995

It looks like the crash is an issue with our specific driver, so I'd rather
forget about that for the purpose of this discussion.

In the other hand, I just placed a patch set for review here:
https://codereview.chromium.org/1480333002

@piman: I'm using my work email now, both here and for the code review, as
I was told that our Corporate CLA should be signed by now, but please let
me know should there was any issue with tha once you double check it.
Thanks!

chro...@googlecode.com

unread,
Dec 11, 2015, 7:32:43 AM12/11/15
to chromi...@chromium.org

Comment #99 on issue 326995 by bugd...@chromium.org: Resizing browser
flickers black on all window managers
https://code.google.com/p/chromium/issues/detail?id=326995#c99

The following revision refers to this bug:

https://chromium.googlesource.com/chromium/src.git/+/93f34d7ae6a7825439da4226dbfa1ceafbb54c22

commit 93f34d7ae6a7825439da4226dbfa1ceafbb54c22
Author: mario <ma...@endlessm.com>
Date: Fri Dec 11 12:29:54 2015

egl/x11: Created a child window to control resizes and prevent flashes

In a similar fashion to what it has been done for GLX, we create a child
XWindow to control resizes of EGL surfaces without exposing bugs in some
drivers which clobber the back buffer, resulting in flashes.

Contrary to GLX, EGL can be used in platforms not using the X Window System,
so we only apply this change in those cases, leaving the original code
untouched for non X11-based systems.

BUG=326995
R=pi...@chromium.org

Review URL: https://codereview.chromium.org/1480333002

Cr-Commit-Position: refs/heads/master@{#364681}

[modify] http://crrev.com/93f34d7ae6a7825439da4226dbfa1ceafbb54c22/AUTHORS
[modify]
http://crrev.com/93f34d7ae6a7825439da4226dbfa1ceafbb54c22/ui/gl/BUILD.gn
[modify]
http://crrev.com/93f34d7ae6a7825439da4226dbfa1ceafbb54c22/ui/gl/gl.gyp
[modify]
http://crrev.com/93f34d7ae6a7825439da4226dbfa1ceafbb54c22/ui/gl/gl_surface_egl.cc
[modify]
http://crrev.com/93f34d7ae6a7825439da4226dbfa1ceafbb54c22/ui/gl/gl_surface_egl.h
[add]
http://crrev.com/93f34d7ae6a7825439da4226dbfa1ceafbb54c22/ui/gl/gl_surface_egl_x11.cc
[add]
http://crrev.com/93f34d7ae6a7825439da4226dbfa1ceafbb54c22/ui/gl/gl_surface_egl_x11.h
[modify]
http://crrev.com/93f34d7ae6a7825439da4226dbfa1ceafbb54c22/ui/gl/gl_surface_x11.cc

chro...@googlecode.com

unread,
Dec 27, 2015, 2:20:02 PM12/27/15
to chromi...@chromium.org

Comment #100 on issue 326995 by przemysl...@revenuegroup.pl: Resizing
browser flickers black on all window managers
https://code.google.com/p/chromium/issues/detail?id=326995

On Linux Mint 17.3 with Nvidia Quadro 3000M.

I had problem with smooth resize od Chrome browser. To repair this i go to
administration, Nvidia X Server Settings then selected 'OpenGL Settings'
and uncheck 'Allow Flipping'.

Maybe it will help someone.

chro...@googlecode.com

unread,
Jan 4, 2016, 10:14:50 AM1/4/16
to chromi...@chromium.org

Comment #101 on issue 326995 by j...@logic-sunrise.com: Resizing browser
flickers black on all window managers
https://code.google.com/p/chromium/issues/detail?id=326995

Thanks for your tip with 'Allow Flipping' box, unfortunatly I tried and
still affected with the bug (even after a restart). Are you sure it's the
only box you played with in driver's settings ?

chro...@googlecode.com

unread,
Jan 15, 2016, 4:16:23 PM1/15/16
to chromi...@chromium.org

Comment #102 on issue 326995 by cwal...@chromium.org: Resizing browser
flickers black on all window managers
https://code.google.com/p/chromium/issues/detail?id=326995

I've had to fix the same problem when running Chromium on ANGLE on Linux:
ANGLE introduces another level of child window and was resizing at swap
time, causing either a black flicker or a discrepancy between Chromium's
rendering and the child window size.

It was fixed by making ANGLE handle eglWaitNative and resize the window at
that time if possible.

Relevant CL: https://chromium-review.googlesource.com/#/c/322390/
Reply all
Reply to author
Forward
0 new messages