aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--graphics/pixelformat.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/graphics/pixelformat.h b/graphics/pixelformat.h
index 9dd06241b7..7b966a8a15 100644
--- a/graphics/pixelformat.h
+++ b/graphics/pixelformat.h
@@ -215,6 +215,10 @@ struct PixelFormat {
return (8 - aLoss);
}
+ inline byte bpp() const {
+ return rBits() + gBits() + bBits() + aBits();
+ }
+
////////////////////////////////////////////////////////////////////////
// Convenience functions for getting color components' maximum values //
////////////////////////////////////////////////////////////////////////