Skip to content
Permalink
Browse files
[Threaded Compositor] Update also the contents size when creating the…
… threaded compositor

https://bugs.webkit.org/show_bug.cgi?id=167452

Reviewed by Žan Doberšek.

In r210954 we ensured that the threaded compositor and the viewport controller were created with the initial web
page size. If we don't update the contents size, the visible rectangle will be empty and tiles won't be created
until contentsSizeDidChange is called. It's even possible, when entering AC mode on demand, that we create the
layer tree host after the contents size changed, in which case nothing is rendered unless we resize the window.

* WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
(WebKit::ThreadedCoordinatedLayerTreeHost::ThreadedCoordinatedLayerTreeHost):

Canonical link: https://commits.webkit.org/184488@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@211205 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
carlosgcampos committed Jan 26, 2017
1 parent 5097c4d commit 506e7f09a48cbf1d809cf2046a8b4eafaff6109f
Showing with 21 additions and 0 deletions.
  1. +15 −0 Source/WebKit2/ChangeLog
  2. +6 −0 Source/WebKit2/WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp
@@ -1,3 +1,18 @@
2017-01-26 Carlos Garcia Campos <cgarcia@igalia.com>

[Threaded Compositor] Update also the contents size when creating the threaded compositor
https://bugs.webkit.org/show_bug.cgi?id=167452

Reviewed by Žan Doberšek.

In r210954 we ensured that the threaded compositor and the viewport controller were created with the initial web
page size. If we don't update the contents size, the visible rectangle will be empty and tiles won't be created
until contentsSizeDidChange is called. It's even possible, when entering AC mode on demand, that we create the
layer tree host after the contents size changed, in which case nothing is rendered unless we resize the window.

* WebProcess/WebPage/CoordinatedGraphics/ThreadedCoordinatedLayerTreeHost.cpp:
(WebKit::ThreadedCoordinatedLayerTreeHost::ThreadedCoordinatedLayerTreeHost):

2017-01-26 Csaba Osztrogonác <ossy@webkit.org>

[Mac][cmake] Fix the build after r211160
@@ -55,6 +55,12 @@ ThreadedCoordinatedLayerTreeHost::ThreadedCoordinatedLayerTreeHost(WebPage& webP
, m_surface(AcceleratedSurface::create(webPage))
, m_viewportController(webPage.size())
{
if (FrameView* frameView = m_webPage.mainFrameView()) {
auto contentsSize = frameView->contentsSize();
if (!contentsSize.isEmpty())
m_viewportController.didChangeContentsSize(contentsSize);
}

IntSize scaledSize(m_webPage.size());
scaledSize.scale(m_webPage.deviceScaleFactor());
float scaleFactor = m_webPage.deviceScaleFactor() * m_viewportController.pageScaleFactor();

0 comments on commit 506e7f0

Please sign in to comment.