Index: tests/PaintTest.cpp |
diff --git a/tests/PaintTest.cpp b/tests/PaintTest.cpp |
index 51060577284c4dbc96643c1be033d08a48a710dc..57d028336aa3431947f5bdbbdad7e65b30e5e2d9 100644 |
--- a/tests/PaintTest.cpp |
+++ b/tests/PaintTest.cpp |
@@ -318,19 +318,22 @@ DEF_TEST(Paint_regression_measureText, reporter) { |
DEF_TEST(Paint_FlatteningTraits, r) { |
SkPaint paint; |
paint.setColor(0x00AABBCC); |
- paint.setTextScaleX(1.0f); // Encoded despite being the default value. |
+ paint.setTextScaleX(1.0f); // Default value, ignored. |
paint.setTextSize(19); |
paint.setXfermode(SkXfermode::Create(SkXfermode::kModulate_Mode))->unref(); |
- paint.setLooper(NULL); // Ignored. |
+ paint.setLooper(NULL); // Default value, ignored. |
SkWriteBuffer writer; |
SkPaint::FlatteningTraits::Flatten(writer, paint); |
- const size_t expectedBytesWritten = sizeof(void*) == 8 ? 36 : 32; |
- ASSERT(expectedBytesWritten == writer.bytesWritten()); |
- const uint32_t* written = writer.getWriter32()->contiguousArray(); |
- SkASSERT(written != NULL); |
- ASSERT(*written == ((1<<0) | (1<<1) | (1<<2) | (1<<8))); // Dirty bits for our 4. |
+ // BEGIN white box asserts: if the impl changes, these asserts may change |
+ const size_t expectedBytesWritten = sizeof(void*) == 8 ? 32 : 28; |
+ ASSERT(expectedBytesWritten == writer.bytesWritten()); |
+ |
+ const uint32_t* written = writer.getWriter32()->contiguousArray(); |
+ SkASSERT(written != NULL); |
+ ASSERT(*written == ((1<<0) | (1<<1) | (1<<8))); // Dirty bits for our 3. |
+ // END white box asserts |
SkReadBuffer reader(written, writer.bytesWritten()); |
SkPaint other; |