| Index: src/effects/SkColorMatrixFilter.cpp
|
| diff --git a/src/effects/SkColorMatrixFilter.cpp b/src/effects/SkColorMatrixFilter.cpp
|
| index d76502e239afafe16425243ae036594c4c36f386..f62e0f146233b030ebf0474b25695a85dde2facb 100644
|
| --- a/src/effects/SkColorMatrixFilter.cpp
|
| +++ b/src/effects/SkColorMatrixFilter.cpp
|
| @@ -303,18 +303,26 @@ void SkColorMatrixFilter::filterSpan16(const uint16_t src[], int count,
|
| ///////////////////////////////////////////////////////////////////////////////
|
|
|
| void SkColorMatrixFilter::flatten(SkWriteBuffer& buffer) const {
|
| - this->INHERITED::flatten(buffer);
|
| SkASSERT(sizeof(fMatrix.fMat)/sizeof(SkScalar) == 20);
|
| buffer.writeScalarArray(fMatrix.fMat, 20);
|
| }
|
|
|
| -SkColorMatrixFilter::SkColorMatrixFilter(SkReadBuffer& buffer)
|
| - : INHERITED(buffer) {
|
| +#ifdef SK_SUPPORT_LEGACY_DEEPFLATTENING
|
| +SkColorMatrixFilter::SkColorMatrixFilter(SkReadBuffer& buffer) : INHERITED(buffer) {
|
| SkASSERT(buffer.getArrayCount() == 20);
|
| if (buffer.readScalarArray(fMatrix.fMat, 20)) {
|
| this->initState(fMatrix.fMat);
|
| }
|
| }
|
| +#endif
|
| +
|
| +SkFlattenable* SkColorMatrixFilter::CreateProc(SkReadBuffer& buffer) {
|
| + SkColorMatrix matrix;
|
| + if (buffer.readScalarArray(matrix.fMat, 20)) {
|
| + return Create(matrix);
|
| + }
|
| + return NULL;
|
| +}
|
|
|
| bool SkColorMatrixFilter::asColorMatrix(SkScalar matrix[20]) const {
|
| if (matrix) {
|
|
|