diff --git a/gm/badpaint.cpp b/gm/badpaint.cpp index 45b17f85fe..cce81465ad 100644 --- a/gm/badpaint.cpp +++ b/gm/badpaint.cpp @@ -30,12 +30,10 @@ protected: SkMatrix badMatrix; badMatrix.setAll(0, 0, 0, 0, 0, 0, 0, 0, 0); -#if 0 // This crashes pipe! // Empty bitmap. fPaints.push_back().setColor(SK_ColorGREEN); fPaints.back().setShader(SkShader::CreateBitmapShader(emptyBmp, SkShader::kClamp_TileMode, SkShader::kClamp_TileMode))->unref(); -#endif // Non-invertible local matrix. fPaints.push_back().setColor(SK_ColorGREEN); diff --git a/src/core/SkEmptyShader.h b/src/core/SkEmptyShader.h index 8809d5f958..7b87c284f7 100644 --- a/src/core/SkEmptyShader.h +++ b/src/core/SkEmptyShader.h @@ -34,6 +34,12 @@ protected: return NULL; } + void flatten(SkWriteBuffer& buffer) const override { + // Do nothing. + // We just don't want to fall through to SkShader::flatten(), + // which will write data we don't care to serialize or decode. + } + private: typedef SkShader INHERITED; };