2006-12-09 13:33:38 -08:00
|
|
|
/* GIMP - The GNU Image Manipulation Program
|
1997-11-24 14:05:25 -08:00
|
|
|
* Copyright (C) 1995 Spencer Kimball and Peter Mattis
|
|
|
|
|
*
|
2009-01-17 14:28:01 -08:00
|
|
|
* This program is free software: you can redistribute it and/or modify
|
1997-11-24 14:05:25 -08:00
|
|
|
* it under the terms of the GNU General Public License as published by
|
2009-01-17 14:28:01 -08:00
|
|
|
* the Free Software Foundation; either version 3 of the License, or
|
1997-11-24 14:05:25 -08:00
|
|
|
* (at your option) any later version.
|
|
|
|
|
*
|
|
|
|
|
* This program is distributed in the hope that it will be useful,
|
|
|
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
|
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
|
|
|
* GNU General Public License for more details.
|
|
|
|
|
*
|
|
|
|
|
* You should have received a copy of the GNU General Public License
|
2018-07-11 14:47:19 -07:00
|
|
|
* along with this program. If not, see <https://www.gnu.org/licenses/>.
|
1997-11-24 14:05:25 -08:00
|
|
|
*/
|
2000-12-29 07:22:01 -08:00
|
|
|
|
2004-07-13 09:36:29 -07:00
|
|
|
#ifndef __GIMP_PROJECTION_H__
|
|
|
|
|
#define __GIMP_PROJECTION_H__
|
1997-11-24 14:05:25 -08:00
|
|
|
|
2001-05-13 10:25:12 -07:00
|
|
|
|
2004-07-13 09:36:29 -07:00
|
|
|
#include "gimpobject.h"
|
2001-08-17 07:27:31 -07:00
|
|
|
|
2001-05-13 14:51:20 -07:00
|
|
|
|
2004-07-13 09:36:29 -07:00
|
|
|
#define GIMP_TYPE_PROJECTION (gimp_projection_get_type ())
|
|
|
|
|
#define GIMP_PROJECTION(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), GIMP_TYPE_PROJECTION, GimpProjection))
|
|
|
|
|
#define GIMP_PROJECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), GIMP_TYPE_PROJECTION, GimpProjectionClass))
|
|
|
|
|
#define GIMP_IS_PROJECTION(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), GIMP_TYPE_PROJECTION))
|
|
|
|
|
#define GIMP_IS_PROJECTION_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), GIMP_TYPE_PROJECTION))
|
|
|
|
|
#define GIMP_PROJECTION_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), GIMP_TYPE_PROJECTION, GimpProjectionClass))
|
2001-09-25 10:44:03 -07:00
|
|
|
|
2007-06-06 06:45:44 -07:00
|
|
|
|
2014-05-30 15:08:43 -07:00
|
|
|
typedef struct _GimpProjectionPrivate GimpProjectionPrivate;
|
|
|
|
|
typedef struct _GimpProjectionClass GimpProjectionClass;
|
2001-09-25 10:44:03 -07:00
|
|
|
|
2004-07-13 09:36:29 -07:00
|
|
|
struct _GimpProjection
|
1997-11-24 14:05:25 -08:00
|
|
|
{
|
2014-05-30 15:08:43 -07:00
|
|
|
GimpObject parent_instance;
|
2001-10-31 13:20:09 -08:00
|
|
|
|
2014-05-30 15:08:43 -07:00
|
|
|
GimpProjectionPrivate *priv;
|
1997-11-24 14:05:25 -08:00
|
|
|
};
|
|
|
|
|
|
2004-07-13 09:36:29 -07:00
|
|
|
struct _GimpProjectionClass
|
2001-09-25 10:44:03 -07:00
|
|
|
{
|
|
|
|
|
GimpObjectClass parent_class;
|
1997-11-24 14:05:25 -08:00
|
|
|
|
2018-12-27 14:07:46 -08:00
|
|
|
void (* update) (GimpProjection *proj,
|
|
|
|
|
gboolean now,
|
|
|
|
|
gint x,
|
|
|
|
|
gint y,
|
|
|
|
|
gint width,
|
|
|
|
|
gint height);
|
2004-07-13 09:36:29 -07:00
|
|
|
};
|
1997-11-24 14:05:25 -08:00
|
|
|
|
2001-10-31 13:20:09 -08:00
|
|
|
|
2014-05-30 17:34:56 -07:00
|
|
|
GType gimp_projection_get_type (void) G_GNUC_CONST;
|
2001-10-31 13:20:09 -08:00
|
|
|
|
2014-05-30 17:34:56 -07:00
|
|
|
GimpProjection * gimp_projection_new (GimpProjectable *projectable);
|
2007-06-06 06:45:44 -07:00
|
|
|
|
2017-12-02 06:48:14 -08:00
|
|
|
void gimp_projection_set_priority (GimpProjection *projection,
|
|
|
|
|
gint priority);
|
|
|
|
|
gint gimp_projection_get_priority (GimpProjection *projection);
|
|
|
|
|
|
2014-05-30 17:34:56 -07:00
|
|
|
void gimp_projection_set_priority_rect (GimpProjection *proj,
|
|
|
|
|
gint x,
|
|
|
|
|
gint y,
|
|
|
|
|
gint width,
|
|
|
|
|
gint height);
|
2007-06-06 03:03:17 -07:00
|
|
|
|
2014-06-29 14:57:22 -07:00
|
|
|
void gimp_projection_stop_rendering (GimpProjection *proj);
|
|
|
|
|
|
2014-05-30 17:34:56 -07:00
|
|
|
void gimp_projection_flush (GimpProjection *proj);
|
app: add "direct" parameter to gimp_projection_flush_now()
Add a boolean "direct" parameter to gimp_projection_flush_now(),
which specifies if the projection buffer should only be invalidated
(FALSE), or rendered directly (TRUE).
Pass TRUE when flushing the projection during painting, so that the
affected regions are rendered in a single step, instead of tile-by-
tile. We previously only invalidated the projection buffer, but
since we synchronously flush the display right after that, the
invalidated regions would still get rendered, albeit less
efficiently.
Likewise, pass TRUE when benchmarking the projection through the
debug action, and avoid flushing the display, to more accurately
measure the render time.
(cherry picked from commit dac9bfe3342a0ac23da759e382d732e606796197)
2018-12-02 06:44:52 -08:00
|
|
|
void gimp_projection_flush_now (GimpProjection *proj,
|
|
|
|
|
gboolean direct);
|
2014-05-30 17:34:56 -07:00
|
|
|
void gimp_projection_finish_draw (GimpProjection *proj);
|
|
|
|
|
|
|
|
|
|
gint64 gimp_projection_estimate_memsize (GimpImageBaseType type,
|
2014-06-14 14:20:52 -07:00
|
|
|
GimpComponentType component_type,
|
2014-05-30 17:34:56 -07:00
|
|
|
gint width,
|
|
|
|
|
gint height);
|
2001-11-10 15:03:22 -08:00
|
|
|
|
|
|
|
|
|
2004-07-13 09:36:29 -07:00
|
|
|
#endif /* __GIMP_PROJECTION_H__ */
|