Mesa (master): mesa/swrast: Use global function _mesa_regions_overlap()
Anuj Phogat
aphogat at kemper.freedesktop.org
Mon Jun 29 20:19:44 UTC 2015
Module: Mesa
Branch: master
Commit: ca21c9ab28df24ef015ead28df1dcccd90387df6
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=ca21c9ab28df24ef015ead28df1dcccd90387df6
Author: Anuj Phogat <anuj.phogat at gmail.com>
Date: Tue Jun 9 15:18:13 2015 -0700
mesa/swrast: Use global function _mesa_regions_overlap()
Signed-off-by: Anuj Phogat <anuj.phogat at gmail.com>
Reviewed-by: Brian Paul <brianp at vmware.com>
---
src/mesa/swrast/s_copypix.c | 16 +++-------------
1 file changed, 3 insertions(+), 13 deletions(-)
diff --git a/src/mesa/swrast/s_copypix.c b/src/mesa/swrast/s_copypix.c
index 68c83e4..8fde0c2 100644
--- a/src/mesa/swrast/s_copypix.c
+++ b/src/mesa/swrast/s_copypix.c
@@ -27,6 +27,7 @@
#include "main/context.h"
#include "main/condrender.h"
#include "main/macros.h"
+#include "main/blit.h"
#include "main/pixeltransfer.h"
#include "main/imports.h"
@@ -52,19 +53,8 @@ regions_overlap(GLint srcx, GLint srcy,
GLfloat zoomX, GLfloat zoomY)
{
if (zoomX == 1.0 && zoomY == 1.0) {
- /* no zoom */
- if (srcx >= dstx + width || (srcx + width <= dstx)) {
- return GL_FALSE;
- }
- else if (srcy < dsty) { /* this is OK */
- return GL_FALSE;
- }
- else if (srcy > dsty + height) {
- return GL_FALSE;
- }
- else {
- return GL_TRUE;
- }
+ return _mesa_regions_overlap(srcx, srcy, srcx + width, srcy + height,
+ dstx, dsty, dstx + width, dsty + height);
}
else {
/* add one pixel of slop when zooming, just to be safe */
More information about the mesa-commit
mailing list