Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1444)

Unified Diff: third_party/WebKit/Source/platform/graphics/ColorBehavior.cpp

Issue 2556973002: Allow specifying ColorBehavior to ImageSource (Closed)
Patch Set: Rebase Created 4 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
Index: third_party/WebKit/Source/platform/graphics/ColorBehavior.cpp
diff --git a/third_party/WebKit/Source/platform/graphics/ColorBehavior.cpp b/third_party/WebKit/Source/platform/graphics/ColorBehavior.cpp
index 781ccc1f6d606e921424e537d63332411d0afdf5..10969e12369f813e18fee2c1787079da3769ce82 100644
--- a/third_party/WebKit/Source/platform/graphics/ColorBehavior.cpp
+++ b/third_party/WebKit/Source/platform/graphics/ColorBehavior.cpp
@@ -5,7 +5,6 @@
#include "platform/graphics/ColorBehavior.h"
#include "platform/graphics/BitmapImageMetrics.h"
-#include "third_party/skia/include/core/SkColorSpace.h"
#include "wtf/SpinLock.h"
namespace blink {
@@ -66,4 +65,16 @@ ColorBehavior ColorBehavior::transformToTargetForTesting() {
return transformToGlobalTarget();
}
+bool ColorBehavior::operator==(const ColorBehavior& other) const {
+ if (m_type != other.m_type)
+ return false;
+ if (m_type != Type::TransformTo)
+ return true;
+ return SkColorSpace::Equals(m_target.get(), other.m_target.get());
+}
+
+bool ColorBehavior::operator!=(const ColorBehavior& other) const {
+ return !(*this == other);
+}
+
} // namespace blink
« no previous file with comments | « third_party/WebKit/Source/platform/graphics/ColorBehavior.h ('k') | third_party/WebKit/Source/platform/graphics/ImageSource.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698