summaryrefslogtreecommitdiffstats
path: root/gfx
diff options
context:
space:
mode:
authorMoonchild <moonchild@palemoon.org>2019-05-22 21:58:01 +0000
committerGitHub <noreply@github.com>2019-05-22 21:58:01 +0000
commit372fccddf49146f9a0847564959d36ba3bef2e62 (patch)
tree086723e76ceea23f60bd85d0cd1578eebfdf48df /gfx
parentbe8d03cf14455a80342582e8578fdbee590f350a (diff)
parent2fd3007864d0c37b5bcc5ea9ca85d53d96fd83c5 (diff)
downloadUXP-372fccddf49146f9a0847564959d36ba3bef2e62.tar
UXP-372fccddf49146f9a0847564959d36ba3bef2e62.tar.gz
UXP-372fccddf49146f9a0847564959d36ba3bef2e62.tar.lz
UXP-372fccddf49146f9a0847564959d36ba3bef2e62.tar.xz
UXP-372fccddf49146f9a0847564959d36ba3bef2e62.zip
Merge pull request #1100 from Ionic/bugfix/xrender-flicker
Enable double buffering when using XRENDER.
Diffstat (limited to 'gfx')
-rw-r--r--gfx/layers/client/ContentClient.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/gfx/layers/client/ContentClient.cpp b/gfx/layers/client/ContentClient.cpp
index 3373230a9..50e159a23 100644
--- a/gfx/layers/client/ContentClient.cpp
+++ b/gfx/layers/client/ContentClient.cpp
@@ -78,8 +78,21 @@ ContentClient::CreateContentClient(CompositableForwarder* aForwarder)
// We can't use double buffering when using image content with
// Xrender support on Linux, as ContentHostDoubleBuffered is not
// suited for direct uploads to the server.
+ // FIXME: Even though the comment above suggests that double buffering
+ // is supposed to be disabled when Xrender support is being enabled
+ // (and used), it really wasn't. Historically,
+ // UseImageOffscreenSurfaces() was always false in GTK2 builds, thus
+ // triggering the check, regardless of UseXRender().
+ // Some time later, offscreen surfaces were always enabled, but the
+ // Xrender functionality broke due to not using Xlib-based surfaces.
+ // Using Xlib-based surfaces compatible with Xrender operations seems
+ // to lead to weird graphical artifacts (bars and stripes) on some
+ // hardware (Intel-based?) when displaying quickly-changing content,
+ // so contrary to the statement above we'd better enable double
+ // buffering - which also seems to not have any negative performance
+ // impact.
if (!gfxPlatformGtk::GetPlatform()->UseImageOffscreenSurfaces() ||
- !gfxVars::UseXRender())
+ gfxVars::UseXRender())
#endif
{
useDoubleBuffering = (LayerManagerComposite::SupportsDirectTexturing() &&