Add helper to compare RedDrawable::Formats for copy compabible

Being copy compatible means the format are identical except
that some bits in the source may be ignored in the destination.
This commit is contained in:
Alexander Larsson 2010-04-21 12:46:22 +02:00
parent 5c2d9a3e32
commit 1efe358a05

View File

@ -57,6 +57,10 @@ public:
A1,
};
static int format_copy_compatible(Format src, Format dest) {
return src == dest || (src == ARGB32 && dest == RGB32);
}
static int format_to_bpp(Format format) {
if (format == RedDrawable::A1) {
return 1;