[gimp/goat-invasion] app: temporarily disable drawable previews for precision > u8



commit 9e9dc27be48cd2ff7eaf61a96f699c3eafe08889
Author: Michael Natterer <mitch gimp org>
Date:   Sat Apr 28 15:25:04 2012 +0200

    app: temporarily disable drawable previews for precision > u8

 app/core/gimpdrawable-preview.c |   17 +++++++++--------
 1 files changed, 9 insertions(+), 8 deletions(-)
---
diff --git a/app/core/gimpdrawable-preview.c b/app/core/gimpdrawable-preview.c
index 82852e7..4936196 100644
--- a/app/core/gimpdrawable-preview.c
+++ b/app/core/gimpdrawable-preview.c
@@ -67,13 +67,12 @@ gimp_drawable_get_preview (GimpViewable *viewable,
                            gint          width,
                            gint          height)
 {
-  GimpDrawable *drawable;
-  GimpImage    *image;
+  GimpDrawable *drawable = GIMP_DRAWABLE (viewable);
+  GimpImage    *image    = gimp_item_get_image (GIMP_ITEM (drawable));
 
-  drawable = GIMP_DRAWABLE (viewable);
-  image    = gimp_item_get_image (GIMP_ITEM (drawable));
-
-  if (! image->gimp->config->layer_previews)
+  if (! image->gimp->config->layer_previews ||
+      /* XXX fixme enable drawable previews for > u8 */
+      gimp_drawable_get_precision (drawable) != GIMP_PRECISION_U8)
     return NULL;
 
   /* Ok prime the cache with a large preview if the cache is invalid */
@@ -149,7 +148,9 @@ gimp_drawable_get_sub_preview (GimpDrawable *drawable,
 
   image = gimp_item_get_image (item);
 
-  if (! image->gimp->config->layer_previews)
+  if (! image->gimp->config->layer_previews ||
+      /* XXX fixme enable drawable previews for > u8 */
+      gimp_drawable_get_precision (drawable) != GIMP_PRECISION_U8)
     return NULL;
 
   if (gimp_drawable_is_indexed (drawable))
@@ -172,7 +173,7 @@ gimp_drawable_preview_private (GimpDrawable *drawable,
                                gint          width,
                                gint          height)
 {
-  GimpTempBuf *ret_buf;
+  GimpTempBuf *ret_buf = NULL;
 
   if (! drawable->private->preview_valid ||
       ! (ret_buf = gimp_preview_cache_get (&drawable->private->preview_cache,



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