[gimp] app: don't upscale preallocated display buffers by GIMP_DISPLAY_RENDER_MAX_SCALE
- From: N/A <ell src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [gimp] app: don't upscale preallocated display buffers by GIMP_DISPLAY_RENDER_MAX_SCALE
- Date: Sun, 31 Dec 2017 16:57:51 +0000 (UTC)
commit 37a66200060b948d638ca75401058ceed0f95a97
Author: Ell <ell_se yahoo com>
Date: Sun Dec 31 11:50:55 2017 -0500
app: don't upscale preallocated display buffers by GIMP_DISPLAY_RENDER_MAX_SCALE
After commit 8029508fbef8b2b5b3abd3be8a3fbb7d46654f86, we always
render the image in chunks that are at most
GIMP_DISPLAY_RENDER_BUF_WIDTH x GIMP_DISPLAY_RENDER_BUF_HEIGHT,
even when the window's scale factor is > 1.
app/display/gimpdisplayshell-profile.c | 4 ++--
app/display/gimpdisplayxfer.c | 8 ++++----
2 files changed, 6 insertions(+), 6 deletions(-)
---
diff --git a/app/display/gimpdisplayshell-profile.c b/app/display/gimpdisplayshell-profile.c
index 23a580d..4b66973 100644
--- a/app/display/gimpdisplayshell-profile.c
+++ b/app/display/gimpdisplayshell-profile.c
@@ -159,8 +159,8 @@ gimp_display_shell_profile_update (GimpDisplayShell *shell)
if (shell->filter_transform || shell->profile_transform)
{
- gint w = GIMP_DISPLAY_RENDER_BUF_WIDTH * GIMP_DISPLAY_RENDER_MAX_SCALE;
- gint h = GIMP_DISPLAY_RENDER_BUF_HEIGHT * GIMP_DISPLAY_RENDER_MAX_SCALE;
+ gint w = GIMP_DISPLAY_RENDER_BUF_WIDTH;
+ gint h = GIMP_DISPLAY_RENDER_BUF_HEIGHT;
shell->profile_data =
gegl_malloc (w * h * babl_format_get_bytes_per_pixel (src_format));
diff --git a/app/display/gimpdisplayxfer.c b/app/display/gimpdisplayxfer.c
index 09713c9..73b22a1 100644
--- a/app/display/gimpdisplayxfer.c
+++ b/app/display/gimpdisplayxfer.c
@@ -236,8 +236,8 @@ gimp_display_xfer_realize (GtkWidget *widget)
if (xfer == NULL)
{
cairo_t *cr;
- gint w = GIMP_DISPLAY_RENDER_BUF_WIDTH * GIMP_DISPLAY_RENDER_MAX_SCALE;
- gint h = GIMP_DISPLAY_RENDER_BUF_HEIGHT * GIMP_DISPLAY_RENDER_MAX_SCALE;
+ gint w = GIMP_DISPLAY_RENDER_BUF_WIDTH;
+ gint h = GIMP_DISPLAY_RENDER_BUF_HEIGHT;
int n;
xfer = g_new (GimpDisplayXfer, 1);
@@ -271,8 +271,8 @@ gimp_display_xfer_get_surface (GimpDisplayXfer *xfer,
{
RTreeNode *node;
- g_assert (w <= GIMP_DISPLAY_RENDER_BUF_WIDTH * GIMP_DISPLAY_RENDER_MAX_SCALE &&
- h <= GIMP_DISPLAY_RENDER_BUF_HEIGHT * GIMP_DISPLAY_RENDER_MAX_SCALE);
+ g_assert (w <= GIMP_DISPLAY_RENDER_BUF_WIDTH &&
+ h <= GIMP_DISPLAY_RENDER_BUF_HEIGHT);
node = rtree_insert (&xfer->rtree, w, h);
if (node == NULL)
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]