Skip to content

Commit

Permalink
CoordinatedGraphics: fix includes when COORDINATED_GRAPHICS is not set
Browse files Browse the repository at this point in the history
https://bugs.webkit.org/show_bug.cgi?id=244811

Reviewed by Fujii Hironori.

COORDINATED_GRAPHICS is not set if USE_OPENGL_OR_ES=OFF

- Forward declare CoordinatedGraphicsLayer, the header will be
  included in CompositingCoordinator if COORDINATED_GRAPHICS is set.

- The LayerTreeHost.cpp is not compiled if the COORDINATED_GRAPHICS
  flag is not set, so extend the mocked function list.

Signed-off-by: Thomas Devoogdt <thomas.devoogdt@barco.com>

Canonical link: https://commits.webkit.org/254220@main
  • Loading branch information
ThomasDevoogdt authored and fujii committed Sep 7, 2022
1 parent af6020b commit f06201c
Showing 1 changed file with 6 additions and 3 deletions.
Expand Up @@ -37,9 +37,6 @@
#include <wtf/Forward.h>
#include <wtf/OptionSet.h>
#include <wtf/RunLoop.h>
#if PLATFORM(GTK)
#include <WebCore/CoordinatedGraphicsLayer.h>
#endif

#if USE(GRAPHICS_LAYER_TEXTURE_MAPPER)

Expand All @@ -48,6 +45,7 @@
#else // USE(GRAPHICS_LAYER_TEXTURE_MAPPER)

namespace WebCore {
class CoordinatedGraphicsLayer;
class IntRect;
class IntSize;
class GraphicsLayer;
Expand Down Expand Up @@ -234,6 +232,7 @@ inline void LayerTreeHost::scrollNonCompositedContents(const WebCore::IntRect&)
inline void LayerTreeHost::forceRepaint() { }
inline void LayerTreeHost::forceRepaintAsync(CompletionHandler<void()>&&) { }
inline void LayerTreeHost::sizeDidChange(const WebCore::IntSize&) { }
inline void LayerTreeHost::targetRefreshRateDidChange(unsigned) { }
inline void LayerTreeHost::pauseRendering() { }
inline void LayerTreeHost::resumeRendering() { }
inline WebCore::GraphicsLayerFactory* LayerTreeHost::graphicsLayerFactory() { return nullptr; }
Expand All @@ -242,6 +241,10 @@ inline void LayerTreeHost::didChangeViewportAttributes(WebCore::ViewportAttribut
inline void LayerTreeHost::setIsDiscardable(bool) { }
inline void LayerTreeHost::deviceOrPageScaleFactorChanged() { }
inline RefPtr<WebCore::DisplayRefreshMonitor> LayerTreeHost::createDisplayRefreshMonitor(WebCore::PlatformDisplayID) { return nullptr; }
#if PLATFORM(GTK)
inline void LayerTreeHost::adjustTransientZoom(double, WebCore::FloatPoint) { }
inline void LayerTreeHost::commitTransientZoom(double, WebCore::FloatPoint) { }
#endif
#endif

} // namespace WebKit
Expand Down

0 comments on commit f06201c

Please sign in to comment.