aboutsummaryrefslogtreecommitdiff
path: root/src/core
diff options
context:
space:
mode:
Diffstat (limited to 'src/core')
-rw-r--r--src/core/SkResourceCache.cpp4
-rw-r--r--src/core/SkSharedMutex.cpp14
-rw-r--r--src/core/SkStream.cpp2
-rw-r--r--src/core/SkStrikeCache.cpp4
-rw-r--r--src/core/SkTextBlobTrace.cpp4
-rw-r--r--src/core/SkVM.cpp2
6 files changed, 16 insertions, 14 deletions
diff --git a/src/core/SkResourceCache.cpp b/src/core/SkResourceCache.cpp
index 016c38cdc1..b8285edde6 100644
--- a/src/core/SkResourceCache.cpp
+++ b/src/core/SkResourceCache.cpp
@@ -412,7 +412,7 @@ void SkResourceCache::validate() const {
void SkResourceCache::dump() const {
this->validate();
- SkDebugf("SkResourceCache: count=%d bytes=%d %s\n",
+ SkDebugf("SkResourceCache: count=%d bytes=%zu %s\n",
fCount, fTotalBytesUsed, fDiscardableFactory ? "discardable" : "malloc");
}
@@ -581,7 +581,7 @@ void SkGraphics::PurgeResourceCache() {
/////////////
static void dump_visitor(const SkResourceCache::Rec& rec, void*) {
- SkDebugf("RC: %12s bytes %9lu discardable %p\n",
+ SkDebugf("RC: %12s bytes %9zu discardable %p\n",
rec.getCategory(), rec.bytesUsed(), rec.diagnostic_only_getDiscardable());
}
diff --git a/src/core/SkSharedMutex.cpp b/src/core/SkSharedMutex.cpp
index 5d34e42d9b..6ae129a6be 100644
--- a/src/core/SkSharedMutex.cpp
+++ b/src/core/SkSharedMutex.cpp
@@ -10,6 +10,8 @@
#include "include/core/SkTypes.h"
#include "include/private/SkSemaphore.h"
+#include <cinttypes>
+
#if !defined(__has_feature)
#define __has_feature(x) 0
#endif
@@ -132,10 +134,10 @@
SkAutoMutexExclusive l(fMu);
SkASSERTF(!fCurrentShared->find(threadID),
- "Thread %lx already has an shared lock\n", threadID);
+ "Thread %" PRIx64 " already has an shared lock\n", threadID);
if (!fWaitingExclusive->tryAdd(threadID)) {
- SkDEBUGFAILF("Thread %lx already has an exclusive lock\n", threadID);
+ SkDEBUGFAILF("Thread %" PRIx64 " already has an exclusive lock\n", threadID);
}
currentSharedCount = fCurrentShared->count();
@@ -162,7 +164,7 @@
SkAutoMutexExclusive l(fMu);
SkASSERT(0 == fCurrentShared->count());
if (!fWaitingExclusive->tryRemove(threadID)) {
- SkDEBUGFAILF("Thread %lx did not have the lock held.\n", threadID);
+ SkDEBUGFAILF("Thread %" PRIx64 " did not have the lock held.\n", threadID);
}
exclusiveWaitingCount = fWaitingExclusive->count();
sharedWaitingCount = fWaitingShared->count();
@@ -196,11 +198,11 @@
exclusiveWaitingCount = fWaitingExclusive->count();
if (exclusiveWaitingCount > 0) {
if (!fWaitingShared->tryAdd(threadID)) {
- SkDEBUGFAILF("Thread %lx was already waiting!\n", threadID);
+ SkDEBUGFAILF("Thread %" PRIx64 " was already waiting!\n", threadID);
}
} else {
if (!fCurrentShared->tryAdd(threadID)) {
- SkDEBUGFAILF("Thread %lx already holds a shared lock!\n", threadID);
+ SkDEBUGFAILF("Thread %" PRIx64 " already holds a shared lock!\n", threadID);
}
}
sharedQueueSelect = fSharedQueueSelect;
@@ -222,7 +224,7 @@
{
SkAutoMutexExclusive l(fMu);
if (!fCurrentShared->tryRemove(threadID)) {
- SkDEBUGFAILF("Thread %lx does not hold a shared lock.\n", threadID);
+ SkDEBUGFAILF("Thread %" PRIx64 " does not hold a shared lock.\n", threadID);
}
currentSharedCount = fCurrentShared->count();
waitingExclusiveCount = fWaitingExclusive->count();
diff --git a/src/core/SkStream.cpp b/src/core/SkStream.cpp
index ad1669872f..52fe06176c 100644
--- a/src/core/SkStream.cpp
+++ b/src/core/SkStream.cpp
@@ -428,7 +428,7 @@ bool SkFILEWStream::write(const void* buffer, size_t size)
if (sk_fwrite(buffer, size, fFILE) != size)
{
- SkDEBUGCODE(SkDebugf("SkFILEWStream failed writing %d bytes\n", size);)
+ SkDEBUGCODE(SkDebugf("SkFILEWStream failed writing %zu bytes\n", size);)
sk_fclose(fFILE);
fFILE = nullptr;
return false;
diff --git a/src/core/SkStrikeCache.cpp b/src/core/SkStrikeCache.cpp
index 1fce164dd1..19a745412f 100644
--- a/src/core/SkStrikeCache.cpp
+++ b/src/core/SkStrikeCache.cpp
@@ -58,7 +58,7 @@ void SkStrikeCache::Dump() {
SkDebugf("GlyphCache [ used budget ]\n");
SkDebugf(" bytes [ %8zu %8zu ]\n",
SkGraphics::GetFontCacheUsed(), SkGraphics::GetFontCacheLimit());
- SkDebugf(" count [ %8zu %8zu ]\n",
+ SkDebugf(" count [ %8d %8d ]\n",
SkGraphics::GetFontCacheCountUsed(), SkGraphics::GetFontCacheCountLimit());
int counter = 0;
@@ -342,7 +342,7 @@ void SkStrikeCache::validate() const {
SK_ABORT("fCacheCount != computedCount");
}
if (fTotalMemoryUsed != computedBytes) {
- SkDebugf("fTotalMemoryUsed: %d, computedBytes: %d", fTotalMemoryUsed, computedBytes);
+ SkDebugf("fTotalMemoryUsed: %zu, computedBytes: %zu", fTotalMemoryUsed, computedBytes);
SK_ABORT("fTotalMemoryUsed == computedBytes");
}
#endif
diff --git a/src/core/SkTextBlobTrace.cpp b/src/core/SkTextBlobTrace.cpp
index 7cd15e3387..88275427a6 100644
--- a/src/core/SkTextBlobTrace.cpp
+++ b/src/core/SkTextBlobTrace.cpp
@@ -63,8 +63,8 @@ void SkTextBlobTrace::DumpTrace(const std::vector<SkTextBlobTrace::Record>& trac
font.getScaleX(),
font.getSkewX(),
SkFontPriv::Flags(font),
- font.getEdging(),
- font.getHinting());
+ (int)font.getEdging(),
+ (int)font.getHinting());
uint32_t glyphCount = iter.glyphCount();
const uint16_t* glyphs = iter.glyphs();
for (uint32_t i = 0; i < glyphCount; i++) {
diff --git a/src/core/SkVM.cpp b/src/core/SkVM.cpp
index 840701d23a..bc49f16672 100644
--- a/src/core/SkVM.cpp
+++ b/src/core/SkVM.cpp
@@ -159,7 +159,7 @@ namespace skvm {
size_t fBytesWritten = 0;
bool write(const void* buffer, size_t size) override {
- SkDebugf("%.*s", size, buffer);
+ SkDebugf("%.*s", (int)size, (const char*)buffer);
fBytesWritten += size;
return true;
}