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

Unified Diff: tests/SerializationTest.cpp

Issue 2132113002: SkLS accepts nullptr for pointer args, handles alpha accurately, has new GM (Closed) Base URL: https://skia.googlesource.com/skia@dvonbeck-diffuse-api-change
Patch Set: Fixed more windows warnings Created 4 years, 5 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/gpu/GrFragmentProcessor.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/SerializationTest.cpp
diff --git a/tests/SerializationTest.cpp b/tests/SerializationTest.cpp
index 88f88fc2ac5bb524950ceb3677195d2bd663df8f..f806c4a5ccc4653eee16b66560cb3e8ef12258d1 100644
--- a/tests/SerializationTest.cpp
+++ b/tests/SerializationTest.cpp
@@ -587,13 +587,26 @@ DEF_TEST(Serialization, reporter) {
ctm);
sk_sp<SkShader> diffuseShader = SkMakeBitmapShader(diffuse, SkShader::kClamp_TileMode,
SkShader::kClamp_TileMode, &matrix, nullptr);
- sk_sp<SkShader> lightingShader = SkLightingShader::Make(std::move(diffuseShader),
- std::move(normalSource),
+
+ sk_sp<SkShader> lightingShader = SkLightingShader::Make(diffuseShader,
+ normalSource,
fLights);
+ SkAutoTUnref<SkShader>(TestFlattenableSerialization(lightingShader.get(), true, reporter));
+ lightingShader = SkLightingShader::Make(std::move(diffuseShader),
+ nullptr,
+ fLights);
SkAutoTUnref<SkShader>(TestFlattenableSerialization(lightingShader.get(), true, reporter));
- // TODO test equality?
+ lightingShader = SkLightingShader::Make(nullptr,
+ std::move(normalSource),
+ fLights);
+ SkAutoTUnref<SkShader>(TestFlattenableSerialization(lightingShader.get(), true, reporter));
+
+ lightingShader = SkLightingShader::Make(nullptr,
+ nullptr,
+ fLights);
+ SkAutoTUnref<SkShader>(TestFlattenableSerialization(lightingShader.get(), true, reporter));
}
}
« no previous file with comments | « src/gpu/GrFragmentProcessor.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698