diff options
author | David Reveman <c99drn@cs.umu.se> | 2005-03-11 12:26:20 +0000 |
---|---|---|
committer | David Reveman <c99drn@cs.umu.se> | 2005-03-11 12:26:20 +0000 |
commit | 816606b9eabee334ce6e0b79e8aa67544f428c19 (patch) | |
tree | bf15edaf918dc863d391e14be7f5e78d3ed4140a /hw/xgl | |
parent | 4de5aa428514f2cacc60d4708dad996dedee1092 (diff) |
Return early from xglFillRect when no rectangles should be filled
Diffstat (limited to 'hw/xgl')
-rw-r--r-- | hw/xgl/xglfill.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/hw/xgl/xglfill.c b/hw/xgl/xglfill.c index 7832df27e..573484782 100644 --- a/hw/xgl/xglfill.c +++ b/hw/xgl/xglfill.c @@ -178,6 +178,9 @@ xglFillRect (DrawablePtr pDrawable, } } + if (!nBox) + return; + pBox = (heapBox) ? heapBox : stackBox; if (!xglFill (pDrawable, pGC, NULL, @@ -206,7 +209,7 @@ xglFillRect (DrawablePtr pDrawable, FatalError (XGL_SW_FAILURE_STRING); break; } - + REGION_INIT (pGC->pScreen, ®ion, pBox, nBox); while (nBox--) |