Don't serialize anything for SkEmptyShader.
BUG=skia:3735 Review URL: https://codereview.chromium.org/1097433002
This commit is contained in:
parent
6318016469
commit
6ef68ab2cd
@ -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);
|
||||
|
@ -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;
|
||||
};
|
||||
|
Loading…
Reference in New Issue
Block a user