Revert "Add format-specifier warnings to SkDebugf."
This reverts commit e58831cd95
.
Reason for revert: looks like breaking a few build bots
Original change's description:
> Add format-specifier warnings to SkDebugf.
>
> This CL fixes up many existing format-specifier violations in Skia.
> Note that GCC has a warning for formatting nothing, so existing calls to
> `SkDebugf("")` have been removed, or replaced with `SkDebugf("%s", "")`.
> These were apparently meant to be used as a place to set a breakpoint.
>
> Some of our clients also use SkDebug with bad format specifiers, so this
> check is currently only enabled when SKIA_IMPLEMENTATION is true.
>
> Change-Id: I8177a1298a624c6936adc24e0d8f481362a356d0
> Bug: skia:12143
> Reviewed-on: https://skia-review.googlesource.com/c/skia/+/420902
> Auto-Submit: John Stiles <johnstiles@google.com>
> Commit-Queue: Brian Osman <brianosman@google.com>
> Reviewed-by: Brian Osman <brianosman@google.com>
TBR=brianosman@google.com,ethannicholas@google.com,johnstiles@google.com
Change-Id: I07848c1bf8992925c9498e916744d0840355a077
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: skia:12143
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/421917
Reviewed-by: Tyler Denniston <tdenniston@google.com>
Commit-Queue: Tyler Denniston <tdenniston@google.com>
This commit is contained in:
parent
68d6983acd
commit
283dba5785
@ -17,7 +17,7 @@ void draw(SkCanvas* canvas) {
|
|||||||
} ) {
|
} ) {
|
||||||
bitmap.setInfo(info.makeColorType(colorType));
|
bitmap.setInfo(info.makeColorType(colorType));
|
||||||
SkDebugf("color: k" "%s" "_SkColorType" "%*s" "bytesPerPixel: %d\n",
|
SkDebugf("color: k" "%s" "_SkColorType" "%*s" "bytesPerPixel: %d\n",
|
||||||
colors[colorType], (int)(13 - strlen(colors[colorType])), " ",
|
colors[colorType], 13 - strlen(colors[colorType]), " ",
|
||||||
bitmap.bytesPerPixel());
|
bitmap.bytesPerPixel());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -9,7 +9,7 @@ void draw(SkCanvas* canvas) {
|
|||||||
for (int height: { 1, 1000, 1000000 } ) {
|
for (int height: { 1, 1000, 1000000 } ) {
|
||||||
SkImageInfo imageInfo = SkImageInfo::MakeN32(width, height, kPremul_SkAlphaType);
|
SkImageInfo imageInfo = SkImageInfo::MakeN32(width, height, kPremul_SkAlphaType);
|
||||||
bitmap.setInfo(imageInfo, width * 5);
|
bitmap.setInfo(imageInfo, width * 5);
|
||||||
SkDebugf("width: %7d height: %7d computeByteSize: %13zu\n", width, height,
|
SkDebugf("width: %7d height: %7d computeByteSize: %13lld\n", width, height,
|
||||||
bitmap.computeByteSize());
|
bitmap.computeByteSize());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,8 +7,7 @@ void draw(SkCanvas* canvas) {
|
|||||||
SkBitmap bitmap;
|
SkBitmap bitmap;
|
||||||
for (int rowBytes : { 2, 8 } ) {
|
for (int rowBytes : { 2, 8 } ) {
|
||||||
bool result = bitmap.setInfo(SkImageInfo::MakeA8(4, 4), rowBytes);
|
bool result = bitmap.setInfo(SkImageInfo::MakeA8(4, 4), rowBytes);
|
||||||
SkDebugf("setInfo returned:%s rowBytes:%zu\n",
|
SkDebugf("setInfo returned:%s rowBytes:%d\n", result ? "true " : "false", bitmap.rowBytes());
|
||||||
result ? "true " : "false", bitmap.rowBytes());
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // END FIDDLE
|
} // END FIDDLE
|
||||||
|
@ -17,7 +17,7 @@ void draw(SkCanvas* canvas) {
|
|||||||
} ) {
|
} ) {
|
||||||
bitmap.setInfo(info.makeColorType(colorType));
|
bitmap.setInfo(info.makeColorType(colorType));
|
||||||
SkDebugf("color: k" "%s" "_SkColorType" "%*s" "shiftPerPixel: %d\n",
|
SkDebugf("color: k" "%s" "_SkColorType" "%*s" "shiftPerPixel: %d\n",
|
||||||
colors[colorType], (int)(14 - strlen(colors[colorType])), " ",
|
colors[colorType], 14 - strlen(colors[colorType]), " ",
|
||||||
bitmap.shiftPerPixel());
|
bitmap.shiftPerPixel());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -5,7 +5,7 @@
|
|||||||
REG_FIDDLE(Canvas_empty_constructor, 256, 256, true, 0) {
|
REG_FIDDLE(Canvas_empty_constructor, 256, 256, true, 0) {
|
||||||
static void check_for_rotated_ctm(const SkCanvas* canvas) {
|
static void check_for_rotated_ctm(const SkCanvas* canvas) {
|
||||||
const SkM44 matrix = canvas->getLocalToDevice();
|
const SkM44 matrix = canvas->getLocalToDevice();
|
||||||
SkDebugf("ctm is identity = %s\n", matrix == SkM44() ? "true" : "false");
|
SkDebugf("ctm is identity = \n", matrix == SkM44() ? "true" : "false");
|
||||||
}
|
}
|
||||||
|
|
||||||
void draw(SkCanvas* canvas) {
|
void draw(SkCanvas* canvas) {
|
||||||
|
@ -5,6 +5,6 @@
|
|||||||
REG_FIDDLE(IRect_height64, 256, 256, true, 0) {
|
REG_FIDDLE(IRect_height64, 256, 256, true, 0) {
|
||||||
void draw(SkCanvas* canvas) {
|
void draw(SkCanvas* canvas) {
|
||||||
SkIRect large = { 1, -2147483647, 2, 2147483644 };
|
SkIRect large = { 1, -2147483647, 2, 2147483644 };
|
||||||
SkDebugf("height: %d height64: %" PRId64 "\n", large.height(), large.height64());
|
SkDebugf("height: %d height64: %lld\n", large.height(), large.height64());
|
||||||
}
|
}
|
||||||
} // END FIDDLE
|
} // END FIDDLE
|
||||||
|
@ -5,6 +5,6 @@
|
|||||||
REG_FIDDLE(IRect_width64, 256, 256, true, 0) {
|
REG_FIDDLE(IRect_width64, 256, 256, true, 0) {
|
||||||
void draw(SkCanvas* canvas) {
|
void draw(SkCanvas* canvas) {
|
||||||
SkIRect large = { -2147483647, 1, 2147483644, 2 };
|
SkIRect large = { -2147483647, 1, 2147483644, 2 };
|
||||||
SkDebugf("width: %d width64: %" PRId64 "\n", large.width(), large.width64());
|
SkDebugf("width: %d width64: %lld\n", large.width(), large.width64());
|
||||||
}
|
}
|
||||||
} // END FIDDLE
|
} // END FIDDLE
|
||||||
|
@ -15,7 +15,7 @@ void draw(SkCanvas* canvas) {
|
|||||||
} ) {
|
} ) {
|
||||||
SkImageInfo info = SkImageInfo::Make(1, 1, colorType, kOpaque_SkAlphaType);
|
SkImageInfo info = SkImageInfo::Make(1, 1, colorType, kOpaque_SkAlphaType);
|
||||||
SkDebugf("color: k" "%s" "_SkColorType" "%*s" "bytesPerPixel: %d\n",
|
SkDebugf("color: k" "%s" "_SkColorType" "%*s" "bytesPerPixel: %d\n",
|
||||||
colors[colorType], (int)(13 - strlen(colors[colorType])), " ",
|
colors[colorType], 13 - strlen(colors[colorType]), " ",
|
||||||
info.bytesPerPixel());
|
info.bytesPerPixel());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ void draw(SkCanvas* canvas) {
|
|||||||
} ) {
|
} ) {
|
||||||
SkImageInfo info = SkImageInfo::Make(1, 1, colorType, kOpaque_SkAlphaType);
|
SkImageInfo info = SkImageInfo::Make(1, 1, colorType, kOpaque_SkAlphaType);
|
||||||
SkDebugf("color: k" "%s" "_SkColorType" "%*s" "shiftPerPixel: %d\n",
|
SkDebugf("color: k" "%s" "_SkColorType" "%*s" "shiftPerPixel: %d\n",
|
||||||
color_type(colorType), (int)(14 - strlen(color_type(colorType))), " ",
|
color_type(colorType), 14 - strlen(color_type(colorType)), " ",
|
||||||
info.shiftPerPixel());
|
info.shiftPerPixel());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -6,7 +6,7 @@ REG_FIDDLE(ImageInfo_validRowBytes, 256, 256, true, 0) {
|
|||||||
void draw(SkCanvas* canvas) {
|
void draw(SkCanvas* canvas) {
|
||||||
SkImageInfo info = SkImageInfo::MakeN32Premul(16, 8);
|
SkImageInfo info = SkImageInfo::MakeN32Premul(16, 8);
|
||||||
for (size_t rowBytes = 60; rowBytes < 72; rowBytes += sizeof(SkPMColor)) {
|
for (size_t rowBytes = 60; rowBytes < 72; rowBytes += sizeof(SkPMColor)) {
|
||||||
SkDebugf("validRowBytes(%zu): %s\n", rowBytes, info.validRowBytes(rowBytes) ?
|
SkDebugf("validRowBytes(%llu): %s\n", rowBytes, info.validRowBytes(rowBytes) ?
|
||||||
"true" : "false");
|
"true" : "false");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,6 +7,6 @@ void draw(SkCanvas* canvas) {
|
|||||||
SkPaint paint1, paint2;
|
SkPaint paint1, paint2;
|
||||||
paint1.setColor(SK_ColorRED);
|
paint1.setColor(SK_ColorRED);
|
||||||
paint2 = std::move(paint1);
|
paint2 = std::move(paint1);
|
||||||
SkDebugf("SK_ColorRED %c= paint2.getColor()\n", SK_ColorRED == paint2.getColor() ? '=' : '!');
|
SkDebugf("SK_ColorRED == paint2.getColor()\n", SK_ColorRED == paint2.getColor() ? '=' : '!');
|
||||||
}
|
}
|
||||||
} // END FIDDLE
|
} // END FIDDLE
|
||||||
|
@ -12,9 +12,9 @@ void draw(SkCanvas* canvas) {
|
|||||||
path.writeToMemory(storage.begin());
|
path.writeToMemory(storage.begin());
|
||||||
size_t wrongSize = size - 4;
|
size_t wrongSize = size - 4;
|
||||||
size_t bytesRead = copy.readFromMemory(storage.begin(), wrongSize);
|
size_t bytesRead = copy.readFromMemory(storage.begin(), wrongSize);
|
||||||
SkDebugf("length = %zu; returned by readFromMemory = %zu\n", wrongSize, bytesRead);
|
SkDebugf("length = %u; returned by readFromMemory = %u\n", wrongSize, bytesRead);
|
||||||
size_t largerSize = size + 4;
|
size_t largerSize = size + 4;
|
||||||
bytesRead = copy.readFromMemory(storage.begin(), largerSize);
|
bytesRead = copy.readFromMemory(storage.begin(), largerSize);
|
||||||
SkDebugf("length = %zu; returned by readFromMemory = %zu\n", largerSize, bytesRead);
|
SkDebugf("length = %u; returned by readFromMemory = %u\n", largerSize, bytesRead);
|
||||||
}
|
}
|
||||||
} // END FIDDLE
|
} // END FIDDLE
|
||||||
|
@ -9,10 +9,10 @@ void draw(SkCanvas* canvas) {
|
|||||||
SkPixmap pixmap(SkImageInfo::Make(image->width(), image->height(), kN32_SkColorType,
|
SkPixmap pixmap(SkImageInfo::Make(image->width(), image->height(), kN32_SkColorType,
|
||||||
image->alphaType()), (const void*) &pixels.front(), image->width() * 4);
|
image->alphaType()), (const void*) &pixels.front(), image->width() * 4);
|
||||||
image->readPixels(nullptr, pixmap, 0, 0);
|
image->readPixels(nullptr, pixmap, 0, 0);
|
||||||
SkDebugf("pixels address: 0x%p\n", pixmap.addr());
|
SkDebugf("pixels address: 0x%llx\n", pixmap.addr());
|
||||||
SkPixmap inset;
|
SkPixmap inset;
|
||||||
if (pixmap.extractSubset(&inset, {128, 128, 512, 512})) {
|
if (pixmap.extractSubset(&inset, {128, 128, 512, 512})) {
|
||||||
SkDebugf("inset address: 0x%p\n", inset.addr());
|
SkDebugf("inset address: 0x%llx\n", inset.addr());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} // END FIDDLE
|
} // END FIDDLE
|
||||||
|
@ -9,7 +9,7 @@ void draw(SkCanvas* canvas) {
|
|||||||
for (int height: { 1, 1000, 1000000 } ) {
|
for (int height: { 1, 1000, 1000000 } ) {
|
||||||
SkImageInfo imageInfo = SkImageInfo::MakeN32(width, height, kPremul_SkAlphaType);
|
SkImageInfo imageInfo = SkImageInfo::MakeN32(width, height, kPremul_SkAlphaType);
|
||||||
pixmap.reset(imageInfo, nullptr, width * 5);
|
pixmap.reset(imageInfo, nullptr, width * 5);
|
||||||
SkDebugf("width: %7d height: %7d computeByteSize: %13zu\n", width, height,
|
SkDebugf("width: %7d height: %7d computeByteSize: %13lld\n", width, height,
|
||||||
pixmap.computeByteSize());
|
pixmap.computeByteSize());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -7,7 +7,7 @@ void draw(SkCanvas* canvas) {
|
|||||||
SkPixmap badPixmap = {SkImageInfo::MakeA8(4, 4), nullptr, 2};
|
SkPixmap badPixmap = {SkImageInfo::MakeA8(4, 4), nullptr, 2};
|
||||||
SkPixmap okPixmap = {SkImageInfo::MakeA8(4, 4), nullptr, 8};
|
SkPixmap okPixmap = {SkImageInfo::MakeA8(4, 4), nullptr, 8};
|
||||||
for (auto& pixmap : { badPixmap, okPixmap } ) {
|
for (auto& pixmap : { badPixmap, okPixmap } ) {
|
||||||
SkDebugf("rowBytes: %zu minRowBytes: %zu\n", pixmap.rowBytes(),
|
SkDebugf("rowBytes: %d minRowBytes: %d\n", pixmap.rowBytes(),
|
||||||
pixmap.info().minRowBytes());
|
pixmap.info().minRowBytes());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -29,7 +29,7 @@ void draw(SkCanvas* canvas) {
|
|||||||
kGray_8_SkColorType, kRGBA_F16_SkColorType } ) {
|
kGray_8_SkColorType, kRGBA_F16_SkColorType } ) {
|
||||||
SkPixmap pixmap(info.makeColorType(colorType), nullptr, 4);
|
SkPixmap pixmap(info.makeColorType(colorType), nullptr, 4);
|
||||||
SkDebugf("color: k" "%s" "_SkColorType" "%*s" "bytesPerPixel: %d shiftPerPixel: %d\n",
|
SkDebugf("color: k" "%s" "_SkColorType" "%*s" "bytesPerPixel: %d shiftPerPixel: %d\n",
|
||||||
color_type(colorType), (int)(10 - strlen(color_type(colorType))), " ",
|
color_type(colorType), 10 - strlen(color_type(colorType)), " ",
|
||||||
pixmap.info().bytesPerPixel(), pixmap.shiftPerPixel());
|
pixmap.info().bytesPerPixel(), pixmap.shiftPerPixel());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -8,11 +8,11 @@ void draw(SkCanvas* canvas) {
|
|||||||
SkRect negZero = {-0.0f, -0.0f, 2, 2};
|
SkRect negZero = {-0.0f, -0.0f, 2, 2};
|
||||||
SkDebugf("{%g, %g, %g, %g} %c= {%g, %g, %g, %g} %s numerically equal\n",
|
SkDebugf("{%g, %g, %g, %g} %c= {%g, %g, %g, %g} %s numerically equal\n",
|
||||||
test.fLeft, test.fTop, test.fRight, test.fBottom,
|
test.fLeft, test.fTop, test.fRight, test.fBottom,
|
||||||
test == negZero ? '=' : '!',
|
|
||||||
negZero.fLeft, negZero.fTop, negZero.fRight, negZero.fBottom,
|
negZero.fLeft, negZero.fTop, negZero.fRight, negZero.fBottom,
|
||||||
(test.fLeft == negZero.fLeft && test.fTop == negZero.fTop &&
|
test == negZero ? '=' : '!',
|
||||||
test.fRight == negZero.fRight && test.fBottom == negZero.fBottom) ?
|
test.fLeft == negZero.fLeft && test.fTop == negZero.fTop &&
|
||||||
"and are" : "yet are not");
|
test.fRight == negZero.fRight && test.fBottom == negZero.fBottom ?
|
||||||
|
"and are" : "yet are not");
|
||||||
};
|
};
|
||||||
SkRect tests[] = {{0, 0, 2, 2}, {-0, -0, 2, 2}, {0.0f, 0.0f, 2, 2}};
|
SkRect tests[] = {{0, 0, 2, 2}, {-0, -0, 2, 2}, {0.0f, 0.0f, 2, 2}};
|
||||||
SkDebugf("tests are %s" "equal\n", tests[0] == tests[1] && tests[1] == tests[2] ? "" : "not ");
|
SkDebugf("tests are %s" "equal\n", tests[0] == tests[1] && tests[1] == tests[2] ? "" : "not ");
|
||||||
|
@ -108,8 +108,8 @@ public:
|
|||||||
|
|
||||||
void dump() const override {
|
void dump() const override {
|
||||||
SkDebugf("%d: draw%s %d %d %d %d -- %d",
|
SkDebugf("%d: draw%s %d %d %d %d -- %d",
|
||||||
fID.toInt(),
|
|
||||||
fShape == Shape::kRect ? "Rect" : "Oval",
|
fShape == Shape::kRect ? "Rect" : "Oval",
|
||||||
|
fID.toInt(),
|
||||||
fRect.fLeft, fRect.fTop, fRect.fRight, fRect.fBottom,
|
fRect.fLeft, fRect.fTop, fRect.fRight, fRect.fBottom,
|
||||||
fPaintersOrder.toUInt());
|
fPaintersOrder.toUInt());
|
||||||
}
|
}
|
||||||
@ -146,8 +146,8 @@ public:
|
|||||||
|
|
||||||
void dump() const override {
|
void dump() const override {
|
||||||
SkDebugf("%d: clip%s %d %d %d %d",
|
SkDebugf("%d: clip%s %d %d %d %d",
|
||||||
fID.toInt(),
|
|
||||||
fShape == Shape::kRect ? "Rect" : "Oval",
|
fShape == Shape::kRect ? "Rect" : "Oval",
|
||||||
|
fID.toInt(),
|
||||||
fRect.fLeft, fRect.fTop, fRect.fRight, fRect.fBottom);
|
fRect.fLeft, fRect.fTop, fRect.fRight, fRect.fBottom);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -223,13 +223,13 @@ static void check_order(int testID,
|
|||||||
|
|
||||||
if (expectedOrder != actualOrder) {
|
if (expectedOrder != actualOrder) {
|
||||||
SkDebugf("order mismatch in test %d:\n", testID);
|
SkDebugf("order mismatch in test %d:\n", testID);
|
||||||
SkDebugf("E %zu: ", expectedOrder.size());
|
SkDebugf("E %d: ", expectedOrder.size());
|
||||||
for (auto t : expectedOrder) {
|
for (auto t : expectedOrder) {
|
||||||
SkDebugf("%d", t.toInt());
|
SkDebugf("%d", t.toInt());
|
||||||
}
|
}
|
||||||
SkDebugf("\n");
|
SkDebugf("\n");
|
||||||
|
|
||||||
SkDebugf("A %zu: ", actualOrder.size());
|
SkDebugf("A %d: ", actualOrder.size());
|
||||||
for (auto t : actualOrder) {
|
for (auto t : actualOrder) {
|
||||||
SkDebugf("%d", t.toInt());
|
SkDebugf("%d", t.toInt());
|
||||||
}
|
}
|
||||||
|
@ -48,7 +48,7 @@ std::tuple<sk_sp<Component>, size_t> parse_component(StreamReader* sr) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
SkDebugf("!! unsupported node type: %d\n", (int)block.type());
|
SkDebugf("!! unsupported node type: %d\n", block.type());
|
||||||
return {nullptr, 0};
|
return {nullptr, 0};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -109,7 +109,7 @@ sk_sp<Artboard> parse_artboard(StreamReader* sr) {
|
|||||||
ab->setRoot(parse_components(sr));
|
ab->setRoot(parse_components(sr));
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
SkDebugf("!! Unsupported block type: %d\n", (int)block.type());
|
SkDebugf("!! Unsupported block type: %d\n", block.type());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -26,7 +26,7 @@ void parse_artboards(const sk_sp<SkRive>& skrive, StreamReader* sr) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (block.type() != StreamReader::BlockType::kActorArtboard) {
|
if (block.type() != StreamReader::BlockType::kActorArtboard) {
|
||||||
SkDebugf("!! Unexpected artboard block type: %d\n", (int)block.type());
|
SkDebugf("!! Unexpected artboard block type: %d\n", block.type());
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -55,7 +55,7 @@ static sk_sp<SkRive> parse_skrive(std::unique_ptr<StreamReader> sr) {
|
|||||||
parse_artboards(skrive, sr.get());
|
parse_artboards(skrive, sr.get());
|
||||||
break;
|
break;
|
||||||
default:
|
default:
|
||||||
SkDebugf("!! Unsupported block type: %d\n", (int)block.type());
|
SkDebugf("!! Unsupported block type: %d\n", block.type());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -77,7 +77,7 @@ DEF_FUZZ(WEBPEncoder, fuzz) {
|
|||||||
// and dump out a corpus for this fuzzer.
|
// and dump out a corpus for this fuzzer.
|
||||||
DEF_FUZZ(_MakeEncoderCorpus, fuzz) {
|
DEF_FUZZ(_MakeEncoderCorpus, fuzz) {
|
||||||
auto bytes = fuzz->fBytes;
|
auto bytes = fuzz->fBytes;
|
||||||
SkDebugf("bytes %zu\n", bytes->size());
|
SkDebugf("bytes %d\n", bytes->size());
|
||||||
auto img = SkImage::MakeFromEncoded(bytes);
|
auto img = SkImage::MakeFromEncoded(bytes);
|
||||||
if (nullptr == img.get()) {
|
if (nullptr == img.get()) {
|
||||||
SkDebugf("invalid image, could not decode\n");
|
SkDebugf("invalid image, could not decode\n");
|
||||||
|
@ -667,7 +667,7 @@ static void fuzz_img(sk_sp<SkData> bytes, uint8_t scale, uint8_t mode) {
|
|||||||
bitmap.rowBytes(), &options);
|
bitmap.rowBytes(), &options);
|
||||||
if (SkCodec::kSuccess != result) {
|
if (SkCodec::kSuccess != result) {
|
||||||
SkDebugf("[terminated] failed to start incremental decode "
|
SkDebugf("[terminated] failed to start incremental decode "
|
||||||
"in frame %zu with error %d\n", i, result);
|
"in frame %d with error %d\n", i, result);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -678,7 +678,7 @@ static void fuzz_img(sk_sp<SkData> bytes, uint8_t scale, uint8_t mode) {
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
if (result == SkCodec::kSuccess) {
|
if (result == SkCodec::kSuccess) {
|
||||||
SkDebugf("okay - decoded frame %zu\n", i);
|
SkDebugf("okay - decoded frame %d\n", i);
|
||||||
} else {
|
} else {
|
||||||
SkDebugf("[terminated] incremental decode failed with "
|
SkDebugf("[terminated] incremental decode failed with "
|
||||||
"error %d\n", result);
|
"error %d\n", result);
|
||||||
|
@ -13,8 +13,6 @@
|
|||||||
#include "include/core/SkTypes.h"
|
#include "include/core/SkTypes.h"
|
||||||
#include "include/private/SkMacros.h"
|
#include "include/private/SkMacros.h"
|
||||||
|
|
||||||
#include <cinttypes>
|
|
||||||
|
|
||||||
class SkString;
|
class SkString;
|
||||||
|
|
||||||
/** \class SkTime
|
/** \class SkTime
|
||||||
@ -53,7 +51,7 @@ public:
|
|||||||
, fNow(SkTime::GetMSecs()) {}
|
, fNow(SkTime::GetMSecs()) {}
|
||||||
~SkAutoTime() {
|
~SkAutoTime() {
|
||||||
uint64_t dur = static_cast<uint64_t>(SkTime::GetMSecs() - fNow);
|
uint64_t dur = static_cast<uint64_t>(SkTime::GetMSecs() - fNow);
|
||||||
SkDebugf("%s %" PRIu64 "\n", fLabel ? fLabel : "", dur);
|
SkDebugf("%s %ld\n", fLabel ? fLabel : "", dur);
|
||||||
}
|
}
|
||||||
private:
|
private:
|
||||||
const char* fLabel;
|
const char* fLabel;
|
||||||
|
@ -453,15 +453,10 @@
|
|||||||
[[noreturn]] SK_API extern void sk_abort_no_print(void);
|
[[noreturn]] SK_API extern void sk_abort_no_print(void);
|
||||||
|
|
||||||
#ifndef SkDebugf
|
#ifndef SkDebugf
|
||||||
#if SKIA_IMPLEMENTATION
|
SK_API void SkDebugf(const char format[], ...);
|
||||||
SK_API void SkDebugf(const char format[], ...) SK_PRINTF_LIKE(1, 2);
|
|
||||||
#else
|
|
||||||
// TODO(johnstiles): fix external code which misuses format specifiers
|
|
||||||
SK_API void SkDebugf(const char format[], ...);
|
|
||||||
#endif
|
|
||||||
#endif
|
#endif
|
||||||
#if defined(SK_BUILD_FOR_LIBFUZZER)
|
#if defined(SK_BUILD_FOR_LIBFUZZER)
|
||||||
SK_API SK_PRINTF_LIKE(1, 2) inline void SkDebugf(const char format[], ...) {}
|
SK_API inline void SkDebugf(const char format[], ...) {}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
// SkASSERT, SkASSERTF and SkASSERT_RELEASE can be used as stand alone assertion expressions, e.g.
|
// SkASSERT, SkASSERTF and SkASSERT_RELEASE can be used as stand alone assertion expressions, e.g.
|
||||||
|
@ -127,7 +127,7 @@ protected:
|
|||||||
} else {
|
} else {
|
||||||
SkDebugf("hash: %d ", this->hash());
|
SkDebugf("hash: %d ", this->hash());
|
||||||
SkDebugf("domain: %d ", this->domain());
|
SkDebugf("domain: %d ", this->domain());
|
||||||
SkDebugf("size: %zuB ", this->internalSize());
|
SkDebugf("size: %dB ", this->internalSize());
|
||||||
size_t dataCount = this->internalSize() / sizeof(uint32_t) - kMetaDataCnt;
|
size_t dataCount = this->internalSize() / sizeof(uint32_t) - kMetaDataCnt;
|
||||||
for (size_t i = 0; i < dataCount; ++i) {
|
for (size_t i = 0; i < dataCount; ++i) {
|
||||||
SkDebugf("%d ", fKey[SkTo<int>(kMetaDataCnt+i)]);
|
SkDebugf("%d ", fKey[SkTo<int>(kMetaDataCnt+i)]);
|
||||||
|
@ -214,7 +214,7 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
void report() const {
|
void report() const {
|
||||||
SkDebugf("Animation loaded with %zu error%s, %zu warning%s.\n",
|
SkDebugf("Animation loaded with %lu error%s, %lu warning%s.\n",
|
||||||
fErrors.size(), fErrors.size() == 1 ? "" : "s",
|
fErrors.size(), fErrors.size() == 1 ? "" : "s",
|
||||||
fWarnings.size(), fWarnings.size() == 1 ? "" : "s");
|
fWarnings.size(), fWarnings.size() == 1 ? "" : "s");
|
||||||
|
|
||||||
|
@ -2073,16 +2073,14 @@ protected:
|
|||||||
auto impl = static_cast<ParagraphImpl*>(paragraph.get());
|
auto impl = static_cast<ParagraphImpl*>(paragraph.get());
|
||||||
for (auto& line : impl->lines()) {
|
for (auto& line : impl->lines()) {
|
||||||
if (this->isVerbose()) {
|
if (this->isVerbose()) {
|
||||||
SkDebugf("line[%d]: %f + %f\n", (int)(&line - impl->lines().begin()),
|
SkDebugf("line[%d]: %f + %f\n", &line - impl->lines().begin(), line.offset().fX, line.shift());
|
||||||
line.offset().fX, line.shift());
|
|
||||||
}
|
}
|
||||||
line.iterateThroughVisualRuns(true,
|
line.iterateThroughVisualRuns(true,
|
||||||
[&](const Run* run, SkScalar runOffset, TextRange textRange, SkScalar* width) {
|
[&](const Run* run, SkScalar runOffset, TextRange textRange, SkScalar* width) {
|
||||||
*width = line.measureTextInsideOneRun(textRange, run, runOffset, 0, true, false).clip.width();
|
*width = line.measureTextInsideOneRun(textRange, run, runOffset, 0, true, false).clip.width();
|
||||||
if (this->isVerbose()) {
|
if (this->isVerbose()) {
|
||||||
SkDebugf("%zu[%zu: %zu) @%f + %f %s\n",
|
SkDebugf("%d[%d: %d) @%f + %f %s\n", run->index(),
|
||||||
run->index(), textRange.start, textRange.end, runOffset, *width,
|
textRange.start, textRange.end, runOffset, *width, run->leftToRight() ? "left" : "right");
|
||||||
run->leftToRight() ? "left" : "right");
|
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
});
|
});
|
||||||
@ -2279,9 +2277,8 @@ protected:
|
|||||||
{18, 22},
|
{18, 22},
|
||||||
};
|
};
|
||||||
for (auto rect: rects) {
|
for (auto rect: rects) {
|
||||||
auto results = paragraph->getRectsForRange(
|
auto results = paragraph->getRectsForRange(rect.first, rect.second, RectHeightStyle::kTight, RectWidthStyle::kTight);
|
||||||
rect.first, rect.second, RectHeightStyle::kTight, RectWidthStyle::kTight);
|
SkDebugf("[%d : %d) ", rect.first, rect.second);
|
||||||
SkDebugf("[%zu : %zu) ", rect.first, rect.second);
|
|
||||||
if (!results.empty()) {
|
if (!results.empty()) {
|
||||||
SkASSERT(results.size() == 1);
|
SkASSERT(results.size() == 1);
|
||||||
SkDebugf("[%f : %f]\n", results[0].rect.fLeft,results[0].rect.fRight);
|
SkDebugf("[%f : %f]\n", results[0].rect.fLeft,results[0].rect.fRight);
|
||||||
@ -2574,7 +2571,7 @@ protected:
|
|||||||
size_t c = 0;
|
size_t c = 0;
|
||||||
SkDebugf("clusters\n");
|
SkDebugf("clusters\n");
|
||||||
for (auto& cluster: clusters) {
|
for (auto& cluster: clusters) {
|
||||||
SkDebugf("%zu: [%zu:%zu) %s\n", c++,
|
SkDebugf("%d: [%d:%d) %s\n", c++,
|
||||||
cluster.textRange().start, cluster.textRange().end,
|
cluster.textRange().start, cluster.textRange().end,
|
||||||
cluster.isSoftBreak() ? "soft" :
|
cluster.isSoftBreak() ? "soft" :
|
||||||
cluster.isHardBreak() ? "hard" :
|
cluster.isHardBreak() ? "hard" :
|
||||||
@ -2585,7 +2582,7 @@ protected:
|
|||||||
size_t i = 0;
|
size_t i = 0;
|
||||||
SkDebugf("lines\n");
|
SkDebugf("lines\n");
|
||||||
for (auto& line : lines) {
|
for (auto& line : lines) {
|
||||||
SkDebugf("%zu: [%zu:%zu)\n", i++, line.trimmedText().start, line.trimmedText().end);
|
SkDebugf("%d: [%d:%d)\n", i++, line.trimmedText().start, line.trimmedText().end);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -20,9 +20,9 @@ void OneLineShaper::commitRunBuffer(const RunInfo&) {
|
|||||||
|
|
||||||
auto oldUnresolvedCount = fUnresolvedBlocks.size();
|
auto oldUnresolvedCount = fUnresolvedBlocks.size();
|
||||||
/*
|
/*
|
||||||
SkDebugf("Run [%zu:%zu)\n", fCurrentRun->fTextRange.start, fCurrentRun->fTextRange.end);
|
SkDebugf("Run [%d:%d)\n", fCurrentRun->fTextRange.start, fCurrentRun->fTextRange.end);
|
||||||
for (size_t i = 0; i < fCurrentRun->size(); ++i) {
|
for (size_t i = 0; i < fCurrentRun->size(); ++i) {
|
||||||
SkDebugf("[%zu] %hu %u %f\n", i, fCurrentRun->fGlyphs[i], fCurrentRun->fClusterIndexes[i], fCurrentRun->fPositions[i].fX);
|
SkDebugf("[%d] %d %d %f\n", i, fCurrentRun->fGlyphs[i], fCurrentRun->fClusterIndexes[i], fCurrentRun->fPositions[i].fX);
|
||||||
}
|
}
|
||||||
*/
|
*/
|
||||||
// Find all unresolved blocks
|
// Find all unresolved blocks
|
||||||
@ -56,10 +56,10 @@ void OneLineShaper::commitRunBuffer(const RunInfo&) {
|
|||||||
|
|
||||||
#ifdef SK_DEBUG
|
#ifdef SK_DEBUG
|
||||||
void OneLineShaper::printState() {
|
void OneLineShaper::printState() {
|
||||||
SkDebugf("Resolved: %zu\n", fResolvedBlocks.size());
|
SkDebugf("Resolved: %d\n", fResolvedBlocks.size());
|
||||||
for (auto& resolved : fResolvedBlocks) {
|
for (auto& resolved : fResolvedBlocks) {
|
||||||
if (resolved.fRun == nullptr) {
|
if (resolved.fRun == nullptr) {
|
||||||
SkDebugf("[%zu:%zu) unresolved\n",
|
SkDebugf("[%d:%d) unresolved\n",
|
||||||
resolved.fText.start, resolved.fText.end);
|
resolved.fText.start, resolved.fText.end);
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@ -67,16 +67,16 @@ void OneLineShaper::printState() {
|
|||||||
if (resolved.fRun->fFont.getTypeface() != nullptr) {
|
if (resolved.fRun->fFont.getTypeface() != nullptr) {
|
||||||
resolved.fRun->fFont.getTypeface()->getFamilyName(&name);
|
resolved.fRun->fFont.getTypeface()->getFamilyName(&name);
|
||||||
}
|
}
|
||||||
SkDebugf("[%zu:%zu) ", resolved.fGlyphs.start, resolved.fGlyphs.end);
|
SkDebugf("[%d:%d) ", resolved.fGlyphs.start, resolved.fGlyphs.end);
|
||||||
SkDebugf("[%zu:%zu) with %s\n",
|
SkDebugf("[%d:%d) with %s\n",
|
||||||
resolved.fText.start, resolved.fText.end,
|
resolved.fText.start, resolved.fText.end,
|
||||||
name.c_str());
|
name.c_str());
|
||||||
}
|
}
|
||||||
|
|
||||||
auto size = fUnresolvedBlocks.size();
|
auto size = fUnresolvedBlocks.size();
|
||||||
SkDebugf("Unresolved: %zu\n", size);
|
SkDebugf("Unresolved: %d\n", size);
|
||||||
for (const auto& unresolved : fUnresolvedBlocks) {
|
for (const auto& unresolved : fUnresolvedBlocks) {
|
||||||
SkDebugf("[%zu:%zu)\n", unresolved.fText.start, unresolved.fText.end);
|
SkDebugf("[%d:%d)\n", unresolved.fText.start, unresolved.fText.end);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
@ -180,8 +180,7 @@ void OneLineShaper::finish(const Block& block, SkScalar height, SkScalar& advanc
|
|||||||
auto glyphs = resolvedBlock.fGlyphs;
|
auto glyphs = resolvedBlock.fGlyphs;
|
||||||
auto text = resolvedBlock.fText;
|
auto text = resolvedBlock.fText;
|
||||||
if (lastTextEnd != text.start) {
|
if (lastTextEnd != text.start) {
|
||||||
SkDEBUGF("Text ranges mismatch: ...:%zu] - [%zu:%zu] (%zu-%zu)\n",
|
SkDEBUGF("Text ranges mismatch: ...:%d] - [%d:%d] (%d-%d)\n", lastTextEnd, text.start, text.end, glyphs.start, glyphs.end);
|
||||||
lastTextEnd, text.start, text.end, glyphs.start, glyphs.end);
|
|
||||||
SkASSERT(false);
|
SkASSERT(false);
|
||||||
}
|
}
|
||||||
lastTextEnd = text.end;
|
lastTextEnd = text.end;
|
||||||
@ -236,7 +235,7 @@ void OneLineShaper::finish(const Block& block, SkScalar height, SkScalar& advanc
|
|||||||
|
|
||||||
advanceX = fAdvance.fX;
|
advanceX = fAdvance.fX;
|
||||||
if (lastTextEnd != blockText.end) {
|
if (lastTextEnd != blockText.end) {
|
||||||
SkDEBUGF("Last range mismatch: %zu - %zu\n", lastTextEnd, blockText.end);
|
SkDEBUGF("Last range mismatch: %d - %d\n", lastTextEnd, blockText.end);
|
||||||
SkASSERT(false);
|
SkASSERT(false);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -209,7 +209,7 @@ struct EditorLayer : public sk_app::Window::Layer {
|
|||||||
switch (c) {
|
switch (c) {
|
||||||
case 'p':
|
case 'p':
|
||||||
for (StringView str : fEditor.text()) {
|
for (StringView str : fEditor.text()) {
|
||||||
SkDebugf(">> '%.*s'\n", (int)str.size, str.data);
|
SkDebugf(">> '%.*s'\n", str.size, str.data);
|
||||||
}
|
}
|
||||||
return true;
|
return true;
|
||||||
case 's':
|
case 's':
|
||||||
|
@ -112,7 +112,7 @@ std::tuple<sk_sp<SkImageFilter>, SkSVGColorspace> SkSVGFilterContext::getInput(
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
SkDebugf("unhandled filter input type %d\n", (int)inputType.type());
|
SkDebugf("unhandled filter input type %d\n", inputType.type());
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -47,7 +47,7 @@ static sk_sp<SkImage> LoadImage(const sk_sp<skresources::ResourceProvider>& rp,
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
default:
|
default:
|
||||||
SkDebugf("error loading image: unhandled iri type %d\n", (int)href.type());
|
SkDebugf("error loading image: unhandled iri type %d\n", href.type());
|
||||||
return nullptr;
|
return nullptr;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ SkScalar SkSVGLengthContext::resolve(const SkSVGLength& l, LengthType t) const {
|
|||||||
case SkSVGLength::Unit::kPC:
|
case SkSVGLength::Unit::kPC:
|
||||||
return l.value() * fDPI * kPCMultiplier;
|
return l.value() * fDPI * kPCMultiplier;
|
||||||
default:
|
default:
|
||||||
SkDebugf("unsupported unit type: <%d>\n", (int)l.unit());
|
SkDebugf("unsupported unit type: <%d>\n", l.unit());
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -30,7 +30,7 @@ protected:
|
|||||||
SkDebugf("make: dur:%g time%g state:%d",
|
SkDebugf("make: dur:%g time%g state:%d",
|
||||||
fPlayer->duration(),
|
fPlayer->duration(),
|
||||||
fPlayer->time(),
|
fPlayer->time(),
|
||||||
(int)fPlayer->state());
|
fPlayer->state());
|
||||||
}
|
}
|
||||||
|
|
||||||
fBar = { 10, 10, 510, 30 };
|
fBar = { 10, 10, 510, 30 };
|
||||||
|
@ -162,6 +162,7 @@ protected:
|
|||||||
// draw time to make it easier to guess when the bad cubic was drawn
|
// draw time to make it easier to guess when the bad cubic was drawn
|
||||||
std::string timeStr = std::to_string((float) (curTime - start) / 1000.f);
|
std::string timeStr = std::to_string((float) (curTime - start) / 1000.f);
|
||||||
canvas->drawSimpleText(timeStr.c_str(), timeStr.size(), SkTextEncoding::kUTF8, 20, 20, SkFont(), SkPaint());
|
canvas->drawSimpleText(timeStr.c_str(), timeStr.size(), SkTextEncoding::kUTF8, 20, 20, SkFont(), SkPaint());
|
||||||
|
SkDebugf("");
|
||||||
}
|
}
|
||||||
|
|
||||||
bool onAnimate(double nanos) override {
|
bool onAnimate(double nanos) override {
|
||||||
|
@ -29,7 +29,7 @@ protected:
|
|||||||
void onOnceBeforeDraw() override {
|
void onOnceBeforeDraw() override {
|
||||||
SkFILEStream svgStream(fPath.c_str());
|
SkFILEStream svgStream(fPath.c_str());
|
||||||
if (!svgStream.isValid()) {
|
if (!svgStream.isValid()) {
|
||||||
SkDebugf("file not found: \"%s\"\n", fPath.c_str());
|
SkDebugf("file not found: \"path\"\n", fPath.c_str());
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -412,7 +412,7 @@ void SkResourceCache::validate() const {
|
|||||||
void SkResourceCache::dump() const {
|
void SkResourceCache::dump() const {
|
||||||
this->validate();
|
this->validate();
|
||||||
|
|
||||||
SkDebugf("SkResourceCache: count=%d bytes=%zu %s\n",
|
SkDebugf("SkResourceCache: count=%d bytes=%d %s\n",
|
||||||
fCount, fTotalBytesUsed, fDiscardableFactory ? "discardable" : "malloc");
|
fCount, fTotalBytesUsed, fDiscardableFactory ? "discardable" : "malloc");
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -581,7 +581,7 @@ void SkGraphics::PurgeResourceCache() {
|
|||||||
/////////////
|
/////////////
|
||||||
|
|
||||||
static void dump_visitor(const SkResourceCache::Rec& rec, void*) {
|
static void dump_visitor(const SkResourceCache::Rec& rec, void*) {
|
||||||
SkDebugf("RC: %12s bytes %9zu discardable %p\n",
|
SkDebugf("RC: %12s bytes %9lu discardable %p\n",
|
||||||
rec.getCategory(), rec.bytesUsed(), rec.diagnostic_only_getDiscardable());
|
rec.getCategory(), rec.bytesUsed(), rec.diagnostic_only_getDiscardable());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -10,8 +10,6 @@
|
|||||||
#include "include/core/SkTypes.h"
|
#include "include/core/SkTypes.h"
|
||||||
#include "include/private/SkSemaphore.h"
|
#include "include/private/SkSemaphore.h"
|
||||||
|
|
||||||
#include <cinttypes>
|
|
||||||
|
|
||||||
#if !defined(__has_feature)
|
#if !defined(__has_feature)
|
||||||
#define __has_feature(x) 0
|
#define __has_feature(x) 0
|
||||||
#endif
|
#endif
|
||||||
@ -134,10 +132,10 @@
|
|||||||
SkAutoMutexExclusive l(fMu);
|
SkAutoMutexExclusive l(fMu);
|
||||||
|
|
||||||
SkASSERTF(!fCurrentShared->find(threadID),
|
SkASSERTF(!fCurrentShared->find(threadID),
|
||||||
"Thread %" PRIx64 " already has an shared lock\n", threadID);
|
"Thread %lx already has an shared lock\n", threadID);
|
||||||
|
|
||||||
if (!fWaitingExclusive->tryAdd(threadID)) {
|
if (!fWaitingExclusive->tryAdd(threadID)) {
|
||||||
SkDEBUGFAILF("Thread %" PRIx64 " already has an exclusive lock\n", threadID);
|
SkDEBUGFAILF("Thread %lx already has an exclusive lock\n", threadID);
|
||||||
}
|
}
|
||||||
|
|
||||||
currentSharedCount = fCurrentShared->count();
|
currentSharedCount = fCurrentShared->count();
|
||||||
@ -164,7 +162,7 @@
|
|||||||
SkAutoMutexExclusive l(fMu);
|
SkAutoMutexExclusive l(fMu);
|
||||||
SkASSERT(0 == fCurrentShared->count());
|
SkASSERT(0 == fCurrentShared->count());
|
||||||
if (!fWaitingExclusive->tryRemove(threadID)) {
|
if (!fWaitingExclusive->tryRemove(threadID)) {
|
||||||
SkDEBUGFAILF("Thread %" PRIx64 " did not have the lock held.\n", threadID);
|
SkDEBUGFAILF("Thread %lx did not have the lock held.\n", threadID);
|
||||||
}
|
}
|
||||||
exclusiveWaitingCount = fWaitingExclusive->count();
|
exclusiveWaitingCount = fWaitingExclusive->count();
|
||||||
sharedWaitingCount = fWaitingShared->count();
|
sharedWaitingCount = fWaitingShared->count();
|
||||||
@ -198,11 +196,11 @@
|
|||||||
exclusiveWaitingCount = fWaitingExclusive->count();
|
exclusiveWaitingCount = fWaitingExclusive->count();
|
||||||
if (exclusiveWaitingCount > 0) {
|
if (exclusiveWaitingCount > 0) {
|
||||||
if (!fWaitingShared->tryAdd(threadID)) {
|
if (!fWaitingShared->tryAdd(threadID)) {
|
||||||
SkDEBUGFAILF("Thread %" PRIx64 " was already waiting!\n", threadID);
|
SkDEBUGFAILF("Thread %lx was already waiting!\n", threadID);
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
if (!fCurrentShared->tryAdd(threadID)) {
|
if (!fCurrentShared->tryAdd(threadID)) {
|
||||||
SkDEBUGFAILF("Thread %" PRIx64 " already holds a shared lock!\n", threadID);
|
SkDEBUGFAILF("Thread %lx already holds a shared lock!\n", threadID);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
sharedQueueSelect = fSharedQueueSelect;
|
sharedQueueSelect = fSharedQueueSelect;
|
||||||
@ -224,7 +222,7 @@
|
|||||||
{
|
{
|
||||||
SkAutoMutexExclusive l(fMu);
|
SkAutoMutexExclusive l(fMu);
|
||||||
if (!fCurrentShared->tryRemove(threadID)) {
|
if (!fCurrentShared->tryRemove(threadID)) {
|
||||||
SkDEBUGFAILF("Thread %" PRIx64 " does not hold a shared lock.\n", threadID);
|
SkDEBUGFAILF("Thread %lx does not hold a shared lock.\n", threadID);
|
||||||
}
|
}
|
||||||
currentSharedCount = fCurrentShared->count();
|
currentSharedCount = fCurrentShared->count();
|
||||||
waitingExclusiveCount = fWaitingExclusive->count();
|
waitingExclusiveCount = fWaitingExclusive->count();
|
||||||
|
@ -428,7 +428,7 @@ bool SkFILEWStream::write(const void* buffer, size_t size)
|
|||||||
|
|
||||||
if (sk_fwrite(buffer, size, fFILE) != size)
|
if (sk_fwrite(buffer, size, fFILE) != size)
|
||||||
{
|
{
|
||||||
SkDEBUGCODE(SkDebugf("SkFILEWStream failed writing %zu bytes\n", size);)
|
SkDEBUGCODE(SkDebugf("SkFILEWStream failed writing %d bytes\n", size);)
|
||||||
sk_fclose(fFILE);
|
sk_fclose(fFILE);
|
||||||
fFILE = nullptr;
|
fFILE = nullptr;
|
||||||
return false;
|
return false;
|
||||||
|
@ -58,7 +58,7 @@ void SkStrikeCache::Dump() {
|
|||||||
SkDebugf("GlyphCache [ used budget ]\n");
|
SkDebugf("GlyphCache [ used budget ]\n");
|
||||||
SkDebugf(" bytes [ %8zu %8zu ]\n",
|
SkDebugf(" bytes [ %8zu %8zu ]\n",
|
||||||
SkGraphics::GetFontCacheUsed(), SkGraphics::GetFontCacheLimit());
|
SkGraphics::GetFontCacheUsed(), SkGraphics::GetFontCacheLimit());
|
||||||
SkDebugf(" count [ %8d %8d ]\n",
|
SkDebugf(" count [ %8zu %8zu ]\n",
|
||||||
SkGraphics::GetFontCacheCountUsed(), SkGraphics::GetFontCacheCountLimit());
|
SkGraphics::GetFontCacheCountUsed(), SkGraphics::GetFontCacheCountLimit());
|
||||||
|
|
||||||
int counter = 0;
|
int counter = 0;
|
||||||
@ -342,7 +342,7 @@ void SkStrikeCache::validate() const {
|
|||||||
SK_ABORT("fCacheCount != computedCount");
|
SK_ABORT("fCacheCount != computedCount");
|
||||||
}
|
}
|
||||||
if (fTotalMemoryUsed != computedBytes) {
|
if (fTotalMemoryUsed != computedBytes) {
|
||||||
SkDebugf("fTotalMemoryUsed: %zu, computedBytes: %zu", fTotalMemoryUsed, computedBytes);
|
SkDebugf("fTotalMemoryUsed: %d, computedBytes: %d", fTotalMemoryUsed, computedBytes);
|
||||||
SK_ABORT("fTotalMemoryUsed == computedBytes");
|
SK_ABORT("fTotalMemoryUsed == computedBytes");
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
@ -63,8 +63,8 @@ void SkTextBlobTrace::DumpTrace(const std::vector<SkTextBlobTrace::Record>& trac
|
|||||||
font.getScaleX(),
|
font.getScaleX(),
|
||||||
font.getSkewX(),
|
font.getSkewX(),
|
||||||
SkFontPriv::Flags(font),
|
SkFontPriv::Flags(font),
|
||||||
(int)font.getEdging(),
|
font.getEdging(),
|
||||||
(int)font.getHinting());
|
font.getHinting());
|
||||||
uint32_t glyphCount = iter.glyphCount();
|
uint32_t glyphCount = iter.glyphCount();
|
||||||
const uint16_t* glyphs = iter.glyphs();
|
const uint16_t* glyphs = iter.glyphs();
|
||||||
for (uint32_t i = 0; i < glyphCount; i++) {
|
for (uint32_t i = 0; i < glyphCount; i++) {
|
||||||
|
@ -159,7 +159,7 @@ namespace skvm {
|
|||||||
size_t fBytesWritten = 0;
|
size_t fBytesWritten = 0;
|
||||||
|
|
||||||
bool write(const void* buffer, size_t size) override {
|
bool write(const void* buffer, size_t size) override {
|
||||||
SkDebugf("%.*s", (int)size, (const char*)buffer);
|
SkDebugf("%.*s", size, buffer);
|
||||||
fBytesWritten += size;
|
fBytesWritten += size;
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
@ -99,7 +99,7 @@ public:
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
SkDebugf("%s", msg);
|
SkDebugf(msg);
|
||||||
}
|
}
|
||||||
|
|
||||||
GrRecordingContext::Stats* stats() {
|
GrRecordingContext::Stats* stats() {
|
||||||
|
@ -13,14 +13,14 @@
|
|||||||
#include "include/gpu/d3d/GrD3DTypes.h"
|
#include "include/gpu/d3d/GrD3DTypes.h"
|
||||||
#include "include/private/GrTypesPriv.h"
|
#include "include/private/GrTypesPriv.h"
|
||||||
|
|
||||||
#define GR_D3D_CALL_ERRCHECK(X) \
|
#define GR_D3D_CALL_ERRCHECK(X) \
|
||||||
do { \
|
do { \
|
||||||
HRESULT result = X; \
|
HRESULT result = X; \
|
||||||
SkASSERT(SUCCEEDED(result)); \
|
SkASSERT(SUCCEEDED(result)); \
|
||||||
if (!SUCCEEDED(result)) { \
|
if (!SUCCEEDED(result)) { \
|
||||||
SkDebugf("Failed Direct3D call. Error: 0x%08lx\n", result); \
|
SkDebugf("Failed Direct3D call. Error: 0x%08x\n", result); \
|
||||||
} \
|
} \
|
||||||
} while (false)
|
} while(false)
|
||||||
|
|
||||||
static constexpr bool operator==(const D3D12_CPU_DESCRIPTOR_HANDLE & first,
|
static constexpr bool operator==(const D3D12_CPU_DESCRIPTOR_HANDLE & first,
|
||||||
const D3D12_CPU_DESCRIPTOR_HANDLE & second) {
|
const D3D12_CPU_DESCRIPTOR_HANDLE & second) {
|
||||||
|
@ -11,8 +11,6 @@
|
|||||||
#include "include/gpu/vk/GrVkTypes.h"
|
#include "include/gpu/vk/GrVkTypes.h"
|
||||||
#include "src/gpu/vk/GrVkManagedResource.h"
|
#include "src/gpu/vk/GrVkManagedResource.h"
|
||||||
|
|
||||||
#include <cinttypes>
|
|
||||||
|
|
||||||
class GrVkGpu;
|
class GrVkGpu;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -32,8 +30,8 @@ public:
|
|||||||
|
|
||||||
#ifdef SK_TRACE_MANAGED_RESOURCES
|
#ifdef SK_TRACE_MANAGED_RESOURCES
|
||||||
void dumpInfo() const override {
|
void dumpInfo() const override {
|
||||||
SkDebugf("GrVkDescriptorPool: %" PRIdPTR ", type %d (%d refs)\n", (intptr_t)fDescPool,
|
SkDebugf("GrVkDescriptorPool: %d, type %d (%d refs)\n", fDescPool, fType,
|
||||||
fType, this->getRefCnt());
|
this->getRefCnt());
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -12,8 +12,6 @@
|
|||||||
#include "src/gpu/vk/GrVkDescriptorSetManager.h"
|
#include "src/gpu/vk/GrVkDescriptorSetManager.h"
|
||||||
#include "src/gpu/vk/GrVkManagedResource.h"
|
#include "src/gpu/vk/GrVkManagedResource.h"
|
||||||
|
|
||||||
#include <cinttypes>
|
|
||||||
|
|
||||||
class GrVkDescriptorPool;
|
class GrVkDescriptorPool;
|
||||||
class GrVkGpu;
|
class GrVkGpu;
|
||||||
|
|
||||||
@ -30,8 +28,7 @@ public:
|
|||||||
|
|
||||||
#ifdef SK_TRACE_MANAGED_RESOURCES
|
#ifdef SK_TRACE_MANAGED_RESOURCES
|
||||||
void dumpInfo() const override {
|
void dumpInfo() const override {
|
||||||
SkDebugf("GrVkDescriptorSet: %" PRIdPTR " (%d refs)\n", (intptr_t)fDescSet,
|
SkDebugf("GrVkDescriptorSet: %d (%d refs)\n", fDescSet, this->getRefCnt());
|
||||||
this->getRefCnt());
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -13,8 +13,6 @@
|
|||||||
#include "src/gpu/vk/GrVkManagedResource.h"
|
#include "src/gpu/vk/GrVkManagedResource.h"
|
||||||
#include "src/gpu/vk/GrVkResourceProvider.h"
|
#include "src/gpu/vk/GrVkResourceProvider.h"
|
||||||
|
|
||||||
#include <cinttypes>
|
|
||||||
|
|
||||||
class GrVkAttachment;
|
class GrVkAttachment;
|
||||||
class GrVkGpu;
|
class GrVkGpu;
|
||||||
class GrVkImageView;
|
class GrVkImageView;
|
||||||
@ -59,8 +57,7 @@ public:
|
|||||||
|
|
||||||
#ifdef SK_TRACE_MANAGED_RESOURCES
|
#ifdef SK_TRACE_MANAGED_RESOURCES
|
||||||
void dumpInfo() const override {
|
void dumpInfo() const override {
|
||||||
SkDebugf("GrVkFramebuffer: %" PRIdPTR " (%d refs)\n",
|
SkDebugf("GrVkFramebuffer: %d (%d refs)\n", fFramebuffer, this->getRefCnt());
|
||||||
(intptr_t)fFramebuffer, this->getRefCnt());
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -17,8 +17,6 @@
|
|||||||
#include "src/gpu/GrManagedResource.h"
|
#include "src/gpu/GrManagedResource.h"
|
||||||
#include "src/gpu/GrTexture.h"
|
#include "src/gpu/GrTexture.h"
|
||||||
|
|
||||||
#include <cinttypes>
|
|
||||||
|
|
||||||
class GrVkGpu;
|
class GrVkGpu;
|
||||||
class GrVkTexture;
|
class GrVkTexture;
|
||||||
|
|
||||||
@ -195,7 +193,7 @@ private:
|
|||||||
|
|
||||||
#ifdef SK_TRACE_MANAGED_RESOURCES
|
#ifdef SK_TRACE_MANAGED_RESOURCES
|
||||||
void dumpInfo() const override {
|
void dumpInfo() const override {
|
||||||
SkDebugf("GrVkImage: %" PRIdPTR " (%d refs)\n", (intptr_t)fImage, this->getRefCnt());
|
SkDebugf("GrVkImage: %d (%d refs)\n", fImage, this->getRefCnt());
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -12,8 +12,6 @@
|
|||||||
#include "include/gpu/vk/GrVkTypes.h"
|
#include "include/gpu/vk/GrVkTypes.h"
|
||||||
#include "src/gpu/vk/GrVkManagedResource.h"
|
#include "src/gpu/vk/GrVkManagedResource.h"
|
||||||
|
|
||||||
#include <cinttypes>
|
|
||||||
|
|
||||||
class GrVkSamplerYcbcrConversion;
|
class GrVkSamplerYcbcrConversion;
|
||||||
struct GrVkYcbcrConversionInfo;
|
struct GrVkYcbcrConversionInfo;
|
||||||
|
|
||||||
@ -32,8 +30,7 @@ public:
|
|||||||
|
|
||||||
#ifdef SK_TRACE_MANAGED_RESOURCES
|
#ifdef SK_TRACE_MANAGED_RESOURCES
|
||||||
void dumpInfo() const override {
|
void dumpInfo() const override {
|
||||||
SkDebugf("GrVkImageView: %" PRIdPTR " (%d refs)\n",
|
SkDebugf("GrVkImageView: %d (%d refs)\n", fImageView, this->getRefCnt());
|
||||||
(intptr_t)fImageView, this->getRefCnt());
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -14,8 +14,6 @@
|
|||||||
#include "src/gpu/GrXferProcessor.h"
|
#include "src/gpu/GrXferProcessor.h"
|
||||||
#include "src/gpu/vk/GrVkManagedResource.h"
|
#include "src/gpu/vk/GrVkManagedResource.h"
|
||||||
|
|
||||||
#include <cinttypes>
|
|
||||||
|
|
||||||
class GrPipeline;
|
class GrPipeline;
|
||||||
class GrProgramInfo;
|
class GrProgramInfo;
|
||||||
class GrRenderTarget;
|
class GrRenderTarget;
|
||||||
@ -76,7 +74,7 @@ public:
|
|||||||
|
|
||||||
#ifdef SK_TRACE_MANAGED_RESOURCES
|
#ifdef SK_TRACE_MANAGED_RESOURCES
|
||||||
void dumpInfo() const override {
|
void dumpInfo() const override {
|
||||||
SkDebugf("GrVkPipeline: %" PRIdPTR " (%d refs)\n", (intptr_t)fPipeline, this->getRefCnt());
|
SkDebugf("GrVkPipeline: %d (%d refs)\n", fPipeline, this->getRefCnt());
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -12,8 +12,6 @@
|
|||||||
#include "include/gpu/vk/GrVkTypes.h"
|
#include "include/gpu/vk/GrVkTypes.h"
|
||||||
#include "src/gpu/vk/GrVkManagedResource.h"
|
#include "src/gpu/vk/GrVkManagedResource.h"
|
||||||
|
|
||||||
#include <cinttypes>
|
|
||||||
|
|
||||||
class GrProcessorKeyBuilder;
|
class GrProcessorKeyBuilder;
|
||||||
class GrVkGpu;
|
class GrVkGpu;
|
||||||
class GrVkRenderTarget;
|
class GrVkRenderTarget;
|
||||||
@ -166,8 +164,7 @@ public:
|
|||||||
|
|
||||||
#ifdef SK_TRACE_MANAGED_RESOURCES
|
#ifdef SK_TRACE_MANAGED_RESOURCES
|
||||||
void dumpInfo() const override {
|
void dumpInfo() const override {
|
||||||
SkDebugf("GrVkRenderPass: %" PRIdPTR " (%d refs)\n",
|
SkDebugf("GrVkRenderPass: %d (%d refs)\n", fRenderPass, this->getRefCnt());
|
||||||
(intptr_t)fRenderPass, this->getRefCnt());
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -12,9 +12,7 @@
|
|||||||
#include "src/core/SkOpts.h"
|
#include "src/core/SkOpts.h"
|
||||||
#include "src/gpu/vk/GrVkManagedResource.h"
|
#include "src/gpu/vk/GrVkManagedResource.h"
|
||||||
#include "src/gpu/vk/GrVkSamplerYcbcrConversion.h"
|
#include "src/gpu/vk/GrVkSamplerYcbcrConversion.h"
|
||||||
|
|
||||||
#include <atomic>
|
#include <atomic>
|
||||||
#include <cinttypes>
|
|
||||||
|
|
||||||
class GrSamplerState;
|
class GrSamplerState;
|
||||||
class GrVkGpu;
|
class GrVkGpu;
|
||||||
@ -55,7 +53,7 @@ public:
|
|||||||
|
|
||||||
#ifdef SK_TRACE_MANAGED_RESOURCES
|
#ifdef SK_TRACE_MANAGED_RESOURCES
|
||||||
void dumpInfo() const override {
|
void dumpInfo() const override {
|
||||||
SkDebugf("GrVkSampler: %" PRIdPTR " (%d refs)\n", (intptr_t)fSampler, this->getRefCnt());
|
SkDebugf("GrVkSampler: %d (%d refs)\n", fSampler, this->getRefCnt());
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -13,8 +13,6 @@
|
|||||||
#include "include/gpu/vk/GrVkTypes.h"
|
#include "include/gpu/vk/GrVkTypes.h"
|
||||||
#include "src/core/SkOpts.h"
|
#include "src/core/SkOpts.h"
|
||||||
|
|
||||||
#include <cinttypes>
|
|
||||||
|
|
||||||
class GrVkGpu;
|
class GrVkGpu;
|
||||||
|
|
||||||
class GrVkSamplerYcbcrConversion : public GrVkManagedResource {
|
class GrVkSamplerYcbcrConversion : public GrVkManagedResource {
|
||||||
@ -55,8 +53,7 @@ public:
|
|||||||
|
|
||||||
#ifdef SK_TRACE_MANAGED_RESOURCES
|
#ifdef SK_TRACE_MANAGED_RESOURCES
|
||||||
void dumpInfo() const override {
|
void dumpInfo() const override {
|
||||||
SkDebugf("GrVkSamplerYcbcrConversion: %" PRIdPTR " (%d refs)\n", (intptr_t)fYcbcrConversion,
|
SkDebugf("GrVkSamplerYcbcrConversion: %d (%d refs)\n", fYcbcrConversion, this->getRefCnt());
|
||||||
this->getRefCnt());
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
@ -14,8 +14,6 @@
|
|||||||
#include "src/gpu/GrResourceProvider.h"
|
#include "src/gpu/GrResourceProvider.h"
|
||||||
#include "src/gpu/vk/GrVkManagedResource.h"
|
#include "src/gpu/vk/GrVkManagedResource.h"
|
||||||
|
|
||||||
#include <cinttypes>
|
|
||||||
|
|
||||||
class GrBackendSemaphore;
|
class GrBackendSemaphore;
|
||||||
class GrVkGpu;
|
class GrVkGpu;
|
||||||
|
|
||||||
@ -68,8 +66,7 @@ public:
|
|||||||
|
|
||||||
#ifdef SK_TRACE_MANAGED_RESOURCES
|
#ifdef SK_TRACE_MANAGED_RESOURCES
|
||||||
void dumpInfo() const override {
|
void dumpInfo() const override {
|
||||||
SkDebugf("GrVkSemaphore: %" PRIdPTR " (%d refs)\n", (intptr_t)fSemaphore,
|
SkDebugf("GrVkSemaphore: %d (%d refs)\n", fSemaphore, this->getRefCnt());
|
||||||
this->getRefCnt());
|
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
private:
|
private:
|
||||||
|
@ -40,7 +40,7 @@ void SkTCoincident::setPerp(const SkTCurve& c1, double t,
|
|||||||
fMatch = cPt.approximatelyEqual(fPerpPt);
|
fMatch = cPt.approximatelyEqual(fPerpPt);
|
||||||
#if DEBUG_T_SECT
|
#if DEBUG_T_SECT
|
||||||
if (fMatch) {
|
if (fMatch) {
|
||||||
SkDebugf("%s", ""); // allow setting breakpoint
|
SkDebugf(""); // allow setting breakpoint
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
@ -233,7 +233,7 @@ bool SkTSpan::initBounds(const SkTCurve& c) {
|
|||||||
fDeleted = false;
|
fDeleted = false;
|
||||||
#if DEBUG_T_SECT
|
#if DEBUG_T_SECT
|
||||||
if (fCollapsed) {
|
if (fCollapsed) {
|
||||||
SkDebugf("%s", ""); // for convenient breakpoints
|
SkDebugf(""); // for convenient breakpoints
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return fBounds.valid();
|
return fBounds.valid();
|
||||||
|
@ -364,6 +364,7 @@ void SkPathWriter::assemble() {
|
|||||||
connect by following segments from one to the other, rather than introducing
|
connect by following segments from one to the other, rather than introducing
|
||||||
a diagonal to connect the two.
|
a diagonal to connect the two.
|
||||||
*/
|
*/
|
||||||
|
SkDebugf("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (forward) {
|
if (forward) {
|
||||||
|
@ -1455,7 +1455,7 @@ void SkScalerContext_FreeType::generateImage(const SkGlyph& glyph) {
|
|||||||
FT_Error err = FT_Load_Glyph(fFace, glyph.getGlyphID(), fLoadGlyphFlags);
|
FT_Error err = FT_Load_Glyph(fFace, glyph.getGlyphID(), fLoadGlyphFlags);
|
||||||
if (err != 0) {
|
if (err != 0) {
|
||||||
SK_TRACEFTR(err, "SkScalerContext_FreeType::generateImage: FT_Load_Glyph(glyph:%d "
|
SK_TRACEFTR(err, "SkScalerContext_FreeType::generateImage: FT_Load_Glyph(glyph:%d "
|
||||||
"width:%d height:%d rb:%zu flags:%d) failed.",
|
"width:%d height:%d rb:%d flags:%d) failed.",
|
||||||
glyph.getGlyphID(), glyph.width(), glyph.height(), glyph.rowBytes(),
|
glyph.getGlyphID(), glyph.width(), glyph.height(), glyph.rowBytes(),
|
||||||
fLoadGlyphFlags);
|
fLoadGlyphFlags);
|
||||||
sk_bzero(glyph.fImage, glyph.imageSize());
|
sk_bzero(glyph.fImage, glyph.imageSize());
|
||||||
|
@ -1070,7 +1070,7 @@ void SkScalerContext_FreeType_Base::generateGlyphImage(
|
|||||||
FT_Error err = FT_Render_Glyph(face->glyph, doVert ? FT_RENDER_MODE_LCD_V :
|
FT_Error err = FT_Render_Glyph(face->glyph, doVert ? FT_RENDER_MODE_LCD_V :
|
||||||
FT_RENDER_MODE_LCD);
|
FT_RENDER_MODE_LCD);
|
||||||
if (err) {
|
if (err) {
|
||||||
SK_TRACEFTR(err, "Could not render glyph %p.", face->glyph);
|
SK_TRACEFTR(err, "Could not render glyph %x.", face->glyph);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -27,7 +27,7 @@ typedef signed long FT_Pos;
|
|||||||
#ifdef SK_DEBUG
|
#ifdef SK_DEBUG
|
||||||
const char* SkTraceFtrGetError(int);
|
const char* SkTraceFtrGetError(int);
|
||||||
#define SK_TRACEFTR(ERR, MSG, ...) \
|
#define SK_TRACEFTR(ERR, MSG, ...) \
|
||||||
SkDebugf("%s:%d:1: error: 0x%x '%s' " MSG "\n", __FILE__, __LINE__, ERR, \
|
SkDebugf("%s:%lu:1: error: 0x%x '%s' " MSG "\n", __FILE__, __LINE__, ERR, \
|
||||||
SkTraceFtrGetError((int)(ERR)), __VA_ARGS__)
|
SkTraceFtrGetError((int)(ERR)), __VA_ARGS__)
|
||||||
#else
|
#else
|
||||||
#define SK_TRACEFTR(ERR, ...) do { sk_ignore_unused_variable(ERR); } while (false)
|
#define SK_TRACEFTR(ERR, ...) do { sk_ignore_unused_variable(ERR); } while (false)
|
||||||
|
@ -126,11 +126,9 @@ static bool memeq(const char* s1, const char* s2, size_t n1, size_t n2) {
|
|||||||
|
|
||||||
#define SK_FONTMGR_ANDROID_PARSER_PREFIX "[SkFontMgr Android Parser] "
|
#define SK_FONTMGR_ANDROID_PARSER_PREFIX "[SkFontMgr Android Parser] "
|
||||||
|
|
||||||
#define SK_FONTCONFIGPARSER_WARNING(message, ...) \
|
#define SK_FONTCONFIGPARSER_WARNING(message, ...) \
|
||||||
SkDebugf(SK_FONTMGR_ANDROID_PARSER_PREFIX "%s:%d:%d: warning: " message "\n", \
|
SkDebugf(SK_FONTMGR_ANDROID_PARSER_PREFIX "%s:%d:%d: warning: " message "\n", self->fFilename, \
|
||||||
self->fFilename, \
|
XML_GetCurrentLineNumber(self->fParser), XML_GetCurrentColumnNumber(self->fParser), \
|
||||||
(int)XML_GetCurrentLineNumber(self->fParser), \
|
|
||||||
(int)XML_GetCurrentColumnNumber(self->fParser), \
|
|
||||||
##__VA_ARGS__)
|
##__VA_ARGS__)
|
||||||
|
|
||||||
static bool is_whitespace(char c) {
|
static bool is_whitespace(char c) {
|
||||||
|
@ -22,7 +22,7 @@ public:
|
|||||||
|
|
||||||
// Allow implicit conversion from Token::Kind, since this is just a utility wrapper on top.
|
// Allow implicit conversion from Token::Kind, since this is just a utility wrapper on top.
|
||||||
Operator(Token::Kind t) : fKind(t) {
|
Operator(Token::Kind t) : fKind(t) {
|
||||||
SkASSERTF(this->isOperator(), "token-kind %d is not an operator", (int)fKind);
|
SkASSERTF(this->isOperator(), "token-kind %d is not an operator", fKind);
|
||||||
}
|
}
|
||||||
|
|
||||||
enum class Precedence {
|
enum class Precedence {
|
||||||
|
@ -644,7 +644,7 @@ Value SkVMGenerator::writeTypeConversion(const Value& src,
|
|||||||
default:
|
default:
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
SkDEBUGFAILF("Unsupported type conversion: %d -> %d", (int)srcKind, (int)dstKind);
|
SkDEBUGFAILF("Unsupported type conversion: %d -> %d", srcKind, dstKind);
|
||||||
return {};
|
return {};
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1348,7 +1348,7 @@ Value SkVMGenerator::writeExpression(const Expression& e) {
|
|||||||
|
|
||||||
Value SkVMGenerator::writeStore(const Expression& lhs, const Value& rhs) {
|
Value SkVMGenerator::writeStore(const Expression& lhs, const Value& rhs) {
|
||||||
SkASSERTF(rhs.slots() == lhs.type().slotCount(),
|
SkASSERTF(rhs.slots() == lhs.type().slotCount(),
|
||||||
"lhs=%s (%s)\nrhs=%zu slot",
|
"lhs=%s (%s)\nrhs=%d slot",
|
||||||
lhs.type().description().c_str(), lhs.description().c_str(), rhs.slots());
|
lhs.type().description().c_str(), lhs.description().c_str(), rhs.slots());
|
||||||
|
|
||||||
// We need to figure out the collection of slots that we're storing into. The l-value (lhs)
|
// We need to figure out the collection of slots that we're storing into. The l-value (lhs)
|
||||||
|
@ -14,7 +14,7 @@ void SkTraceHR(const char* file, unsigned long line, HRESULT hr, const char* msg
|
|||||||
if (msg) {
|
if (msg) {
|
||||||
SkDebugf("%s\n", msg);
|
SkDebugf("%s\n", msg);
|
||||||
}
|
}
|
||||||
SkDebugf("%s(%lu) : error 0x%lx: ", file, line, hr);
|
SkDebugf("%s(%lu) : error 0x%x: ", file, line, hr);
|
||||||
|
|
||||||
LPSTR errorText = nullptr;
|
LPSTR errorText = nullptr;
|
||||||
FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER |
|
FormatMessageA(FORMAT_MESSAGE_ALLOCATE_BUFFER |
|
||||||
|
@ -100,8 +100,7 @@ static void test_intersectline(skiatest::Reporter* reporter) {
|
|||||||
for (i = 0; i < SK_ARRAY_COUNT(gEmpty); i += 2) {
|
for (i = 0; i < SK_ARRAY_COUNT(gEmpty); i += 2) {
|
||||||
bool valid = SkLineClipper::IntersectLine(&gEmpty[i], gR, dst);
|
bool valid = SkLineClipper::IntersectLine(&gEmpty[i], gR, dst);
|
||||||
if (valid) {
|
if (valid) {
|
||||||
SkDebugf("----- [%zu] %g %g -> %g %g\n",
|
SkDebugf("----- [%d] %g %g -> %g %g\n", i/2, dst[0].fX, dst[0].fY, dst[1].fX, dst[1].fY);
|
||||||
i/2, dst[0].fX, dst[0].fY, dst[1].fX, dst[1].fY);
|
|
||||||
}
|
}
|
||||||
REPORTER_ASSERT(reporter, !valid);
|
REPORTER_ASSERT(reporter, !valid);
|
||||||
}
|
}
|
||||||
@ -125,8 +124,7 @@ static void test_intersectline(skiatest::Reporter* reporter) {
|
|||||||
for (i = 0; i < SK_ARRAY_COUNT(gFull); i += 2) {
|
for (i = 0; i < SK_ARRAY_COUNT(gFull); i += 2) {
|
||||||
bool valid = SkLineClipper::IntersectLine(&gFull[i], gR, dst);
|
bool valid = SkLineClipper::IntersectLine(&gFull[i], gR, dst);
|
||||||
if (!valid || 0 != memcmp(&gFull[i], dst, sizeof(dst))) {
|
if (!valid || 0 != memcmp(&gFull[i], dst, sizeof(dst))) {
|
||||||
SkDebugf("++++ [%zu] %g %g -> %g %g\n",
|
SkDebugf("++++ [%d] %g %g -> %g %g\n", i/2, dst[0].fX, dst[0].fY, dst[1].fX, dst[1].fY);
|
||||||
i/2, dst[0].fX, dst[0].fY, dst[1].fX, dst[1].fY);
|
|
||||||
}
|
}
|
||||||
REPORTER_ASSERT(reporter, valid && !memcmp(&gFull[i], dst, sizeof(dst)));
|
REPORTER_ASSERT(reporter, valid && !memcmp(&gFull[i], dst, sizeof(dst)));
|
||||||
}
|
}
|
||||||
@ -145,8 +143,7 @@ static void test_intersectline(skiatest::Reporter* reporter) {
|
|||||||
for (i = 0; i < SK_ARRAY_COUNT(gPartial); i += 4) {
|
for (i = 0; i < SK_ARRAY_COUNT(gPartial); i += 4) {
|
||||||
bool valid = SkLineClipper::IntersectLine(&gPartial[i], gR, dst);
|
bool valid = SkLineClipper::IntersectLine(&gPartial[i], gR, dst);
|
||||||
if (!valid || 0 != memcmp(&gPartial[i+2], dst, sizeof(dst))) {
|
if (!valid || 0 != memcmp(&gPartial[i+2], dst, sizeof(dst))) {
|
||||||
SkDebugf("++++ [%zu] %g %g -> %g %g\n",
|
SkDebugf("++++ [%d] %g %g -> %g %g\n", i/2, dst[0].fX, dst[0].fY, dst[1].fX, dst[1].fY);
|
||||||
i/2, dst[0].fX, dst[0].fY, dst[1].fX, dst[1].fY);
|
|
||||||
}
|
}
|
||||||
REPORTER_ASSERT(reporter, valid &&
|
REPORTER_ASSERT(reporter, valid &&
|
||||||
!memcmp(&gPartial[i+2], dst, sizeof(dst)));
|
!memcmp(&gPartial[i+2], dst, sizeof(dst)));
|
||||||
|
@ -197,7 +197,7 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(EGLImageTest, reporter, ctxInfo) {
|
|||||||
|
|
||||||
//TestReadPixels(reporter, context0, surfaceContext.get(), pixels.get(), "EGLImageTest-read");
|
//TestReadPixels(reporter, context0, surfaceContext.get(), pixels.get(), "EGLImageTest-read");
|
||||||
|
|
||||||
SkDebugf("type: %d\n", (int)surfaceContext->asTextureProxy()->textureType());
|
SkDebugf("type: %d\n", surfaceContext->asTextureProxy()->textureType());
|
||||||
// We should not be able to write to an EXTERNAL texture
|
// We should not be able to write to an EXTERNAL texture
|
||||||
TestWritePixels(reporter, context0, surfaceContext.get(), false, "EGLImageTest-write");
|
TestWritePixels(reporter, context0, surfaceContext.get(), false, "EGLImageTest-write");
|
||||||
|
|
||||||
|
@ -334,6 +334,9 @@ static bool bruteMinT(skiatest::Reporter* reporter, const SkDQuad& quad1, const
|
|||||||
rStep /= 2;
|
rStep /= 2;
|
||||||
} while (rStep > FLT_EPSILON);
|
} while (rStep > FLT_EPSILON);
|
||||||
if (bestCCW < 0) {
|
if (bestCCW < 0) {
|
||||||
|
if (bestR >= maxRadius) {
|
||||||
|
SkDebugf("");
|
||||||
|
}
|
||||||
REPORTER_ASSERT(reporter, bestR < maxRadius);
|
REPORTER_ASSERT(reporter, bestR < maxRadius);
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -521,5 +521,6 @@ DEF_TEST(PathOpsAngleAllOnOneSide, reporter) {
|
|||||||
/* int result = */
|
/* int result = */
|
||||||
PathOpsAngleTester::AllOnOneSide(*first->debugLastAngle(), *next->debugLastAngle());
|
PathOpsAngleTester::AllOnOneSide(*first->debugLastAngle(), *next->debugLastAngle());
|
||||||
// SkDebugf("i=%d result=%d\n", i , result);
|
// SkDebugf("i=%d result=%d\n", i , result);
|
||||||
|
// SkDebugf("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -311,6 +311,9 @@ static void oneOff(skiatest::Reporter* reporter, const ConicPts& conic1, const C
|
|||||||
SkASSERT(ValidConic(c2));
|
SkASSERT(ValidConic(c2));
|
||||||
SkIntersections intersections;
|
SkIntersections intersections;
|
||||||
intersections.intersect(c1, c2);
|
intersections.intersect(c1, c2);
|
||||||
|
if (coin && intersections.used() != 2) {
|
||||||
|
SkDebugf("");
|
||||||
|
}
|
||||||
REPORTER_ASSERT(reporter, !coin || intersections.used() == 2);
|
REPORTER_ASSERT(reporter, !coin || intersections.used() == 2);
|
||||||
double tt1, tt2;
|
double tt1, tt2;
|
||||||
SkDPoint xy1, xy2;
|
SkDPoint xy1, xy2;
|
||||||
|
@ -88,6 +88,7 @@ static void testOneOffs(skiatest::Reporter* reporter) {
|
|||||||
SkDPoint lineXY = line.ptAtT(lineT);
|
SkDPoint lineXY = line.ptAtT(lineT);
|
||||||
if (!conicXY.approximatelyEqual(lineXY)) {
|
if (!conicXY.approximatelyEqual(lineXY)) {
|
||||||
conicXY.approximatelyEqual(lineXY);
|
conicXY.approximatelyEqual(lineXY);
|
||||||
|
SkDebugf("");
|
||||||
}
|
}
|
||||||
REPORTER_ASSERT(reporter, conicXY.approximatelyEqual(lineXY));
|
REPORTER_ASSERT(reporter, conicXY.approximatelyEqual(lineXY));
|
||||||
}
|
}
|
||||||
|
@ -411,6 +411,9 @@ static void oneOff(skiatest::Reporter* reporter, const CubicPts& cubic1, const C
|
|||||||
SkDebugf("sect%d,\n", index);
|
SkDebugf("sect%d,\n", index);
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
if (coin && intersections.used() < 2) {
|
||||||
|
SkDebugf("");
|
||||||
|
}
|
||||||
REPORTER_ASSERT(reporter, !coin || intersections.used() >= 2);
|
REPORTER_ASSERT(reporter, !coin || intersections.used() >= 2);
|
||||||
double tt1, tt2;
|
double tt1, tt2;
|
||||||
SkDPoint xy1, xy2;
|
SkDPoint xy1, xy2;
|
||||||
|
@ -450,7 +450,7 @@ static bool check_for_duplicate_names(const char* testName) {
|
|||||||
if (PathOpsDebug::gCheckForDuplicateNames) {
|
if (PathOpsDebug::gCheckForDuplicateNames) {
|
||||||
if (gUniqueNames.end() != std::find(gUniqueNames.begin(), gUniqueNames.end(),
|
if (gUniqueNames.end() != std::find(gUniqueNames.begin(), gUniqueNames.end(),
|
||||||
std::string(testName))) {
|
std::string(testName))) {
|
||||||
SkDebugf("%s", ""); // convenience for setting breakpoints
|
SkDebugf(""); // convenience for setting breakpoints
|
||||||
}
|
}
|
||||||
gUniqueNames.push_back(std::string(testName));
|
gUniqueNames.push_back(std::string(testName));
|
||||||
return true;
|
return true;
|
||||||
|
@ -98,6 +98,7 @@ static void testOneOffs(skiatest::Reporter* reporter) {
|
|||||||
SkDPoint lineXY = line.ptAtT(lineT);
|
SkDPoint lineXY = line.ptAtT(lineT);
|
||||||
if (!quadXY.approximatelyEqual(lineXY)) {
|
if (!quadXY.approximatelyEqual(lineXY)) {
|
||||||
quadXY.approximatelyEqual(lineXY);
|
quadXY.approximatelyEqual(lineXY);
|
||||||
|
SkDebugf("");
|
||||||
}
|
}
|
||||||
REPORTER_ASSERT(reporter, quadXY.approximatelyEqual(lineXY));
|
REPORTER_ASSERT(reporter, quadXY.approximatelyEqual(lineXY));
|
||||||
}
|
}
|
||||||
|
@ -777,13 +777,13 @@ DEF_GPUTEST_FOR_GL_RENDERING_CONTEXTS(ProcessorOptimizationValidationTest, repor
|
|||||||
"0x%08x, processor: %s", failedPixelCount, kRenderSize * kRenderSize,
|
"0x%08x, processor: %s", failedPixelCount, kRenderSize * kRenderSize,
|
||||||
fpGenerator.initialSeed(), fp->dumpInfo().c_str());
|
fpGenerator.initialSeed(), fp->dumpInfo().c_str());
|
||||||
if (!coverageMessage.isEmpty()) {
|
if (!coverageMessage.isEmpty()) {
|
||||||
INFOF(reporter, "%s", coverageMessage.c_str());
|
INFOF(reporter, coverageMessage.c_str());
|
||||||
}
|
}
|
||||||
if (!constMessage.isEmpty()) {
|
if (!constMessage.isEmpty()) {
|
||||||
INFOF(reporter, "%s", constMessage.c_str());
|
INFOF(reporter, constMessage.c_str());
|
||||||
}
|
}
|
||||||
if (!opaqueMessage.isEmpty()) {
|
if (!opaqueMessage.isEmpty()) {
|
||||||
INFOF(reporter, "%s", opaqueMessage.c_str());
|
INFOF(reporter, opaqueMessage.c_str());
|
||||||
}
|
}
|
||||||
if (!loggedFirstWarning) {
|
if (!loggedFirstWarning) {
|
||||||
SkString input;
|
SkString input;
|
||||||
|
@ -63,7 +63,7 @@ static void path_contains_rrect_check(skiatest::Reporter* reporter, const SkRRec
|
|||||||
SkPathDirection dir, unsigned start) {
|
SkPathDirection dir, unsigned start) {
|
||||||
SkRRect out = inner_path_contains_rrect(reporter, in, dir, start);
|
SkRRect out = inner_path_contains_rrect(reporter, in, dir, start);
|
||||||
if (in != out) {
|
if (in != out) {
|
||||||
SkDebugf("%s", "");
|
SkDebugf("");
|
||||||
}
|
}
|
||||||
REPORTER_ASSERT(reporter, in == out);
|
REPORTER_ASSERT(reporter, in == out);
|
||||||
}
|
}
|
||||||
@ -72,7 +72,7 @@ static void path_contains_rrect_nocheck(skiatest::Reporter* reporter, const SkRR
|
|||||||
SkPathDirection dir, unsigned start) {
|
SkPathDirection dir, unsigned start) {
|
||||||
SkRRect out = inner_path_contains_rrect(reporter, in, dir, start);
|
SkRRect out = inner_path_contains_rrect(reporter, in, dir, start);
|
||||||
if (in == out) {
|
if (in == out) {
|
||||||
SkDebugf("%s", "");
|
SkDebugf("");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -169,7 +169,7 @@
|
|||||||
|
|
||||||
static LONG WINAPI handler(EXCEPTION_POINTERS* e) {
|
static LONG WINAPI handler(EXCEPTION_POINTERS* e) {
|
||||||
const DWORD code = e->ExceptionRecord->ExceptionCode;
|
const DWORD code = e->ExceptionRecord->ExceptionCode;
|
||||||
SkDebugf("\nCaught exception %lu", code);
|
SkDebugf("\nCaught exception %u", code);
|
||||||
for (size_t i = 0; i < SK_ARRAY_COUNT(kExceptions); i++) {
|
for (size_t i = 0; i < SK_ARRAY_COUNT(kExceptions); i++) {
|
||||||
if (kExceptions[i].code == code) {
|
if (kExceptions[i].code == code) {
|
||||||
SkDebugf(" %s", kExceptions[i].name);
|
SkDebugf(" %s", kExceptions[i].name);
|
||||||
@ -230,7 +230,7 @@
|
|||||||
DWORD64 offset;
|
DWORD64 offset;
|
||||||
SymGetSymFromAddr64(hProcess, frame.AddrPC.Offset, &offset, symbol);
|
SymGetSymFromAddr64(hProcess, frame.AddrPC.Offset, &offset, symbol);
|
||||||
|
|
||||||
SkDebugf("%s +%llx\n", symbol->Name, offset);
|
SkDebugf("%s +%x\n", symbol->Name, offset);
|
||||||
}
|
}
|
||||||
#endif //SK_WINUWP
|
#endif //SK_WINUWP
|
||||||
|
|
||||||
|
@ -56,7 +56,7 @@ sk_sp<SkData> SkSharingSerialContext::serializeImage(SkImage* img, void* ctx) {
|
|||||||
sk_sp<SkImage> SkSharingDeserialContext::deserializeImage(
|
sk_sp<SkImage> SkSharingDeserialContext::deserializeImage(
|
||||||
const void* data, size_t length, void* ctx) {
|
const void* data, size_t length, void* ctx) {
|
||||||
if (!data || !length || !ctx) {
|
if (!data || !length || !ctx) {
|
||||||
SkDebugf("SkSharingDeserialContext::deserializeImage arguments invalid %p %zu %p.\n",
|
SkDebugf("SkSharingDeserialContext::deserializeImage arguments invalid %p %d %p.\n",
|
||||||
data, length, ctx);
|
data, length, ctx);
|
||||||
// Return something so the rest of the debugger can proceed.
|
// Return something so the rest of the debugger can proceed.
|
||||||
SkBitmap bm;
|
SkBitmap bm;
|
||||||
|
@ -6,7 +6,6 @@
|
|||||||
#include "tools/Registry.h"
|
#include "tools/Registry.h"
|
||||||
#include "skia.h"
|
#include "skia.h"
|
||||||
|
|
||||||
#include <cinttypes>
|
|
||||||
#include <cmath>
|
#include <cmath>
|
||||||
#include <string>
|
#include <string>
|
||||||
|
|
||||||
|
@ -18,14 +18,14 @@
|
|||||||
#include <dxgi1_4.h>
|
#include <dxgi1_4.h>
|
||||||
#include <wrl/client.h>
|
#include <wrl/client.h>
|
||||||
|
|
||||||
#define GR_D3D_CALL_ERRCHECK(X) \
|
#define GR_D3D_CALL_ERRCHECK(X) \
|
||||||
do { \
|
do { \
|
||||||
HRESULT result = X; \
|
HRESULT result = X; \
|
||||||
SkASSERT(SUCCEEDED(result)); \
|
SkASSERT(SUCCEEDED(result)); \
|
||||||
if (!SUCCEEDED(result)) { \
|
if (!SUCCEEDED(result)) { \
|
||||||
SkDebugf("Failed Direct3D call. Error: 0x%08lx\n", result); \
|
SkDebugf("Failed Direct3D call. Error: 0x%08x\n", result); \
|
||||||
} \
|
} \
|
||||||
} while (false)
|
} while(false)
|
||||||
|
|
||||||
using namespace Microsoft::WRL;
|
using namespace Microsoft::WRL;
|
||||||
|
|
||||||
|
@ -67,7 +67,7 @@ SkEventTracer::Handle SkDebugfTracer::addTraceEvent(char phase,
|
|||||||
bool open = (phase == TRACE_EVENT_PHASE_COMPLETE);
|
bool open = (phase == TRACE_EVENT_PHASE_COMPLETE);
|
||||||
if (open) {
|
if (open) {
|
||||||
const char* category = this->getCategoryGroupName(categoryEnabledFlag);
|
const char* category = this->getCategoryGroupName(categoryEnabledFlag);
|
||||||
SkDebugf("[% 2d]%s <%s> %s%s #%d {\n", (int)fIndent.size(), fIndent.c_str(), category, name,
|
SkDebugf("[% 2d]%s <%s> %s%s #%d {\n", fIndent.size(), fIndent.c_str(), category, name,
|
||||||
args.c_str(), fCnt);
|
args.c_str(), fCnt);
|
||||||
fIndent.append(" ");
|
fIndent.append(" ");
|
||||||
} else {
|
} else {
|
||||||
@ -81,5 +81,5 @@ void SkDebugfTracer::updateTraceEventDuration(const uint8_t* categoryEnabledFlag
|
|||||||
const char* name,
|
const char* name,
|
||||||
SkEventTracer::Handle handle) {
|
SkEventTracer::Handle handle) {
|
||||||
fIndent.resize(fIndent.size() - 1);
|
fIndent.resize(fIndent.size() - 1);
|
||||||
SkDebugf("[% 2d]%s } %s\n", (int)fIndent.size(), fIndent.c_str(), name);
|
SkDebugf("[% 2d]%s } %s\n", fIndent.size(), fIndent.c_str(), name);
|
||||||
}
|
}
|
||||||
|
@ -129,7 +129,7 @@ void SkottieSlide::load(SkScalar w, SkScalar h) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
void report() const {
|
void report() const {
|
||||||
SkDebugf("Animation loaded with %zu error%s, %zu warning%s.\n",
|
SkDebugf("Animation loaded with %lu error%s, %lu warning%s.\n",
|
||||||
fErrors.size(), fErrors.size() == 1 ? "" : "s",
|
fErrors.size(), fErrors.size() == 1 ? "" : "s",
|
||||||
fWarnings.size(), fWarnings.size() == 1 ? "" : "s");
|
fWarnings.size(), fWarnings.size() == 1 ? "" : "s");
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user