⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 246030 in webkit


Ignore:
Timestamp:
Jun 3, 2019, 1:07:06 AM (7 years ago)
Author:
Carlos Garcia Campos
Message:

REGRESSION(r244182): [CoordinatedGraphics] Related view doesn't receive graphic updates
https://bugs.webkit.org/show_bug.cgi?id=198418

Reviewed by Žan Doberšek.

This is because we need a DisplayRefreshMonitor per drawing area, but the one from the first ThreradedCompositor
is always reused because they use the same display ID.

  • WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp:

(WebKit::DrawingAreaCoordinatedGraphics::enterAcceleratedCompositingMode): Use a unique display ID derived from
WebPage's ID.
(WebKit::DrawingAreaCoordinatedGraphics::exitAcceleratedCompositingMode): Use the primary display ID.

  • WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp:

(WebKit::LayerTreeHost::LayerTreeHost): Get the current web page display ID instead of inventing one.
(WebKit::LayerTreeHost::setIsDiscardable): Do not change display ID.

Location:
trunk/Source/WebKit
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/WebKit/ChangeLog

    r246023 r246030  
     12019-06-03  Carlos Garcia Campos  <cgarcia@igalia.com>
     2
     3        REGRESSION(r244182): [CoordinatedGraphics] Related view doesn't receive graphic updates
     4        https://bugs.webkit.org/show_bug.cgi?id=198418
     5
     6        Reviewed by Žan Doberšek.
     7
     8        This is because we need a DisplayRefreshMonitor per drawing area, but the one from the first ThreradedCompositor
     9        is always reused because they use the same display ID.
     10
     11        * WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp:
     12        (WebKit::DrawingAreaCoordinatedGraphics::enterAcceleratedCompositingMode): Use a unique display ID derived from
     13        WebPage's ID.
     14        (WebKit::DrawingAreaCoordinatedGraphics::exitAcceleratedCompositingMode): Use the primary display ID.
     15        * WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp:
     16        (WebKit::LayerTreeHost::LayerTreeHost): Get the current web page display ID instead of inventing one.
     17        (WebKit::LayerTreeHost::setIsDiscardable): Do not change display ID.
     18
    1192019-06-01  Dean Jackson  <dino@apple.com>
    220
  • trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/DrawingAreaCoordinatedGraphics.cpp

    r244182 r246030  
    545545    m_wantsToExitAcceleratedCompositingMode = false;
    546546
     547    // In order to ensure that we get a unique DisplayRefreshMonitor per-DrawingArea (necessary because ThreadedDisplayRefreshMonitor
     548    // is driven by the ThreadedCompositor of the drawing area), give each page a unique DisplayID derived from WebPage's unique ID.
     549    m_webPage.windowScreenDidChange(std::numeric_limits<uint32_t>::max() - m_webPage.pageID().toUInt64());
     550
    547551    ASSERT(!m_layerTreeHost);
    548552    if (m_previousLayerTreeHost) {
     
    598602    m_discardPreviousLayerTreeHostTimer.startOneShot(5_s);
    599603
     604    // Always use the primary display ID (0) when not in accelerated compositing mode.
     605    m_webPage.windowScreenDidChange(0);
     606
    600607    m_dirtyRegion = m_webPage.bounds();
    601608
  • trunk/Source/WebKit/WebProcess/WebPage/CoordinatedGraphics/LayerTreeHost.cpp

    r244182 r246030  
    3535#include "WebPage.h"
    3636#include "WebPageProxyMessages.h"
     37#include <WebCore/Chrome.h>
    3738#include <WebCore/Frame.h>
    3839#include <WebCore/FrameView.h>
     
    4546namespace WebKit {
    4647using namespace WebCore;
    47 
    48 static const PlatformDisplayID primaryDisplayID = 0;
    49 #if PLATFORM(GTK)
    50 static const PlatformDisplayID compositingDisplayID = 1;
    51 #else
    52 static const PlatformDisplayID compositingDisplayID = primaryDisplayID;
    53 #endif
    5448
    5549LayerTreeHost::LayerTreeHost(WebPage& webPage)
     
    8478            paintFlags |= TextureMapper::PaintingMirrored;
    8579
    86         m_compositor = ThreadedCompositor::create(m_compositorClient, m_compositorClient, compositingDisplayID, scaledSize, scaleFactor, ThreadedCompositor::ShouldDoFrameSync::Yes, paintFlags);
     80        m_compositor = ThreadedCompositor::create(m_compositorClient, m_compositorClient, m_webPage.corePage()->chrome().displayID(), scaledSize, scaleFactor, ThreadedCompositor::ShouldDoFrameSync::Yes, paintFlags);
    8781        m_layerTreeContext.contextID = m_surface->surfaceID();
    8882    } else
    89         m_compositor = ThreadedCompositor::create(m_compositorClient, m_compositorClient, compositingDisplayID, scaledSize, scaleFactor);
    90 
    91     m_webPage.windowScreenDidChange(compositingDisplayID);
     83        m_compositor = ThreadedCompositor::create(m_compositorClient, m_compositorClient, m_webPage.corePage()->chrome().displayID(), scaledSize, scaleFactor);
    9284
    9385    didChangeViewport();
     
    325317    if (m_isDiscardable) {
    326318        m_discardableSyncActions = OptionSet<DiscardableSyncActions>();
    327         m_webPage.windowScreenDidChange(primaryDisplayID);
    328         return;
    329     }
    330     m_webPage.windowScreenDidChange(compositingDisplayID);
     319        return;
     320    }
    331321
    332322    if (m_discardableSyncActions.isEmpty())
Note: See TracChangeset for help on using the changeset viewer.