Skip to content
Permalink
Browse files
Guard code that uses class LayerTreeHost with USE(COORDINATED_GRAPHIC…
…S) or USE(TEXTURE_MAPPER)

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

Reviewed by Tim Horton.

We neither make use of LayerTreeHost on Mac nor on iOS. We should guard code that makes
use of this class as applicable. This also fixes the iOS Simulator build when using
Apple Internal software.

* WebProcess/WebCoreSupport/WebChromeClient.cpp: Guard code that used LayerTreeHost.
* WebProcess/WebPage/LayerTreeHost.cpp: Guard contents of file with USE(COORDINATED_GRAPHICS) || USE(TEXTURE_MAPPER).
* WebProcess/WebPage/LayerTreeHost.h: Ditto.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::scalePage): Ditto.
(WebKit::WebPage::setDeviceScaleFactor): Ditto.
* WebProcess/WebPage/WebPage.h: Substitute header LayerTreeContext.h for LayerTreeHost.h since we make use
of the enum class LayerHostingMode.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateVisibleContentRects): Remove unnecessary code; DrawingArea::layerTreeHost() always
returns nullptr on iOS.

Canonical link: https://commits.webkit.org/170415@main
git-svn-id: https://svn.webkit.org/repository/webkit/trunk@194108 268f45cc-cd09-0410-ab3c-d52691b4dbfc
  • Loading branch information
dydz committed Dec 15, 2015
1 parent beca2df commit 10e738b52db07fcae836d99c7bb72518d0fbe316
@@ -1,3 +1,26 @@
2015-12-15 Daniel Bates <dabates@apple.com>

Guard code that uses class LayerTreeHost with USE(COORDINATED_GRAPHICS) or USE(TEXTURE_MAPPER)
https://bugs.webkit.org/show_bug.cgi?id=152265

Reviewed by Tim Horton.

We neither make use of LayerTreeHost on Mac nor on iOS. We should guard code that makes
use of this class as applicable. This also fixes the iOS Simulator build when using
Apple Internal software.

* WebProcess/WebCoreSupport/WebChromeClient.cpp: Guard code that used LayerTreeHost.
* WebProcess/WebPage/LayerTreeHost.cpp: Guard contents of file with USE(COORDINATED_GRAPHICS) || USE(TEXTURE_MAPPER).
* WebProcess/WebPage/LayerTreeHost.h: Ditto.
* WebProcess/WebPage/WebPage.cpp:
(WebKit::WebPage::scalePage): Ditto.
(WebKit::WebPage::setDeviceScaleFactor): Ditto.
* WebProcess/WebPage/WebPage.h: Substitute header LayerTreeContext.h for LayerTreeHost.h since we make use
of the enum class LayerHostingMode.
* WebProcess/WebPage/ios/WebPageIOS.mm:
(WebKit::WebPage::updateVisibleContentRects): Remove unnecessary code; DrawingArea::layerTreeHost() always
returns nullptr on iOS.

2015-12-15 Zan Dobersek <zdobersek@igalia.com>

[TexMap] Operate with a reference to the TextureMapper wherever possible
@@ -33,7 +33,6 @@
#include "HangDetectionDisabler.h"
#include "InjectedBundleNavigationAction.h"
#include "InjectedBundleNodeHandle.h"
#include "LayerTreeHost.h"
#include "NavigationActionData.h"
#include "PageBanner.h"
#include "UserData.h"
@@ -84,6 +83,10 @@
#include "RemoteScrollingCoordinator.h"
#endif

#if USE(COORDINATED_GRAPHICS)
#include "LayerTreeHost.h"
#endif

#if PLATFORM(GTK)
#include "PrinterListGtk.h"
#endif
@@ -24,6 +24,9 @@
*/

#include "config.h"

#if USE(COORDINATED_GRAPHICS) || USE(TEXTURE_MAPPER)

#include "LayerTreeHost.h"

#if USE(COORDINATED_GRAPHICS_MULTIPROCESS)
@@ -62,3 +65,5 @@ LayerTreeHost::~LayerTreeHost()
}

} // namespace WebKit

#endif // USE(COORDINATED_GRAPHICS) || USE(TEXTURE_MAPPER)
@@ -26,6 +26,8 @@
#ifndef LayerTreeHost_h
#define LayerTreeHost_h

#if USE(COORDINATED_GRAPHICS) || USE(TEXTURE_MAPPER)

#include "LayerTreeContext.h"
#include <WebCore/Color.h>
#include <wtf/PassRefPtr.h>
@@ -106,4 +108,6 @@ class LayerTreeHost : public RefCounted<LayerTreeHost> {

} // namespace WebKit

#endif // USE(COORDINATED_GRAPHICS) || USE(TEXTURE_MAPPER)

#endif // LayerTreeHost_h
@@ -40,7 +40,6 @@
#include "EventDispatcher.h"
#include "InjectedBundle.h"
#include "InjectedBundleBackForwardList.h"
#include "LayerTreeHost.h"
#include "Logging.h"
#include "NetscapePlugin.h"
#include "NotificationPermissionRequestManager.h"
@@ -212,6 +211,10 @@
#include <wtf/RefCountedLeakCounter.h>
#endif

#if USE(COORDINATED_GRAPHICS) || USE(TEXTURE_MAPPER)
#include "LayerTreeHost.h"
#endif

#if USE(COORDINATED_GRAPHICS_MULTIPROCESS)
#include "CoordinatedLayerTreeHostMessages.h"
#endif
@@ -1459,8 +1462,10 @@ void WebPage::scalePage(double scale, const IntPoint& origin)
for (auto* pluginView : m_pluginViews)
pluginView->pageScaleFactorDidChange();

#if USE(COORDINATED_GRAPHICS) || USE(TEXTURE_MAPPER)
if (m_drawingArea->layerTreeHost())
m_drawingArea->layerTreeHost()->deviceOrPageScaleFactorChanged();
#endif

send(Messages::WebPageProxy::PageScaleFactorDidChange(scale));
}
@@ -1535,8 +1540,10 @@ void WebPage::setDeviceScaleFactor(float scaleFactor)
m_findController.deviceScaleFactorDidChange();
}

#if USE(COORDINATED_GRAPHICS) || USE(TEXTURE_MAPPER)
if (m_drawingArea->layerTreeHost())
m_drawingArea->layerTreeHost()->deviceOrPageScaleFactorChanged();
#endif
}

float WebPage::deviceScaleFactor() const
@@ -39,7 +39,7 @@
#include "InjectedBundlePageLoaderClient.h"
#include "InjectedBundlePagePolicyClient.h"
#include "InjectedBundlePageResourceLoadClient.h"
#include "LayerTreeHost.h"
#include "LayerTreeContext.h"
#include "MessageReceiver.h"
#include "MessageSender.h"
#include "Plugin.h"
@@ -2924,9 +2924,6 @@ static inline FloatRect adjustExposedRectForBoundedScale(const FloatRect& expose

m_page->setPageScaleFactor(floatBoundedScale, scrollPosition, m_isInStableState);
hasSetPageScale = true;

if (LayerTreeHost* layerTreeHost = m_drawingArea->layerTreeHost())
layerTreeHost->deviceOrPageScaleFactorChanged();
send(Messages::WebPageProxy::PageScaleFactorDidChange(floatBoundedScale));
}

0 comments on commit 10e738b

Please sign in to comment.