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

Unified Diff: src/core/SkValidatingReadBuffer.cpp

Issue 429343004: Stopped skipping tests in dm of SkPatch (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Moved DRAW_PATCH DrawType to the last position Created 6 years, 4 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/core/SkValidatingReadBuffer.h ('k') | src/pipe/SkGPipePriv.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/core/SkValidatingReadBuffer.cpp
diff --git a/src/core/SkValidatingReadBuffer.cpp b/src/core/SkValidatingReadBuffer.cpp
index 037a99465b2853f34627b379ba32323277a3f3ea..8202149cc1d2ed3f384f112ba32d7c9f2e30a018 100644
--- a/src/core/SkValidatingReadBuffer.cpp
+++ b/src/core/SkValidatingReadBuffer.cpp
@@ -171,6 +171,17 @@ void SkValidatingReadBuffer::readPath(SkPath* path) {
}
}
+void SkValidatingReadBuffer::readPatch(SkPatch* patch) {
+ size_t size = 0;
+ if (!fError) {
+ size = patch->readFromMemory(fReader.peek(), fReader.available());
+ this->validate((SkAlign4(size) == size) && (0 != size));
+ }
+ if (!fError) {
+ (void)this->skip(size);
+ }
+}
+
bool SkValidatingReadBuffer::readArray(void* value, size_t size, size_t elementSize) {
const uint32_t count = this->getArrayCount();
this->validate(size == count);
« no previous file with comments | « src/core/SkValidatingReadBuffer.h ('k') | src/pipe/SkGPipePriv.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698