diff --git a/src/svg/SkSVGDevice.cpp b/src/svg/SkSVGDevice.cpp index e3f93cb022..e777f60e9f 100644 --- a/src/svg/SkSVGDevice.cpp +++ b/src/svg/SkSVGDevice.cpp @@ -87,7 +87,7 @@ static SkString svg_transform(const SkMatrix& t) { SkString tstr; switch (t.getType()) { case SkMatrix::kPerspective_Mask: - SkDebugf("Can't handle perspective matrices."); + // TODO: handle perspective matrices? break; case SkMatrix::kTranslate_Mask: tstr.printf("translate(%g %g)", t.getTranslateX(), t.getTranslateY()); @@ -468,7 +468,6 @@ void SkSVGDevice::AutoElement::addGradientShaderResources(const SkShader* shader grInfo.fColorCount = 0; if (SkShader::kLinear_GradientType != shader->asAGradient(&grInfo)) { // TODO: non-linear gradient support - SkDebugf("unsupported shader type\n"); return; } @@ -491,7 +490,6 @@ void SkSVGDevice::AutoElement::addGradientShaderResources(const SkShader* shader sk_sp AsDataUri(SkImage* image) { sk_sp imageData = image->encodeToData(); if (!imageData) { - SkDebugf("Failed to encode image shader's contents."); return nullptr; } @@ -507,8 +505,6 @@ sk_sp AsDataUri(SkImage* image) { selectedPrefixLength = sizeof(jpgDataPrefix); } else { if (!SkPngCodec::IsPng(src, imageData->size())) { - SkDebugf("Cached image is stored as unsupported type: %d . re-encoding", - SkCodec::MakeFromData(imageData)->getEncodedFormat()); imageData = image->encodeToData(SkEncodedImageFormat::kPNG, 100); } selectedPrefix = pngDataPrefix; @@ -536,7 +532,6 @@ void SkSVGDevice::AutoElement::addImageShaderResources(const SkShader* shader, c sk_sp dataUri = AsDataUri(image); if (!dataUri) { - SkDebugf("Failed to encode data as data URI."); return; } SkIRect imageSize = image->bounds(); @@ -547,8 +542,8 @@ void SkSVGDevice::AutoElement::addImageShaderResources(const SkShader* shader, c patternDims[i].appendScalar(imageDimension); break; default: + // TODO: other tile modes? patternDims[i] = "100%"; - SkDebugf("unhandled tilemode for %d th dim : %d", i, xy[i]); } } @@ -582,12 +577,11 @@ void SkSVGDevice::AutoElement::addShaderResources(const SkPaint& paint, Resource SkASSERT(shader); if (shader->asAGradient(nullptr) != SkShader::kNone_GradientType) { - addGradientShaderResources(shader, paint, resources); + this->addGradientShaderResources(shader, paint, resources); } else if (shader->isAImage()) { - addImageShaderResources(shader, paint, resources); - } else { - SkDebugf("unsupported shader type\n"); + this->addImageShaderResources(shader, paint, resources); } + // TODO: other shader types? } void SkSVGDevice::AutoElement::addClipResources(const MxCp& mc, Resources* resources) { @@ -798,7 +792,7 @@ void SkSVGDevice::drawPoints(SkCanvas::PointMode mode, size_t count, switch (mode) { // todo case SkCanvas::kPoints_PointMode: - SkDebugf("unsupported operation: drawPoints(kPoints_PointMode)\n"); + // TODO? break; case SkCanvas::kLines_PointMode: count -= 1; @@ -1006,11 +1000,9 @@ void SkSVGDevice::drawTextOnPath(const void* text, size_t len, const SkPath& pat void SkSVGDevice::drawVertices(const SkVertices*, SkBlendMode, const SkPaint&) { // todo - SkDebugf("unsupported operation: drawVertices()\n"); } void SkSVGDevice::drawDevice(SkBaseDevice*, int x, int y, const SkPaint&) { // todo - SkDebugf("unsupported operation: drawDevice()\n"); }