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

Unified Diff: src/core/SkModeColorFilter.cpp

Issue 1577073002: remove external header for SkModeColorFilter (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: duh -- actually move the header Created 4 years, 11 months 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
« no previous file with comments | « src/core/SkModeColorFilter.h ('k') | src/effects/SkColorFilters.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkModeColorFilter.cpp
diff --git a/src/effects/SkColorFilters.cpp b/src/core/SkModeColorFilter.cpp
similarity index 91%
rename from src/effects/SkColorFilters.cpp
rename to src/core/SkModeColorFilter.cpp
index fe39dd980025c3ed4c7e39a5beb42d52b2e04646..df1051abb0ea35fa07b8db6b49fc84ab817a7ff8 100644
--- a/src/effects/SkColorFilters.cpp
+++ b/src/core/SkModeColorFilter.cpp
@@ -15,6 +15,17 @@
#include "SkString.h"
#include "SkValidationUtils.h"
+//////////////////////////////////////////////////////////////////////////////////////////////////
+
+#ifndef SK_IGNORE_TO_STRING
+void SkModeColorFilter::toString(SkString* str) const {
+ str->append("SkModeColorFilter: color: 0x");
+ str->appendHex(fColor);
+ str->append(" mode: ");
+ str->append(SkXfermode::ModeName(fMode));
+}
+#endif
+
bool SkModeColorFilter::asColorMode(SkColor* color, SkXfermode::Mode* mode) const {
if (color) {
*color = fColor;
@@ -100,7 +111,7 @@ const GrFragmentProcessor* SkModeColorFilter::asFragmentProcessor(GrContext*) co
///////////////////////////////////////////////////////////////////////////////
-class Src_SkModeColorFilter : public SkModeColorFilter {
+class Src_SkModeColorFilter final : public SkModeColorFilter {
public:
Src_SkModeColorFilter(SkColor color) : INHERITED(color, SkXfermode::kSrc_Mode) {}
@@ -112,7 +123,7 @@ private:
typedef SkModeColorFilter INHERITED;
};
-class SrcOver_SkModeColorFilter : public SkModeColorFilter {
+class SrcOver_SkModeColorFilter final : public SkModeColorFilter {
public:
SrcOver_SkModeColorFilter(SkColor color) : INHERITED(color, SkXfermode::kSrcOver_Mode) { }
« no previous file with comments | « src/core/SkModeColorFilter.h ('k') | src/effects/SkColorFilters.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698