aboutsummaryrefslogtreecommitdiffhomepage
path: root/tests
diff options
context:
space:
mode:
authorGravatar Cary Clark <caryclark@skia.org>2018-03-06 15:09:27 -0500
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2018-03-12 15:53:48 +0000
commit60ca8675e553ae4cb97d2a449fa92ad3b2bed38e (patch)
treefa48f42c08174ca908380c6844fd76e472bbc5d6 /tests
parentc618a5b3e948efbafbbc7821addb674035b3d2ea (diff)
make paint flatten unflatten private
SkPaint flatten and unflatten rely on interfaces that are not public, SkReadBuffer and SkWriteBuffer. R=reed@google.com Bug: skia:6172 Change-Id: I487af9f8931c78daf763c51d9e0d3ff8ff440b22 Reviewed-on: https://skia-review.googlesource.com/112561 Reviewed-by: Mike Reed <reed@google.com> Commit-Queue: Cary Clark <caryclark@skia.org>
Diffstat (limited to 'tests')
-rw-r--r--tests/PaintTest.cpp10
1 files changed, 5 insertions, 5 deletions
diff --git a/tests/PaintTest.cpp b/tests/PaintTest.cpp
index 7ddcd0d78f..dd1885e652 100644
--- a/tests/PaintTest.cpp
+++ b/tests/PaintTest.cpp
@@ -9,7 +9,7 @@
#include "SkBlurMask.h"
#include "SkBlurMaskFilter.h"
#include "SkLayerDrawLooper.h"
-#include "SkPaint.h"
+#include "SkPaintPriv.h"
#include "SkPath.h"
#include "SkRandom.h"
#include "SkReadBuffer.h"
@@ -256,14 +256,14 @@ DEF_TEST(Paint_flattening, reporter) {
FOR_SETUP(p, styles, setStyle)
SkBinaryWriteBuffer writer;
- paint.flatten(writer);
+ SkPaintPriv::Flatten(paint, writer);
SkAutoMalloc buf(writer.bytesWritten());
writer.writeToMemory(buf.get());
SkReadBuffer reader(buf.get(), writer.bytesWritten());
SkPaint paint2;
- paint2.unflatten(reader);
+ SkPaintPriv::Unflatten(&paint2, reader);
REPORTER_ASSERT(reporter, paint2 == paint);
}}}}}}}
@@ -296,14 +296,14 @@ DEF_TEST(Paint_MoreFlattening, r) {
paint.setLooper(nullptr); // Default value, ignored.
SkBinaryWriteBuffer writer;
- paint.flatten(writer);
+ SkPaintPriv::Flatten(paint, writer);
SkAutoMalloc buf(writer.bytesWritten());
writer.writeToMemory(buf.get());
SkReadBuffer reader(buf.get(), writer.bytesWritten());
SkPaint other;
- other.unflatten(reader);
+ SkPaintPriv::Unflatten(&other, reader);
ASSERT(reader.offset() == writer.bytesWritten());
// No matter the encoding, these must always hold.