Chromium Code Reviews| Index: src/pdf/SkPDFShader.cpp |
| =================================================================== |
| --- src/pdf/SkPDFShader.cpp (revision 11092) |
| +++ src/pdf/SkPDFShader.cpp (working copy) |
| @@ -55,6 +55,10 @@ |
| */ |
| static void interpolateColorCode(SkScalar range, SkScalar* curColor, |
| SkScalar* prevColor, SkString* result) { |
| + if (range == SkIntToScalar(0)) { |
|
vandebo (ex-Chrome)
2013/09/12 21:37:05
This should go to a different CL.
You can't just
edisonn
2013/09/17 15:14:23
Done.
|
| + return; |
| + } |
| + |
| static const int kColorComponents = 3; |
| // Figure out how to scale each color component. |
| @@ -578,6 +582,13 @@ |
| SkPDFObject* SkPDFShader::GetPDFShader(const SkShader& shader, |
| const SkMatrix& matrix, |
| const SkIRect& surfaceBBox) { |
| + if (matrix.hasPerspective() || shader.getLocalMatrix().hasPerspective()) { |
| + NOT_IMPLEMENTED(true, false); // just report that PDF does not supports perspective |
| + // TODO(edisonn): update the shape when possible |
| + // or dump in an image otherwise |
| + return NULL; |
| + } |
| + |
| SkAutoMutexAcquire lock(CanonicalShadersMutex()); |
| return GetPDFShaderByState( |
| SkNEW_ARGS(State, (shader, matrix, surfaceBBox))); |