[gegl/gsoc2009-gpu] Do not clear GPU texture data immediately after creation
- From: Jerson Michael Perpetua <jperpetua src gnome org>
- To: svn-commits-list gnome org
- Subject: [gegl/gsoc2009-gpu] Do not clear GPU texture data immediately after creation
- Date: Thu, 9 Jul 2009 18:05:46 +0000 (UTC)
commit f8b706137d07d3af542fe0e9ac52f8a18c8fd899
Author: Jerson Michael Perpetua <jersonperpetua gmail com>
Date: Fri Jul 10 01:42:07 2009 +0800
Do not clear GPU texture data immediately after creation
gegl/buffer/gegl-tile-handler-empty.c | 6 ++++++
gegl/gpu/gegl-gpu-texture.c | 2 --
2 files changed, 6 insertions(+), 2 deletions(-)
---
diff --git a/gegl/buffer/gegl-tile-handler-empty.c b/gegl/buffer/gegl-tile-handler-empty.c
index f9e8461..01a1789 100644
--- a/gegl/buffer/gegl-tile-handler-empty.c
+++ b/gegl/buffer/gegl-tile-handler-empty.c
@@ -24,6 +24,9 @@
#include "gegl-tile-handler-empty.h"
#include "gegl-tile-handler-cache.h"
+#include "gegl-gpu-init.h"
+#include "gegl-gpu-texture.h"
+
G_DEFINE_TYPE (GeglTileHandlerEmpty, gegl_tile_handler_empty, GEGL_TYPE_TILE_HANDLER)
enum
@@ -146,6 +149,9 @@ constructor (GType type,
/* FIXME: need babl format here */
memset (gegl_tile_get_data (empty->tile), 0x00, tile_size);
+ if (gegl_gpu_is_accelerated ())
+ gegl_gpu_texture_clear (empty->tile->gpu_data, NULL);
+
return object;
}
diff --git a/gegl/gpu/gegl-gpu-texture.c b/gegl/gpu/gegl-gpu-texture.c
index f082fa7..3c103d8 100644
--- a/gegl/gpu/gegl-gpu-texture.c
+++ b/gegl/gpu/gegl-gpu-texture.c
@@ -55,8 +55,6 @@ gegl_gpu_texture_new (gint width,
0);
glBindTexture (GL_TEXTURE_RECTANGLE_ARB, 0);
- gegl_gpu_texture_clear (texture, NULL);
-
texture->width = width;
texture->height = height;
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]