summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLaszlo Agocs <laszlo.agocs@qt.io>2018-01-10 12:04:40 +0100
committerLaszlo Agocs <laszlo.agocs@qt.io>2018-01-10 12:28:25 +0000
commit9a7f9875cca21bf58f46300d2085a5879b300c42 (patch)
tree0eebe5cadf0258d1133531234318710d0459eda6
parent350c999b55d27b8ea23146e0a69f4155168826ba (diff)
Print a hint when scanning for transparency manually
Change-Id: I7d8949490c803e187d147e1d8ac1fc32f298dee8 Reviewed-by: Andy Nichols <andy.nichols@qt.io>
-rw-r--r--src/runtime/q3dspresentation.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/runtime/q3dspresentation.cpp b/src/runtime/q3dspresentation.cpp
index 083fa1a..5ea2f6f 100644
--- a/src/runtime/q3dspresentation.cpp
+++ b/src/runtime/q3dspresentation.cpp
@@ -1061,6 +1061,11 @@ namespace {
if (!textureImage.hasAlphaChannel())
return false;
+ if (textureImage.width() > 1024 || textureImage.height() > 1024)
+ qCDebug(lcUip, "Perf. hint: Scanning image of size %dx%d manually for transparency. "
+ "Prefer setting hasTransparency in the ImageBuffer element instead.",
+ textureImage.width(), textureImage.height());
+
bool hasTransparency = false;
for (int y = 0; y < textureImage.height(); ++y) {
for (int x = 0; x < textureImage.width(); ++x) {