[gegl/gsoc2009-gpu] gegl_tile_lock(): synchronize to/from the GPU data only when GPU support is enabled
- From: Jerson Michael Perpetua <jperpetua src gnome org>
- To: svn-commits-list gnome org
- Cc:
- Subject: [gegl/gsoc2009-gpu] gegl_tile_lock(): synchronize to/from the GPU data only when GPU support is enabled
- Date: Thu, 27 Aug 2009 00:28:50 +0000 (UTC)
commit 7a5c1d1a40e260a174d4b760d0b79653b6e8fbc1
Author: Jerson Michael Perpetua <jersonperpetua gmail com>
Date: Thu Aug 27 07:40:10 2009 +0800
gegl_tile_lock(): synchronize to/from the GPU data only when GPU support is enabled
gegl/buffer/gegl-tile.c | 23 +++++++++++++----------
1 files changed, 13 insertions(+), 10 deletions(-)
---
diff --git a/gegl/buffer/gegl-tile.c b/gegl/buffer/gegl-tile.c
index ff5408e..0d8536e 100644
--- a/gegl/buffer/gegl-tile.c
+++ b/gegl/buffer/gegl-tile.c
@@ -420,20 +420,23 @@ gegl_tile_lock (GeglTile *tile,
/*gegl_buffer_add_dirty (tile->buffer, tile->x, tile->y);*/
}
- if (lock_mode & GEGL_TILE_LOCK_GPU_READ && tile->rev > tile->gpu_rev)
+ if (gegl_gpu_is_accelerated ())
{
- gegl_gpu_texture_set (tile->gpu_data, NULL, tile->data,
- gegl_tile_get_format (tile));
+ if (lock_mode & GEGL_TILE_LOCK_GPU_READ && tile->rev > tile->gpu_rev)
+ {
+ gegl_gpu_texture_set (tile->gpu_data, NULL, tile->data,
+ gegl_tile_get_format (tile));
- tile->gpu_rev = tile->rev;
- }
+ tile->gpu_rev = tile->rev;
+ }
- if (lock_mode & GEGL_TILE_LOCK_READ && tile->gpu_rev > tile->rev)
- {
- gegl_gpu_texture_get (tile->gpu_data, NULL, tile->data,
- gegl_tile_get_format (tile));
+ if (lock_mode & GEGL_TILE_LOCK_READ && tile->gpu_rev > tile->rev)
+ {
+ gegl_gpu_texture_get (tile->gpu_data, NULL, tile->data,
+ gegl_tile_get_format (tile));
- tile->rev = tile->gpu_rev;
+ tile->rev = tile->gpu_rev;
+ }
}
tile->lock_mode = lock_mode;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]