[gegl/gsoc2011-opencl: 74/78] changes in tile locking mechanism



commit 452823f879017478e5ac6f905c76a66f2a4627cc
Author: Victor Oliveira <victormatheus gmail com>
Date:   Tue Jun 21 17:13:53 2011 -0300

    changes in tile locking mechanism

 gegl/buffer/gegl-tile.c |    6 ++----
 1 files changed, 2 insertions(+), 4 deletions(-)
---
diff --git a/gegl/buffer/gegl-tile.c b/gegl/buffer/gegl-tile.c
index dc0c8fd..ca7682d 100644
--- a/gegl/buffer/gegl-tile.c
+++ b/gegl/buffer/gegl-tile.c
@@ -262,14 +262,12 @@ gegl_tile_lock (GeglTile *tile,
 
   gegl_tile_unclone (tile);
 
-  if (lock_mode & GEGL_TILE_LOCK_CL_READ && lock_mode & GEGL_TILE_LOCK_WRITE
-     && tile->rev > tile->cl_rev)
+  if (lock_mode & GEGL_TILE_LOCK_CL_READ && tile->rev > tile->cl_rev)
     {
       gegl_cl_texture_set (tile->cl_data, tile->data, tile->size);
       tile->cl_rev = tile->rev;
     }
-  else if (lock_mode & GEGL_TILE_LOCK_READ && lock_mode & GEGL_TILE_LOCK_CL_WRITE
-    && tile->cl_rev > tile->rev)
+  else if (lock_mode & GEGL_TILE_LOCK_READ && tile->cl_rev > tile->rev)
     {
       gegl_cl_texture_get (tile->cl_data, tile->data, tile->size);
       tile->rev = tile->cl_rev;



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]