Diff
Modified: trunk/Source/WebKit2/ChangeLog (213843 => 213844)
--- trunk/Source/WebKit2/ChangeLog 2017-03-13 14:04:37 UTC (rev 213843)
+++ trunk/Source/WebKit2/ChangeLog 2017-03-13 14:42:38 UTC (rev 213844)
@@ -1,3 +1,24 @@
+2017-03-13 Zan Dobersek <[email protected]>
+
+ [WK2] Move AcceleratedSurface files under WebProcess/WebPage/CoordinatedGraphics
+ https://bugs.webkit.org/show_bug.cgi?id=169348
+
+ Reviewed by Carlos Garcia Campos.
+
+ Move the AcceleratedSurface header and implementation files under the
+ WebProcess/WebPage directory since that class is not specific to the
+ GTK+ port.
+
+ * PlatformGTK.cmake:
+ * WebProcess/WebPage/AcceleratedSurface.cpp: Renamed from Source/WebKit2/WebProcess/WebPage/gtk/AcceleratedSurface.cpp.
+ (WebKit::AcceleratedSurface::create):
+ (WebKit::AcceleratedSurface::AcceleratedSurface):
+ (WebKit::AcceleratedSurface::resize):
+ * WebProcess/WebPage/AcceleratedSurface.h: Renamed from Source/WebKit2/WebProcess/WebPage/gtk/AcceleratedSurface.h.
+ (WebKit::AcceleratedSurface::window):
+ (WebKit::AcceleratedSurface::surfaceID):
+ (WebKit::AcceleratedSurface::shouldPaintMirrored):
+
2017-03-13 Konstantin Tokarev <[email protected]>
[cmake] [WK2] Guard flags intended for GCC-like compilers with COMPILER_IS_GCC_OR_CLANG
Modified: trunk/Source/WebKit2/PlatformGTK.cmake (213843 => 213844)
--- trunk/Source/WebKit2/PlatformGTK.cmake 2017-03-13 14:04:37 UTC (rev 213843)
+++ trunk/Source/WebKit2/PlatformGTK.cmake 2017-03-13 14:42:38 UTC (rev 213844)
@@ -479,6 +479,7 @@
WebProcess/WebCoreSupport/soup/WebFrameNetworkingContext.cpp
WebProcess/WebPage/AcceleratedDrawingArea.cpp
+ WebProcess/WebPage/AcceleratedSurface.cpp
WebProcess/WebPage/CoordinatedGraphics/AreaAllocator.cpp
WebProcess/WebPage/CoordinatedGraphics/CompositingCoordinator.cpp
@@ -492,7 +493,6 @@
WebProcess/WebPage/gstreamer/WebPageGStreamer.cpp
- WebProcess/WebPage/gtk/AcceleratedSurface.cpp
WebProcess/WebPage/gtk/AcceleratedSurfaceWayland.cpp
WebProcess/WebPage/gtk/AcceleratedSurfaceX11.cpp
WebProcess/WebPage/gtk/PrinterListGtk.cpp
Added: trunk/Source/WebKit2/WebProcess/WebPage/AcceleratedSurface.cpp (0 => 213844)
--- trunk/Source/WebKit2/WebProcess/WebPage/AcceleratedSurface.cpp (rev 0)
+++ trunk/Source/WebKit2/WebProcess/WebPage/AcceleratedSurface.cpp 2017-03-13 14:42:38 UTC (rev 213844)
@@ -0,0 +1,75 @@
+/*
+ * Copyright (C) 2016 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#include "config.h"
+#include "AcceleratedSurface.h"
+
+#include "WebPage.h"
+#include <WebCore/PlatformDisplay.h>
+
+#if PLATFORM(WAYLAND)
+#include "AcceleratedSurfaceWayland.h"
+#endif
+
+#if USE(REDIRECTED_XCOMPOSITE_WINDOW)
+#include "AcceleratedSurfaceX11.h"
+#endif
+
+using namespace WebCore;
+
+namespace WebKit {
+
+std::unique_ptr<AcceleratedSurface> AcceleratedSurface::create(WebPage& webPage)
+{
+#if PLATFORM(WAYLAND)
+ if (PlatformDisplay::sharedDisplay().type() == PlatformDisplay::Type::Wayland)
+ return AcceleratedSurfaceWayland::create(webPage);
+#endif
+#if USE(REDIRECTED_XCOMPOSITE_WINDOW)
+ if (PlatformDisplay::sharedDisplay().type() == PlatformDisplay::Type::X11)
+ return AcceleratedSurfaceX11::create(webPage);
+#endif
+ return nullptr;
+}
+
+AcceleratedSurface::AcceleratedSurface(WebPage& webPage)
+ : m_webPage(webPage)
+ , m_size(webPage.size())
+{
+ m_size.scale(m_webPage.deviceScaleFactor());
+}
+
+bool AcceleratedSurface::resize(const IntSize& size)
+{
+ IntSize scaledSize(size);
+ scaledSize.scale(m_webPage.deviceScaleFactor());
+ if (scaledSize == m_size)
+ return false;
+
+ m_size = scaledSize;
+ return true;
+}
+
+} // namespace WebKit
Added: trunk/Source/WebKit2/WebProcess/WebPage/AcceleratedSurface.h (0 => 213844)
--- trunk/Source/WebKit2/WebProcess/WebPage/AcceleratedSurface.h (rev 0)
+++ trunk/Source/WebKit2/WebProcess/WebPage/AcceleratedSurface.h 2017-03-13 14:42:38 UTC (rev 213844)
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2016 Igalia S.L.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions
+ * are met:
+ * 1. Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * 2. Redistributions in binary form must reproduce the above copyright
+ * notice, this list of conditions and the following disclaimer in the
+ * documentation and/or other materials provided with the distribution.
+ *
+ * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
+ * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+ * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+ * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
+ * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+ * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+ * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
+ * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
+ * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ */
+
+#pragma once
+
+#include <WebCore/IntSize.h>
+#include <wtf/Noncopyable.h>
+
+namespace WebKit {
+
+class WebPage;
+
+class AcceleratedSurface {
+ WTF_MAKE_NONCOPYABLE(AcceleratedSurface); WTF_MAKE_FAST_ALLOCATED;
+public:
+ static std::unique_ptr<AcceleratedSurface> create(WebPage&);
+ virtual ~AcceleratedSurface() = default;
+
+ virtual uint64_t window() const { ASSERT_NOT_REACHED(); return 0; }
+ virtual uint64_t surfaceID() const { ASSERT_NOT_REACHED(); return 0; };
+ virtual bool resize(const WebCore::IntSize&);
+ virtual bool shouldPaintMirrored() const { return false; }
+
+protected:
+ AcceleratedSurface(WebPage&);
+
+ WebPage& m_webPage;
+ WebCore::IntSize m_size;
+};
+
+} // namespace WebKit
Deleted: trunk/Source/WebKit2/WebProcess/WebPage/gtk/AcceleratedSurface.cpp (213843 => 213844)
--- trunk/Source/WebKit2/WebProcess/WebPage/gtk/AcceleratedSurface.cpp 2017-03-13 14:04:37 UTC (rev 213843)
+++ trunk/Source/WebKit2/WebProcess/WebPage/gtk/AcceleratedSurface.cpp 2017-03-13 14:42:38 UTC (rev 213844)
@@ -1,75 +0,0 @@
-/*
- * Copyright (C) 2016 Igalia S.L.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#include "config.h"
-#include "AcceleratedSurface.h"
-
-#include "WebPage.h"
-#include <WebCore/PlatformDisplay.h>
-
-#if PLATFORM(WAYLAND)
-#include "AcceleratedSurfaceWayland.h"
-#endif
-
-#if USE(REDIRECTED_XCOMPOSITE_WINDOW)
-#include "AcceleratedSurfaceX11.h"
-#endif
-
-using namespace WebCore;
-
-namespace WebKit {
-
-std::unique_ptr<AcceleratedSurface> AcceleratedSurface::create(WebPage& webPage)
-{
-#if PLATFORM(WAYLAND)
- if (PlatformDisplay::sharedDisplay().type() == PlatformDisplay::Type::Wayland)
- return AcceleratedSurfaceWayland::create(webPage);
-#endif
-#if USE(REDIRECTED_XCOMPOSITE_WINDOW)
- if (PlatformDisplay::sharedDisplay().type() == PlatformDisplay::Type::X11)
- return AcceleratedSurfaceX11::create(webPage);
-#endif
- return nullptr;
-}
-
-AcceleratedSurface::AcceleratedSurface(WebPage& webPage)
- : m_webPage(webPage)
- , m_size(webPage.size())
-{
- m_size.scale(m_webPage.deviceScaleFactor());
-}
-
-bool AcceleratedSurface::resize(const IntSize& size)
-{
- IntSize scaledSize(size);
- scaledSize.scale(m_webPage.deviceScaleFactor());
- if (scaledSize == m_size)
- return false;
-
- m_size = scaledSize;
- return true;
-}
-
-} // namespace WebKit
Deleted: trunk/Source/WebKit2/WebProcess/WebPage/gtk/AcceleratedSurface.h (213843 => 213844)
--- trunk/Source/WebKit2/WebProcess/WebPage/gtk/AcceleratedSurface.h 2017-03-13 14:04:37 UTC (rev 213843)
+++ trunk/Source/WebKit2/WebProcess/WebPage/gtk/AcceleratedSurface.h 2017-03-13 14:42:38 UTC (rev 213844)
@@ -1,53 +0,0 @@
-/*
- * Copyright (C) 2016 Igalia S.L.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * 1. Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * 2. Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in the
- * documentation and/or other materials provided with the distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY APPLE INC. ``AS IS'' AND ANY
- * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
- * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
- * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL APPLE INC. OR
- * CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
- * EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
- * PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR
- * PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY
- * OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
- * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
- * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
- */
-
-#pragma once
-
-#include <WebCore/IntSize.h>
-#include <wtf/Noncopyable.h>
-
-namespace WebKit {
-
-class WebPage;
-
-class AcceleratedSurface {
- WTF_MAKE_NONCOPYABLE(AcceleratedSurface); WTF_MAKE_FAST_ALLOCATED;
-public:
- static std::unique_ptr<AcceleratedSurface> create(WebPage&);
- virtual ~AcceleratedSurface() = default;
-
- virtual uint64_t window() const { ASSERT_NOT_REACHED(); return 0; }
- virtual uint64_t surfaceID() const { ASSERT_NOT_REACHED(); return 0; };
- virtual bool resize(const WebCore::IntSize&);
- virtual bool shouldPaintMirrored() const { return false; }
-
-protected:
- AcceleratedSurface(WebPage&);
-
- WebPage& m_webPage;
- WebCore::IntSize m_size;
-};
-
-} // namespace WebKit