aboutsummaryrefslogtreecommitdiffhomepage
path: root/include/core/SkRRect.h
diff options
context:
space:
mode:
authorGravatar Brian Salomon <bsalomon@google.com>2017-09-21 12:29:24 -0400
committerGravatar Skia Commit-Bot <skia-commit-bot@chromium.org>2017-09-21 18:16:13 +0000
commit1e3b79e0c6480ea7e372ec4e5a2c5e11a03a845d (patch)
tree8d6461a4df840960c50bff6f02fb81e6430cd4a3 /include/core/SkRRect.h
parent2fbf1bc8c96f749a4c098bcfc827053445c2e12d (diff)
Serialize rrect/oval paths as rrects rather than points and verbs.
This is a step towards not trusting deserialized isoval/isrrect for general paths without losing the performance advantages of knowing that a path is a rrect/oval. Change-Id: I1a8c0608c0f29f4bf7a118dfa1d475e2ab5802ea Reviewed-on: https://skia-review.googlesource.com/49761 Commit-Queue: Brian Salomon <bsalomon@google.com> Reviewed-by: Robert Phillips <robertphillips@google.com>
Diffstat (limited to 'include/core/SkRRect.h')
-rw-r--r--include/core/SkRRect.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/include/core/SkRRect.h b/include/core/SkRRect.h
index eb983b6c0e..0a231b6a2c 100644
--- a/include/core/SkRRect.h
+++ b/include/core/SkRRect.h
@@ -13,6 +13,8 @@
class SkPath;
class SkMatrix;
+class SkRBuffer;
+class SkWBuffer;
// Path forward:
// core work
@@ -302,6 +304,7 @@ public:
* a multiple of 4. Return kSizeInMemory.
*/
size_t writeToMemory(void* buffer) const;
+ void writeToBuffer(SkWBuffer*) const;
/**
* Reads the rrect from the specified buffer
@@ -315,6 +318,7 @@ public:
* 0 if there was not enough memory available
*/
size_t readFromMemory(const void* buffer, size_t length);
+ bool readFromBuffer(SkRBuffer*);
/**
* Transform by the specified matrix, and put the result in dst.