summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorYi Kong <yikong@google.com>2023-12-05 15:33:30 +0900
committerYi Kong <yikong@google.com>2023-12-05 09:39:13 +0000
commit906306cacf0dad2d1822ab0eda36fe95ce0e37cf (patch)
treed100c2bb1fcac4cc51bd09575e09f72365cfaa13
parent443973f505b34b2a8cc71ae18f9067e5c629719c (diff)
downloadnative-906306cacf0dad2d1822ab0eda36fe95ce0e37cf.tar.gz
Fix -Wformat compiler warning
error: format specifies type 'int' but the argument has type 'ui::Dataspace' [-Werror,-Wformat] 91 | LOG_ALWAYS_FATAL("%s isTextureValid:%d dataspace:%d" | ~~ 92 | "\n\tGrBackendTexture: (%i x %i) hasMipmaps: %i isProtected: %i texType: %i" 93 | "\n\t\tGrGLTextureInfo: success: %i fTarget: %u fFormat: %u colorType %i", 94 | msg, tex.isValid(), dataspace, tex.width(), tex.height(), tex.hasMipmaps(), | ^~~~~~~~~ | static_cast<int32_t>( ) Test: build with upstream Clang Change-Id: I81868618064fbb189affb0f55c4e3ab94e78430b Merged-In: I81868618064fbb189affb0f55c4e3ab94e78430b (cherry picked from commit d90ebf37bac881823a701190afd871dbc7495624)
-rw-r--r--libs/renderengine/skia/AutoBackendTexture.cpp6
1 files changed, 3 insertions, 3 deletions
diff --git a/libs/renderengine/skia/AutoBackendTexture.cpp b/libs/renderengine/skia/AutoBackendTexture.cpp
index c412c9cff7..daa42c32b6 100644
--- a/libs/renderengine/skia/AutoBackendTexture.cpp
+++ b/libs/renderengine/skia/AutoBackendTexture.cpp
@@ -91,9 +91,9 @@ void logFatalTexture(const char* msg, const GrBackendTexture& tex, ui::Dataspace
LOG_ALWAYS_FATAL("%s isTextureValid:%d dataspace:%d"
"\n\tGrBackendTexture: (%i x %i) hasMipmaps: %i isProtected: %i texType: %i"
"\n\t\tGrGLTextureInfo: success: %i fTarget: %u fFormat: %u colorType %i",
- msg, tex.isValid(), dataspace, tex.width(), tex.height(), tex.hasMipmaps(),
- tex.isProtected(), static_cast<int>(tex.textureType()), retrievedTextureInfo,
- textureInfo.fTarget, textureInfo.fFormat, colorType);
+ msg, tex.isValid(), static_cast<int32_t>(dataspace), tex.width(), tex.height(),
+ tex.hasMipmaps(), tex.isProtected(), static_cast<int>(tex.textureType()),
+ retrievedTextureInfo, textureInfo.fTarget, textureInfo.fFormat, colorType);
}
sk_sp<SkImage> AutoBackendTexture::makeImage(ui::Dataspace dataspace, SkAlphaType alphaType,