implement isABitmap for imageshader, return localmatrix for bitmap's impl
For imageshader, I only return true if the image is explicitly raster-backed. I do not return true for texture, nor for generator (i.e. lazy/picture) backed. Is that ok?
BUG=skia:5592
GOLD_TRYBOT_URL= https://gold.skia.org/search?issue=2197323002
Review-Url: https://codereview.chromium.org/2197323002
diff --git a/src/pdf/SkPDFShader.cpp b/src/pdf/SkPDFShader.cpp
index 31af569..885b7e6 100644
--- a/src/pdf/SkPDFShader.cpp
+++ b/src/pdf/SkPDFShader.cpp
@@ -1289,10 +1289,7 @@
fType = shader->asAGradient(&fInfo);
if (fType == SkShader::kNone_GradientType) {
- SkMatrix matrix;
- if (shader->isABitmap(&fImage, &matrix, fImageTileModes)) {
- SkASSERT(matrix.isIdentity());
- } else {
+ if (!shader->isABitmap(&fImage, nullptr, fImageTileModes)) {
// Generic fallback for unsupported shaders:
// * allocate a bbox-sized bitmap
// * shade the whole area