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

Unified Diff: tests/LayerRasterizerTest.cpp

Issue 313653006: Return NULL when building empty LayerRasterizer. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 6 years, 7 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/effects/SkLayerRasterizer.cpp ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: tests/LayerRasterizerTest.cpp
diff --git a/tests/LayerRasterizerTest.cpp b/tests/LayerRasterizerTest.cpp
index 8e6b64c2076db47b45a5a0efe2e84485f75528d5..640c5813d4bbcd9fa364a8081a5b713ad780931d 100644
--- a/tests/LayerRasterizerTest.cpp
+++ b/tests/LayerRasterizerTest.cpp
@@ -81,6 +81,7 @@ static bool equals(const SkLayerRasterizer_Rec& rec1, const SkLayerRasterizer_Re
DEF_TEST(LayerRasterizer_copy, reporter) {
SkLayerRasterizer::Builder builder;
+ REPORTER_ASSERT(reporter, NULL == builder.snapshotRasterizer());
SkPaint paint;
// Create a bunch of paints with different flags.
for (uint32_t flags = 0x01; flags < SkPaint::kAllFlags; flags <<= 1) {
@@ -136,3 +137,8 @@ DEF_TEST(LayerRasterizer_copy, reporter) {
}
}
}
+
+DEF_TEST(LayerRasterizer_detachEmpty, reporter) {
+ SkLayerRasterizer::Builder builder;
+ REPORTER_ASSERT(reporter, NULL == builder.detachRasterizer());
+}
« no previous file with comments | « src/effects/SkLayerRasterizer.cpp ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698