diff options
author | Alexander Larsson <alexl@redhat.com> | 2010-04-21 12:46:22 +0200 |
---|---|---|
committer | Alexander Larsson <alexl@redhat.com> | 2010-04-23 16:36:35 +0200 |
commit | 1efe358a05661054eac79dfdb88a55982de10760 (patch) | |
tree | d1703ebed1c8e33e273c22f5bec6dbbcbf6b2368 /client/red_drawable.h | |
parent | 5c2d9a3e321eca7f93f69a5cfc8ff240c8992e13 (diff) | |
download | spice-1efe358a05661054eac79dfdb88a55982de10760.tar.gz spice-1efe358a05661054eac79dfdb88a55982de10760.tar.xz spice-1efe358a05661054eac79dfdb88a55982de10760.zip |
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.
Diffstat (limited to 'client/red_drawable.h')
-rw-r--r-- | client/red_drawable.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/client/red_drawable.h b/client/red_drawable.h index 64929e8c..3fac164c 100644 --- a/client/red_drawable.h +++ b/client/red_drawable.h @@ -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; |