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

Unified Diff: src/core/SkReadBuffer.cpp

Issue 288343009: Remove unused (by clients) SkUnitMapper (https://codereview.chromium.org/283273002/) (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: SK_SUPPORT_LEGACY_DEADUNITMAPPERTYPE is unneeded 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/animator/SkDrawGradient.cpp ('k') | src/core/SkValidatingReadBuffer.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkReadBuffer.cpp
diff --git a/src/core/SkReadBuffer.cpp b/src/core/SkReadBuffer.cpp
index d016d9c980b5ecbc77fc938a059c0cea11add3dc..c32c7bd658672b3531900f3484363251223f91e1 100644
--- a/src/core/SkReadBuffer.cpp
+++ b/src/core/SkReadBuffer.cpp
@@ -335,3 +335,25 @@ SkFlattenable* SkReadBuffer::readFlattenable(SkFlattenable::Type ft) {
}
return obj;
}
+
+/**
+ * Needs to follow the same pattern as readFlattenable(), but explicitly skip whatever data
+ * has been written.
+ */
+void SkReadBuffer::skipFlattenable() {
+ if (fFactoryCount > 0) {
+ if (0 == fReader.readU32()) {
+ return;
+ }
+ } else if (fFactoryTDArray) {
+ if (0 == fReader.readU32()) {
+ return;
+ }
+ } else {
+ if (NULL == this->readFunctionPtr()) {
+ return;
+ }
+ }
+ uint32_t sizeRecorded = fReader.readU32();
+ fReader.skip(sizeRecorded);
+}
« no previous file with comments | « src/animator/SkDrawGradient.cpp ('k') | src/core/SkValidatingReadBuffer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698