Title: [274114] trunk/Source/WebCore
Revision
274114
Author
wei...@apple.com
Date
2021-03-08 15:35:57 -0800 (Mon, 08 Mar 2021)

Log Message

Make Color threadsafe
https://bugs.webkit.org/show_bug.cgi?id=222886

Reviewed by Darin Adler.

Color is mostly threadsafe already and can really be used as an immutable
value type in most cases. Let's make that completely true by making the out
of line component case ThreadSafeRefCounted.

* platform/graphics/Color.h:

Modified Paths

Diff

Modified: trunk/Source/WebCore/ChangeLog (274113 => 274114)


--- trunk/Source/WebCore/ChangeLog	2021-03-08 23:21:18 UTC (rev 274113)
+++ trunk/Source/WebCore/ChangeLog	2021-03-08 23:35:57 UTC (rev 274114)
@@ -1,3 +1,16 @@
+2021-03-08  Sam Weinig  <wei...@apple.com>
+
+        Make Color threadsafe
+        https://bugs.webkit.org/show_bug.cgi?id=222886
+
+        Reviewed by Darin Adler.
+
+        Color is mostly threadsafe already and can really be used as an immutable
+        value type in most cases. Let's make that completely true by making the out
+        of line component case ThreadSafeRefCounted.
+
+        * platform/graphics/Color.h:
+
 2021-03-05  Darin Adler  <da...@apple.com>
 
         Fix inspector viewing of canvas save/restore stack, and tighten and simplify CanvasRenderingContext2DBase

Modified: trunk/Source/WebCore/platform/graphics/Color.h (274113 => 274114)


--- trunk/Source/WebCore/platform/graphics/Color.h	2021-03-08 23:21:18 UTC (rev 274113)
+++ trunk/Source/WebCore/platform/graphics/Color.h	2021-03-08 23:35:57 UTC (rev 274114)
@@ -35,8 +35,8 @@
 #include <wtf/OptionSet.h>
 #include <wtf/Optional.h>
 #include <wtf/Ref.h>
-#include <wtf/RefCounted.h>
 #include <wtf/StdLibExtras.h>
+#include <wtf/ThreadSafeRefCounted.h>
 
 #if USE(CG)
 typedef struct CGColor* CGColorRef;
@@ -185,7 +185,7 @@
     template<class Decoder> static Optional<Color> decode(Decoder&);
 
 private:
-    class OutOfLineComponents : public RefCounted<OutOfLineComponents> {
+    class OutOfLineComponents : public ThreadSafeRefCounted<OutOfLineComponents> {
     public:
         static Ref<OutOfLineComponents> create(ColorComponents<float> components)
         {
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to