[gimp/gimp-2-10] app: don't use direct-buffer fill when some components are masked
- From: Ell <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp/gimp-2-10] app: don't use direct-buffer fill when some components are masked
- Date: Mon, 3 Dec 2018 14:54:53 +0000 (UTC)
commit fa74fe78f9757a82e03773210e9630e289a560af
Author: Ell <ell_se yahoo com>
Date: Mon Dec 3 09:52:49 2018 -0500
app: don't use direct-buffer fill when some components are masked
(cherry picked from commit 83250eb57c46b5ca2b7bbc3353bbc7a14b806a80)
app/core/gimpdrawable-edit.c | 3 +++
1 file changed, 3 insertions(+)
---
diff --git a/app/core/gimpdrawable-edit.c b/app/core/gimpdrawable-edit.c
index d63b4a50f7..cd9a4071b8 100644
--- a/app/core/gimpdrawable-edit.c
+++ b/app/core/gimpdrawable-edit.c
@@ -58,6 +58,7 @@ gimp_drawable_edit_can_fill_direct (GimpDrawable *drawable,
GimpImage *image;
GimpContext *context;
gdouble opacity;
+ GimpComponentMask affect;
GimpLayerMode mode;
GimpLayerCompositeMode composite_mode;
GimpLayerCompositeRegion composite_region;
@@ -65,12 +66,14 @@ gimp_drawable_edit_can_fill_direct (GimpDrawable *drawable,
image = gimp_item_get_image (GIMP_ITEM (drawable));
context = GIMP_CONTEXT (options);
opacity = gimp_context_get_opacity (context);
+ affect = gimp_drawable_get_active_mask (drawable);
mode = gimp_context_get_paint_mode (context);
composite_mode = gimp_layer_mode_get_paint_composite_mode (mode);
composite_region = gimp_layer_mode_get_included_region (mode, composite_mode);
if (gimp_channel_is_empty (gimp_image_get_mask (image)) &&
opacity == GIMP_OPACITY_OPAQUE &&
+ affect == GIMP_COMPONENT_MASK_ALL &&
gimp_layer_mode_is_trivial (mode) &&
(! gimp_layer_mode_is_subtractive (mode) ^
! (composite_region & GIMP_LAYER_COMPOSITE_REGION_SOURCE)))
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]