Skip to content
Permalink
Browse files
Transient quarter display with a HiDPI /4k screen and a 200% scaling
https://bugs.webkit.org/show_bug.cgi?id=219202

Patch by Alexander Mikhaylenko <alexm@gnome.org> on 2021-05-27
Reviewed by Adrian Perez de Castro.

Set the root layer transformation before syncing animations and not after.
This way we avoid having the first frame use the wrong scale on hidpi.

* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
(WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):

Canonical link: https://commits.webkit.org/238200@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@278156 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
Exalm authored and webkit-commit-queue committed May 27, 2021
1 parent 1d7fc84 commit 56b0e4f90db29c928ef4e213a1e9830114fbc0e1
Showing with 16 additions and 3 deletions.
  1. +13 −0 Source/WebKit/ChangeLog
  2. +3 −3 Source/WebKit/Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp
@@ -1,3 +1,16 @@
2021-05-27 Alexander Mikhaylenko <alexm@gnome.org>

Transient quarter display with a HiDPI /4k screen and a 200% scaling
https://bugs.webkit.org/show_bug.cgi?id=219202

Reviewed by Adrian Perez de Castro.

Set the root layer transformation before syncing animations and not after.
This way we avoid having the first frame use the wrong scale on hidpi.

* Shared/CoordinatedGraphics/CoordinatedGraphicsScene.cpp:
(WebKit::CoordinatedGraphicsScene::paintToCurrentGLContext):

2021-05-26 Chris Dumez <cdumez@apple.com>

Leverage the new Vector(const T*, size_t) constructor
@@ -68,13 +68,13 @@ void CoordinatedGraphicsScene::paintToCurrentGLContext(const TransformationMatri
if (!currentRootLayer)
return;

if (currentRootLayer->transform() != matrix)
currentRootLayer->setTransform(matrix);

bool sceneHasRunningAnimations = currentRootLayer->applyAnimationsRecursively(MonotonicTime::now());
m_textureMapper->beginPainting(PaintFlags);
m_textureMapper->beginClip(TransformationMatrix(), FloatRoundedRect(clipRect));

if (currentRootLayer->transform() != matrix)
currentRootLayer->setTransform(matrix);

currentRootLayer->paint(*m_textureMapper);
m_fpsCounter.updateFPSAndDisplay(*m_textureMapper, clipRect.location(), matrix);
m_textureMapper->endClip();

0 comments on commit 56b0e4f

Please sign in to comment.