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

Unified Diff: tests/ValueTest.cpp

Issue 1585813004: SkValue: SkXfermode (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: 2016-01-14 (Thursday) 16:27:56 EST 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
« src/effects/SkArithmeticMode.cpp ('K') | « src/utils/debugger/SkDebugCanvas.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/ValueTest.cpp
diff --git a/tests/ValueTest.cpp b/tests/ValueTest.cpp
index 220ef2f9aeceb43d318a2c2f3c250a837c9c25d4..99625307839b9f573dde980cf8b989d0d3aff83a 100644
--- a/tests/ValueTest.cpp
+++ b/tests/ValueTest.cpp
@@ -6,4 +6,21 @@
*/
#include "Test.h"
-#include "SkValue.h"
+#include "SkValueKeys.h"
+#include "SkXfermode.h"
+
+DEF_TEST(Value_Xfermode, r) {
+
+ SkAutoTUnref<SkXfermode> xfermode(
+ SkXfermode::Create(SkXfermode::kDstOver_Mode));
+ SkValue val = xfermode->represent();
+ REPORTER_ASSERT(r, SkValue::ProcCoeffXfermode == val.type());
+ SkValue valCopy = val;
+ REPORTER_ASSERT(r, SkValue::ProcCoeffXfermode == valCopy.type());
+
+ const SkValue* mode = val.get(SkValueKeys::ProcCoeffXfermode_Mode);
+ REPORTER_ASSERT(r, mode);
+ if (mode) {
+ REPORTER_ASSERT(r, (uint32_t)SkXfermode::kDstOver_Mode == mode->u32());
+ }
+}
« src/effects/SkArithmeticMode.cpp ('K') | « src/utils/debugger/SkDebugCanvas.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698