Page Menu
Home
Search
Configure Global Search
Log In
Files
F26681
fix33935.patch
Public
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Authored By
Sergey Sharybin (sergey)
Nov 13 2013, 5:37 PM
Size
4 KB
Subscribers
None
fix33935.patch
View Options
Index: source/blender/editors/sculpt_paint/paint_image.c
===================================================================
--- source/blender/editors/sculpt_paint/paint_image.c (revision 54374)
+++ source/blender/editors/sculpt_paint/paint_image.c (working copy)
@@ -4419,15 +4419,10 @@ static void imapaint_dirty_region(Image *ima, ImBuf *ibuf, int x, int y, int w,
static void imapaint_image_update(Scene *scene, SpaceImage *sima, Image *image, ImBuf *ibuf, short texpaint)
{
- if (scene) {
- IMB_partial_display_buffer_update(ibuf, ibuf->rect_float, (unsigned char *) ibuf->rect, ibuf->x, 0, 0,
- &scene->view_settings, &scene->display_settings,
- imapaintpartial.x1, imapaintpartial.y1,
- imapaintpartial.x2, imapaintpartial.y2, FALSE);
- }
- else {
- ibuf->userflags |= IB_DISPLAY_BUFFER_INVALID;
- }
+ (void) scene;
+
+ IMB_partial_display_buffer_update_delayed(ibuf, imapaintpartial.x1, imapaintpartial.y1,
+ imapaintpartial.x2, imapaintpartial.y2);
if (ibuf->mipmap[0])
ibuf->userflags |= IB_MIPMAP_INVALID;
Index: source/blender/imbuf/IMB_colormanagement.h
===================================================================
--- source/blender/imbuf/IMB_colormanagement.h (revision 54374)
+++ source/blender/imbuf/IMB_colormanagement.h (working copy)
@@ -133,6 +133,8 @@ void IMB_partial_display_buffer_update(struct ImBuf *ibuf, const float *linear_b
int xmin, int ymin, int xmax, int ymax,
int update_orig_byte_buffer);
+void IMB_partial_display_buffer_update_delayed(struct ImBuf *ibuf, int xmin, int ymin, int xmax, int ymax);
+
/* ** Pixel processor functions ** */
struct ColormanageProcessor *IMB_colormanagement_display_processor_new(const struct ColorManagedViewSettings *view_settings,
const struct ColorManagedDisplaySettings *display_settings);
Index: source/blender/imbuf/IMB_imbuf_types.h
===================================================================
--- source/blender/imbuf/IMB_imbuf_types.h (revision 54374)
+++ source/blender/imbuf/IMB_imbuf_types.h (working copy)
@@ -28,6 +28,8 @@
#ifndef __IMB_IMBUF_TYPES_H__
#define __IMB_IMBUF_TYPES_H__
+#include "DNA_vec_types.h" /* for rcti */
+
/**
* \file IMB_imbuf_types.h
* \ingroup imbuf
@@ -132,6 +134,7 @@ typedef struct ImBuf {
unsigned int *display_buffer_flags; /* array of per-display display buffers dirty flags */
struct ColormanageCache *colormanage_cache; /* cache used by color management */
int colormanage_flag;
+ rcti invalid_rect;
/* information for compressed textures */
struct DDSData dds_data;
Index: source/blender/imbuf/intern/colormanagement.c
===================================================================
--- source/blender/imbuf/intern/colormanagement.c (revision 54374)
+++ source/blender/imbuf/intern/colormanagement.c (working copy)
@@ -57,6 +57,7 @@
#include "BLI_path_util.h"
#include "BLI_string.h"
#include "BLI_threads.h"
+#include "BLI_rect.h"
#include "BKE_colortools.h"
#include "BKE_context.h"
@@ -1815,6 +1816,16 @@ unsigned char *IMB_display_buffer_acquire(ImBuf *ibuf, const ColorManagedViewSet
colormanage_view_settings_to_cache(&cache_view_settings, applied_view_settings);
colormanage_display_settings_to_cache(&cache_display_settings, display_settings);
+ if (ibuf->invalid_rect.xmin != ibuf->invalid_rect.xmax) {
+ IMB_partial_display_buffer_update(ibuf, ibuf->rect_float, (unsigned char *) ibuf->rect,
+ ibuf->x, 0, 0, applied_view_settings, display_settings,
+ ibuf->invalid_rect.xmin, ibuf->invalid_rect.ymin,
+ ibuf->invalid_rect.xmax, ibuf->invalid_rect.ymax,
+ FALSE);
+
+ BLI_rcti_init(&ibuf->invalid_rect, 0, 0, 0, 0);
+ }
+
BLI_lock_thread(LOCK_COLORMANAGE);
/* ensure color management bit fields exists */
@@ -2440,6 +2451,13 @@ void IMB_partial_display_buffer_update(ImBuf *ibuf, const float *linear_buffer,
}
}
+void IMB_partial_display_buffer_update_delayed(ImBuf *ibuf, int xmin, int ymin, int xmax, int ymax)
+{
+ rcti rect;
+ BLI_rcti_init(&rect, xmin, xmax, ymin, ymax);
+ BLI_rcti_union(&ibuf->invalid_rect, &rect);
+}
+
/*********************** Pixel processor functions *************************/
ColormanageProcessor *IMB_colormanagement_display_processor_new(const ColorManagedViewSettings *view_settings,
File Metadata
Details
Mime Type
text/x-diff
Storage Engine
local-disk
Storage Format
Raw Data
Storage Handle
49/c6/69f0bbb42d792462631b1dea773c
Event Timeline
Log In to Comment