Mesa (master): util: single call to util_format_description in fill_rect
Brian Paul
brianp at kemper.freedesktop.org
Thu Sep 22 07:45:10 PDT 2011
Module: Mesa
Branch: master
Commit: c40c1599bb7782808a1387663d69cc9f99f4c68f
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=c40c1599bb7782808a1387663d69cc9f99f4c68f
Author: Keith Whitwell <keithw at vmware.com>
Date: Wed Sep 21 11:14:04 2011 -0600
util: single call to util_format_description in fill_rect
---
src/gallium/auxiliary/util/u_rect.c | 7 ++++---
1 files changed, 4 insertions(+), 3 deletions(-)
diff --git a/src/gallium/auxiliary/util/u_rect.c b/src/gallium/auxiliary/util/u_rect.c
index 56fcfac..59bebbc 100644
--- a/src/gallium/auxiliary/util/u_rect.c
+++ b/src/gallium/auxiliary/util/u_rect.c
@@ -97,11 +97,12 @@ util_fill_rect(ubyte * dst,
unsigned height,
union util_color *uc)
{
+ const struct util_format_description *desc = util_format_description(format);
unsigned i, j;
unsigned width_size;
- int blocksize = util_format_get_blocksize(format);
- int blockwidth = util_format_get_blockwidth(format);
- int blockheight = util_format_get_blockheight(format);
+ int blocksize = desc->block.bits / 8;
+ int blockwidth = desc->block.width;
+ int blockheight = desc->block.height;
assert(blocksize > 0);
assert(blockwidth > 0);
More information about the mesa-commit
mailing list