If we fail to contruct the Pdf Image Shader, mark the object as busted, and dn't try to remove it from shaders list. Also, when we delete invalid shaders, remove the lock, otherwise we freeze (see CanonicalShadersMutex usage).

R=vandebo@chromium.org

Review URL: https://codereview.chromium.org/19509005

git-svn-id: http://skia.googlecode.com/svn/trunk@10290 2bbb7eff-a529-9590-31e7-b0007b416f81
This commit is contained in:
edisonn@google.com 2013-07-23 19:45:38 +00:00
parent 2fd5d36ea6
commit 8e473760d7

View File

@ -444,7 +444,9 @@ class SkPDFImageShader : public SkPDFStream, public SkPDFShader {
public:
explicit SkPDFImageShader(SkPDFShader::State* state);
virtual ~SkPDFImageShader() {
RemoveShader(this);
if (isValid()) {
RemoveShader(this);
}
fResources.unrefAll();
}