Provide default implementations of Image and Icon
authordon.olmstead@sony.com <don.olmstead@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Nov 2018 22:16:34 +0000 (22:16 +0000)
committerdon.olmstead@sony.com <don.olmstead@sony.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 16 Nov 2018 22:16:34 +0000 (22:16 +0000)
https://bugs.webkit.org/show_bug.cgi?id=191764

Reviewed by Michael Catanzaro.

Makes IconWPE and ImageWPE implementations the default.

* Sources.txt:
* SourcesWPE.txt:
* platform/graphics/Icon.cpp: Renamed from Source/WebCore/platform/graphics/wpe/IconWPE.cpp.
* platform/graphics/Image.cpp:
(WebCore::BitmapImage::invalidatePlatformData): Placed here for consistency with implementing ports.
(WebCore::Image::loadPlatformResource):
* platform/graphics/wpe/ImageWPE.cpp: Removed.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@238304 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/WebCore/ChangeLog
Source/WebCore/Sources.txt
Source/WebCore/SourcesWPE.txt
Source/WebCore/platform/graphics/Icon.cpp [moved from Source/WebCore/platform/graphics/wpe/IconWPE.cpp with 90% similarity]
Source/WebCore/platform/graphics/Image.cpp
Source/WebCore/platform/graphics/wpe/ImageWPE.cpp [deleted file]

index 8409f6e..f4b47d2 100644 (file)
@@ -1,3 +1,20 @@
+2018-11-16  Don Olmstead  <don.olmstead@sony.com>
+
+        Provide default implementations of Image and Icon
+        https://bugs.webkit.org/show_bug.cgi?id=191764
+
+        Reviewed by Michael Catanzaro.
+
+        Makes IconWPE and ImageWPE implementations the default.
+
+        * Sources.txt:
+        * SourcesWPE.txt:
+        * platform/graphics/Icon.cpp: Renamed from Source/WebCore/platform/graphics/wpe/IconWPE.cpp.
+        * platform/graphics/Image.cpp:
+        (WebCore::BitmapImage::invalidatePlatformData): Placed here for consistency with implementing ports.
+        (WebCore::Image::loadPlatformResource):
+        * platform/graphics/wpe/ImageWPE.cpp: Removed.
+
 2018-11-16  Brent Fulgham  <bfulgham@apple.com>
 
         [Win] Reduce the use of WKSI library calls: CFNetwork
index 8633bd7..758c87e 100644 (file)
@@ -1668,6 +1668,7 @@ platform/graphics/GraphicsLayerTransform.cpp
 platform/graphics/GraphicsLayerUpdater.cpp
 platform/graphics/GraphicsTypes.cpp
 platform/graphics/HEVCUtilities.cpp
+platform/graphics/Icon.cpp
 platform/graphics/Image.cpp
 platform/graphics/ImageBuffer.cpp
 platform/graphics/ImageDecoder.cpp
index 87d2869..09fcc55 100644 (file)
@@ -62,9 +62,6 @@ platform/graphics/opengl/TemporaryOpenGLSetting.cpp
 
 platform/graphics/opentype/OpenTypeVerticalData.cpp
 
-platform/graphics/wpe/IconWPE.cpp
-platform/graphics/wpe/ImageWPE.cpp
-
 platform/libwpe/PasteboardLibWPE.cpp
 platform/libwpe/PlatformKeyboardEventLibWPE.cpp
 platform/libwpe/PlatformPasteboardLibWPE.cpp
similarity index 90%
rename from Source/WebCore/platform/graphics/wpe/IconWPE.cpp
rename to Source/WebCore/platform/graphics/Icon.cpp
index 76a21da..5d3ca83 100644 (file)
@@ -26,6 +26,8 @@
 #include "config.h"
 #include "Icon.h"
 
+#if !PLATFORM(GTK) && !PLATFORM(IOS_FAMILY) && !PLATFORM(MAC) && !PLATFORM(WIN)
+
 namespace WebCore {
 
 Icon::~Icon() = default;
@@ -40,3 +42,5 @@ RefPtr<Icon> Icon::createIconForFiles(const Vector<String>&)
 }
 
 } // namespace WebCore
+
+#endif // !PLATFORM(GTK) && !PLATFORM(IOS_FAMILY) && !PLATFORM(MAC) && !PLATFORM(WIN)
index 5bce618..4f077d5 100644 (file)
@@ -387,4 +387,17 @@ TextStream& operator<<(TextStream& ts, const Image& image)
     return ts;
 }
 
+#if !PLATFORM(COCOA) && !PLATFORM(GTK) && !PLATFORM(WIN)
+
+void BitmapImage::invalidatePlatformData()
+{
+}
+
+Ref<Image> Image::loadPlatformResource(const char* resource)
+{
+    WTFLogAlways("WARNING: trying to load platform resource '%s'", resource);
+    return BitmapImage::create();
+}
+
+#endif // !PLATFORM(COCOA) && !PLATFORM(GTK) && !PLATFORM(WIN)
 }
diff --git a/Source/WebCore/platform/graphics/wpe/ImageWPE.cpp b/Source/WebCore/platform/graphics/wpe/ImageWPE.cpp
deleted file mode 100644 (file)
index c3c1341..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-/*
- * Copyright (C) 2014 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. AND ITS CONTRIBUTORS ``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 ITS 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 "BitmapImage.h"
-
-#include <cstdio>
-
-namespace WebCore {
-
-void BitmapImage::invalidatePlatformData()
-{
-}
-
-Ref<Image> Image::loadPlatformResource(const char* resource)
-{
-    WTFLogAlways("WARNING: trying to load platform resource '%s'", resource);
-    return BitmapImage::create();
-}
-
-} // namespace WebCore