diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/pipe/SkGPipeRead.cpp | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/pipe/SkGPipeRead.cpp b/src/pipe/SkGPipeRead.cpp index ecb19fd059..6665abb3ff 100644 --- a/src/pipe/SkGPipeRead.cpp +++ b/src/pipe/SkGPipeRead.cpp @@ -527,7 +527,7 @@ SkGPipeReader::~SkGPipeReader() { } SkGPipeReader::Status SkGPipeReader::playback(const void* data, size_t length, - size_t* bytesRead) { + size_t* bytesRead, bool readAtom) { if (NULL == fCanvas) { return kError_Status; } @@ -559,6 +559,15 @@ SkGPipeReader::Status SkGPipeReader::playback(const void* data, size_t length, break; } table[op](canvas, &reader, op32, fState); + if (readAtom && + (table[op] != paintOp_rp && + table[op] != def_Typeface_rp && + table[op] != def_PaintFlat_rp && + table[op] != name_PaintFlat_rp + )) { + status = kReadAtom_Status; + break; + } } if (bytesRead) { |