Diff
Modified: trunk/Source/WebCore/ChangeLog (276880 => 276881)
--- trunk/Source/WebCore/ChangeLog 2021-05-02 03:09:34 UTC (rev 276880)
+++ trunk/Source/WebCore/ChangeLog 2021-05-02 03:39:07 UTC (rev 276881)
@@ -1,3 +1,18 @@
+2021-05-01 Sam Weinig <wei...@apple.com>
+
+ Move PixelFormat into its own file
+ https://bugs.webkit.org/show_bug.cgi?id=225272
+
+ Reviewed by Darin Adler.
+
+ PixelFormat is going to be useful for non-ImageBuffer specific reasons
+ soon, so let's move it to its own header.
+
+ * Headers.cmake:
+ * WebCore.xcodeproj/project.pbxproj:
+ * platform/graphics/ImageBufferBackend.h:
+ * platform/graphics/PixelFormat.h: Added.
+
2021-04-30 Darin Adler <da...@apple.com>
Use SortedArrayMap in a few more places
Modified: trunk/Source/WebCore/Headers.cmake (276880 => 276881)
--- trunk/Source/WebCore/Headers.cmake 2021-05-02 03:09:34 UTC (rev 276880)
+++ trunk/Source/WebCore/Headers.cmake 2021-05-02 03:39:07 UTC (rev 276881)
@@ -1286,6 +1286,7 @@
platform/graphics/Path.h
platform/graphics/PathUtilities.h
platform/graphics/Pattern.h
+ platform/graphics/PixelFormat.h
platform/graphics/PlatformDisplay.h
platform/graphics/PlatformImage.h
platform/graphics/PlatformImageBuffer.h
Modified: trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj (276880 => 276881)
--- trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2021-05-02 03:09:34 UTC (rev 276880)
+++ trunk/Source/WebCore/WebCore.xcodeproj/project.pbxproj 2021-05-02 03:39:07 UTC (rev 276881)
@@ -4097,6 +4097,7 @@
BCA257151293C010007A263D /* VerticalPositionCache.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA257141293C010007A263D /* VerticalPositionCache.h */; };
BCA2B061105047600043BD1C /* UserScript.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA2B0601050475F0043BD1C /* UserScript.h */; settings = {ATTRIBUTES = (Private, ); }; };
BCA2B08B10505BCD0043BD1C /* UserScriptTypes.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA2B08A10505BCD0043BD1C /* UserScriptTypes.h */; settings = {ATTRIBUTES = (Private, ); }; };
+ BCA55914263DBD79007F19B3 /* PixelFormat.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA55912263DBD79007F19B3 /* PixelFormat.h */; settings = {ATTRIBUTES = (Private, ); }; };
BCA83E500D7CE1E9003421A8 /* JSDataTransfer.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA83E4E0D7CE1E9003421A8 /* JSDataTransfer.h */; };
BCA846D70DC67A350026C309 /* RenderReplica.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA846D50DC67A350026C309 /* RenderReplica.h */; };
BCA8C81E11E3D36900812FB7 /* BackForwardController.h in Headers */ = {isa = PBXBuildFile; fileRef = BCA8C81C11E3D36900812FB7 /* BackForwardController.h */; settings = {ATTRIBUTES = (Private, ); }; };
@@ -14312,6 +14313,7 @@
BCA2B08A10505BCD0043BD1C /* UserScriptTypes.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = UserScriptTypes.h; sourceTree = "<group>"; };
BCA378BA0D15F64200B793D6 /* ScheduledAction.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = ScheduledAction.cpp; sourceTree = "<group>"; };
BCA378BB0D15F64200B793D6 /* ScheduledAction.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = ScheduledAction.h; sourceTree = "<group>"; };
+ BCA55912263DBD79007F19B3 /* PixelFormat.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = PixelFormat.h; sourceTree = "<group>"; };
BCA83E360D7CDC4E003421A8 /* DataTransfer.idl */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = DataTransfer.idl; sourceTree = "<group>"; };
BCA83E4D0D7CE1E9003421A8 /* JSDataTransfer.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = JSDataTransfer.cpp; sourceTree = "<group>"; };
BCA83E4E0D7CE1E9003421A8 /* JSDataTransfer.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = JSDataTransfer.h; sourceTree = "<group>"; };
@@ -27019,6 +27021,7 @@
2D5002FA1B56D7990020AAF7 /* PathUtilities.h */,
A8FA6E5C0E4CFDED00D5CF49 /* Pattern.cpp */,
A8FA6E5B0E4CFDED00D5CF49 /* Pattern.h */,
+ BCA55912263DBD79007F19B3 /* PixelFormat.h */,
726D56E1253AE0430002EF90 /* PlatformImage.h */,
72BAC3A623E17328008D741C /* PlatformImageBuffer.h */,
550640AD240756DA00AAE045 /* PlatformImageBufferBackend.h */,
@@ -34437,6 +34440,7 @@
5758597C23A1FCF300C74572 /* Pin.h in Headers */,
D0FF2A5E11F8C45A007E74E0 /* PingLoader.h in Headers */,
CD7D33441C7A123F00041293 /* PixelBufferConformerCV.h in Headers */,
+ BCA55914263DBD79007F19B3 /* PixelFormat.h in Headers */,
CDEFA2281E7669E8000AE99C /* PlatformAudioData.h in Headers */,
499B3EDD128DB50200E726C2 /* PlatformCAAnimation.h in Headers */,
0F5E200618E771FC003EC3E5 /* PlatformCAAnimationCocoa.h in Headers */,
Modified: trunk/Source/WebCore/platform/graphics/ImageBufferBackend.h (276880 => 276881)
--- trunk/Source/WebCore/platform/graphics/ImageBufferBackend.h 2021-05-02 03:09:34 UTC (rev 276880)
+++ trunk/Source/WebCore/platform/graphics/ImageBufferBackend.h 2021-05-02 03:39:07 UTC (rev 276881)
@@ -31,6 +31,7 @@
#include "GraphicsTypesGL.h"
#include "ImagePaintingOptions.h"
#include "IntRect.h"
+#include "PixelFormat.h"
#include "PlatformLayer.h"
#include "RenderingMode.h"
#include <wtf/RefPtr.h>
@@ -55,13 +56,6 @@
Yes,
};
-enum class PixelFormat : uint8_t {
- RGBA8,
- BGRA8,
- RGB10,
- RGB10A8,
-};
-
enum class VolatilityState : uint8_t {
Valid,
Empty
@@ -170,16 +164,6 @@
namespace WTF {
-template<> struct EnumTraits<WebCore::PixelFormat> {
- using values = EnumValues<
- WebCore::PixelFormat,
- WebCore::PixelFormat::RGBA8,
- WebCore::PixelFormat::BGRA8,
- WebCore::PixelFormat::RGB10,
- WebCore::PixelFormat::RGB10A8
- >;
-};
-
template<> struct EnumTraits<WebCore::PreserveResolution> {
using values = EnumValues<
WebCore::PreserveResolution,
Added: trunk/Source/WebCore/platform/graphics/PixelFormat.h (0 => 276881)
--- trunk/Source/WebCore/platform/graphics/PixelFormat.h (rev 0)
+++ trunk/Source/WebCore/platform/graphics/PixelFormat.h 2021-05-02 03:39:07 UTC (rev 276881)
@@ -0,0 +1,53 @@
+/*
+ * Copyright (C) 2021 Apple Inc. All rights reserved.
+ *
+ * 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.
+ */
+
+#pragma once
+
+#include <wtf/EnumTraits.h>
+
+namespace WebCore {
+
+enum class PixelFormat : uint8_t {
+ RGBA8,
+ BGRA8,
+ RGB10,
+ RGB10A8,
+};
+
+}
+
+namespace WTF {
+
+template<> struct EnumTraits<WebCore::PixelFormat> {
+ using values = EnumValues<
+ WebCore::PixelFormat,
+ WebCore::PixelFormat::RGBA8,
+ WebCore::PixelFormat::BGRA8,
+ WebCore::PixelFormat::RGB10,
+ WebCore::PixelFormat::RGB10A8
+ >;
+};
+
+}