clean up some SkDebugf()

These annoy the crap out of me every time I run DM.

Change-Id: I76edf1d5a5c1931a93d208ba1d8db5220987e62d
Reviewed-on: https://skia-review.googlesource.com/126929
Commit-Queue: Mike Klein <mtklein@chromium.org>
Commit-Queue: Florin Malita <fmalita@chromium.org>
Auto-Submit: Mike Klein <mtklein@chromium.org>
Reviewed-by: Florin Malita <fmalita@chromium.org>
This commit is contained in:
Mike Klein 2018-05-09 10:48:52 -04:00 committed by Skia Commit-Bot
parent 8094749628
commit 6b2b6504c9

View File

@ -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<SkData> AsDataUri(SkImage* image) {
sk_sp<SkData> imageData = image->encodeToData();
if (!imageData) {
SkDebugf("Failed to encode image shader's contents.");
return nullptr;
}
@ -507,8 +505,6 @@ sk_sp<SkData> 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<SkData> 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");
}