Compare commits

..

6 Commits

Author SHA1 Message Date
Benjamin Berg
9f999f9cb3 tests/monitor-unit-tests: Add test to for ignoring connector IDs
In some cases the connector ID should be ignored. Add a flag to modify
the generated connector ID, and test whether the stored configuration
still applies with the changed IDs.

https://gitlab.gnome.org/GNOME/mutter/issues/932
2020-02-12 15:01:06 +01:00
Benjamin Berg
1dc6998bf9 monitor: Only take connector into account when required
Add a flag to meta_monitor_spec_equals to disable full connector
matching when this is possible. In this mode, the connector is simply
skipped from the compare, assuming that all monitors can be
disambiguated using just EDID information.

Update all calls to the relevant functions to pass whether a full match
is needed or not.

https://gitlab.gnome.org/GNOME/mutter/issues/932
2020-02-12 15:01:06 +01:00
Benjamin Berg
c85643a0f7 tests/monitor-unit-tests: Disambiguate external monitor in lid switch test
The external and internal monitor in the lid switch test had the
identical EDID information. This is at odds with the change to ignore
the connector if possible, as each of the monitors can be present
independently.

Avoid the problem by updating the test and setting a different serial
number in the EDID data of the external monitor.

https://gitlab.gnome.org/GNOME/mutter/issues/932
2020-02-12 14:02:55 +01:00
Benjamin Berg
2f2efdefcf monitor: Only hash the connector when required
If the monitors in the configuration can already be uniquely identified
using the EDID information and connector type, then remove the connector
from the hash. This ensures that monitor configurations will land in the
same bucket if only the connectors are different.

Also add a quick return to the equal function by checking the
edid_sufficient boolean.

https://gitlab.gnome.org/GNOME/mutter/issues/932
2020-02-12 13:57:32 +01:00
Benjamin Berg
d79fe1960b monitor: Add flag whether EDID is sufficient to disambiguate monitors
If the EDID of the attached or stored monitor configurations contain
proper serial numbers, then we do not need to rely on the connector to
disambiguate them. Add a boolean to both MetaMonitorManager and
MetaMonitorsConfigKey to store this information.

https://gitlab.gnome.org/GNOME/mutter/issues/932
2020-02-12 13:57:32 +01:00
Benjamin Berg
0d27c7ee1d monitor: Make the connector the last sort key for monitors
We want to ignore the connector in certain situations. Prepare this by
changing the sort order so that two monitors will be paired up in the
list if only the connector is different.

https://gitlab.gnome.org/GNOME/mutter/issues/932
2020-02-12 13:57:28 +01:00
386 changed files with 8788 additions and 11280 deletions

View File

@@ -28,20 +28,6 @@ build-mutter:
- merge_requests
- /^.*$/
build-without-opengl-and-glx:
stage: build
script:
- meson . build -Dbuildtype=debugoptimized -Dopengl=false -Dglx=false -Degl_device=true -Dwayland_eglstream=true --werror --prefix /usr
- ninja -C build
- ninja -C build install
artifacts:
expire_in: 1 day
paths:
- build
only:
- merge_requests
- /^.*$/
build-without-native-backend-and-wayland:
stage: build
script:

View File

@@ -11,7 +11,6 @@ RUN dnf -y update && dnf -y upgrade && \
dnf install -y 'dnf-command(builddep)' && \
dnf install -y 'dnf-command(copr)' && \
dnf copr enable -y fmuellner/gnome-shell-ci && \
dnf copr enable -y jadahl/mutter-ci && \
dnf -y update && dnf -y upgrade && \
dnf builddep -y mutter && \
@@ -27,6 +26,4 @@ RUN dnf -y update && dnf -y upgrade && \
dnf remove -y gnome-bluetooth-libs-devel dbus-glib-devel upower-devel python3-devel && \
dnf remove -y --noautoremove mutter mutter-devel && \
dnf upgrade -y 'pkgconfig(libpipewire-0.3)' && \
dnf clean all

View File

@@ -19,7 +19,7 @@ fi
function commit_message_has_url() {
commit=$1
commit_message=$(git show -s --format='format:%b' $commit)
echo "$commit_message" | grep -qe "\($CI_MERGE_REQUEST_PROJECT_URL/\(-/\)\?\(issues\|merge_requests\)/[0-9]\+\|https://bugzilla.gnome.org/show_bug.cgi?id=[0-9]\+\)"
echo "$commit_message" | grep -qe "\($CI_MERGE_REQUEST_PROJECT_URL/\(issues\|merge_requests\)/[0-9]\+\|https://bugzilla.gnome.org/show_bug.cgi?id=[0-9]\+\)"
return $?
}

View File

@@ -1,4 +1,4 @@
<!--
!--
Please read https://wiki.gnome.org/Community/GettingInTouch/BugReportingGuidelines
first to ensure that you create a clear and specific issue.
-->

115
NEWS
View File

@@ -1,118 +1,3 @@
3.36.1
======
* Fix hardware cursor on GPU hotplpug [Pekka; !1097]
* Fix black areas around XWayland windows when resizing [Robert, Olivier; !1091]
* Fix applying wrong scale to monitors on X11 [Jonas; !1118]
* Fix moving/resizing windows via keyboard on wayland [Alynx; !997]
* Fix locate-pointer feature interfering with keybindings [Carlos; !1014]
* Add support for middle-click emulation [Andrew; !256]
* Fix freeze when moving cursor between scaled monitors [Robert; !1125]
* Fix popup misplacement with focus-follows-mouse [Jonas Å.; !1122]
* Fix misplaced cursor in preedit strings [Carlos; !1132]
* Support mirroring with proprietary Nvidia driver [Jonas Å.; !1098]
* Support tablets with multiple mode switch buttons in a group [Carlos; !970]
* Ignore foreground color for color glyphs (emojis) [Carlos; !1148]
* Allow pad mode switches while showing OSD [Carlos; !975]
* Fix positioning of OSD for display-attached tablets [Carlos; !971]
* Respect configured RANDR panning on X11 [Jonas Å.; !1085]
* Use correct texture filtering with scaled displays [Jonas; !1124]
* Fix cursor hotspots in virtual machines [Jonas Å.; !1136]
* Fix build with GLES and no GL [Georges; !1151]
* Work around Firefox bug when copying images on wayland [Robert; !1141]
* Fix wrong cursor rotation on rotated displays [Hans; !1153]
* Fix glitches in window screencasts [Georges; !1129]
* Fix IM support for deleting surrounding text [Takao, Carlos; #539]
* Fix map animation of maximized windows [Robert; !1164]
* Fixed crashes [Jonas Å., Carlos, Florian, Robert; !1120, !1121,
#917, #1132, #1083, !1147, #1147]
* Misc. bug fixes and cleanups [Jonas Å., Olivier, Mart, Sebastian, Corentin,
Andre, Daniel, Robert, Carlos, Peter, Georges, Jonas D., Florian, Christian;
!1115, !1102, !1104, !1106, !1117, !1119, !1101, !1123, #1124, !1130, !1131,
!1133, #1065, !1108, !1144, !1145, !1109, !1059, !1107, !999, !1152, #1128,
!1155, !1156, !1158, !1157, #1146, !1161, !1163]
Contributors:
Jonas Dreßler, Olivier Fourdan, Takao Fujiwara, Carlos Garnacho, Andrew Gaul,
Hans de Goede, Peter Hutterer, Sebastian Keller, Robert Mader,
Andre Moreira Magalhaes, Florian Müllner, Georges Basile Stavracas Neto,
Corentin Noël, Pekka Paalanen, Christian Rauch, Mart Raudsepp,
Daniel van Vugt, Alynx Zhou, Jonas Ådahl
Translators:
Марко Костић [sr], Daniel Șerbănescu [ro]
3.36.0
======
* Fix placement of popup windows in multi-monitor setups [Jonas; !1110]
* Fix invisible mouse cursor on some hardware [Jonas; !1079]
Contributors:
Jonas Ådahl
Translators:
Aurimas Černius [lt], Goran Vidović [hr], Anders Jonsson [sv],
Guillaume Bernard [fr], Milo Casagrande [it], Daniel Korostil [uk],
Andre Klapper [cy], Aman Alam [pa], Nathan Follens [nl]
3.35.92
=======
* Fix visibility of initially hidden windows [Jonas Å.; !1066]
* Avoid flicker when (un)redirecting windows [Sebastian; #997]
* Let BindConstraints update the preferred size [Emmanuele; !1070]
* Learn about GLES3 [Adam; !882]
* Ping windows on every window focus [Jonas D.; !891]
* Remove overhead from hot code paths [Christian;
#1056, !1081, !1083, !1071, !1087]
* Allow remote desktop services to inhibit animations [Jonas Å.; !838]
* Update screen-cast code to PipeWire 0.3 API [Wim; !1062]
* Make check-alive timeouts configurable [Jonas Å.; !1080]
* Make each stage view correspond to a single CRTC [Jonas Å.; !1042]
* Implement scaled/transformed hardware cursors [Robert; !526]
* Use DMA buffers for screencasting if possible [Georges; !1086]
* Make Xwayland startup asynchronous [Carlos; !944]
* Fix clipping glitches in long text entries [Jonas D.; !1096]
* Add side channel for starting required X11 services [Carlos; !945]
* Support synchronized wayland popup moving [Jonas Å.; !705]
* Fixed crashes [Olivier, Jonas Å.; !1073, !1093]
* Plugged memory leaks [Sebastian, Jonas Å.; !1089, !1095]
* Misc. bug fixes and cleanups [Jonas Å, Olivier, Florian, Daniel, Jonas D.,
Robert, Sebastian, Christian, Arun, Carlos, worldofpeace; !1061, #1043,
!1067, !1068, !1065, !835, !1058, !1069, !1075, #1060, !1077, !423, !1090,
!1088, !1094, #1067, !1064, !1099, !957, !1000, !1082]
Contributors:
Emmanuele Bassi, Jonas Dreßler, Olivier Fourdan, Carlos Garnacho,
Christian Hergert, Adam Jackson, Sebastian Keller, Robert Mader,
Florian Müllner, Georges Basile Stavracas Neto, Arun Raghavan, Wim Taymans,
Daniel van Vugt, worldofpeace, Jonas Ådahl
Translators:
Yi-Jyun Pan [zh_TW], Asier Sarasua Garmendia [eu], Rafael Fontenelle [pt_BR],
Emin Tufan Çetin [tr], Daniel Mustieles [es], Balázs Úr [hu],
Gwan-gyeong Mun [ko], Marek Černocký [cs], Fran Dieguez [gl],
Kukuh Syafaat [id], Alan Mortensen [da], Piotr Drąg [pl], sicklylife [ja],
Matej Urbančič [sl]
3.35.91
=======
* Honor accelerometer orientation on monitor config changes [Hans; !959]
* Enable culling for integer-scaled actors [Robert; !1036]
* Add ClutterSeat::touch-mode property [Carlos; !1044]
* Fix mis-scaling when streaming windows [Olivier; !1022]
* Make the cursor renderer use the transactional KMS API [Jonas; !930]
* Advertise MetaMonitor as wl_output [Olivier; !994]
* Fix culling of XWayland windows [Robert; !1049]
* Only consider enabled effects when disabling culling [Robert; !1052]
* Misc. bug fixes and cleanups [Olivier, Sergio, Adam, Carlos, Björn; !1040,
#985, !1024, !1039, !1051]
Contributors:
Sergio Costas, Björn Daase, Olivier Fourdan, Carlos Garnacho, Hans de Goede,
Adam Jackson, Robert Mader, Jonas Ådahl
Translators:
sicklylife [ja]
3.35.90
=======
* Cull out clip region [Robert; !985]

View File

@@ -600,11 +600,10 @@ cally_actor_real_remove_actor (ClutterActor *container,
g_return_val_if_fail (CLUTTER_IS_ACTOR (actor), 0);
atk_parent = ATK_OBJECT (data);
atk_child = clutter_actor_get_accessible (actor);
if (clutter_actor_has_accessible (actor))
if (atk_child)
{
atk_child = clutter_actor_get_accessible (actor);
g_value_init (&values.old_value, G_TYPE_POINTER);
g_value_set_pointer (&values.old_value, atk_parent);

View File

@@ -631,7 +631,7 @@
#include "clutter-color-static.h"
#include "clutter-color.h"
#include "clutter-constraint-private.h"
#include "clutter-container-private.h"
#include "clutter-container.h"
#include "clutter-content-private.h"
#include "clutter-debug.h"
#include "clutter-easing.h"
@@ -710,7 +710,6 @@ struct _ClutterActorPrivate
guint8 opacity;
gint opacity_override;
unsigned int inhibit_culling_counter;
ClutterOffscreenRedirect offscreen_redirect;
@@ -1125,20 +1124,6 @@ static GQuark quark_actor_layout_info = 0;
static GQuark quark_actor_transform_info = 0;
static GQuark quark_actor_animation_info = 0;
static GQuark quark_key = 0;
static GQuark quark_motion = 0;
static GQuark quark_pointer_focus = 0;
static GQuark quark_button = 0;
static GQuark quark_scroll = 0;
static GQuark quark_stage = 0;
static GQuark quark_destroy = 0;
static GQuark quark_client = 0;
static GQuark quark_delete = 0;
static GQuark quark_touch = 0;
static GQuark quark_touchpad = 0;
static GQuark quark_proximity = 0;
static GQuark quark_pad = 0;
G_DEFINE_TYPE_WITH_CODE (ClutterActor,
clutter_actor,
G_TYPE_INITIALLY_UNOWNED,
@@ -2410,7 +2395,6 @@ clutter_actor_should_pick_paint (ClutterActor *self)
g_return_val_if_fail (CLUTTER_IS_ACTOR (self), FALSE);
if (CLUTTER_ACTOR_IS_MAPPED (self) &&
clutter_actor_has_allocation (self) &&
(_clutter_context_get_pick_mode () == CLUTTER_PICK_ALL ||
CLUTTER_ACTOR_IS_REACTIVE (self)))
return TRUE;
@@ -3490,8 +3474,8 @@ _clutter_actor_draw_paint_volume_full (ClutterActor *self,
cogl_pipeline_set_color (outline, &cogl_color);
pipeline_node = clutter_pipeline_node_new (outline);
clutter_paint_node_set_static_name (pipeline_node,
"ClutterActor (paint volume outline)");
clutter_paint_node_set_name (pipeline_node,
"ClutterActor (paint volume outline)");
clutter_paint_node_add_primitive (pipeline_node, prim);
clutter_paint_node_add_child (node, pipeline_node);
cogl_object_unref (prim);
@@ -3505,8 +3489,8 @@ _clutter_actor_draw_paint_volume_full (ClutterActor *self,
pango_layout_set_text (layout, label, -1);
text_node = clutter_text_node_new (layout, color);
clutter_paint_node_set_static_name (text_node,
"ClutterActor (paint volume label)");
clutter_paint_node_set_name (text_node,
"ClutterActor (paint volume label)");
clutter_paint_node_add_rectangle (text_node,
&(ClutterActorBox) {
.x1 = pv->vertices[0].x,
@@ -3602,8 +3586,8 @@ _clutter_actor_paint_cull_result (ClutterActor *self,
pango_layout_set_text (layout, label, -1);
text_node = clutter_text_node_new (layout, &color);
clutter_paint_node_set_static_name (text_node,
"ClutterActor (paint volume text)");
clutter_paint_node_set_name (text_node,
"ClutterActor (paint volume text)");
clutter_paint_node_add_rectangle (text_node,
&(ClutterActorBox) {
.x1 = 0.f,
@@ -3759,13 +3743,7 @@ needs_flatten_effect (ClutterActor *self)
CLUTTER_DEBUG_DISABLE_OFFSCREEN_REDIRECT))
return FALSE;
/* We need to enable the effect immediately even in ON_IDLE because that can
* only be implemented efficiently within the effect itself.
* If it was implemented here using just priv->is_dirty then we would lose
* the ability to animate opacity without repaints.
*/
if ((priv->offscreen_redirect & CLUTTER_OFFSCREEN_REDIRECT_ALWAYS) ||
(priv->offscreen_redirect & CLUTTER_OFFSCREEN_REDIRECT_ON_IDLE))
if (priv->offscreen_redirect & CLUTTER_OFFSCREEN_REDIRECT_ALWAYS)
return TRUE;
else if (priv->offscreen_redirect & CLUTTER_OFFSCREEN_REDIRECT_AUTOMATIC_FOR_OPACITY)
{
@@ -3884,7 +3862,7 @@ clutter_actor_paint_node (ClutterActor *actor,
clear_flags = COGL_BUFFER_BIT_DEPTH;
node = clutter_root_node_new (fb, &bg_color, clear_flags);
clutter_paint_node_set_static_name (node, "stageClear");
clutter_paint_node_set_name (node, "stageClear");
clutter_paint_node_add_rectangle (node, &box);
clutter_paint_node_add_child (root, node);
clutter_paint_node_unref (node);
@@ -3899,7 +3877,7 @@ clutter_actor_paint_node (ClutterActor *actor,
/ 255;
node = clutter_color_node_new (&bg_color);
clutter_paint_node_set_static_name (node, "backgroundColor");
clutter_paint_node_set_name (node, "backgroundColor");
clutter_paint_node_add_rectangle (node, &box);
clutter_paint_node_add_child (root, node);
clutter_paint_node_unref (node);
@@ -3953,7 +3931,6 @@ clutter_actor_paint (ClutterActor *self,
g_autoptr (ClutterPaintNode) root_node = NULL;
ClutterActorPrivate *priv;
ClutterActorBox clip;
gboolean culling_inhibited;
gboolean clip_set = FALSE;
g_return_if_fail (CLUTTER_IS_ACTOR (self));
@@ -4020,14 +3997,11 @@ clutter_actor_paint (ClutterActor *self,
clutter_actor_get_transform (self, &transform);
if (!cogl_matrix_is_identity (&transform))
{
transform_node = clutter_transform_node_new (&transform);
clutter_paint_node_add_child (transform_node, root_node);
clutter_paint_node_unref (root_node);
transform_node = clutter_transform_node_new (&transform);
clutter_paint_node_add_child (transform_node, root_node);
clutter_paint_node_unref (root_node);
root_node = g_steal_pointer (&transform_node);
}
root_node = g_steal_pointer (&transform_node);
#ifdef CLUTTER_ENABLE_DEBUG
/* Catch when out-of-band transforms have been made by actors not as part
@@ -4102,8 +4076,7 @@ clutter_actor_paint (ClutterActor *self,
* paint then the last-paint-volume would likely represent the new
* actor position not the old.
*/
culling_inhibited = priv->inhibit_culling_counter > 0;
if (!culling_inhibited && !in_clone_paint ())
if (!in_clone_paint ())
{
gboolean success;
/* annoyingly gcc warns if uninitialized even though
@@ -4185,7 +4158,7 @@ clutter_actor_continue_paint (ClutterActor *self,
*/
framebuffer = clutter_paint_context_get_base_framebuffer (paint_context);
dummy = _clutter_dummy_node_new (self, framebuffer);
clutter_paint_node_set_static_name (dummy, "Root");
clutter_paint_node_set_name (dummy, "Root");
/* XXX - for 1.12, we use the return value of paint_node() to
* decide whether we should emit the ::paint signal.
@@ -4225,11 +4198,6 @@ clutter_actor_continue_paint (ClutterActor *self,
run_flags |= CLUTTER_EFFECT_PAINT_ACTOR_DIRTY;
}
if (priv->current_effect == priv->flatten_effect &&
priv->offscreen_redirect & CLUTTER_OFFSCREEN_REDIRECT_ON_IDLE &&
run_flags & CLUTTER_EFFECT_PAINT_ACTOR_DIRTY)
run_flags |= CLUTTER_EFFECT_PAINT_BYPASS_EFFECT;
_clutter_effect_paint (priv->current_effect, paint_context, run_flags);
priv->current_effect = old_current_effect;
@@ -4600,7 +4568,7 @@ clutter_actor_remove_child_internal (ClutterActor *self,
/* we need to emit the signal before dropping the reference */
if (emit_actor_removed)
_clutter_container_emit_actor_removed (CLUTTER_CONTAINER (self), child);
g_signal_emit_by_name (self, "actor-removed", child);
if (notify_first_last)
{
@@ -6563,20 +6531,6 @@ clutter_actor_class_init (ClutterActorClass *klass)
quark_actor_transform_info = g_quark_from_static_string ("-clutter-actor-transform-info");
quark_actor_animation_info = g_quark_from_static_string ("-clutter-actor-animation-info");
quark_key = g_quark_from_static_string ("key");
quark_motion = g_quark_from_static_string ("motion");
quark_pointer_focus = g_quark_from_static_string ("pointer-focus");
quark_button = g_quark_from_static_string ("button");
quark_scroll = g_quark_from_static_string ("scroll");
quark_stage = g_quark_from_static_string ("stage");
quark_destroy = g_quark_from_static_string ("destroy");
quark_client = g_quark_from_static_string ("client");
quark_delete = g_quark_from_static_string ("delete");
quark_touch = g_quark_from_static_string ("touch");
quark_touchpad = g_quark_from_static_string ("touchpad");
quark_proximity = g_quark_from_static_string ("proximity");
quark_pad = g_quark_from_static_string ("pad");
object_class->constructor = clutter_actor_constructor;
object_class->set_property = clutter_actor_set_property;
object_class->get_property = clutter_actor_get_property;
@@ -8612,7 +8566,7 @@ clutter_actor_class_init (ClutterActorClass *klass)
actor_signals[CAPTURED_EVENT] =
g_signal_new (I_("captured-event"),
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST | G_SIGNAL_DETAILED,
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ClutterActorClass, captured_event),
_clutter_boolean_handled_accumulator, NULL,
_clutter_marshal_BOOLEAN__BOXED,
@@ -13258,7 +13212,7 @@ clutter_actor_add_child_internal (ClutterActor *self,
}
if (emit_actor_added)
_clutter_container_emit_actor_added (CLUTTER_CONTAINER (self), child);
g_signal_emit_by_name (self, "actor-added", child);
if (notify_first_last)
{
@@ -13922,70 +13876,8 @@ clutter_actor_event (ClutterActor *actor,
if (capture)
{
GQuark detail = 0;
switch (event->type)
{
case CLUTTER_NOTHING:
break;
case CLUTTER_KEY_PRESS:
case CLUTTER_KEY_RELEASE:
detail = quark_key;
break;
case CLUTTER_MOTION:
detail = quark_motion;
break;
case CLUTTER_ENTER:
case CLUTTER_LEAVE:
detail = quark_pointer_focus;
break;
case CLUTTER_BUTTON_PRESS:
case CLUTTER_BUTTON_RELEASE:
detail = quark_button;
break;
case CLUTTER_SCROLL:
detail = quark_scroll;
break;
case CLUTTER_STAGE_STATE:
detail = quark_stage;
break;
case CLUTTER_DESTROY_NOTIFY:
detail = quark_destroy;
break;
case CLUTTER_CLIENT_MESSAGE:
detail = quark_client;
break;
case CLUTTER_DELETE:
detail = quark_delete;
break;
case CLUTTER_TOUCH_BEGIN:
case CLUTTER_TOUCH_UPDATE:
case CLUTTER_TOUCH_END:
case CLUTTER_TOUCH_CANCEL:
detail = quark_touch;
break;
case CLUTTER_TOUCHPAD_PINCH:
case CLUTTER_TOUCHPAD_SWIPE:
detail = quark_touchpad;
break;
case CLUTTER_PROXIMITY_IN:
case CLUTTER_PROXIMITY_OUT:
detail = quark_proximity;
break;
case CLUTTER_PAD_BUTTON_PRESS:
case CLUTTER_PAD_BUTTON_RELEASE:
case CLUTTER_PAD_STRIP:
case CLUTTER_PAD_RING:
detail = quark_pad;
break;
case CLUTTER_EVENT_LAST: /* Just keep compiler warnings quiet */
break;
}
g_signal_emit (actor,
actor_signals[CAPTURED_EVENT],
detail,
event,
g_signal_emit (actor, actor_signals[CAPTURED_EVENT], 0,
event,
&retval);
goto out;
}
@@ -16006,63 +15898,6 @@ clutter_actor_get_opacity_override (ClutterActor *self)
return self->priv->opacity_override;
}
/**
* clutter_actor_inhibit_culling:
* @actor: a #ClutterActor
*
* Increases the culling inhibitor counter. Inhibiting culling
* forces the actor to be painted even when outside the visible
* bounds of the stage view.
*
* This is usually necessary when an actor is being painted on
* another paint context.
*
* Pair with clutter_actor_uninhibit_culling() when the actor doesn't
* need to be painted anymore.
*/
void
clutter_actor_inhibit_culling (ClutterActor *actor)
{
ClutterActorPrivate *priv;
g_return_if_fail (CLUTTER_IS_ACTOR (actor));
priv = actor->priv;
priv->inhibit_culling_counter++;
_clutter_actor_set_enable_paint_unmapped (actor, TRUE);
}
/**
* clutter_actor_uninhibit_culling:
* @actor: a #ClutterActor
*
* Decreases the culling inhibitor counter. See clutter_actor_inhibit_culling()
* for when inhibit culling is necessary.
*
* Calling this function without a matching call to
* clutter_actor_inhibit_culling() is a programming error.
*/
void
clutter_actor_uninhibit_culling (ClutterActor *actor)
{
ClutterActorPrivate *priv;
g_return_if_fail (CLUTTER_IS_ACTOR (actor));
priv = actor->priv;
if (priv->inhibit_culling_counter == 0)
{
g_critical ("Unpaired call to clutter_actor_uninhibit_culling");
return;
}
priv->inhibit_culling_counter--;
if (priv->inhibit_culling_counter == 0)
_clutter_actor_set_enable_paint_unmapped (actor, FALSE);
}
/* Allows you to disable applying the actors model view transform during
* a paint. Used by ClutterClone. */
void
@@ -17776,42 +17611,10 @@ _clutter_actor_compute_resource_scale (ClutterActor *self,
resource_scale))
{
if (priv->parent)
{
gboolean in_clone_paint;
gboolean was_parent_in_clone_paint;
gboolean was_parent_unmapped;
gboolean was_parent_paint_unmapped;
gboolean ret;
in_clone_paint = clutter_actor_is_in_clone_paint (self);
was_parent_unmapped = !clutter_actor_is_mapped (priv->parent);
was_parent_in_clone_paint =
clutter_actor_is_in_clone_paint (priv->parent);
was_parent_paint_unmapped = priv->parent->priv->enable_paint_unmapped;
if (in_clone_paint && was_parent_unmapped)
{
_clutter_actor_set_in_clone_paint (priv->parent, TRUE);
_clutter_actor_set_enable_paint_unmapped (priv->parent, TRUE);
}
ret = _clutter_actor_compute_resource_scale (priv->parent,
resource_scale);
if (in_clone_paint && was_parent_unmapped)
{
_clutter_actor_set_in_clone_paint (priv->parent,
was_parent_in_clone_paint);
_clutter_actor_set_enable_paint_unmapped (priv->parent,
was_parent_paint_unmapped);
}
return ret;
}
return _clutter_actor_compute_resource_scale (priv->parent,
resource_scale);
else
{
return FALSE;
}
return FALSE;
}
return TRUE;
@@ -21354,7 +21157,7 @@ clutter_actor_create_texture_paint_node (ClutterActor *self,
color.alpha = clutter_actor_get_paint_opacity_internal (self);
node = clutter_texture_node_new (texture, &color, priv->min_filter, priv->mag_filter);
clutter_paint_node_set_static_name (node, "Texture");
clutter_paint_node_set_name (node, "Texture");
if (priv->content_repeat == CLUTTER_REPEAT_NONE)
clutter_paint_node_add_rectangle (node, &box);
@@ -21375,14 +21178,3 @@ clutter_actor_create_texture_paint_node (ClutterActor *self,
return node;
}
gboolean
clutter_actor_has_accessible (ClutterActor *actor)
{
g_return_val_if_fail (CLUTTER_IS_ACTOR (actor), FALSE);
if (CLUTTER_ACTOR_GET_CLASS (actor)->has_accessible)
return CLUTTER_ACTOR_GET_CLASS (actor)->has_accessible (actor);
return TRUE;
}

View File

@@ -299,11 +299,10 @@ struct _ClutterActorClass
gboolean (* touch_event) (ClutterActor *self,
ClutterTouchEvent *event);
gboolean (* has_accessible) (ClutterActor *self);
/*< private >*/
/* padding for future expansion */
gpointer _padding_dummy[25];
gpointer _padding_dummy[26];
};
/**
@@ -381,8 +380,6 @@ CLUTTER_EXPORT
const gchar * clutter_actor_get_name (ClutterActor *self);
CLUTTER_EXPORT
AtkObject * clutter_actor_get_accessible (ClutterActor *self);
CLUTTER_EXPORT
gboolean clutter_actor_has_accessible (ClutterActor *self);
CLUTTER_EXPORT
gboolean clutter_actor_is_visible (ClutterActor *self);
@@ -884,11 +881,6 @@ void clutter_actor_set_opacity_override
CLUTTER_EXPORT
gint clutter_actor_get_opacity_override (ClutterActor *self);
CLUTTER_EXPORT
void clutter_actor_inhibit_culling (ClutterActor *actor);
CLUTTER_EXPORT
void clutter_actor_uninhibit_culling (ClutterActor *actor);
/**
* ClutterActorCreateChildFunc:
* @item: (type GObject): the item in the model

View File

@@ -144,55 +144,6 @@ source_destroyed (ClutterActor *actor,
bind->source = NULL;
}
static void
clutter_bind_constraint_update_preferred_size (ClutterConstraint *constraint,
ClutterActor *actor,
ClutterOrientation direction,
float for_size,
float *minimum_size,
float *natural_size)
{
ClutterBindConstraint *bind = CLUTTER_BIND_CONSTRAINT (constraint);
float source_min, source_nat;
if (bind->source == NULL)
return;
/* only these bindings affect the preferred size */
if (!(bind->coordinate == CLUTTER_BIND_WIDTH ||
bind->coordinate == CLUTTER_BIND_HEIGHT ||
bind->coordinate == CLUTTER_BIND_SIZE ||
bind->coordinate == CLUTTER_BIND_ALL))
return;
switch (direction)
{
case CLUTTER_ORIENTATION_HORIZONTAL:
if (bind->coordinate != CLUTTER_BIND_HEIGHT)
{
clutter_actor_get_preferred_width (bind->source, for_size,
&source_min,
&source_nat);
*minimum_size = source_min;
*natural_size = source_nat;
}
break;
case CLUTTER_ORIENTATION_VERTICAL:
if (bind->coordinate != CLUTTER_BIND_WIDTH)
{
clutter_actor_get_preferred_height (bind->source, for_size,
&source_min,
&source_nat);
*minimum_size = source_min;
*natural_size = source_nat;
}
break;
}
}
static void
clutter_bind_constraint_update_allocation (ClutterConstraint *constraint,
ClutterActor *actor,
@@ -377,8 +328,6 @@ clutter_bind_constraint_class_init (ClutterBindConstraintClass *klass)
meta_class->set_actor = clutter_bind_constraint_set_actor;
constraint_class->update_allocation = clutter_bind_constraint_update_allocation;
constraint_class->update_preferred_size = clutter_bind_constraint_update_preferred_size;
/**
* ClutterBindConstraint:source:
*

View File

@@ -352,7 +352,7 @@ clutter_canvas_paint_content (ClutterContent *content,
return;
node = clutter_actor_create_texture_paint_node (actor, priv->texture);
clutter_paint_node_set_static_name (node, "Canvas Content");
clutter_paint_node_set_name (node, "Canvas Content");
clutter_paint_node_add_child (root, node);
clutter_paint_node_unref (node);

View File

@@ -346,12 +346,6 @@ on_captured_event (ClutterActor *stage,
ClutterModifierType modifier_state;
gboolean has_button = TRUE;
if (!clutter_actor_meta_get_enabled (CLUTTER_ACTOR_META (action)))
{
clutter_click_action_release (action);
return CLUTTER_EVENT_PROPAGATE;
}
actor = clutter_actor_meta_get_actor (CLUTTER_ACTOR_META (action));
switch (clutter_event_type (event))

View File

@@ -30,6 +30,13 @@ gboolean clutter_constraint_update_allocation (ClutterConstraint *constraint,
ClutterActor *actor,
ClutterActorBox *allocation);
void clutter_constraint_update_preferred_size (ClutterConstraint *constraint,
ClutterActor *actor,
ClutterOrientation direction,
float for_size,
float *minimum_size,
float *natural_size);
G_END_DECLS
#endif /* __CLUTTER_CONSTRAINT_PRIVATE_H__ */

View File

@@ -222,17 +222,6 @@ clutter_constraint_update_allocation (ClutterConstraint *constraint,
return !clutter_actor_box_equal (allocation, &old_alloc);
}
/**
* clutter_constraint_update_preferred_size:
* @constraint: a #ClutterConstraint
* @actor: a #ClutterActor
* @direction: a #ClutterOrientation
* @for_size: the size in the opposite direction
* @minimum_size: (inout): the minimum size to modify
* @natural_size: (inout): the natural size to modify
*
* Asks the @constraint to update the size request of a #ClutterActor.
*/
void
clutter_constraint_update_preferred_size (ClutterConstraint *constraint,
ClutterActor *actor,

View File

@@ -99,14 +99,6 @@ struct _ClutterConstraintClass
CLUTTER_EXPORT
GType clutter_constraint_get_type (void) G_GNUC_CONST;
CLUTTER_EXPORT
void clutter_constraint_update_preferred_size (ClutterConstraint *constraint,
ClutterActor *actor,
ClutterOrientation direction,
float for_size,
float *minimum_size,
float *natural_size);
/* ClutterActor API */
CLUTTER_EXPORT
void clutter_actor_add_constraint (ClutterActor *self,

View File

@@ -1,36 +0,0 @@
/*
* Clutter.
*
* An OpenGL based 'interactive canvas' library.
*
* Copyright 2020 Red Hat, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library 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
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library. If not, see <http://www.gnu.org/licenses/>.
*/
#ifndef __CLUTTER_CONTAINER_PRIVATE_H__
#define __CLUTTER_CONTAINER_PRIVATE_H__
#include <clutter/clutter-container.h>
G_BEGIN_DECLS
void _clutter_container_emit_actor_added (ClutterContainer *container,
ClutterActor *actor);
void _clutter_container_emit_actor_removed (ClutterContainer *container,
ClutterActor *actor);
G_END_DECLS
#endif /* __CLUTTER_CONTAINER_PRIVATE_H__ */

View File

@@ -37,7 +37,6 @@
#include "clutter-actor-private.h"
#include "clutter-child-meta.h"
#include "clutter-container-private.h"
#include "clutter-debug.h"
#include "clutter-main.h"
#include "clutter-marshal.h"
@@ -1251,23 +1250,3 @@ clutter_container_child_notify (ClutterContainer *container,
child,
pspec);
}
void
_clutter_container_emit_actor_added (ClutterContainer *container,
ClutterActor *actor)
{
g_return_if_fail (CLUTTER_IS_CONTAINER (container));
g_return_if_fail (CLUTTER_IS_ACTOR (actor));
g_signal_emit (container, container_signals[ACTOR_ADDED], 0, actor);
}
void
_clutter_container_emit_actor_removed (ClutterContainer *container,
ClutterActor *actor)
{
g_return_if_fail (CLUTTER_IS_CONTAINER (container));
g_return_if_fail (CLUTTER_IS_ACTOR (actor));
g_signal_emit (container, container_signals[ACTOR_REMOVED], 0, actor);
}

View File

@@ -535,13 +535,9 @@ typedef enum /*< prefix=CLUTTER_ACTOR >*/
* ClutterOffscreenRedirect:
* @CLUTTER_OFFSCREEN_REDIRECT_AUTOMATIC_FOR_OPACITY: Only redirect
* the actor if it is semi-transparent and its has_overlaps()
* virtual returns %TRUE.
* virtual returns %TRUE. This is the default.
* @CLUTTER_OFFSCREEN_REDIRECT_ALWAYS: Always redirect the actor to an
* offscreen buffer even if it is fully opaque.
* @CLUTTER_OFFSCREEN_REDIRECT_ON_IDLE: Only redirect the actor if it is the
* most efficient thing to do based on its recent repaint behaviour. That
* means when its contents are changing less frequently than it's being used
* on stage.
*
* Possible flags to pass to clutter_actor_set_offscreen_redirect().
*
@@ -549,9 +545,8 @@ typedef enum /*< prefix=CLUTTER_ACTOR >*/
*/
typedef enum /*< prefix=CLUTTER_OFFSCREEN_REDIRECT >*/
{
CLUTTER_OFFSCREEN_REDIRECT_AUTOMATIC_FOR_OPACITY = 1 << 0,
CLUTTER_OFFSCREEN_REDIRECT_ALWAYS = 1 << 1,
CLUTTER_OFFSCREEN_REDIRECT_ON_IDLE = 1 << 2
CLUTTER_OFFSCREEN_REDIRECT_AUTOMATIC_FOR_OPACITY = 1<<0,
CLUTTER_OFFSCREEN_REDIRECT_ALWAYS = 1<<1
} ClutterOffscreenRedirect;
/**
@@ -678,15 +673,12 @@ typedef enum /*< prefix=CLUTTER_BIND >*/
* has queued a redraw before this paint. This implies that the effect
* should call clutter_actor_continue_paint() to chain to the next
* effect and can not cache any results from a previous paint.
* @CLUTTER_EFFECT_PAINT_BYPASS_EFFECT: The effect should not be used
* on this frame, but it will be asked to paint the actor still.
*
* Flags passed to the paint or pick method of #ClutterEffect.
*/
typedef enum /*< prefix=CLUTTER_EFFECT_PAINT >*/
{
CLUTTER_EFFECT_PAINT_ACTOR_DIRTY = (1 << 0),
CLUTTER_EFFECT_PAINT_BYPASS_EFFECT = (1 << 1)
CLUTTER_EFFECT_PAINT_ACTOR_DIRTY = (1 << 0)
} ClutterEffectPaintFlags;
/**

View File

@@ -130,7 +130,7 @@ clutter_image_paint_content (ClutterContent *content,
return;
node = clutter_actor_create_texture_paint_node (actor, priv->texture);
clutter_paint_node_set_static_name (node, "Image Content");
clutter_paint_node_set_name (node, "Image Content");
clutter_paint_node_add_child (root, node);
clutter_paint_node_unref (node);
}

View File

@@ -29,7 +29,7 @@ void clutter_input_focus_focus_out (ClutterInputFocus *focus);
void clutter_input_focus_commit (ClutterInputFocus *focus,
const gchar *text);
void clutter_input_focus_delete_surrounding (ClutterInputFocus *focus,
int offset,
guint offset,
guint len);
void clutter_input_focus_request_surrounding (ClutterInputFocus *focus);

View File

@@ -217,7 +217,7 @@ clutter_input_focus_commit (ClutterInputFocus *focus,
void
clutter_input_focus_delete_surrounding (ClutterInputFocus *focus,
int offset,
guint offset,
guint len)
{
g_return_if_fail (CLUTTER_IS_INPUT_FOCUS (focus));

View File

@@ -41,7 +41,7 @@ struct _ClutterInputFocusClass
void (* request_surrounding) (ClutterInputFocus *focus);
void (* delete_surrounding) (ClutterInputFocus *focus,
int offset,
guint offset,
guint len);
void (* commit_text) (ClutterInputFocus *focus,
const gchar *text);

View File

@@ -168,7 +168,7 @@ clutter_input_method_class_init (ClutterInputMethodClass *klass)
G_TYPE_FROM_CLASS (object_class),
G_SIGNAL_RUN_LAST,
0, NULL, NULL, NULL,
G_TYPE_NONE, 2, G_TYPE_INT, G_TYPE_UINT);
G_TYPE_NONE, 2, G_TYPE_UINT, G_TYPE_UINT);
signals[REQUEST_SURROUNDING] =
g_signal_new ("request-surrounding",
G_TYPE_FROM_CLASS (object_class),
@@ -292,7 +292,7 @@ clutter_input_method_commit (ClutterInputMethod *im,
void
clutter_input_method_delete_surrounding (ClutterInputMethod *im,
int offset,
guint offset,
guint len)
{
ClutterInputMethodPrivate *priv;

View File

@@ -68,7 +68,7 @@ void clutter_input_method_commit (ClutterInputMethod *im,
const gchar *text);
CLUTTER_EXPORT
void clutter_input_method_delete_surrounding (ClutterInputMethod *im,
int offset,
guint offset,
guint len);
CLUTTER_EXPORT
void clutter_input_method_request_surrounding (ClutterInputMethod *im);

View File

@@ -63,7 +63,6 @@
#include "clutter-main.h"
#include "clutter-master-clock.h"
#include "clutter-mutter.h"
#include "clutter-paint-node-private.h"
#include "clutter-private.h"
#include "clutter-settings-private.h"
#include "clutter-stage-manager.h"
@@ -971,9 +970,6 @@ clutter_init_real (GError **error)
if (clutter_enable_accessibility)
cally_accessibility_init ();
/* Initialize types required for paint nodes */
_clutter_paint_node_init_types ();
return CLUTTER_INIT_SUCCESS;
}

View File

@@ -31,8 +31,6 @@
#include "clutter-build-config.h"
#include <cogl/cogl.h>
#include "clutter-master-clock.h"
#include "clutter-master-clock-default.h"
#include "clutter-debug.h"
@@ -190,26 +188,6 @@ master_clock_get_swap_wait_time (ClutterMasterClockDefault *master_clock)
}
}
static int64_t
master_clock_get_next_presentation_time (ClutterMasterClockDefault *master_clock)
{
ClutterStageManager *stage_manager = clutter_stage_manager_get_default ();
const GSList *stages, *l;
int64_t earliest = -1;
stages = clutter_stage_manager_peek_stages (stage_manager);
for (l = stages; l != NULL; l = l->next)
{
gint64 t = _clutter_stage_get_next_presentation_time (l->data);
if (earliest == -1 || (t != -1 && t < earliest))
earliest = t;
}
return earliest;
}
static void
master_clock_schedule_stage_updates (ClutterMasterClockDefault *master_clock)
{
@@ -483,14 +461,8 @@ clutter_clock_dispatch (GSource *source,
_clutter_threads_acquire_lock ();
COGL_TRACE_BEGIN (ClutterMasterClockTick, "Master Clock (tick)");
/* Get the time to use for this frame */
master_clock->cur_tick = master_clock_get_next_presentation_time (master_clock);
/* On the first frame the backend might not have an answer */
if (master_clock->cur_tick <= 0)
master_clock->cur_tick = g_source_get_time (source);
master_clock->cur_tick = g_source_get_time (source);
#ifdef CLUTTER_ENABLE_DEBUG
master_clock->remaining_budget = master_clock->frame_budget;
@@ -520,8 +492,6 @@ clutter_clock_dispatch (GSource *source,
g_slist_free_full (stages, g_object_unref);
COGL_TRACE_END (ClutterMasterClockTick);
_clutter_threads_release_lock ();
return TRUE;

View File

@@ -469,13 +469,6 @@ clutter_offscreen_effect_paint (ClutterEffect *effect,
ClutterOffscreenEffect *self = CLUTTER_OFFSCREEN_EFFECT (effect);
ClutterOffscreenEffectPrivate *priv = self->priv;
if (flags & CLUTTER_EFFECT_PAINT_BYPASS_EFFECT)
{
clutter_actor_continue_paint (priv->actor, paint_context);
cogl_clear_object (&priv->offscreen);
return;
}
/* If we've already got a cached image and the actor hasn't been redrawn
* then we can just use the cached image in the FBO.
*/

View File

@@ -20,8 +20,7 @@
#include "clutter-paint-context.h"
ClutterPaintContext * clutter_paint_context_new_for_view (ClutterStageView *view,
const cairo_region_t *redraw_clip);
ClutterPaintContext * clutter_paint_context_new_for_view (ClutterStageView *view);
gboolean clutter_paint_context_is_drawing_off_stage (ClutterPaintContext *paint_context);

View File

@@ -26,8 +26,6 @@ struct _ClutterPaintContext
GList *framebuffers;
ClutterStageView *view;
cairo_region_t *redraw_clip;
};
G_DEFINE_BOXED_TYPE (ClutterPaintContext, clutter_paint_context,
@@ -35,8 +33,7 @@ G_DEFINE_BOXED_TYPE (ClutterPaintContext, clutter_paint_context,
clutter_paint_context_unref)
ClutterPaintContext *
clutter_paint_context_new_for_view (ClutterStageView *view,
const cairo_region_t *redraw_clip)
clutter_paint_context_new_for_view (ClutterStageView *view)
{
ClutterPaintContext *paint_context;
CoglFramebuffer *framebuffer;
@@ -44,7 +41,6 @@ clutter_paint_context_new_for_view (ClutterStageView *view,
paint_context = g_new0 (ClutterPaintContext, 1);
g_ref_count_init (&paint_context->ref_count);
paint_context->view = view;
paint_context->redraw_clip = cairo_region_copy (redraw_clip);
framebuffer = clutter_stage_view_get_framebuffer (view);
clutter_paint_context_push_framebuffer (paint_context, framebuffer);
@@ -81,7 +77,6 @@ clutter_paint_context_dispose (ClutterPaintContext *paint_context)
g_list_free_full (paint_context->framebuffers,
cogl_object_unref);
paint_context->framebuffers = NULL;
g_clear_pointer (&paint_context->redraw_clip, cairo_region_destroy);
}
void
@@ -120,12 +115,6 @@ clutter_paint_context_pop_framebuffer (ClutterPaintContext *paint_context)
paint_context->framebuffers);
}
const cairo_region_t *
clutter_paint_context_get_redraw_clip (ClutterPaintContext *paint_context)
{
return paint_context->redraw_clip;
}
/**
* clutter_paint_context_get_framebuffer:
* @paint_context: The #ClutterPaintContext

View File

@@ -59,7 +59,4 @@ void clutter_paint_context_push_framebuffer (ClutterPaintContext *paint_context,
CLUTTER_EXPORT
void clutter_paint_context_pop_framebuffer (ClutterPaintContext *paint_context);
CLUTTER_EXPORT
const cairo_region_t * clutter_paint_context_get_redraw_clip (ClutterPaintContext *paint_context);
#endif /* CLUTTER_PAINT_CONTEXT_H */

View File

@@ -49,11 +49,11 @@ struct _ClutterPaintNode
ClutterPaintNode *next_sibling;
ClutterPaintNode *last_child;
guint n_children;
GArray *operations;
const gchar *name;
guint n_children;
gchar *name;
volatile int ref_count;
};

View File

@@ -171,6 +171,8 @@ clutter_paint_node_real_finalize (ClutterPaintNode *node)
{
ClutterPaintNode *iter;
g_free (node->name);
if (node->operations != NULL)
{
guint i;
@@ -295,8 +297,7 @@ clutter_paint_node_get_type (void)
*
* The @name will be used for debugging purposes.
*
* The @node will intern @name using g_intern_string(). If you have access to a
* static string, use clutter_paint_node_set_static_name() instead.
* The @node will copy the passed string.
*
* Since: 1.10
*/
@@ -306,22 +307,8 @@ clutter_paint_node_set_name (ClutterPaintNode *node,
{
g_return_if_fail (CLUTTER_IS_PAINT_NODE (node));
node->name = g_intern_string (name);
}
/**
* clutter_paint_node_set_static_name: (skip)
*
* Like clutter_paint_node_set_name() but uses a static or interned string
* containing the name.
*/
void
clutter_paint_node_set_static_name (ClutterPaintNode *node,
const char *name)
{
g_return_if_fail (CLUTTER_IS_PAINT_NODE (node));
node->name = name;
g_free (node->name);
node->name = g_strdup (name);
}
/**
@@ -1194,6 +1181,8 @@ _clutter_paint_node_create (GType gtype)
{
g_return_val_if_fail (g_type_is_a (gtype, CLUTTER_TYPE_PAINT_NODE), NULL);
_clutter_paint_node_init_types ();
return (gpointer) g_type_create_instance (gtype);
}

View File

@@ -56,9 +56,6 @@ void clutter_paint_node_paint (Clutter
CLUTTER_EXPORT
void clutter_paint_node_set_name (ClutterPaintNode *node,
const char *name);
CLUTTER_EXPORT
void clutter_paint_node_set_static_name (ClutterPaintNode *node,
const char *name);
CLUTTER_EXPORT
CoglFramebuffer * clutter_paint_node_get_framebuffer (ClutterPaintNode *node);

View File

@@ -248,9 +248,6 @@ gboolean _clutter_util_rectangle_intersection (const cairo_rectangle_int_t *src1
const cairo_rectangle_int_t *src2,
cairo_rectangle_int_t *dest);
gboolean clutter_util_rectangle_equal (const cairo_rectangle_int_t *src1,
const cairo_rectangle_int_t *src2);
struct _ClutterVertex4
{

View File

@@ -41,7 +41,6 @@ enum
PTR_A11Y_DWELL_CLICK_TYPE_CHANGED,
PTR_A11Y_TIMEOUT_STARTED,
PTR_A11Y_TIMEOUT_STOPPED,
IS_UNFOCUS_INHIBITED_CHANGED,
N_SIGNALS,
};
@@ -63,8 +62,6 @@ struct _ClutterSeatPrivate
{
ClutterBackend *backend;
unsigned int inhibit_unfocus_count;
/* Keyboard a11y */
ClutterKbdA11ySettings kbd_a11y_settings;
@@ -278,22 +275,6 @@ clutter_seat_class_init (ClutterSeatClass *klass)
G_TYPE_FROM_CLASS (object_class),
_clutter_marshal_VOID__OBJECT_FLAGS_BOOLEANv);
/**
* ClutterSeat::is-unfocus-inhibited-changed:
* @seat: the #ClutterSeat that emitted the signal
*
* The ::is-unfocus-inhibited-changed signal is emitted when the
* property to inhibit the unsetting of the focus-surface of the
* #ClutterSeat changed. To get the current state of this property,
* use clutter_seat_is_unfocus_inhibited().
*/
signals[IS_UNFOCUS_INHIBITED_CHANGED] =
g_signal_new (I_("is-unfocus-inhibited-changed"),
G_TYPE_FROM_CLASS (klass),
G_SIGNAL_RUN_LAST,
0, NULL, NULL, NULL,
G_TYPE_NONE, 0);
props[PROP_BACKEND] =
g_param_spec_object ("backend",
P_("Backend"),
@@ -301,12 +282,6 @@ clutter_seat_class_init (ClutterSeatClass *klass)
CLUTTER_TYPE_BACKEND,
CLUTTER_PARAM_READWRITE | G_PARAM_CONSTRUCT_ONLY);
/**
* ClutterSeat:touch-mode:
*
* The current touch-mode of the #ClutterSeat, it is set to %TRUE if the
* requirements documented in clutter_seat_get_touch_mode() are fulfilled.
**/
props[PROP_TOUCH_MODE] =
g_param_spec_boolean ("touch-mode",
P_("Touch mode"),
@@ -533,85 +508,6 @@ clutter_seat_set_pointer_a11y_dwell_click_type (ClutterSeat
priv->pointer_a11y_settings.dwell_click_type = click_type;
}
/**
* clutter_seat_inhibit_unfocus:
* @seat: a #ClutterSeat
*
* Inhibits unsetting of the pointer focus-surface for the #ClutterSeat @seat,
* this allows to keep using the pointer even when it's hidden.
*
* This property is refcounted, so clutter_seat_uninhibit_unfocus() must be
* called the exact same number of times as clutter_seat_inhibit_unfocus()
* was called before.
**/
void
clutter_seat_inhibit_unfocus (ClutterSeat *seat)
{
ClutterSeatPrivate *priv;
g_return_if_fail (CLUTTER_IS_SEAT (seat));
priv = clutter_seat_get_instance_private (seat);
priv->inhibit_unfocus_count++;
if (priv->inhibit_unfocus_count == 1)
g_signal_emit (G_OBJECT (seat), signals[IS_UNFOCUS_INHIBITED_CHANGED], 0);
}
/**
* clutter_seat_uninhibit_unfocus:
* @seat: a #ClutterSeat
*
* Disables the inhibiting of unsetting of the pointer focus-surface
* previously enabled by calling clutter_seat_inhibit_unfocus().
*
* This property is refcounted, so clutter_seat_uninhibit_unfocus() must be
* called the exact same number of times as clutter_seat_inhibit_unfocus()
* was called before.
**/
void
clutter_seat_uninhibit_unfocus (ClutterSeat *seat)
{
ClutterSeatPrivate *priv;
g_return_if_fail (CLUTTER_IS_SEAT (seat));
priv = clutter_seat_get_instance_private (seat);
if (priv->inhibit_unfocus_count == 0)
{
g_warning ("Called clutter_seat_uninhibit_unfocus without inhibiting before");
return;
}
priv->inhibit_unfocus_count--;
if (priv->inhibit_unfocus_count == 0)
g_signal_emit (G_OBJECT (seat), signals[IS_UNFOCUS_INHIBITED_CHANGED], 0);
}
/**
* clutter_seat_is_unfocus_inhibited:
* @seat: a #ClutterSeat
*
* Gets whether unsetting of the pointer focus-surface is inhibited
* for the #ClutterSeat @seat.
*
* Returns: %TRUE if unsetting is inhibited, %FALSE otherwise
**/
gboolean
clutter_seat_is_unfocus_inhibited (ClutterSeat *seat)
{
ClutterSeatPrivate *priv;
g_return_val_if_fail (CLUTTER_IS_SEAT (seat), FALSE);
priv = clutter_seat_get_instance_private (seat);
return priv->inhibit_unfocus_count > 0;
}
/**
* clutter_seat_create_virtual_device:
* @seat: a #ClutterSeat
@@ -673,21 +569,6 @@ clutter_seat_warp_pointer (ClutterSeat *seat,
CLUTTER_SEAT_GET_CLASS (seat)->warp_pointer (seat, x, y);
}
/**
* clutter_seat_get_touch_mode:
* @seat: a #ClutterSeat
*
* Gets the current touch-mode state of the #ClutterSeat @seat.
* The #ClutterSeat:touch-mode property is set to %TRUE if the following
* requirements are fulfilled:
*
* - A touchscreen is available
* - No external keyboard is attached to the device
* - A tablet mode switch, if present, is enabled
*
* Returns: %TRUE if the device is a tablet that doesn't have an external
* keyboard attached, %FALSE otherwise.
**/
gboolean
clutter_seat_get_touch_mode (ClutterSeat *seat)
{

View File

@@ -159,16 +159,6 @@ void clutter_seat_get_pointer_a11y_settings (ClutterSeat *seat,
CLUTTER_EXPORT
void clutter_seat_set_pointer_a11y_dwell_click_type (ClutterSeat *seat,
ClutterPointerA11yDwellClickType click_type);
CLUTTER_EXPORT
void clutter_seat_inhibit_unfocus (ClutterSeat *seat);
CLUTTER_EXPORT
void clutter_seat_uninhibit_unfocus (ClutterSeat *seat);
CLUTTER_EXPORT
gboolean clutter_seat_is_unfocus_inhibited (ClutterSeat *seat);
CLUTTER_EXPORT
ClutterVirtualInputDevice *clutter_seat_create_virtual_device (ClutterSeat *seat,
ClutterInputDeviceType device_type);

View File

@@ -367,12 +367,24 @@ clutter_shader_effect_try_static_source (ClutterShaderEffect *self)
CLUTTER_NOTE (SHADER, "Compiling shader effect");
class_priv->program = cogl_create_program ();
cogl_shader_compile (class_priv->shader);
cogl_program_attach_shader (class_priv->program,
class_priv->shader);
if (cogl_shader_is_compiled (class_priv->shader))
{
class_priv->program = cogl_create_program ();
cogl_program_link (class_priv->program);
cogl_program_attach_shader (class_priv->program,
class_priv->shader);
cogl_program_link (class_priv->program);
}
else
{
gchar *log_buf = cogl_shader_get_info_log (class_priv->shader);
g_warning (G_STRLOC ": Unable to compile the GLSL shader: %s", log_buf);
g_free (log_buf);
}
}
priv->shader = cogl_object_ref (class_priv->shader);
@@ -890,11 +902,23 @@ clutter_shader_effect_set_shader_source (ClutterShaderEffect *effect,
CLUTTER_NOTE (SHADER, "Compiling shader effect");
priv->program = cogl_create_program ();
cogl_shader_compile (priv->shader);
cogl_program_attach_shader (priv->program, priv->shader);
if (cogl_shader_is_compiled (priv->shader))
{
priv->program = cogl_create_program ();
cogl_program_link (priv->program);
cogl_program_attach_shader (priv->program, priv->shader);
cogl_program_link (priv->program);
}
else
{
gchar *log_buf = cogl_shader_get_info_log (priv->shader);
g_warning (G_STRLOC ": Unable to compile the GLSL shader: %s", log_buf);
g_free (log_buf);
}
return TRUE;
}

View File

@@ -36,9 +36,9 @@ typedef struct _ClutterStageQueueRedrawEntry ClutterStageQueueRedrawEntry;
/* stage */
ClutterStageWindow *_clutter_stage_get_default_window (void);
void clutter_stage_paint_view (ClutterStage *stage,
ClutterStageView *view,
const cairo_region_t *redraw_clip);
void _clutter_stage_paint_view (ClutterStage *stage,
ClutterStageView *view,
const cairo_rectangle_int_t *clip);
void _clutter_stage_emit_after_paint (ClutterStage *stage);
@@ -78,7 +78,6 @@ void _clutter_stage_schedule_update (ClutterStage *stage);
gint64 _clutter_stage_get_update_time (ClutterStage *stage);
void _clutter_stage_clear_update_time (ClutterStage *stage);
gboolean _clutter_stage_has_full_redraw_queued (ClutterStage *stage);
int64_t _clutter_stage_get_next_presentation_time (ClutterStage *stage);
void clutter_stage_log_pick (ClutterStage *stage,
const graphene_point_t *vertices,

View File

@@ -20,7 +20,8 @@
#include "clutter/clutter-stage-view.h"
void clutter_stage_view_after_paint (ClutterStageView *view);
void clutter_stage_view_after_paint (ClutterStageView *view,
const cairo_rectangle_int_t *clip);
gboolean clutter_stage_view_is_dirty_viewport (ClutterStageView *view);
@@ -32,15 +33,7 @@ gboolean clutter_stage_view_is_dirty_projection (ClutterStageView *view);
void clutter_stage_view_set_dirty_projection (ClutterStageView *view,
gboolean dirty);
void clutter_stage_view_add_redraw_clip (ClutterStageView *view,
const cairo_rectangle_int_t *clip);
gboolean clutter_stage_view_has_full_redraw_clip (ClutterStageView *view);
gboolean clutter_stage_view_has_redraw_clip (ClutterStageView *view);
const cairo_region_t * clutter_stage_view_peek_redraw_clip (ClutterStageView *view);
cairo_region_t * clutter_stage_view_take_redraw_clip (ClutterStageView *view);
void clutter_stage_view_add_redraw_clip (ClutterStageView *view,
cairo_rectangle_int_t *clip);
#endif /* __CLUTTER_STAGE_VIEW_PRIVATE_H__ */

View File

@@ -23,8 +23,6 @@
#include <cairo-gobject.h>
#include <math.h>
#include "clutter/clutter-private.h"
enum
{
PROP_0,
@@ -52,9 +50,6 @@ typedef struct _ClutterStageViewPrivate
CoglOffscreen *shadowfb;
CoglPipeline *shadowfb_pipeline;
gboolean has_redraw_clip;
cairo_region_t *redraw_clip;
guint dirty_viewport : 1;
guint dirty_projection : 1;
} ClutterStageViewPrivate;
@@ -171,11 +166,12 @@ clutter_stage_view_invalidate_offscreen_blit_pipeline (ClutterStageView *view)
}
static void
clutter_stage_view_copy_to_framebuffer (ClutterStageView *view,
CoglPipeline *pipeline,
CoglFramebuffer *src_framebuffer,
CoglFramebuffer *dst_framebuffer,
gboolean can_blit)
clutter_stage_view_copy_to_framebuffer (ClutterStageView *view,
const cairo_rectangle_int_t *rect,
CoglPipeline *pipeline,
CoglFramebuffer *src_framebuffer,
CoglFramebuffer *dst_framebuffer,
gboolean can_blit)
{
CoglMatrix matrix;
@@ -208,7 +204,8 @@ clutter_stage_view_copy_to_framebuffer (ClutterStageView *view,
}
void
clutter_stage_view_after_paint (ClutterStageView *view)
clutter_stage_view_after_paint (ClutterStageView *view,
const cairo_rectangle_int_t *rect)
{
ClutterStageViewPrivate *priv =
clutter_stage_view_get_instance_private (view);
@@ -225,6 +222,7 @@ clutter_stage_view_after_paint (ClutterStageView *view)
if (priv->shadowfb)
{
clutter_stage_view_copy_to_framebuffer (view,
rect,
priv->offscreen_pipeline,
priv->offscreen,
priv->shadowfb,
@@ -233,6 +231,7 @@ clutter_stage_view_after_paint (ClutterStageView *view)
else
{
clutter_stage_view_copy_to_framebuffer (view,
rect,
priv->offscreen_pipeline,
priv->offscreen,
priv->framebuffer,
@@ -244,6 +243,7 @@ clutter_stage_view_after_paint (ClutterStageView *view)
{
clutter_stage_view_ensure_shadowfb_blit_pipeline (view);
clutter_stage_view_copy_to_framebuffer (view,
rect,
priv->shadowfb_pipeline,
priv->shadowfb,
priv->framebuffer,
@@ -307,86 +307,6 @@ clutter_stage_view_get_offscreen_transformation_matrix (ClutterStageView *view,
view_class->get_offscreen_transformation_matrix (view, matrix);
}
void
clutter_stage_view_add_redraw_clip (ClutterStageView *view,
const cairo_rectangle_int_t *clip)
{
ClutterStageViewPrivate *priv =
clutter_stage_view_get_instance_private (view);
if (priv->has_redraw_clip && !priv->redraw_clip)
return;
if (!clip)
{
g_clear_pointer (&priv->redraw_clip, cairo_region_destroy);
priv->has_redraw_clip = TRUE;
return;
}
if (clip->width == 0 || clip->height == 0)
return;
if (!priv->redraw_clip)
{
if (!clutter_util_rectangle_equal (&priv->layout, clip))
priv->redraw_clip = cairo_region_create_rectangle (clip);
}
else
{
cairo_region_union_rectangle (priv->redraw_clip, clip);
if (cairo_region_num_rectangles (priv->redraw_clip) == 1)
{
cairo_rectangle_int_t redraw_clip_extents;
cairo_region_get_extents (priv->redraw_clip, &redraw_clip_extents);
if (clutter_util_rectangle_equal (&priv->layout, &redraw_clip_extents))
g_clear_pointer (&priv->redraw_clip, cairo_region_destroy);
}
}
priv->has_redraw_clip = TRUE;
}
gboolean
clutter_stage_view_has_redraw_clip (ClutterStageView *view)
{
ClutterStageViewPrivate *priv =
clutter_stage_view_get_instance_private (view);
return priv->has_redraw_clip;
}
gboolean
clutter_stage_view_has_full_redraw_clip (ClutterStageView *view)
{
ClutterStageViewPrivate *priv =
clutter_stage_view_get_instance_private (view);
return priv->has_redraw_clip && !priv->redraw_clip;
}
const cairo_region_t *
clutter_stage_view_peek_redraw_clip (ClutterStageView *view)
{
ClutterStageViewPrivate *priv =
clutter_stage_view_get_instance_private (view);
return priv->redraw_clip;
}
cairo_region_t *
clutter_stage_view_take_redraw_clip (ClutterStageView *view)
{
ClutterStageViewPrivate *priv =
clutter_stage_view_get_instance_private (view);
priv->has_redraw_clip = FALSE;
return g_steal_pointer (&priv->redraw_clip);
}
void
clutter_stage_view_transform_to_onscreen (ClutterStageView *view,
gfloat *x,
@@ -499,7 +419,6 @@ clutter_stage_view_dispose (GObject *object)
g_clear_pointer (&priv->offscreen, cogl_object_unref);
g_clear_pointer (&priv->offscreen_pipeline, cogl_object_unref);
g_clear_pointer (&priv->shadowfb_pipeline, cogl_object_unref);
g_clear_pointer (&priv->redraw_clip, cairo_region_destroy);
G_OBJECT_CLASS (clutter_stage_view_parent_class)->dispose (object);
}

View File

@@ -178,20 +178,75 @@ _clutter_stage_window_clear_update_time (ClutterStageWindow *window)
iface->clear_update_time (window);
}
int64_t
_clutter_stage_window_get_next_presentation_time (ClutterStageWindow *window)
void
_clutter_stage_window_add_redraw_clip (ClutterStageWindow *window,
cairo_rectangle_int_t *stage_clip)
{
ClutterStageWindowInterface *iface;
g_return_val_if_fail (CLUTTER_IS_STAGE_WINDOW (window), 0);
g_return_if_fail (CLUTTER_IS_STAGE_WINDOW (window));
iface = CLUTTER_STAGE_WINDOW_GET_IFACE (window);
if (iface->add_redraw_clip != NULL)
iface->add_redraw_clip (window, stage_clip);
}
/* If not implemented then just revert to the old behaviour... */
if (iface->get_next_presentation_time == NULL)
return _clutter_stage_window_get_update_time (window);
/* Determines if the backend will clip the rendering of the next
* frame.
*
* Note: at the start of each new frame there is an implied clip that
* clips everything (i.e. nothing would be drawn) so this function
* will return True at the start of a new frame if the backend
* supports clipped redraws.
*/
gboolean
_clutter_stage_window_has_redraw_clips (ClutterStageWindow *window)
{
ClutterStageWindowInterface *iface;
return iface->get_next_presentation_time (window);
g_return_val_if_fail (CLUTTER_IS_STAGE_WINDOW (window), FALSE);
iface = CLUTTER_STAGE_WINDOW_GET_IFACE (window);
if (iface->has_redraw_clips != NULL)
return iface->has_redraw_clips (window);
return FALSE;
}
/* Determines if the backend will discard any additional redraw clips
* and instead promote them to a full stage redraw.
*
* The ideas is that backend may have some heuristics that cause it to
* give up tracking redraw clips so this can be used to avoid the cost
* of calculating a redraw clip when we know it's going to be ignored
* anyway.
*/
gboolean
_clutter_stage_window_ignoring_redraw_clips (ClutterStageWindow *window)
{
ClutterStageWindowInterface *iface;
g_return_val_if_fail (CLUTTER_IS_STAGE_WINDOW (window), FALSE);
iface = CLUTTER_STAGE_WINDOW_GET_IFACE (window);
if (iface->ignoring_redraw_clips != NULL)
return iface->ignoring_redraw_clips (window);
return TRUE;
}
cairo_region_t *
_clutter_stage_window_get_redraw_clip (ClutterStageWindow *window)
{
ClutterStageWindowInterface *iface;
g_return_val_if_fail (CLUTTER_IS_STAGE_WINDOW (window), FALSE);
iface = CLUTTER_STAGE_WINDOW_GET_IFACE (window);
if (iface->get_redraw_clip != NULL)
return iface->get_redraw_clip (window);
return NULL;
}
void

View File

@@ -51,6 +51,12 @@ struct _ClutterStageWindowInterface
gint64 (* get_update_time) (ClutterStageWindow *stage_window);
void (* clear_update_time) (ClutterStageWindow *stage_window);
void (* add_redraw_clip) (ClutterStageWindow *stage_window,
cairo_rectangle_int_t *stage_rectangle);
gboolean (* has_redraw_clips) (ClutterStageWindow *stage_window);
gboolean (* ignoring_redraw_clips) (ClutterStageWindow *stage_window);
cairo_region_t * (* get_redraw_clip) (ClutterStageWindow *stage_window);
void (* set_accept_focus) (ClutterStageWindow *stage_window,
gboolean accept_focus);
@@ -61,8 +67,6 @@ struct _ClutterStageWindowInterface
GList *(* get_views) (ClutterStageWindow *stage_window);
int64_t (* get_frame_counter) (ClutterStageWindow *stage_window);
void (* finish_frame) (ClutterStageWindow *stage_window);
int64_t (* get_next_presentation_time) (ClutterStageWindow *stage_window);
};
ClutterActor * _clutter_stage_window_get_wrapper (ClutterStageWindow *window);
@@ -90,6 +94,12 @@ void _clutter_stage_window_schedule_update (ClutterStageWin
gint64 _clutter_stage_window_get_update_time (ClutterStageWindow *window);
void _clutter_stage_window_clear_update_time (ClutterStageWindow *window);
void _clutter_stage_window_add_redraw_clip (ClutterStageWindow *window,
cairo_rectangle_int_t *stage_clip);
gboolean _clutter_stage_window_has_redraw_clips (ClutterStageWindow *window);
gboolean _clutter_stage_window_ignoring_redraw_clips (ClutterStageWindow *window);
cairo_region_t * _clutter_stage_window_get_redraw_clip (ClutterStageWindow *window);
void _clutter_stage_window_set_accept_focus (ClutterStageWindow *window,
gboolean accept_focus);
@@ -103,8 +113,6 @@ void _clutter_stage_window_finish_frame (ClutterStageWin
int64_t _clutter_stage_window_get_frame_counter (ClutterStageWindow *window);
int64_t _clutter_stage_window_get_next_presentation_time (ClutterStageWindow *window);
G_END_DECLS
#endif /* __CLUTTER_STAGE_WINDOW_H__ */

View File

@@ -78,6 +78,7 @@
#include "clutter-private.h"
#include "cogl/cogl.h"
#include "cogl/cogl-trace.h"
struct _ClutterStageQueueRedrawEntry
{
@@ -143,6 +144,8 @@ struct _ClutterStagePrivate
gpointer paint_data;
GDestroyNotify paint_notify;
cairo_rectangle_int_t view_clip;
int update_freeze_count;
guint redraw_pending : 1;
@@ -556,33 +559,6 @@ pick_record_contains_point (ClutterStage *stage,
return TRUE;
}
static void
clutter_stage_add_redraw_clip (ClutterStage *stage,
cairo_rectangle_int_t *clip)
{
GList *l;
for (l = _clutter_stage_peek_stage_views (stage); l; l = l->next)
{
ClutterStageView *view = l->data;
if (!clip)
{
clutter_stage_view_add_redraw_clip (view, NULL);
}
else
{
cairo_rectangle_int_t view_layout;
cairo_rectangle_int_t intersection;
clutter_stage_view_get_layout (view, &view_layout);
if (_clutter_util_rectangle_intersection (&view_layout, clip,
&intersection))
clutter_stage_view_add_redraw_clip (view, &intersection);
}
}
}
static inline void
queue_full_redraw (ClutterStage *stage)
{
@@ -601,7 +577,7 @@ queue_full_redraw (ClutterStage *stage)
if (stage_window == NULL)
return;
clutter_stage_add_redraw_clip (stage, NULL);
_clutter_stage_window_add_redraw_clip (stage_window, NULL);
}
static gboolean
@@ -927,18 +903,15 @@ setup_view_for_pick_or_paint (ClutterStage *stage,
}
static void
clutter_stage_do_paint_view (ClutterStage *stage,
ClutterStageView *view,
const cairo_region_t *redraw_clip)
clutter_stage_do_paint_view (ClutterStage *stage,
ClutterStageView *view,
const cairo_rectangle_int_t *clip)
{
ClutterPaintContext *paint_context;
cairo_rectangle_int_t clip_rect;
paint_context = clutter_paint_context_new_for_view (view, redraw_clip);
cairo_region_get_extents (redraw_clip, &clip_rect);
setup_view_for_pick_or_paint (stage, view, &clip_rect);
paint_context = clutter_paint_context_new_for_view (view);
setup_view_for_pick_or_paint (stage, view, clip);
clutter_actor_paint (CLUTTER_ACTOR (stage), paint_context);
clutter_paint_context_destroy (paint_context);
}
@@ -947,9 +920,9 @@ clutter_stage_do_paint_view (ClutterStage *stage,
* for picking or painting...
*/
void
clutter_stage_paint_view (ClutterStage *stage,
ClutterStageView *view,
const cairo_region_t *redraw_clip)
_clutter_stage_paint_view (ClutterStage *stage,
ClutterStageView *view,
const cairo_rectangle_int_t *clip)
{
ClutterStagePrivate *priv = stage->priv;
@@ -958,11 +931,15 @@ clutter_stage_paint_view (ClutterStage *stage,
COGL_TRACE_BEGIN_SCOPED (ClutterStagePaintView, "Paint (view)");
priv->view_clip = *clip;
if (g_signal_has_handler_pending (stage, stage_signals[PAINT_VIEW],
0, TRUE))
g_signal_emit (stage, stage_signals[PAINT_VIEW], 0, view, redraw_clip);
g_signal_emit (stage, stage_signals[PAINT_VIEW], 0, view);
else
CLUTTER_STAGE_GET_CLASS (stage)->paint_view (stage, view, redraw_clip);
CLUTTER_STAGE_GET_CLASS (stage)->paint_view (stage, view);
priv->view_clip = (cairo_rectangle_int_t) { 0 };
}
void
@@ -1320,9 +1297,15 @@ clutter_stage_queue_actor_relayout (ClutterStage *stage,
{
ClutterStagePrivate *priv = stage->priv;
if (g_hash_table_contains (priv->pending_relayouts, stage))
return;
if (g_hash_table_size (priv->pending_relayouts) == 0)
_clutter_stage_schedule_update (stage);
if (actor == (ClutterActor *) stage)
g_hash_table_remove_all (priv->pending_relayouts);
g_hash_table_add (priv->pending_relayouts, g_object_ref (actor));
priv->pending_relayouts_version++;
}
@@ -1433,12 +1416,16 @@ clutter_stage_do_redraw (ClutterStage *stage)
static GSList *
_clutter_stage_check_updated_pointers (ClutterStage *stage)
{
ClutterStagePrivate *priv = stage->priv;
ClutterBackend *backend;
ClutterSeat *seat;
GSList *updating = NULL;
GList *l, *devices;
cairo_region_t *clip;
graphene_point_t point;
clip = _clutter_stage_window_get_redraw_clip (priv->impl);
backend = clutter_get_default_backend ();
seat = clutter_backend_get_default_seat (backend);
devices = clutter_seat_list_devices (seat);
@@ -1446,8 +1433,6 @@ _clutter_stage_check_updated_pointers (ClutterStage *stage)
for (l = devices; l; l = l->next)
{
ClutterInputDevice *dev = l->data;
ClutterStageView *view;
const cairo_region_t *clip;
if (clutter_input_device_get_device_mode (dev) !=
CLUTTER_INPUT_MODE_MASTER)
@@ -1463,11 +1448,6 @@ _clutter_stage_check_updated_pointers (ClutterStage *stage)
if (!clutter_input_device_get_coords (dev, NULL, &point))
continue;
view = clutter_stage_get_view_at (stage, point.x, point.y);
if (!view)
continue;
clip = clutter_stage_view_peek_redraw_clip (view);
if (!clip || cairo_region_contains_point (clip, point.x, point.y))
updating = g_slist_prepend (updating, dev);
break;
@@ -1577,22 +1557,6 @@ clutter_stage_real_queue_relayout (ClutterActor *self)
parent_class->queue_relayout (self);
}
static gboolean
is_full_stage_redraw_queued (ClutterStage *stage)
{
GList *l;
for (l = _clutter_stage_peek_stage_views (stage); l; l = l->next)
{
ClutterStageView *view = l->data;
if (!clutter_stage_view_has_full_redraw_clip (view))
return FALSE;
}
return TRUE;
}
static gboolean
clutter_stage_real_queue_redraw (ClutterActor *actor,
ClutterActor *leaf,
@@ -1614,12 +1578,12 @@ clutter_stage_real_queue_redraw (ClutterActor *actor,
if (stage_window == NULL)
return TRUE;
if (is_full_stage_redraw_queued (stage))
if (_clutter_stage_window_ignoring_redraw_clips (stage_window))
return FALSE;
if (redraw_clip == NULL)
{
clutter_stage_add_redraw_clip (stage, NULL);
_clutter_stage_window_add_redraw_clip (stage_window, NULL);
return FALSE;
}
@@ -1651,20 +1615,43 @@ clutter_stage_real_queue_redraw (ClutterActor *actor,
stage_clip.width = intersection_box.x2 - stage_clip.x;
stage_clip.height = intersection_box.y2 - stage_clip.y;
clutter_stage_add_redraw_clip (stage, &stage_clip);
_clutter_stage_window_add_redraw_clip (stage_window, &stage_clip);
return FALSE;
}
gboolean
_clutter_stage_has_full_redraw_queued (ClutterStage *stage)
{
if (CLUTTER_ACTOR_IN_DESTRUCTION (stage))
ClutterStageWindow *stage_window = _clutter_stage_get_window (stage);
if (CLUTTER_ACTOR_IN_DESTRUCTION (stage) || stage_window == NULL)
return FALSE;
if (!stage->priv->redraw_pending)
if (stage->priv->redraw_pending &&
!_clutter_stage_window_has_redraw_clips (stage_window))
return TRUE;
else
return FALSE;
}
return is_full_stage_redraw_queued (stage);
cairo_region_t *
clutter_stage_get_redraw_clip (ClutterStage *stage)
{
ClutterStagePrivate *priv;
cairo_rectangle_int_t clip;
cairo_region_t *region;
g_return_val_if_fail (CLUTTER_IS_STAGE (stage), NULL);
priv = stage->priv;
region = _clutter_stage_window_get_redraw_clip (priv->impl);
if (region)
return region;
/* Set clip to the full extents of the stage */
_clutter_stage_window_get_geometry (priv->impl, &clip);
return cairo_region_create_rectangle (&clip);
}
static ClutterActor *
@@ -1993,11 +1980,13 @@ clutter_stage_finalize (GObject *object)
}
static void
clutter_stage_real_paint_view (ClutterStage *stage,
ClutterStageView *view,
const cairo_region_t *redraw_clip)
clutter_stage_real_paint_view (ClutterStage *stage,
ClutterStageView *view)
{
clutter_stage_do_paint_view (stage, view, redraw_clip);
ClutterStagePrivate *priv = stage->priv;
const cairo_rectangle_int_t *clip = &priv->view_clip;
clutter_stage_do_paint_view (stage, view, clip);
}
static void
@@ -2223,7 +2212,6 @@ clutter_stage_class_init (ClutterStageClass *klass)
* ClutterStage::paint-view:
* @stage: the stage that received the event
* @view: a #ClutterStageView
* @redraw_clip: a #cairo_region_t with the redraw clip
*
* The ::paint-view signal is emitted before a #ClutterStageView is being
* painted.
@@ -2238,9 +2226,8 @@ clutter_stage_class_init (ClutterStageClass *klass)
G_SIGNAL_RUN_LAST,
G_STRUCT_OFFSET (ClutterStageClass, paint_view),
NULL, NULL, NULL,
G_TYPE_NONE, 2,
CLUTTER_TYPE_STAGE_VIEW,
G_TYPE_POINTER);
G_TYPE_NONE, 1,
CLUTTER_TYPE_STAGE_VIEW);
/**
* ClutterStage::presented: (skip)
@@ -2816,17 +2803,13 @@ clutter_stage_read_pixels (ClutterStage *stage,
.height = height,
});
cairo_region_get_extents (clip, &clip_rect);
cairo_region_destroy (clip);
if (clip_rect.width == 0 || clip_rect.height == 0)
{
cairo_region_destroy (clip);
return NULL;
}
return NULL;
framebuffer = clutter_stage_view_get_framebuffer (view);
clutter_stage_do_paint_view (stage, view, clip);
cairo_region_destroy (clip);
clutter_stage_do_paint_view (stage, view, &clip_rect);
view_scale = clutter_stage_view_get_scale (view);
pixel_width = roundf (clip_rect.width * view_scale);
@@ -3745,21 +3728,6 @@ _clutter_stage_clear_update_time (ClutterStage *stage)
_clutter_stage_window_clear_update_time (stage_window);
}
int64_t
_clutter_stage_get_next_presentation_time (ClutterStage *stage)
{
ClutterStageWindow *stage_window;
if (CLUTTER_ACTOR_IN_DESTRUCTION (stage))
return 0;
stage_window = _clutter_stage_get_window (stage);
if (stage_window == NULL)
return 0;
return _clutter_stage_window_get_next_presentation_time (stage_window);
}
ClutterPaintVolume *
_clutter_stage_paint_volume_stack_allocate (ClutterStage *stage)
{
@@ -4348,6 +4316,7 @@ capture_view (ClutterStage *stage,
texture_width, texture_height);
cairo_surface_set_device_scale (image, view_scale, view_scale);
data = cairo_image_surface_get_data (image);
stride = cairo_image_surface_get_stride (image);
@@ -4357,20 +4326,6 @@ capture_view (ClutterStage *stage,
cairo_surface_mark_dirty (capture->image);
}
/**
* clutter_stage_capture:
* @stage: a #ClutterStage
* @paint: whether to pain the frame
* @rect: a #cairo_rectangle_int_t in stage coordinates
* @out_captures: (out) (array length=out_n_captures): an array of
* #ClutterCapture
* @out_n_captures: (out): the number of captures in @out_captures
*
* Captures the stage pixels of @rect into @captures. @rect is in stage
* coordinates.
*
* Returns: %TRUE if a #ClutterCapture has been created, %FALSE otherwise
*/
gboolean
clutter_stage_capture (ClutterStage *stage,
gboolean paint,
@@ -4495,12 +4450,8 @@ capture_view_into (ClutterStage *stage,
if (paint)
{
cairo_region_t *region;
_clutter_stage_maybe_setup_viewport (stage, view);
region = cairo_region_create_rectangle (rect);
clutter_stage_do_paint_view (stage, view, region);
cairo_region_destroy (region);
clutter_stage_do_paint_view (stage, view, rect);
}
view_scale = clutter_stage_view_get_scale (view);
@@ -4526,42 +4477,49 @@ capture_view_into (ClutterStage *stage,
cogl_object_unref (bitmap);
}
static ClutterStageView *
get_view_at_rect (ClutterStage *stage,
cairo_rectangle_int_t *rect)
{
ClutterStagePrivate *priv = stage->priv;
GList *views = _clutter_stage_window_get_views (priv->impl);
GList *l;
for (l = views; l; l = l->next)
{
ClutterStageView *view = l->data;
cairo_rectangle_int_t view_layout;
cairo_region_t *region;
cairo_rectangle_int_t view_capture_rect;
clutter_stage_view_get_layout (view, &view_layout);
region = cairo_region_create_rectangle (&view_layout);
cairo_region_intersect_rectangle (region, rect);
cairo_region_get_extents (region, &view_capture_rect);
cairo_region_destroy (region);
if (view_capture_rect.width == 0 || view_capture_rect.height == 0)
continue;
g_assert (view_capture_rect.width == rect->width &&
view_capture_rect.height == rect->height);
return view;
}
return NULL;
}
void
clutter_stage_capture_into (ClutterStage *stage,
gboolean paint,
cairo_rectangle_int_t *rect,
uint8_t *data)
{
ClutterStagePrivate *priv = stage->priv;
GList *l;
ClutterStageView *view;
int bpp = 4;
int stride;
stride = rect->width * 4;
for (l = _clutter_stage_window_get_views (priv->impl); l; l = l->next)
{
ClutterStageView *view = l->data;
cairo_rectangle_int_t view_layout;
cairo_region_t *region;
cairo_rectangle_int_t capture_rect;
int x_offset, y_offset;
clutter_stage_view_get_layout (view, &view_layout);
region = cairo_region_create_rectangle (&view_layout);
cairo_region_intersect_rectangle (region, rect);
cairo_region_get_extents (region, &capture_rect);
cairo_region_destroy (region);
x_offset = capture_rect.x - rect->x;
y_offset = capture_rect.y - rect->y;
capture_view_into (stage, paint, view,
&capture_rect,
data + (x_offset * bpp) + (y_offset * stride),
stride);
}
view = get_view_at_rect (stage, rect);
capture_view_into (stage, paint, view, rect, data, rect->width * bpp);
}
/**

View File

@@ -84,9 +84,8 @@ struct _ClutterStageClass
gboolean (* delete_event) (ClutterStage *stage,
ClutterEvent *event);
void (* paint_view) (ClutterStage *stage,
ClutterStageView *view,
const cairo_region_t *redraw_clip);
void (* paint_view) (ClutterStage *stage,
ClutterStageView *view);
/*< private >*/
/* padding for future expansion */
@@ -206,6 +205,8 @@ guchar * clutter_stage_read_pixels (ClutterStage
gint width,
gint height);
CLUTTER_EXPORT
cairo_region_t * clutter_stage_get_redraw_clip (ClutterStage *stage);
CLUTTER_EXPORT
void clutter_stage_ensure_viewport (ClutterStage *stage);
CLUTTER_EXPORT
@@ -233,8 +234,8 @@ CLUTTER_EXPORT
gboolean clutter_stage_capture (ClutterStage *stage,
gboolean paint,
cairo_rectangle_int_t *rect,
ClutterCapture **out_captures,
int *out_n_captures);
ClutterCapture **captures,
int *n_captures);
CLUTTER_EXPORT
ClutterStageView * clutter_stage_get_view_at (ClutterStage *stage,
float x,

View File

@@ -348,23 +348,13 @@ clutter_text_input_focus_request_surrounding (ClutterInputFocus *focus)
static void
clutter_text_input_focus_delete_surrounding (ClutterInputFocus *focus,
int offset,
guint offset,
guint len)
{
ClutterText *clutter_text = CLUTTER_TEXT_INPUT_FOCUS (focus)->text;
int cursor;
int start;
cursor = clutter_text_get_cursor_position (clutter_text);
start = cursor + offset;
if (start < 0)
{
g_warning ("The offset '%d' of deleting surrounding is larger than the cursor pos '%d'",
offset, cursor);
return;
}
if (clutter_text_get_editable (clutter_text))
clutter_text_delete_text (clutter_text, start, len);
clutter_text_delete_text (clutter_text, offset, len);
}
static void

View File

@@ -214,16 +214,6 @@ _clutter_util_rectangle_intersection (const cairo_rectangle_int_t *src1,
}
}
gboolean
clutter_util_rectangle_equal (const cairo_rectangle_int_t *src1,
const cairo_rectangle_int_t *src2)
{
return ((src1->x == src2->x) &&
(src1->y == src2->y) &&
(src1->width == src2->width) &&
(src1->height == src2->height));
}
float
_clutter_util_matrix_determinant (const ClutterMatrix *matrix)
{

View File

@@ -47,7 +47,7 @@
#include "clutter-stage-private.h"
#include "clutter-stage-view-private.h"
#define MAX_STACK_RECTS 256
#include "cogl/cogl-trace.h"
typedef struct _ClutterStageViewCoglPrivate
{
@@ -235,12 +235,7 @@ clutter_stage_cogl_schedule_update (ClutterStageWindow *stage_window,
stage_cogl->update_time = next_presentation_time - max_render_time_allowed;
if (stage_cogl->update_time == stage_cogl->last_update_time)
{
stage_cogl->update_time += refresh_interval;
next_presentation_time += refresh_interval;
}
stage_cogl->next_presentation_time = next_presentation_time;
stage_cogl->update_time = stage_cogl->last_update_time + refresh_interval;
}
static gint64
@@ -261,29 +256,6 @@ clutter_stage_cogl_clear_update_time (ClutterStageWindow *stage_window)
stage_cogl->last_update_time = stage_cogl->update_time;
stage_cogl->update_time = -1;
stage_cogl->next_presentation_time = -1;
}
static int64_t
clutter_stage_cogl_get_next_presentation_time (ClutterStageWindow *stage_window)
{
ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_window);
int64_t now = g_get_monotonic_time ();
if (stage_cogl->next_presentation_time > 0 &&
stage_cogl->next_presentation_time <= now)
{
CLUTTER_NOTE (BACKEND,
"Missed some frames. Something blocked for over "
"%" G_GINT64_FORMAT "ms.",
(now - stage_cogl->next_presentation_time) / 1000);
stage_cogl->update_time = -1;
clutter_stage_cogl_schedule_update (stage_window,
stage_cogl->last_sync_delay);
}
return stage_cogl->next_presentation_time;
}
static ClutterActor *
@@ -316,6 +288,97 @@ clutter_stage_cogl_resize (ClutterStageWindow *stage_window,
{
}
static gboolean
clutter_stage_cogl_has_redraw_clips (ClutterStageWindow *stage_window)
{
ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_window);
/* NB: at the start of each new frame there is an implied clip that
* clips everything (i.e. nothing would be drawn) so we need to make
* sure we return True in the un-initialized case here.
*/
if (!stage_cogl->initialized_redraw_clip ||
(stage_cogl->initialized_redraw_clip &&
stage_cogl->redraw_clip))
return TRUE;
else
return FALSE;
}
static gboolean
clutter_stage_cogl_ignoring_redraw_clips (ClutterStageWindow *stage_window)
{
ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_window);
/* NB: a NULL clip means a full stage redraw is required */
if (stage_cogl->initialized_redraw_clip &&
!stage_cogl->redraw_clip)
return TRUE;
else
return FALSE;
}
/* A redraw clip represents (in stage coordinates) the bounding box of
* something that needs to be redrawn. Typically they are added to the
* StageWindow as a result of clutter_actor_queue_clipped_redraw() by
* actors such as ClutterGLXTexturePixmap. All redraw clips are
* discarded after the next paint.
*
* A NULL stage_clip means the whole stage needs to be redrawn.
*
* What we do with this information:
* - we keep track of the bounding box for all redraw clips
* - when we come to redraw; we scissor the redraw to that box and use
* glBlitFramebuffer to present the redraw to the front
* buffer.
*/
static void
clutter_stage_cogl_add_redraw_clip (ClutterStageWindow *stage_window,
cairo_rectangle_int_t *stage_clip)
{
ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_window);
/* If we are already forced to do a full stage redraw then bail early */
if (clutter_stage_cogl_ignoring_redraw_clips (stage_window))
return;
/* A NULL stage clip means a full stage redraw has been queued and
* we keep track of this by setting a NULL redraw_clip.
*/
if (stage_clip == NULL)
{
g_clear_pointer (&stage_cogl->redraw_clip, cairo_region_destroy);
stage_cogl->initialized_redraw_clip = TRUE;
return;
}
/* Ignore requests to add degenerate/empty clip rectangles */
if (stage_clip->width == 0 || stage_clip->height == 0)
return;
if (!stage_cogl->redraw_clip)
{
stage_cogl->redraw_clip = cairo_region_create_rectangle (stage_clip);
}
else
{
cairo_region_union_rectangle (stage_cogl->redraw_clip, stage_clip);
}
stage_cogl->initialized_redraw_clip = TRUE;
}
static cairo_region_t *
clutter_stage_cogl_get_redraw_clip (ClutterStageWindow *stage_window)
{
ClutterStageCogl *stage_cogl = CLUTTER_STAGE_COGL (stage_window);
if (stage_cogl->using_clipped_redraw && stage_cogl->redraw_clip)
return cairo_region_copy (stage_cogl->redraw_clip);
return NULL;
}
static inline gboolean
valid_buffer_age (ClutterStageViewCogl *view_cogl,
int age)
@@ -332,8 +395,7 @@ valid_buffer_age (ClutterStageViewCogl *view_cogl,
static void
paint_damage_region (ClutterStageWindow *stage_window,
ClutterStageView *view,
cairo_region_t *swap_region,
cairo_region_t *queued_redraw_clip)
cairo_region_t *swap_region)
{
CoglFramebuffer *framebuffer = clutter_stage_view_get_onscreen (view);
CoglContext *ctx = cogl_framebuffer_get_context (framebuffer);
@@ -370,7 +432,8 @@ paint_damage_region (ClutterStageWindow *stage_window,
}
/* Red for the clip */
if (queued_redraw_clip)
if (stage_cogl->initialized_redraw_clip &&
stage_cogl->redraw_clip)
{
static CoglPipeline *overlay_red = NULL;
@@ -380,13 +443,13 @@ paint_damage_region (ClutterStageWindow *stage_window,
cogl_pipeline_set_color4ub (overlay_red, 0x33, 0x00, 0x00, 0x33);
}
n_rects = cairo_region_num_rectangles (queued_redraw_clip);
n_rects = cairo_region_num_rectangles (stage_cogl->redraw_clip);
for (i = 0; i < n_rects; i++)
{
cairo_rectangle_int_t rect;
float x_1, x_2, y_1, y_2;
cairo_region_get_rectangle (queued_redraw_clip, i, &rect);
cairo_region_get_rectangle (stage_cogl->redraw_clip, i, &rect);
x_1 = rect.x;
x_2 = rect.x + rect.width;
y_1 = rect.y;
@@ -403,14 +466,13 @@ static gboolean
swap_framebuffer (ClutterStageWindow *stage_window,
ClutterStageView *view,
cairo_region_t *swap_region,
gboolean swap_with_damage,
cairo_region_t *queued_redraw_clip)
gboolean swap_with_damage)
{
CoglFramebuffer *framebuffer = clutter_stage_view_get_onscreen (view);
int *damage, n_rects, i;
if (G_UNLIKELY ((clutter_paint_debug_flags & CLUTTER_DEBUG_PAINT_DAMAGE_REGION)))
paint_damage_region (stage_window, view, swap_region, queued_redraw_clip);
paint_damage_region (stage_window, view, swap_region);
n_rects = cairo_region_num_rectangles (swap_region);
damage = g_newa (int, n_rects * 4);
@@ -474,52 +536,34 @@ scale_and_clamp_rect (const graphene_rect_t *rect,
_clutter_util_rectangle_int_extents (&tmp, dest);
}
static cairo_region_t *
offset_scale_and_clamp_region (const cairo_region_t *region,
int offset_x,
int offset_y,
float scale)
{
int n_rects, i;
cairo_rectangle_int_t *rects;
g_autofree cairo_rectangle_int_t *freeme = NULL;
n_rects = cairo_region_num_rectangles (region);
if (n_rects == 0)
return cairo_region_create ();
if (n_rects < MAX_STACK_RECTS)
rects = g_newa (cairo_rectangle_int_t, n_rects);
else
rects = freeme = g_new (cairo_rectangle_int_t, n_rects);
for (i = 0; i < n_rects; i++)
cairo_region_get_rectangle (region, i, &rects[i]);
for (i = 0; i < n_rects; i++)
{
graphene_rect_t tmp;
_clutter_util_rect_from_rectangle (&rects[i], &tmp);
graphene_rect_offset (&tmp, offset_x, offset_y);
scale_and_clamp_rect (&tmp, scale, &rects[i]);
}
return cairo_region_create_rectangles (rects, n_rects);
}
static void
paint_stage (ClutterStageCogl *stage_cogl,
ClutterStageView *view,
cairo_region_t *redraw_clip)
paint_stage (ClutterStageCogl *stage_cogl,
ClutterStageView *view,
cairo_region_t *clip)
{
ClutterStage *stage = stage_cogl->wrapper;
cairo_rectangle_int_t clip_rect;
cairo_rectangle_int_t paint_rect;
cairo_rectangle_int_t view_rect;
graphene_rect_t rect;
float fb_scale;
clutter_stage_view_get_layout (view, &view_rect);
fb_scale = clutter_stage_view_get_scale (view);
cairo_region_get_extents (clip, &clip_rect);
_clutter_util_rect_from_rectangle (&clip_rect, &rect);
scale_and_clamp_rect (&rect, 1.0f / fb_scale, &paint_rect);
_clutter_util_rectangle_offset (&paint_rect,
view_rect.x,
view_rect.y,
&paint_rect);
_clutter_stage_maybe_setup_viewport (stage, view);
clutter_stage_paint_view (stage, view, redraw_clip);
_clutter_stage_paint_view (stage, view, &paint_rect);
clutter_stage_view_after_paint (view);
clutter_stage_view_after_paint (view, &paint_rect);
}
static void
@@ -639,7 +683,7 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
clutter_stage_view_cogl_get_instance_private (view_cogl);
CoglFramebuffer *fb = clutter_stage_view_get_framebuffer (view);
cairo_rectangle_int_t view_rect;
gboolean is_full_redraw;
gboolean have_clip;
gboolean may_use_clipped_redraw;
gboolean use_clipped_redraw;
gboolean can_blit_sub_buffer;
@@ -647,8 +691,7 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
gboolean do_swap_buffer;
gboolean swap_with_damage;
ClutterActor *wrapper;
cairo_region_t *redraw_clip;
cairo_region_t *queued_redraw_clip;
cairo_region_t *redraw_clip = NULL;
cairo_region_t *fb_clip_region;
cairo_region_t *swap_region;
cairo_rectangle_int_t redraw_rect;
@@ -656,7 +699,6 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
float fb_scale;
int subpixel_compensation = 0;
int fb_width, fb_height;
int buffer_age;
wrapper = CLUTTER_ACTOR (stage_cogl->wrapper);
@@ -671,44 +713,55 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
has_buffer_age = cogl_is_onscreen (fb) && is_buffer_age_enabled ();
redraw_clip = clutter_stage_view_take_redraw_clip (view);
/* NB: a NULL redraw clip == full stage redraw */
if (!redraw_clip)
is_full_redraw = TRUE;
if (!stage_cogl->redraw_clip)
have_clip = FALSE;
else
is_full_redraw = FALSE;
may_use_clipped_redraw =
_clutter_stage_window_can_clip_redraws (stage_window) &&
(can_blit_sub_buffer || has_buffer_age) &&
!is_full_redraw &&
/* some drivers struggle to get going and produce some junk
* frames when starting up... */
cogl_onscreen_get_frame_counter (COGL_ONSCREEN (fb)) > 3;
if (has_buffer_age)
{
buffer_age = cogl_onscreen_get_buffer_age (COGL_ONSCREEN (fb));
if (!valid_buffer_age (view_cogl, buffer_age))
{
CLUTTER_NOTE (CLIPPING, "Invalid back buffer(age=%d): forcing full redraw\n", buffer_age);
may_use_clipped_redraw = FALSE;
}
cairo_region_t *view_region;
redraw_clip = cairo_region_copy (stage_cogl->redraw_clip);
view_region = cairo_region_create_rectangle (&view_rect);
cairo_region_intersect (redraw_clip, view_region);
have_clip = !cairo_region_equal (redraw_clip, view_region);
cairo_region_destroy (view_region);
}
if (may_use_clipped_redraw)
may_use_clipped_redraw = FALSE;
if (_clutter_stage_window_can_clip_redraws (stage_window) &&
(can_blit_sub_buffer || has_buffer_age) &&
have_clip &&
/* some drivers struggle to get going and produce some junk
* frames when starting up... */
cogl_onscreen_get_frame_counter (COGL_ONSCREEN (fb)) > 3)
{
fb_clip_region = offset_scale_and_clamp_region (redraw_clip,
-view_rect.x,
-view_rect.y,
fb_scale);
graphene_rect_t rect;
cairo_rectangle_int_t *rects;
int n_rects, i;
may_use_clipped_redraw = TRUE;
fb_clip_region = cairo_region_create ();
n_rects = cairo_region_num_rectangles (redraw_clip);
rects = g_new (cairo_rectangle_int_t, n_rects);
for (i = 0; i < n_rects; i++)
{
cairo_rectangle_int_t new_fb_clip_rect;
cairo_region_get_rectangle (redraw_clip, i, &rects[i]);
_clutter_util_rect_from_rectangle (&rects[i], &rect);
graphene_rect_offset (&rect, -view_rect.x, -view_rect.y);
scale_and_clamp_rect (&rect, fb_scale, &new_fb_clip_rect);
cairo_region_union_rectangle (fb_clip_region, &new_fb_clip_rect);
}
g_free (rects);
if (fb_scale != floorf (fb_scale))
{
int n_rects, i;
cairo_rectangle_int_t *rects;
subpixel_compensation = ceilf (fb_scale);
n_rects = cairo_region_num_rectangles (fb_clip_region);
@@ -727,20 +780,12 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
}
else
{
cairo_rectangle_int_t fb_rect;
fb_rect = (cairo_rectangle_int_t) {
.width = fb_width,
.height = fb_height,
};
fb_clip_region = cairo_region_create_rectangle (&fb_rect);
cairo_rectangle_int_t rect = { 0, 0, view_rect.width, view_rect.height };
fb_clip_region = cairo_region_create_rectangle (&rect);
g_clear_pointer (&redraw_clip, cairo_region_destroy);
redraw_clip = cairo_region_create_rectangle (&view_rect);
redraw_clip = cairo_region_copy (fb_clip_region);
}
queued_redraw_clip = cairo_region_copy (redraw_clip);
if (may_use_clipped_redraw &&
G_LIKELY (!(clutter_paint_debug_flags & CLUTTER_DEBUG_DISABLE_CLIPPED_REDRAWS)))
use_clipped_redraw = TRUE;
@@ -754,43 +799,62 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
{
if (use_clipped_redraw && !clip_region_empty)
{
cairo_region_t *fb_damage;
cairo_region_t *view_damage;
int i;
int age;
fill_current_damage_history (view, fb_clip_region);
age = cogl_onscreen_get_buffer_age (COGL_ONSCREEN (fb));
fb_damage = cairo_region_create ();
for (i = 1; i <= buffer_age; i++)
if (valid_buffer_age (view_cogl, age))
{
int damage_index;
graphene_rect_t rect;
cairo_rectangle_int_t damage_region;
cairo_rectangle_int_t *rects;
int n_rects, i;
damage_index = DAMAGE_HISTORY (view_priv->damage_index - i - 1);
cairo_region_union (fb_damage,
view_priv->damage_history[damage_index]);
fill_current_damage_history (view, fb_clip_region);
for (i = 1; i <= age; i++)
{
cairo_region_t *fb_damage =
view_priv->damage_history[DAMAGE_HISTORY (view_priv->damage_index - i - 1)];
cairo_region_union (fb_clip_region, fb_damage);
}
/* Update the redraw clip state with the extra damage. */
n_rects = cairo_region_num_rectangles (fb_clip_region);
rects = g_newa (cairo_rectangle_int_t, n_rects);
for (i = 0; i < n_rects; i++)
{
cairo_region_get_rectangle (fb_clip_region, i, &rects[i]);
_clutter_util_rect_from_rectangle (&rects[i], &rect);
scale_and_clamp_rect (&rect, 1.0f / fb_scale, &damage_region);
_clutter_util_rectangle_offset (&damage_region,
view_rect.x,
view_rect.y,
&damage_region);
cairo_region_union_rectangle (stage_cogl->redraw_clip,
&damage_region);
}
CLUTTER_NOTE (CLIPPING, "Reusing back buffer(age=%d) - repairing region: num rects: %d\n",
age,
cairo_region_num_rectangles (fb_clip_region));
swap_with_damage = TRUE;
}
else
{
cairo_rectangle_int_t fb_damage;
/* Update the fb clip region with the extra damage. */
cairo_region_union (fb_clip_region, fb_damage);
view_damage = offset_scale_and_clamp_region (fb_damage,
0, 0,
1.0f / fb_scale);
cairo_region_translate (view_damage, view_rect.x, view_rect.y);
cairo_region_intersect_rectangle (view_damage, &view_rect);
/* Update the redraw clip region with the extra damage. */
cairo_region_union (redraw_clip, view_damage);
cairo_region_destroy (view_damage);
cairo_region_destroy (fb_damage);
CLUTTER_NOTE (CLIPPING, "Reusing back buffer(age=%d) - repairing region: num rects: %d\n",
buffer_age,
cairo_region_num_rectangles (fb_clip_region));
swap_with_damage = TRUE;
CLUTTER_NOTE (CLIPPING, "Invalid back buffer(age=%d): forcing full redraw\n", age);
use_clipped_redraw = FALSE;
fb_damage = (cairo_rectangle_int_t) {
.x = 0,
.y = 0,
.width = ceilf (view_rect.width * fb_scale),
.height = ceilf (view_rect.height * fb_scale)
};
fill_current_damage_history_rectangle (view, &fb_damage);
}
}
else if (!use_clipped_redraw)
{
@@ -815,6 +879,8 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
cairo_rectangle_int_t clip_rect;
cairo_rectangle_int_t scissor_rect;
stage_cogl->using_clipped_redraw = TRUE;
if (cairo_region_num_rectangles (fb_clip_region) == 1)
{
cairo_region_get_extents (fb_clip_region, &clip_rect);
@@ -842,9 +908,11 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
cogl_framebuffer_push_region_clip (fb, fb_clip_region);
}
paint_stage (stage_cogl, view, redraw_clip);
paint_stage (stage_cogl, view, fb_clip_region);
cogl_framebuffer_pop_clip (fb);
stage_cogl->using_clipped_redraw = FALSE;
}
else
{
@@ -872,13 +940,24 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
scissor_rect.width,
scissor_rect.height);
paint_stage (stage_cogl, view, redraw_clip);
paint_stage (stage_cogl, view, fb_clip_region);
cogl_framebuffer_pop_clip (fb);
}
else
{
paint_stage (stage_cogl, view, redraw_clip);
cairo_rectangle_int_t clip;
cairo_region_t *view_region;
clip = (cairo_rectangle_int_t) {
.x = 0,
.y = 0,
.width = ceilf (view_rect.width * fb_scale),
.height = ceilf (view_rect.height * fb_scale)
};
view_region = cairo_region_create_rectangle (&clip);
paint_stage (stage_cogl, view, view_region);
cairo_region_destroy (view_region);
}
}
@@ -949,9 +1028,10 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
do_swap_buffer = TRUE;
}
g_clear_pointer (&redraw_clip, cairo_region_destroy);
g_clear_pointer (&queued_redraw_clip, cairo_region_destroy);
g_clear_pointer (&fb_clip_region, cairo_region_destroy);
if (redraw_clip)
cairo_region_destroy (redraw_clip);
if (fb_clip_region)
cairo_region_destroy (fb_clip_region);
if (do_swap_buffer)
{
@@ -974,8 +1054,7 @@ clutter_stage_cogl_redraw_view (ClutterStageWindow *stage_window,
res = swap_framebuffer (stage_window,
view,
swap_region,
swap_with_damage,
queued_redraw_clip);
swap_with_damage);
cairo_region_destroy (swap_region);
@@ -1000,10 +1079,8 @@ clutter_stage_cogl_redraw (ClutterStageWindow *stage_window)
{
ClutterStageView *view = l->data;
if (!clutter_stage_view_has_redraw_clip (view))
continue;
swap_event |= clutter_stage_cogl_redraw_view (stage_window, view);
swap_event =
clutter_stage_cogl_redraw_view (stage_window, view) || swap_event;
}
_clutter_stage_emit_after_paint (stage_cogl->wrapper);
@@ -1019,6 +1096,10 @@ clutter_stage_cogl_redraw (ClutterStageWindow *stage_window)
stage_cogl->pending_swaps++;
}
/* reset the redraw clipping for the next paint... */
stage_cogl->initialized_redraw_clip = FALSE;
g_clear_pointer (&stage_cogl->redraw_clip, cairo_region_destroy);
stage_cogl->frame_count++;
COGL_TRACE_END (ClutterStageCoglRedraw);
@@ -1036,7 +1117,10 @@ clutter_stage_window_iface_init (ClutterStageWindowInterface *iface)
iface->schedule_update = clutter_stage_cogl_schedule_update;
iface->get_update_time = clutter_stage_cogl_get_update_time;
iface->clear_update_time = clutter_stage_cogl_clear_update_time;
iface->get_next_presentation_time = clutter_stage_cogl_get_next_presentation_time;
iface->add_redraw_clip = clutter_stage_cogl_add_redraw_clip;
iface->has_redraw_clips = clutter_stage_cogl_has_redraw_clips;
iface->ignoring_redraw_clips = clutter_stage_cogl_ignoring_redraw_clips;
iface->get_redraw_clip = clutter_stage_cogl_get_redraw_clip;
iface->redraw = clutter_stage_cogl_redraw;
}
@@ -1082,7 +1166,6 @@ _clutter_stage_cogl_init (ClutterStageCogl *stage)
stage->refresh_rate = 0.0;
stage->update_time = -1;
stage->next_presentation_time = -1;
}
static void

View File

@@ -48,7 +48,6 @@ struct _ClutterStageCogl
gint64 last_presentation_time;
gint64 update_time;
int64_t last_update_time;
int64_t next_presentation_time;
/* We only enable clipped redraws after 2 frames, since we've seen
* a lot of drivers can struggle to get going and may output some
@@ -56,6 +55,14 @@ struct _ClutterStageCogl
unsigned int frame_count;
gint last_sync_delay;
cairo_region_t *redraw_clip;
guint initialized_redraw_clip : 1;
/* TRUE if the current paint cycle has a clipped redraw. In that
case bounding_redraw_clip specifies the the bounds. */
guint using_clipped_redraw : 1;
};
struct _ClutterStageCoglClass

View File

@@ -81,7 +81,6 @@ struct _CoglPangoDisplayListNode
GArray *rectangles;
/* A primitive representing those vertices */
CoglPrimitive *primitive;
guint has_color : 1;
} texture;
struct
@@ -421,9 +420,7 @@ _cogl_pango_display_list_render (CoglFramebuffer *fb,
cogl_color_get_red_byte (&node->color),
cogl_color_get_green_byte (&node->color),
cogl_color_get_blue_byte (&node->color),
(cogl_color_get_alpha_byte (&node->color) *
cogl_color_get_alpha_byte (color) /
255));
cogl_color_get_alpha_byte (color));
else
draw_color = *color;
cogl_color_premultiply (&draw_color);

View File

@@ -58,29 +58,27 @@ struct _CoglPangoGlyphCacheValue
/* This will be set to TRUE when the glyph atlas is reorganized
which means the glyph will need to be redrawn */
guint dirty : 1;
/* Set to TRUE if the glyph has colors (eg. emoji) */
guint has_color : 1;
gboolean dirty;
};
typedef void (* CoglPangoGlyphCacheDirtyFunc) (PangoFont *font,
PangoGlyph glyph,
CoglPangoGlyphCacheValue *value);
COGL_EXPORT CoglPangoGlyphCache *
CoglPangoGlyphCache *
cogl_pango_glyph_cache_new (CoglContext *ctx,
gboolean use_mipmapping);
COGL_EXPORT void
void
cogl_pango_glyph_cache_free (CoglPangoGlyphCache *cache);
COGL_EXPORT CoglPangoGlyphCacheValue *
CoglPangoGlyphCacheValue *
cogl_pango_glyph_cache_lookup (CoglPangoGlyphCache *cache,
gboolean create,
PangoFont *font,
PangoGlyph glyph);
COGL_EXPORT void
void
cogl_pango_glyph_cache_clear (CoglPangoGlyphCache *cache);
void

View File

@@ -50,7 +50,6 @@
#include <pango/pangocairo.h>
#include <pango/pango-renderer.h>
#include <cairo.h>
#include <cairo-ft.h>
#include "cogl/cogl-debug.h"
#include "cogl/cogl-context-private.h"
@@ -527,24 +526,6 @@ cogl_pango_renderer_get_cached_glyph (PangoRenderer *renderer,
create, font, glyph);
}
static gboolean
font_has_color_glyphs (const PangoFont *font)
{
cairo_scaled_font_t *scaled_font;
gboolean has_color = FALSE;
scaled_font = pango_cairo_font_get_scaled_font ((PangoCairoFont *) font);
if (cairo_scaled_font_get_type (scaled_font) == CAIRO_FONT_TYPE_FT)
{
FT_Face ft_face = cairo_ft_scaled_font_lock_face (scaled_font);
has_color = (FT_HAS_COLOR (ft_face) != 0);
cairo_ft_scaled_font_unlock_face (scaled_font);
}
return has_color;
}
static void
cogl_pango_renderer_set_dirty_glyph (PangoFont *font,
PangoGlyph glyph,
@@ -619,8 +600,6 @@ cogl_pango_renderer_set_dirty_glyph (PangoFont *font,
cairo_image_surface_get_data (surface));
cairo_surface_destroy (surface);
value->has_color = font_has_color_glyphs (font);
}
static void
@@ -719,7 +698,6 @@ cogl_pango_renderer_set_color_for_part (PangoRenderer *renderer,
PangoRenderPart part)
{
PangoColor *pango_color = pango_renderer_get_color (renderer, part);
uint16_t alpha = pango_renderer_get_alpha (renderer, part);
CoglPangoRenderer *priv = COGL_PANGO_RENDERER (renderer);
if (pango_color)
@@ -730,7 +708,7 @@ cogl_pango_renderer_set_color_for_part (PangoRenderer *renderer,
pango_color->red >> 8,
pango_color->green >> 8,
pango_color->blue >> 8,
alpha ? alpha >> 8 : 0xff);
0xff);
_cogl_pango_display_list_set_color_override (priv->display_list, &color);
}
@@ -842,13 +820,14 @@ cogl_pango_renderer_draw_glyphs (PangoRenderer *renderer,
CoglPangoGlyphCacheValue *cache_value;
int i;
cogl_pango_renderer_set_color_for_part (renderer,
PANGO_RENDER_PART_FOREGROUND);
for (i = 0; i < glyphs->num_glyphs; i++)
{
PangoGlyphInfo *gi = glyphs->glyphs + i;
float x, y;
cogl_pango_renderer_set_color_for_part (renderer,
PANGO_RENDER_PART_FOREGROUND);
cogl_pango_renderer_get_device_units (renderer,
xi + gi->geometry.x_offset,
yi + gi->geometry.y_offset,
@@ -905,19 +884,6 @@ cogl_pango_renderer_draw_glyphs (PangoRenderer *renderer,
x += (float)(cache_value->draw_x);
y += (float)(cache_value->draw_y);
/* Do not override color if the glyph/font provide its own */
if (cache_value->has_color)
{
CoglColor color;
uint16_t alpha;
alpha = pango_renderer_get_alpha (renderer,
PANGO_RENDER_PART_FOREGROUND);
cogl_color_init_from_4ub (&color, 0xff, 0xff, 0xff,
alpha ? alpha >> 8 : 0xff);
_cogl_pango_display_list_set_color_override (priv->display_list, &color);
}
cogl_pango_renderer_draw_glyph (priv, cache_value, x, y);
}
}

View File

@@ -75,7 +75,7 @@ typedef PangoCairoFontMap CoglPangoFontMap;
*
* Since: 1.14
*/
COGL_EXPORT PangoFontMap *
PangoFontMap *
cogl_pango_font_map_new (void);
/**
@@ -86,7 +86,7 @@ cogl_pango_font_map_new (void);
*
* Returns: (transfer full): the newly created context: free with g_object_unref().
*/
COGL_EXPORT PangoContext *
PangoContext *
cogl_pango_font_map_create_context (CoglPangoFontMap *font_map);
/**
@@ -102,7 +102,7 @@ cogl_pango_font_map_create_context (CoglPangoFontMap *font_map);
*
* Since: 1.14
*/
COGL_EXPORT void
void
cogl_pango_font_map_set_resolution (CoglPangoFontMap *font_map,
double dpi);
@@ -114,7 +114,7 @@ cogl_pango_font_map_set_resolution (CoglPangoFontMap *font_map,
*
* Since: 1.0
*/
COGL_EXPORT void
void
cogl_pango_font_map_clear_glyph_cache (CoglPangoFontMap *font_map);
/**
@@ -129,7 +129,7 @@ cogl_pango_font_map_clear_glyph_cache (CoglPangoFontMap *font_map);
*
* Since: 1.0
*/
COGL_EXPORT void
void
cogl_pango_ensure_glyph_cache_for_layout (PangoLayout *layout);
/**
@@ -142,7 +142,7 @@ cogl_pango_ensure_glyph_cache_for_layout (PangoLayout *layout);
*
* Since: 1.0
*/
COGL_EXPORT void
void
cogl_pango_font_map_set_use_mipmapping (CoglPangoFontMap *font_map,
gboolean value);
@@ -157,7 +157,7 @@ cogl_pango_font_map_set_use_mipmapping (CoglPangoFontMap *font_map,
*
* Since: 1.0
*/
COGL_EXPORT gboolean
gboolean
cogl_pango_font_map_get_use_mipmapping (CoglPangoFontMap *font_map);
/**
@@ -170,7 +170,7 @@ cogl_pango_font_map_get_use_mipmapping (CoglPangoFontMap *font_map);
*
* Since: 1.0
*/
COGL_EXPORT PangoRenderer *
PangoRenderer *
cogl_pango_font_map_get_renderer (CoglPangoFontMap *font_map);
/**
@@ -187,7 +187,7 @@ cogl_pango_font_map_get_renderer (CoglPangoFontMap *font_map);
*
* Since: 1.14
*/
COGL_EXPORT void
void
cogl_pango_show_layout (CoglFramebuffer *framebuffer,
PangoLayout *layout,
float x,
@@ -208,7 +208,7 @@ cogl_pango_show_layout (CoglFramebuffer *framebuffer,
*
* Since: 1.14
*/
COGL_EXPORT void
void
cogl_pango_show_layout_line (CoglFramebuffer *framebuffer,
PangoLayoutLine *line,
float x,
@@ -227,7 +227,7 @@ cogl_pango_show_layout_line (CoglFramebuffer *framebuffer,
typedef struct _CoglPangoRenderer CoglPangoRenderer;
typedef struct _CoglPangoRendererClass CoglPangoRendererClass;
COGL_EXPORT GType cogl_pango_renderer_get_type (void) G_GNUC_CONST;
GType cogl_pango_renderer_get_type (void) G_GNUC_CONST;
G_END_DECLS

View File

@@ -0,0 +1,6 @@
{
global:
cogl_pango_*;
local:
*;
};

View File

@@ -20,13 +20,19 @@ cogl_pango_deps = [
libmutter_cogl_dep,
]
libmutter_cogl_pango_map = 'libmutter-cogl-pango.map'
libmutter_cogl_pango_link_args = [
'-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(),
libmutter_cogl_pango_map),
]
libmutter_cogl_pango = shared_library('mutter-cogl-pango-' + libmutter_api_version,
sources: [cogl_pango_sources, cogl_pango_public_headers],
version: '0.0.0',
soversion: 0,
c_args: cogl_c_args,
include_directories: [cogl_includepath, cogl_path_includepath],
gnu_symbol_visibility: 'hidden',
link_depends: libmutter_cogl_pango_map,
link_args: libmutter_cogl_pango_link_args,
dependencies: [cogl_pango_deps],
install_rpath: pkglibdir,
install_dir: pkglibdir,

View File

@@ -50,7 +50,6 @@ G_BEGIN_DECLS
*
* Returns: a #GType that can be used with the GLib type system.
*/
COGL_EXPORT
GType cogl_path_get_gtype (void);
#define cogl_path_new cogl2_path_new
@@ -65,7 +64,7 @@ GType cogl_path_get_gtype (void);
*
* Since: 2.0
*/
COGL_EXPORT CoglPath *
CoglPath *
cogl_path_new (void);
/**
@@ -83,7 +82,7 @@ cogl_path_new (void);
*
* Since: 2.0
*/
COGL_EXPORT CoglPath *
CoglPath *
cogl_path_copy (CoglPath *path);
/**
@@ -97,7 +96,7 @@ cogl_path_copy (CoglPath *path);
*
* Since: 2.0
*/
COGL_EXPORT gboolean
gboolean
cogl_is_path (void *object);
#define cogl_path_move_to cogl2_path_move_to
@@ -111,7 +110,7 @@ cogl_is_path (void *object);
*
* Since: 2.0
*/
COGL_EXPORT void
void
cogl_path_move_to (CoglPath *path,
float x,
float y);
@@ -128,7 +127,7 @@ cogl_path_move_to (CoglPath *path,
*
* Since: 2.0
*/
COGL_EXPORT void
void
cogl_path_rel_move_to (CoglPath *path,
float x,
float y);
@@ -144,7 +143,7 @@ cogl_path_rel_move_to (CoglPath *path,
*
* Since: 2.0
*/
COGL_EXPORT void
void
cogl_path_line_to (CoglPath *path,
float x,
float y);
@@ -160,7 +159,7 @@ cogl_path_line_to (CoglPath *path,
*
* Since: 2.0
*/
COGL_EXPORT void
void
cogl_path_rel_line_to (CoglPath *path,
float x,
float y);
@@ -188,7 +187,7 @@ cogl_path_rel_line_to (CoglPath *path,
*
* Since: 2.0
*/
COGL_EXPORT void
void
cogl_path_arc (CoglPath *path,
float center_x,
float center_y,
@@ -213,7 +212,7 @@ cogl_path_arc (CoglPath *path,
*
* Since: 2.0
*/
COGL_EXPORT void
void
cogl_path_curve_to (CoglPath *path,
float x_1,
float y_1,
@@ -239,7 +238,7 @@ cogl_path_curve_to (CoglPath *path,
*
* Since: 2.0
*/
COGL_EXPORT void
void
cogl_path_rel_curve_to (CoglPath *path,
float x_1,
float y_1,
@@ -257,7 +256,7 @@ cogl_path_rel_curve_to (CoglPath *path,
*
* Since: 2.0
*/
COGL_EXPORT void
void
cogl_path_close (CoglPath *path);
#define cogl_path_line cogl2_path_line
@@ -274,7 +273,7 @@ cogl_path_close (CoglPath *path);
*
* Since: 2.0
*/
COGL_EXPORT void
void
cogl_path_line (CoglPath *path,
float x_1,
float y_1,
@@ -302,7 +301,7 @@ cogl_path_line (CoglPath *path,
*
* Since: 2.0
*/
COGL_EXPORT void
void
cogl_path_polyline (CoglPath *path,
const float *coords,
int num_points);
@@ -324,7 +323,7 @@ cogl_path_polyline (CoglPath *path,
*
* Since: 2.0
*/
COGL_EXPORT void
void
cogl_path_polygon (CoglPath *path,
const float *coords,
int num_points);
@@ -342,7 +341,7 @@ cogl_path_polygon (CoglPath *path,
*
* Since: 2.0
*/
COGL_EXPORT void
void
cogl_path_rectangle (CoglPath *path,
float x_1,
float y_1,
@@ -362,7 +361,7 @@ cogl_path_rectangle (CoglPath *path,
*
* Since: 2.0
*/
COGL_EXPORT void
void
cogl_path_ellipse (CoglPath *path,
float center_x,
float center_y,
@@ -385,7 +384,7 @@ cogl_path_ellipse (CoglPath *path,
*
* Since: 2.0
*/
COGL_EXPORT void
void
cogl_path_round_rectangle (CoglPath *path,
float x_1,
float y_1,
@@ -407,7 +406,7 @@ cogl_path_round_rectangle (CoglPath *path,
*
* Since: 2.0
*/
COGL_EXPORT void
void
cogl_path_set_fill_rule (CoglPath *path, CoglPathFillRule fill_rule);
#define cogl_path_get_fill_rule cogl2_path_get_fill_rule
@@ -420,7 +419,7 @@ cogl_path_set_fill_rule (CoglPath *path, CoglPathFillRule fill_rule);
*
* Since: 2.0
*/
COGL_EXPORT CoglPathFillRule
CoglPathFillRule
cogl_path_get_fill_rule (CoglPath *path);
/**
@@ -442,7 +441,7 @@ cogl_path_get_fill_rule (CoglPath *path);
*
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_framebuffer_fill_path (CoglFramebuffer *framebuffer,
CoglPipeline *pipeline,
CoglPath *path);
@@ -459,7 +458,7 @@ cogl_framebuffer_fill_path (CoglFramebuffer *framebuffer,
*
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_framebuffer_stroke_path (CoglFramebuffer *framebuffer,
CoglPipeline *pipeline,
CoglPath *path);
@@ -477,7 +476,7 @@ cogl_framebuffer_stroke_path (CoglFramebuffer *framebuffer,
* Since: 1.0
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_framebuffer_push_path_clip (CoglFramebuffer *framebuffer,
CoglPath *path);

View File

@@ -0,0 +1,17 @@
{
global:
cogl_framebuffer_*;
cogl_path_*;
cogl_is_*;
cogl_clip_*;
cogl_get_*;
cogl_set_*;
cogl2_framebuffer_*;
cogl2_path_*;
cogl2_is_*;
cogl2_clip_*;
cogl2_get_*;
cogl2_set_*;
local:
*;
};

View File

@@ -53,13 +53,19 @@ cogl_path_c_args = [
cogl_c_args,
]
libmutter_cogl_path_map = 'libmutter-cogl-path.map'
libmutter_cogl_path_link_args = [
'-Wl,--version-script,@0@/@1@'.format(meson.current_source_dir(),
libmutter_cogl_path_map),
]
libmutter_cogl_path = shared_library('mutter-cogl-path-' + libmutter_api_version,
sources: [cogl_path_sources, cogl_path_public_headers],
version: '0.0.0',
soversion: 0,
c_args: cogl_path_c_args,
include_directories: [cogl_includepath, cogl_path_includepath],
gnu_symbol_visibility: 'hidden',
link_depends: libmutter_cogl_path_map,
link_args: libmutter_cogl_path_link_args,
dependencies: libmutter_cogl_dep,
install_rpath: pkglibdir,
install_dir: pkglibdir,

View File

@@ -65,12 +65,12 @@ CoglAtlasTexture *
_cogl_atlas_texture_new_from_bitmap (CoglBitmap *bmp,
gboolean can_convert_in_place);
COGL_EXPORT void
void
_cogl_atlas_texture_add_reorganize_callback (CoglContext *ctx,
GHookFunc callback,
void *user_data);
COGL_EXPORT void
void
_cogl_atlas_texture_remove_reorganize_callback (CoglContext *ctx,
GHookFunc callback,
void *user_data);

View File

@@ -74,7 +74,6 @@ typedef struct _CoglAtlasTexture CoglAtlasTexture;
*
* Returns: a #GType that can be used with the GLib type system.
*/
COGL_EXPORT
GType cogl_atlas_texture_get_gtype (void);
/**
@@ -109,7 +108,7 @@ GType cogl_atlas_texture_get_gtype (void);
* Since: 1.16
* Stability: unstable
*/
COGL_EXPORT CoglAtlasTexture *
CoglAtlasTexture *
cogl_atlas_texture_new_with_size (CoglContext *ctx,
int width,
int height);
@@ -147,7 +146,7 @@ cogl_atlas_texture_new_with_size (CoglContext *ctx,
* Since: 1.16
* Stability: unstable
*/
COGL_EXPORT CoglAtlasTexture *
CoglAtlasTexture *
cogl_atlas_texture_new_from_file (CoglContext *ctx,
const char *filename,
GError **error);
@@ -192,7 +191,7 @@ cogl_atlas_texture_new_from_file (CoglContext *ctx,
* Since: 1.16
* Stability: unstable
*/
COGL_EXPORT CoglAtlasTexture *
CoglAtlasTexture *
cogl_atlas_texture_new_from_data (CoglContext *ctx,
int width,
int height,
@@ -232,7 +231,7 @@ cogl_atlas_texture_new_from_data (CoglContext *ctx,
* Since: 1.16
* Stability: unstable
*/
COGL_EXPORT CoglAtlasTexture *
CoglAtlasTexture *
cogl_atlas_texture_new_from_bitmap (CoglBitmap *bmp);
/**
@@ -247,7 +246,7 @@ cogl_atlas_texture_new_from_bitmap (CoglBitmap *bmp);
* Since: 1.16
* Stability: Unstable
*/
COGL_EXPORT gboolean
gboolean
cogl_is_atlas_texture (void *object);
G_END_DECLS

View File

@@ -64,12 +64,12 @@ struct _CoglAtlas
GHookList post_reorganize_callbacks;
};
COGL_EXPORT CoglAtlas *
CoglAtlas *
_cogl_atlas_new (CoglPixelFormat texture_format,
CoglAtlasFlags flags,
CoglAtlasUpdatePositionCallback update_position_cb);
COGL_EXPORT gboolean
gboolean
_cogl_atlas_reserve_space (CoglAtlas *atlas,
unsigned int width,
unsigned int height,
@@ -87,7 +87,7 @@ _cogl_atlas_copy_rectangle (CoglAtlas *atlas,
int height,
CoglPixelFormat format);
COGL_EXPORT void
void
_cogl_atlas_add_reorganize_callback (CoglAtlas *atlas,
GHookFunc pre_callback,
GHookFunc post_callback,

View File

@@ -64,7 +64,6 @@ G_BEGIN_DECLS
*
* Returns: a #GType that can be used with the GLib type system.
*/
COGL_EXPORT
GType cogl_attribute_buffer_get_gtype (void);
/**
@@ -90,7 +89,7 @@ GType cogl_attribute_buffer_get_gtype (void);
*
* Stability: Unstable
*/
COGL_EXPORT CoglAttributeBuffer *
CoglAttributeBuffer *
cogl_attribute_buffer_new_with_size (CoglContext *context,
size_t bytes);
@@ -123,7 +122,7 @@ cogl_attribute_buffer_new_with_size (CoglContext *context,
* Since: 1.4
* Stability: Unstable
*/
COGL_EXPORT CoglAttributeBuffer *
CoglAttributeBuffer *
cogl_attribute_buffer_new (CoglContext *context,
size_t bytes,
const void *data);
@@ -140,7 +139,7 @@ cogl_attribute_buffer_new (CoglContext *context,
* Since: 1.4
* Stability: Unstable
*/
COGL_EXPORT gboolean
gboolean
cogl_is_attribute_buffer (void *object);
G_END_DECLS

View File

@@ -63,7 +63,6 @@ G_BEGIN_DECLS
*
* Returns: a #GType that can be used with the GLib type system.
*/
COGL_EXPORT
GType cogl_attribute_get_gtype (void);
/**
@@ -156,7 +155,7 @@ GType cogl_attribute_get_gtype (void);
*/
/* XXX: look for a precedent to see if the stride/offset args should
* have a different order. */
COGL_EXPORT CoglAttribute *
CoglAttribute *
cogl_attribute_new (CoglAttributeBuffer *attribute_buffer,
const char *name,
size_t stride,
@@ -184,7 +183,7 @@ cogl_attribute_new (CoglAttributeBuffer *attribute_buffer,
* Return value: (transfer full): A newly allocated #CoglAttribute
* representing the given constant @value.
*/
COGL_EXPORT CoglAttribute *
CoglAttribute *
cogl_attribute_new_const_1f (CoglContext *context,
const char *name,
float value);
@@ -211,7 +210,7 @@ cogl_attribute_new_const_1f (CoglContext *context,
* Return value: (transfer full): A newly allocated #CoglAttribute
* representing the given constant vector.
*/
COGL_EXPORT CoglAttribute *
CoglAttribute *
cogl_attribute_new_const_2f (CoglContext *context,
const char *name,
float component0,
@@ -243,7 +242,7 @@ cogl_attribute_new_const_2f (CoglContext *context,
* Return value: (transfer full): A newly allocated #CoglAttribute
* representing the given constant vector.
*/
COGL_EXPORT CoglAttribute *
CoglAttribute *
cogl_attribute_new_const_3f (CoglContext *context,
const char *name,
float component0,
@@ -278,7 +277,7 @@ cogl_attribute_new_const_3f (CoglContext *context,
* Return value: (transfer full): A newly allocated #CoglAttribute
* representing the given constant vector.
*/
COGL_EXPORT CoglAttribute *
CoglAttribute *
cogl_attribute_new_const_4f (CoglContext *context,
const char *name,
float component0,
@@ -307,7 +306,7 @@ cogl_attribute_new_const_4f (CoglContext *context,
* Return value: (transfer full): A newly allocated #CoglAttribute
* representing the given constant vector.
*/
COGL_EXPORT CoglAttribute *
CoglAttribute *
cogl_attribute_new_const_2fv (CoglContext *context,
const char *name,
const float *value);
@@ -336,7 +335,7 @@ cogl_attribute_new_const_2fv (CoglContext *context,
* Return value: (transfer full): A newly allocated #CoglAttribute
* representing the given constant vector.
*/
COGL_EXPORT CoglAttribute *
CoglAttribute *
cogl_attribute_new_const_3fv (CoglContext *context,
const char *name,
const float *value);
@@ -366,7 +365,7 @@ cogl_attribute_new_const_3fv (CoglContext *context,
* Return value: (transfer full): A newly allocated #CoglAttribute
* representing the given constant vector.
*/
COGL_EXPORT CoglAttribute *
CoglAttribute *
cogl_attribute_new_const_4fv (CoglContext *context,
const char *name,
const float *value);
@@ -399,7 +398,7 @@ cogl_attribute_new_const_4fv (CoglContext *context,
* Return value: (transfer full): A newly allocated #CoglAttribute
* representing the given constant matrix.
*/
COGL_EXPORT CoglAttribute *
CoglAttribute *
cogl_attribute_new_const_2x2fv (CoglContext *context,
const char *name,
const float *matrix2x2,
@@ -434,7 +433,7 @@ cogl_attribute_new_const_2x2fv (CoglContext *context,
* Return value: (transfer full): A newly allocated #CoglAttribute
* representing the given constant matrix.
*/
COGL_EXPORT CoglAttribute *
CoglAttribute *
cogl_attribute_new_const_3x3fv (CoglContext *context,
const char *name,
const float *matrix3x3,
@@ -469,7 +468,7 @@ cogl_attribute_new_const_3x3fv (CoglContext *context,
* Return value: (transfer full): A newly allocated #CoglAttribute
* representing the given constant matrix.
*/
COGL_EXPORT CoglAttribute *
CoglAttribute *
cogl_attribute_new_const_4x4fv (CoglContext *context,
const char *name,
const float *matrix4x4,
@@ -493,7 +492,7 @@ cogl_attribute_new_const_4x4fv (CoglContext *context,
* Stability: unstable
* Since: 1.10
*/
COGL_EXPORT void
void
cogl_attribute_set_normalized (CoglAttribute *attribute,
gboolean normalized);
@@ -507,7 +506,7 @@ cogl_attribute_set_normalized (CoglAttribute *attribute,
* Stability: unstable
* Since: 1.10
*/
COGL_EXPORT gboolean
gboolean
cogl_attribute_get_normalized (CoglAttribute *attribute);
/**
@@ -520,7 +519,7 @@ cogl_attribute_get_normalized (CoglAttribute *attribute);
* Stability: unstable
* Since: 1.10
*/
COGL_EXPORT CoglAttributeBuffer *
CoglAttributeBuffer *
cogl_attribute_get_buffer (CoglAttribute *attribute);
/**
@@ -533,7 +532,7 @@ cogl_attribute_get_buffer (CoglAttribute *attribute);
* Stability: unstable
* Since: 1.10
*/
COGL_EXPORT void
void
cogl_attribute_set_buffer (CoglAttribute *attribute,
CoglAttributeBuffer *attribute_buffer);
@@ -546,7 +545,7 @@ cogl_attribute_set_buffer (CoglAttribute *attribute,
* Return value: %TRUE if the @object references a #CoglAttribute,
* %FALSE otherwise
*/
COGL_EXPORT gboolean
gboolean
cogl_is_attribute (void *object);
G_END_DECLS

View File

@@ -54,7 +54,6 @@ G_BEGIN_DECLS
*
* Returns: a #GType that can be used with the GLib type system.
*/
COGL_EXPORT
GType cogl_bitmap_get_gtype (void);
/**
@@ -81,7 +80,7 @@ GType cogl_bitmap_get_gtype (void);
*
* Since: 1.0
*/
COGL_EXPORT CoglBitmap *
CoglBitmap *
cogl_bitmap_new_from_file (const char *filename,
GError **error);
@@ -104,7 +103,7 @@ cogl_bitmap_new_from_file (const char *filename,
* Since: 1.8
* Stability: unstable
*/
COGL_EXPORT CoglBitmap *
CoglBitmap *
cogl_bitmap_new_from_buffer (CoglBuffer *buffer,
CoglPixelFormat format,
int width,
@@ -141,7 +140,7 @@ cogl_bitmap_new_from_buffer (CoglBuffer *buffer,
* Since: 1.10
* Stability: Unstable
*/
COGL_EXPORT CoglBitmap *
CoglBitmap *
cogl_bitmap_new_with_size (CoglContext *context,
unsigned int width,
unsigned int height,
@@ -167,7 +166,7 @@ cogl_bitmap_new_with_size (CoglContext *context,
* Since: 1.10
* Stability: unstable
*/
COGL_EXPORT CoglBitmap *
CoglBitmap *
cogl_bitmap_new_for_data (CoglContext *context,
int width,
int height,
@@ -183,7 +182,7 @@ cogl_bitmap_new_for_data (CoglContext *context,
* Since: 1.10
* Stability: unstable
*/
COGL_EXPORT CoglPixelFormat
CoglPixelFormat
cogl_bitmap_get_format (CoglBitmap *bitmap);
/**
@@ -194,7 +193,7 @@ cogl_bitmap_get_format (CoglBitmap *bitmap);
* Since: 1.10
* Stability: unstable
*/
COGL_EXPORT int
int
cogl_bitmap_get_width (CoglBitmap *bitmap);
/**
@@ -205,7 +204,7 @@ cogl_bitmap_get_width (CoglBitmap *bitmap);
* Since: 1.10
* Stability: unstable
*/
COGL_EXPORT int
int
cogl_bitmap_get_height (CoglBitmap *bitmap);
/**
@@ -218,7 +217,7 @@ cogl_bitmap_get_height (CoglBitmap *bitmap);
* Since: 1.10
* Stability: unstable
*/
COGL_EXPORT int
int
cogl_bitmap_get_rowstride (CoglBitmap *bitmap);
/**
@@ -232,7 +231,7 @@ cogl_bitmap_get_rowstride (CoglBitmap *bitmap);
* Stability: unstable
* Since: 1.10
*/
COGL_EXPORT CoglPixelBuffer *
CoglPixelBuffer *
cogl_bitmap_get_buffer (CoglBitmap *bitmap);
/**
@@ -248,7 +247,7 @@ cogl_bitmap_get_buffer (CoglBitmap *bitmap);
*
* Since: 1.0
*/
COGL_EXPORT gboolean
gboolean
cogl_bitmap_get_size_from_file (const char *filename,
int *width,
int *height);
@@ -264,7 +263,7 @@ cogl_bitmap_get_size_from_file (const char *filename,
*
* Since: 1.0
*/
COGL_EXPORT gboolean
gboolean
cogl_is_bitmap (void *object);
/**
@@ -298,7 +297,6 @@ typedef enum
COGL_BITMAP_ERROR_CORRUPT_IMAGE
} CoglBitmapError;
COGL_EXPORT
uint32_t cogl_bitmap_error_quark (void);
G_END_DECLS

View File

@@ -168,10 +168,10 @@ void *
_cogl_buffer_map_range_for_fill_or_fallback (CoglBuffer *buffer,
size_t offset,
size_t size);
COGL_EXPORT void *
void *
_cogl_buffer_map_for_fill_or_fallback (CoglBuffer *buffer);
COGL_EXPORT void
void
_cogl_buffer_unmap_for_fill_or_fallback (CoglBuffer *buffer);
G_END_DECLS

View File

@@ -107,7 +107,7 @@ _cogl_buffer_error_domain (void);
* Since: 1.2
* Stability: unstable
*/
COGL_EXPORT gboolean
gboolean
cogl_is_buffer (void *object);
/**
@@ -121,7 +121,7 @@ cogl_is_buffer (void *object);
* Since: 1.2
* Stability: unstable
*/
COGL_EXPORT unsigned int
unsigned int
cogl_buffer_get_size (CoglBuffer *buffer);
/**
@@ -155,7 +155,7 @@ typedef enum /*< prefix=COGL_BUFFER_UPDATE_HINT >*/
* Since: 1.2
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_buffer_set_update_hint (CoglBuffer *buffer,
CoglBufferUpdateHint hint);
@@ -170,7 +170,7 @@ cogl_buffer_set_update_hint (CoglBuffer *buffer,
* Since: 1.2
* Stability: unstable
*/
COGL_EXPORT CoglBufferUpdateHint
CoglBufferUpdateHint
cogl_buffer_get_update_hint (CoglBuffer *buffer);
/**
@@ -244,7 +244,7 @@ typedef enum /*< prefix=COGL_BUFFER_MAP_HINT >*/
* Since: 1.2
* Stability: unstable
*/
COGL_EXPORT void *
void *
cogl_buffer_map (CoglBuffer *buffer,
CoglBufferAccess access,
CoglBufferMapHint hints);
@@ -281,7 +281,7 @@ cogl_buffer_map (CoglBuffer *buffer,
* Since: 2.0
* Stability: unstable
*/
COGL_EXPORT void *
void *
cogl_buffer_map_range (CoglBuffer *buffer,
size_t offset,
size_t size,
@@ -298,7 +298,7 @@ cogl_buffer_map_range (CoglBuffer *buffer,
* Since: 1.2
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_buffer_unmap (CoglBuffer *buffer);
/**
@@ -317,7 +317,7 @@ cogl_buffer_unmap (CoglBuffer *buffer);
* Since: 1.2
* Stability: unstable
*/
COGL_EXPORT gboolean
gboolean
cogl_buffer_set_data (CoglBuffer *buffer,
size_t offset,
const void *data,

View File

@@ -178,7 +178,7 @@ _cogl_clip_stack_push_window_rectangle (CoglClipStack *stack,
int width,
int height);
COGL_EXPORT CoglClipStack *
CoglClipStack *
_cogl_clip_stack_push_rectangle (CoglClipStack *stack,
float x_1,
float y_1,
@@ -188,7 +188,7 @@ _cogl_clip_stack_push_rectangle (CoglClipStack *stack,
CoglMatrixEntry *projection_entry,
const float *viewport);
COGL_EXPORT CoglClipStack *
CoglClipStack *
_cogl_clip_stack_push_primitive (CoglClipStack *stack,
CoglPrimitive *primitive,
float bounds_x1,

View File

@@ -65,7 +65,7 @@ typedef struct _CoglClosure
* Removes the given closure from the callback list it is connected to
* and destroys it. If the closure was created with a destroy function
* then it will be invoked. */
COGL_EXPORT void
void
_cogl_closure_disconnect (CoglClosure *closure);
void

View File

@@ -57,7 +57,6 @@ G_BEGIN_DECLS
*
* Returns: a #GType that can be used with the GLib type system.
*/
COGL_EXPORT
GType cogl_color_get_gtype (void);
/**
@@ -70,7 +69,7 @@ GType cogl_color_get_gtype (void);
*
* Since: 1.0
*/
COGL_EXPORT CoglColor *
CoglColor *
cogl_color_new (void);
/**
@@ -84,7 +83,7 @@ cogl_color_new (void);
*
* Since: 1.0
*/
COGL_EXPORT CoglColor *
CoglColor *
cogl_color_copy (const CoglColor *color);
/**
@@ -95,7 +94,7 @@ cogl_color_copy (const CoglColor *color);
*
* Since: 1.0
*/
COGL_EXPORT void
void
cogl_color_free (CoglColor *color);
/**
@@ -110,7 +109,7 @@ cogl_color_free (CoglColor *color);
*
* Since: 1.4
*/
COGL_EXPORT void
void
cogl_color_init_from_4ub (CoglColor *color,
uint8_t red,
uint8_t green,
@@ -129,7 +128,7 @@ cogl_color_init_from_4ub (CoglColor *color,
*
* Since: 1.4
*/
COGL_EXPORT void
void
cogl_color_init_from_4f (CoglColor *color,
float red,
float green,
@@ -145,7 +144,7 @@ cogl_color_init_from_4f (CoglColor *color,
*
* Since: 1.4
*/
COGL_EXPORT void
void
cogl_color_init_from_4fv (CoglColor *color,
const float *color_array);
@@ -160,7 +159,7 @@ cogl_color_init_from_4fv (CoglColor *color,
*
* Since: 1.0
*/
COGL_EXPORT unsigned char
unsigned char
cogl_color_get_red_byte (const CoglColor *color);
/**
@@ -174,7 +173,7 @@ cogl_color_get_red_byte (const CoglColor *color);
*
* Since: 1.0
*/
COGL_EXPORT unsigned char
unsigned char
cogl_color_get_green_byte (const CoglColor *color);
/**
@@ -188,7 +187,7 @@ cogl_color_get_green_byte (const CoglColor *color);
*
* Since: 1.0
*/
COGL_EXPORT unsigned char
unsigned char
cogl_color_get_blue_byte (const CoglColor *color);
/**
@@ -202,7 +201,7 @@ cogl_color_get_blue_byte (const CoglColor *color);
*
* Since: 1.0
*/
COGL_EXPORT unsigned char
unsigned char
cogl_color_get_alpha_byte (const CoglColor *color);
/**
@@ -216,7 +215,7 @@ cogl_color_get_alpha_byte (const CoglColor *color);
*
* Since: 1.0
*/
COGL_EXPORT float
float
cogl_color_get_red_float (const CoglColor *color);
/**
@@ -230,7 +229,7 @@ cogl_color_get_red_float (const CoglColor *color);
*
* Since: 1.0
*/
COGL_EXPORT float
float
cogl_color_get_green_float (const CoglColor *color);
/**
@@ -244,7 +243,7 @@ cogl_color_get_green_float (const CoglColor *color);
*
* Since: 1.0
*/
COGL_EXPORT float
float
cogl_color_get_blue_float (const CoglColor *color);
/**
@@ -258,7 +257,7 @@ cogl_color_get_blue_float (const CoglColor *color);
*
* Since: 1.0
*/
COGL_EXPORT float
float
cogl_color_get_alpha_float (const CoglColor *color);
/**
@@ -272,7 +271,7 @@ cogl_color_get_alpha_float (const CoglColor *color);
*
* Since: 1.0
*/
COGL_EXPORT float
float
cogl_color_get_red (const CoglColor *color);
/**
@@ -286,7 +285,7 @@ cogl_color_get_red (const CoglColor *color);
*
* Since: 1.0
*/
COGL_EXPORT float
float
cogl_color_get_green (const CoglColor *color);
/**
@@ -300,7 +299,7 @@ cogl_color_get_green (const CoglColor *color);
*
* Since: 1.0
*/
COGL_EXPORT float
float
cogl_color_get_blue (const CoglColor *color);
/**
@@ -314,7 +313,7 @@ cogl_color_get_blue (const CoglColor *color);
*
* Since: 1.0
*/
COGL_EXPORT float
float
cogl_color_get_alpha (const CoglColor *color);
/**
@@ -326,7 +325,7 @@ cogl_color_get_alpha (const CoglColor *color);
*
* Since: 1.4
*/
COGL_EXPORT void
void
cogl_color_set_red_byte (CoglColor *color,
unsigned char red);
@@ -339,7 +338,7 @@ cogl_color_set_red_byte (CoglColor *color,
*
* Since: 1.4
*/
COGL_EXPORT void
void
cogl_color_set_green_byte (CoglColor *color,
unsigned char green);
@@ -352,7 +351,7 @@ cogl_color_set_green_byte (CoglColor *color,
*
* Since: 1.4
*/
COGL_EXPORT void
void
cogl_color_set_blue_byte (CoglColor *color,
unsigned char blue);
@@ -365,7 +364,7 @@ cogl_color_set_blue_byte (CoglColor *color,
*
* Since: 1.4
*/
COGL_EXPORT void
void
cogl_color_set_alpha_byte (CoglColor *color,
unsigned char alpha);
@@ -378,7 +377,7 @@ cogl_color_set_alpha_byte (CoglColor *color,
*
* since: 1.4
*/
COGL_EXPORT void
void
cogl_color_set_red_float (CoglColor *color,
float red);
@@ -391,7 +390,7 @@ cogl_color_set_red_float (CoglColor *color,
*
* since: 1.4
*/
COGL_EXPORT void
void
cogl_color_set_green_float (CoglColor *color,
float green);
@@ -404,7 +403,7 @@ cogl_color_set_green_float (CoglColor *color,
*
* since: 1.4
*/
COGL_EXPORT void
void
cogl_color_set_blue_float (CoglColor *color,
float blue);
@@ -417,7 +416,7 @@ cogl_color_set_blue_float (CoglColor *color,
*
* since: 1.4
*/
COGL_EXPORT void
void
cogl_color_set_alpha_float (CoglColor *color,
float alpha);
@@ -430,7 +429,7 @@ cogl_color_set_alpha_float (CoglColor *color,
*
* Since: 1.4
*/
COGL_EXPORT void
void
cogl_color_set_red (CoglColor *color,
float red);
@@ -443,7 +442,7 @@ cogl_color_set_red (CoglColor *color,
*
* Since: 1.4
*/
COGL_EXPORT void
void
cogl_color_set_green (CoglColor *color,
float green);
@@ -456,7 +455,7 @@ cogl_color_set_green (CoglColor *color,
*
* Since: 1.4
*/
COGL_EXPORT void
void
cogl_color_set_blue (CoglColor *color,
float blue);
@@ -469,7 +468,7 @@ cogl_color_set_blue (CoglColor *color,
*
* Since: 1.4
*/
COGL_EXPORT void
void
cogl_color_set_alpha (CoglColor *color,
float alpha);
@@ -483,7 +482,7 @@ cogl_color_set_alpha (CoglColor *color,
*
* Since: 1.0
*/
COGL_EXPORT void
void
cogl_color_premultiply (CoglColor *color);
/**
@@ -496,7 +495,7 @@ cogl_color_premultiply (CoglColor *color);
*
* Since: 1.4
*/
COGL_EXPORT void
void
cogl_color_unpremultiply (CoglColor *color);
/**
@@ -513,7 +512,7 @@ cogl_color_unpremultiply (CoglColor *color);
*
* Since: 1.0
*/
COGL_EXPORT gboolean
gboolean
cogl_color_equal (const void *v1, const void *v2);
/**
@@ -530,7 +529,7 @@ cogl_color_equal (const void *v1, const void *v2);
*
* Since: 1.16
*/
COGL_EXPORT void
void
cogl_color_to_hsl (const CoglColor *color,
float *hue,
float *saturation,
@@ -548,7 +547,7 @@ cogl_color_to_hsl (const CoglColor *color,
*
* Since: 1.16
*/
COGL_EXPORT void
void
cogl_color_init_from_hsl (CoglColor *color,
float hue,
float saturation,

View File

@@ -300,7 +300,7 @@ struct _CoglContext
#undef COGL_EXT_END
};
COGL_EXPORT CoglContext *
CoglContext *
_cogl_context_get_default (void);
const CoglWinsysVtable *

View File

@@ -211,7 +211,7 @@ cogl_context_new (CoglDisplay *display,
return NULL;
}
if (!context->driver_vtable->context_init (context))
if (!context->driver_vtable->context_init (context, error))
{
cogl_object_unref (display);
g_free (context);

View File

@@ -99,7 +99,6 @@ G_BEGIN_DECLS
*
* Returns: a #GType that can be used with the GLib type system.
*/
COGL_EXPORT
GType cogl_context_get_gtype (void);
/**
@@ -114,7 +113,7 @@ GType cogl_context_get_gtype (void);
* Since: 1.8
* Stability: unstable
*/
COGL_EXPORT CoglContext *
CoglContext *
cogl_context_new (CoglDisplay *display,
GError **error);
@@ -133,7 +132,7 @@ cogl_context_new (CoglDisplay *display,
* Since: 1.8
* Stability: unstable
*/
COGL_EXPORT CoglDisplay *
CoglDisplay *
cogl_context_get_display (CoglContext *context);
/**
@@ -152,7 +151,7 @@ cogl_context_get_display (CoglContext *context);
* Since: 1.16
* Stability: unstable
*/
COGL_EXPORT CoglRenderer *
CoglRenderer *
cogl_context_get_renderer (CoglContext *context);
/**
@@ -167,7 +166,7 @@ cogl_context_get_renderer (CoglContext *context);
* Since: 1.10
* Stability: Unstable
*/
COGL_EXPORT gboolean
gboolean
cogl_is_context (void *object);
/* XXX: not guarded by the EXPERIMENTAL_API defines to avoid
@@ -235,7 +234,7 @@ typedef enum _CoglFeatureID
* Since: 1.10
* Stability: unstable
*/
COGL_EXPORT gboolean
gboolean
cogl_has_feature (CoglContext *context, CoglFeatureID feature);
/**
@@ -255,7 +254,7 @@ cogl_has_feature (CoglContext *context, CoglFeatureID feature);
* Since: 1.10
* Stability: unstable
*/
COGL_EXPORT gboolean
gboolean
cogl_has_features (CoglContext *context, ...);
/**
@@ -284,7 +283,7 @@ typedef void (*CoglFeatureCallback) (CoglFeatureID feature, void *user_data);
* Since: 1.10
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_foreach_feature (CoglContext *context,
CoglFeatureCallback callback,
void *user_data);
@@ -309,7 +308,7 @@ cogl_foreach_feature (CoglContext *context,
* Since: 1.14
* Stability: unstable
*/
COGL_EXPORT int64_t
int64_t
cogl_get_clock_time (CoglContext *context);
/**
@@ -351,7 +350,7 @@ typedef enum _CoglGraphicsResetStatus
*
* Return value: a #CoglGraphicsResetStatus
*/
COGL_EXPORT CoglGraphicsResetStatus
CoglGraphicsResetStatus
cogl_get_graphics_reset_status (CoglContext *context);
G_END_DECLS

View File

@@ -75,12 +75,10 @@ typedef enum
COGL_DEBUG_N_FLAGS
} CoglDebugFlags;
COGL_EXPORT
GHashTable *_cogl_debug_instances;
extern GHashTable *_cogl_debug_instances;
#define COGL_DEBUG_N_LONGS COGL_FLAGS_N_LONGS_FOR_SIZE (COGL_DEBUG_N_FLAGS)
COGL_EXPORT
unsigned long _cogl_debug_flags[COGL_DEBUG_N_LONGS];
extern unsigned long _cogl_debug_flags[COGL_DEBUG_N_LONGS];
#define COGL_DEBUG_ENABLED(flag) \
COGL_FLAGS_GET (_cogl_debug_flags, flag)

View File

@@ -46,5 +46,3 @@
#mesondefine COGL_HAS_X11_SUPPORT
#mesondefine COGL_HAS_XLIB
#mesondefine COGL_HAS_XLIB_SUPPORT
#mesondefine COGL_HAS_TRACING

View File

@@ -84,7 +84,7 @@ typedef struct {
* Since: 2.0
* Stability: Unstable
*/
COGL_EXPORT void
void
cogl_depth_state_init (CoglDepthState *state);
/**
@@ -112,7 +112,7 @@ cogl_depth_state_init (CoglDepthState *state);
* Since: 2.0
* Stability: Unstable
*/
COGL_EXPORT void
void
cogl_depth_state_set_test_enabled (CoglDepthState *state,
gboolean enable);
@@ -127,7 +127,7 @@ cogl_depth_state_set_test_enabled (CoglDepthState *state,
* Since: 2.0
* Stability: Unstable
*/
COGL_EXPORT gboolean
gboolean
cogl_depth_state_get_test_enabled (CoglDepthState *state);
/**
@@ -150,7 +150,7 @@ cogl_depth_state_get_test_enabled (CoglDepthState *state);
* Since: 2.0
* Stability: Unstable
*/
COGL_EXPORT void
void
cogl_depth_state_set_write_enabled (CoglDepthState *state,
gboolean enable);
@@ -165,7 +165,7 @@ cogl_depth_state_set_write_enabled (CoglDepthState *state,
* Since: 2.0
* Stability: Unstable
*/
COGL_EXPORT gboolean
gboolean
cogl_depth_state_get_write_enabled (CoglDepthState *state);
/**
@@ -186,7 +186,7 @@ cogl_depth_state_get_write_enabled (CoglDepthState *state);
* Since: 2.0
* Stability: Unstable
*/
COGL_EXPORT void
void
cogl_depth_state_set_test_function (CoglDepthState *state,
CoglDepthTestFunction function);
@@ -201,7 +201,7 @@ cogl_depth_state_set_test_function (CoglDepthState *state,
* Since: 2.0
* Stability: Unstable
*/
COGL_EXPORT CoglDepthTestFunction
CoglDepthTestFunction
cogl_depth_state_get_test_function (CoglDepthState *state);
/**
@@ -235,7 +235,7 @@ cogl_depth_state_get_test_function (CoglDepthState *state);
* Since: 2.0
* Stability: Unstable
*/
COGL_EXPORT void
void
cogl_depth_state_set_range (CoglDepthState *state,
float near_val,
float far_val);
@@ -253,7 +253,7 @@ cogl_depth_state_set_range (CoglDepthState *state,
* Since: 2.0
* Stability: Unstable
*/
COGL_EXPORT void
void
cogl_depth_state_get_range (CoglDepthState *state,
float *near_val,
float *far_val);

View File

@@ -75,7 +75,6 @@ typedef struct _CoglDisplay CoglDisplay;
*
* Returns: a #GType that can be used with the GLib type system.
*/
COGL_EXPORT
GType cogl_display_get_gtype (void);
/**
@@ -118,7 +117,7 @@ GType cogl_display_get_gtype (void);
* Since: 1.10
* Stability: unstable
*/
COGL_EXPORT CoglDisplay *
CoglDisplay *
cogl_display_new (CoglRenderer *renderer,
CoglOnscreenTemplate *onscreen_template);
@@ -133,7 +132,7 @@ cogl_display_new (CoglRenderer *renderer,
* Since: 1.10
* Stability: unstable
*/
COGL_EXPORT CoglRenderer *
CoglRenderer *
cogl_display_get_renderer (CoglDisplay *display);
/**
@@ -152,7 +151,7 @@ cogl_display_get_renderer (CoglDisplay *display);
* Since: 1.16
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_display_set_onscreen_template (CoglDisplay *display,
CoglOnscreenTemplate *onscreen_template);
@@ -187,7 +186,7 @@ cogl_display_set_onscreen_template (CoglDisplay *display,
* Since: 1.10
* Stability: unstable
*/
COGL_EXPORT gboolean
gboolean
cogl_display_setup (CoglDisplay *display,
GError **error);
@@ -202,7 +201,7 @@ cogl_display_setup (CoglDisplay *display,
* Since: 1.10
* Stability: unstable
*/
COGL_EXPORT gboolean
gboolean
cogl_is_display (void *object);
G_END_DECLS

View File

@@ -1,94 +0,0 @@
/*
* Cogl
*
* A Low Level GPU Graphics and Utilities API
*
* Copyright (C) 2020 Endless, Inc.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use, copy,
* modify, merge, publish, distribute, sublicense, and/or sell copies
* of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* Authors:
* Georges Basile Stavracas Neto <georges.stavracas@gmail.com>
*/
#include "cogl-config.h"
#include "cogl-dma-buf-handle.h"
#include "cogl-object.h"
#include <unistd.h>
struct _CoglDmaBufHandle
{
CoglFramebuffer *framebuffer;
int dmabuf_fd;
gpointer user_data;
GDestroyNotify destroy_func;
};
CoglDmaBufHandle *
cogl_dma_buf_handle_new (CoglFramebuffer *framebuffer,
int dmabuf_fd,
gpointer user_data,
GDestroyNotify destroy_func)
{
CoglDmaBufHandle *dmabuf_handle;
g_assert (framebuffer);
g_assert (dmabuf_fd != -1);
dmabuf_handle = g_new0 (CoglDmaBufHandle, 1);
dmabuf_handle->framebuffer = cogl_object_ref (framebuffer);
dmabuf_handle->dmabuf_fd = dmabuf_fd;
dmabuf_handle->user_data = user_data;
dmabuf_handle->destroy_func = destroy_func;
return dmabuf_handle;
}
void
cogl_dma_buf_handle_free (CoglDmaBufHandle *dmabuf_handle)
{
g_return_if_fail (dmabuf_handle != NULL);
g_clear_pointer (&dmabuf_handle->framebuffer, cogl_object_unref);
if (dmabuf_handle->destroy_func)
g_clear_pointer (&dmabuf_handle->user_data, dmabuf_handle->destroy_func);
if (dmabuf_handle->dmabuf_fd != -1)
close (dmabuf_handle->dmabuf_fd);
g_free (dmabuf_handle);
}
CoglFramebuffer *
cogl_dma_buf_handle_get_framebuffer (CoglDmaBufHandle *dmabuf_handle)
{
return dmabuf_handle->framebuffer;
}
int
cogl_dma_buf_handle_get_fd (CoglDmaBufHandle *dmabuf_handle)
{
return dmabuf_handle->dmabuf_fd;
}

View File

@@ -1,83 +0,0 @@
/*
* Cogl
*
* A Low Level GPU Graphics and Utilities API
*
* Copyright (C) 2020 Endless, Inc.
*
* Permission is hereby granted, free of charge, to any person
* obtaining a copy of this software and associated documentation
* files (the "Software"), to deal in the Software without
* restriction, including without limitation the rights to use, copy,
* modify, merge, publish, distribute, sublicense, and/or sell copies
* of the Software, and to permit persons to whom the Software is
* furnished to do so, subject to the following conditions:
*
* The above copyright notice and this permission notice shall be
* included in all copies or substantial portions of the Software.
*
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
* MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS
* BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN
* ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN
* CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
* SOFTWARE.
*
* Authors:
* Georges Basile Stavracas Neto <georges.stavracas@gmail.com>
*/
#if !defined(__COGL_H_INSIDE__) && !defined(COGL_COMPILATION)
#error "Only <cogl/cogl.h> can be included directly."
#endif
#ifndef __COGL_DMA_BUF_HANDLE_H__
#define __COGL_DMA_BUF_HANDLE_H__
#include <cogl/cogl-types.h>
#include <cogl/cogl-framebuffer.h>
/**
* cogl_dma_buf_handle_new: (skip)
*/
COGL_EXPORT CoglDmaBufHandle *
cogl_dma_buf_handle_new (CoglFramebuffer *framebuffer,
int dmabuf_fd,
gpointer data,
GDestroyNotify destroy_func);
/**
* cogl_dma_buf_handle_free: (skip)
*
* Releases @dmabuf_handle; it is a programming error to release
* an already released handle.
*/
COGL_EXPORT void
cogl_dma_buf_handle_free (CoglDmaBufHandle *dmabuf_handle);
/**
* cogl_dma_buf_handle_get_framebuffer: (skip)
*
* Retrieves the #CoglFramebuffer, backed by an exported DMABuf buffer,
* of @dmabuf_handle.
*
* Returns: (transfer none): a #CoglFramebuffer
*/
COGL_EXPORT CoglFramebuffer *
cogl_dma_buf_handle_get_framebuffer (CoglDmaBufHandle *dmabuf_handle);
/**
* cogl_dma_buf_handle_get_fd: (skip)
*
* Retrieves the file descriptor of @dmabuf_handle.
*
* Returns: a valid file descriptor
*/
COGL_EXPORT int
cogl_dma_buf_handle_get_fd (CoglDmaBufHandle *dmabuf_handle);
#endif /* __COGL_DMA_BUF_HANDLE_H__ */

View File

@@ -41,7 +41,7 @@ typedef struct _CoglDriverVtable CoglDriverVtable;
struct _CoglDriverVtable
{
gboolean
(* context_init) (CoglContext *context);
(* context_init) (CoglContext *context, GError **error);
void
(* context_deinit) (CoglContext *context);
@@ -93,9 +93,6 @@ struct _CoglDriverVtable
void
(* framebuffer_finish) (CoglFramebuffer *framebuffer);
void
(* framebuffer_flush) (CoglFramebuffer *framebuffer);
void
(* framebuffer_discard_buffers) (CoglFramebuffer *framebuffer,
unsigned long buffers);

View File

@@ -76,7 +76,7 @@ G_BEGIN_DECLS
* Since: 1.8
* Stability: unstable
*/
COGL_EXPORT EGLDisplay
EGLDisplay
cogl_egl_context_get_egl_display (CoglContext *context);
G_END_DECLS

View File

@@ -97,7 +97,7 @@ typedef struct _CoglFenceClosure CoglFenceClosure;
* Since: 2.0
* Stability: Unstable
*/
COGL_EXPORT void *
void *
cogl_fence_closure_get_user_data (CoglFenceClosure *closure);
/**
@@ -118,7 +118,7 @@ cogl_fence_closure_get_user_data (CoglFenceClosure *closure);
* Since: 2.0
* Stability: Unstable
*/
COGL_EXPORT CoglFenceClosure *
CoglFenceClosure *
cogl_framebuffer_add_fence_callback (CoglFramebuffer *framebuffer,
CoglFenceCallback callback,
void *user_data);
@@ -136,7 +136,7 @@ cogl_framebuffer_add_fence_callback (CoglFramebuffer *framebuffer,
* Since: 2.0
* Stability: Unstable
*/
COGL_EXPORT void
void
cogl_framebuffer_cancel_fence_callback (CoglFramebuffer *framebuffer,
CoglFenceClosure *closure);

View File

@@ -53,7 +53,6 @@ typedef struct _CoglFrameInfo CoglFrameInfo;
*
* Returns: a #GType that can be used with the GLib type system.
*/
COGL_EXPORT
GType cogl_frame_info_get_gtype (void);
/**
@@ -67,7 +66,7 @@ GType cogl_frame_info_get_gtype (void);
* Since: 2.0
* Stability: unstable
*/
COGL_EXPORT gboolean
gboolean
cogl_is_frame_info (void *object);
/**
@@ -81,7 +80,6 @@ cogl_is_frame_info (void *object);
* Since: 1.14
* Stability: unstable
*/
COGL_EXPORT
int64_t cogl_frame_info_get_frame_counter (CoglFrameInfo *info);
/**
@@ -103,7 +101,6 @@ int64_t cogl_frame_info_get_frame_counter (CoglFrameInfo *info);
* Since: 1.14
* Stability: unstable
*/
COGL_EXPORT
int64_t cogl_frame_info_get_presentation_time (CoglFrameInfo *info);
/**
@@ -123,7 +120,6 @@ int64_t cogl_frame_info_get_presentation_time (CoglFrameInfo *info);
* Since: 1.14
* Stability: unstable
*/
COGL_EXPORT
float cogl_frame_info_get_refresh_rate (CoglFrameInfo *info);
/**
@@ -137,13 +133,12 @@ float cogl_frame_info_get_refresh_rate (CoglFrameInfo *info);
* Since: 1.14
* Stability: unstable
*/
COGL_EXPORT CoglOutput *
CoglOutput *
cogl_frame_info_get_output (CoglFrameInfo *info);
/**
* cogl_frame_info_get_global_frame_counter: (skip)
*/
COGL_EXPORT
int64_t cogl_frame_info_get_global_frame_counter (CoglFrameInfo *info);
G_END_DECLS

View File

@@ -268,10 +268,10 @@ _cogl_framebuffer_mark_clear_clip_dirty (CoglFramebuffer *framebuffer);
CoglClipStack *
_cogl_framebuffer_get_clip_stack (CoglFramebuffer *framebuffer);
COGL_EXPORT CoglMatrixStack *
CoglMatrixStack *
_cogl_framebuffer_get_modelview_stack (CoglFramebuffer *framebuffer);
COGL_EXPORT CoglMatrixStack *
CoglMatrixStack *
_cogl_framebuffer_get_projection_stack (CoglFramebuffer *framebuffer);
void
@@ -393,7 +393,7 @@ _cogl_framebuffer_read_pixels_into_bitmap (CoglFramebuffer *framebuffer,
* Since: 2.0
* Stability: unstable
*/
COGL_EXPORT int
int
_cogl_framebuffer_get_stencil_bits (CoglFramebuffer *framebuffer);
#endif /* __COGL_FRAMEBUFFER_PRIVATE_H */

View File

@@ -1396,17 +1396,6 @@ cogl_framebuffer_finish (CoglFramebuffer *framebuffer)
ctx->driver_vtable->framebuffer_finish (framebuffer);
}
void
cogl_framebuffer_flush (CoglFramebuffer *framebuffer)
{
CoglContext *ctx = framebuffer->context;
_cogl_framebuffer_flush_journal (framebuffer);
ctx->driver_vtable->framebuffer_flush (framebuffer);
}
void
cogl_framebuffer_push_matrix (CoglFramebuffer *framebuffer)
{

View File

@@ -103,7 +103,6 @@ G_BEGIN_DECLS
*
* Returns: a #GType that can be used with the GLib type system.
*/
COGL_EXPORT
GType cogl_framebuffer_get_gtype (void);
/**
@@ -126,7 +125,7 @@ GType cogl_framebuffer_get_gtype (void);
* Since: 1.8
* Stability: unstable
*/
COGL_EXPORT gboolean
gboolean
cogl_framebuffer_allocate (CoglFramebuffer *framebuffer,
GError **error);
@@ -140,7 +139,7 @@ cogl_framebuffer_allocate (CoglFramebuffer *framebuffer,
* Since: 1.8
* Stability: unstable
*/
COGL_EXPORT int
int
cogl_framebuffer_get_width (CoglFramebuffer *framebuffer);
/**
@@ -153,7 +152,7 @@ cogl_framebuffer_get_width (CoglFramebuffer *framebuffer);
* Since: 1.8
* Stability: unstable
*/
COGL_EXPORT int
int
cogl_framebuffer_get_height (CoglFramebuffer *framebuffer);
/**
@@ -185,7 +184,7 @@ cogl_framebuffer_get_height (CoglFramebuffer *framebuffer);
* Since: 1.8
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_framebuffer_set_viewport (CoglFramebuffer *framebuffer,
float x,
float y,
@@ -203,7 +202,7 @@ cogl_framebuffer_set_viewport (CoglFramebuffer *framebuffer,
* Since: 1.8
* Stability: unstable
*/
COGL_EXPORT float
float
cogl_framebuffer_get_viewport_x (CoglFramebuffer *framebuffer);
/**
@@ -217,7 +216,7 @@ cogl_framebuffer_get_viewport_x (CoglFramebuffer *framebuffer);
* Since: 1.8
* Stability: unstable
*/
COGL_EXPORT float
float
cogl_framebuffer_get_viewport_y (CoglFramebuffer *framebuffer);
/**
@@ -231,7 +230,7 @@ cogl_framebuffer_get_viewport_y (CoglFramebuffer *framebuffer);
* Since: 1.8
* Stability: unstable
*/
COGL_EXPORT float
float
cogl_framebuffer_get_viewport_width (CoglFramebuffer *framebuffer);
/**
@@ -245,7 +244,7 @@ cogl_framebuffer_get_viewport_width (CoglFramebuffer *framebuffer);
* Since: 1.8
* Stability: unstable
*/
COGL_EXPORT float
float
cogl_framebuffer_get_viewport_height (CoglFramebuffer *framebuffer);
/**
@@ -263,7 +262,7 @@ cogl_framebuffer_get_viewport_height (CoglFramebuffer *framebuffer);
* Since: 1.8
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_framebuffer_get_viewport4fv (CoglFramebuffer *framebuffer,
float *viewport);
@@ -276,7 +275,7 @@ cogl_framebuffer_get_viewport4fv (CoglFramebuffer *framebuffer,
*
* Since: 1.10
*/
COGL_EXPORT void
void
cogl_framebuffer_push_matrix (CoglFramebuffer *framebuffer);
/**
@@ -287,7 +286,7 @@ cogl_framebuffer_push_matrix (CoglFramebuffer *framebuffer);
*
* Since: 1.10
*/
COGL_EXPORT void
void
cogl_framebuffer_pop_matrix (CoglFramebuffer *framebuffer);
/**
@@ -299,7 +298,7 @@ cogl_framebuffer_pop_matrix (CoglFramebuffer *framebuffer);
* Since: 1.10
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_framebuffer_identity_matrix (CoglFramebuffer *framebuffer);
/**
@@ -315,7 +314,7 @@ cogl_framebuffer_identity_matrix (CoglFramebuffer *framebuffer);
* Since: 1.10
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_framebuffer_scale (CoglFramebuffer *framebuffer,
float x,
float y,
@@ -334,7 +333,7 @@ cogl_framebuffer_scale (CoglFramebuffer *framebuffer,
* Since: 1.10
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_framebuffer_translate (CoglFramebuffer *framebuffer,
float x,
float y,
@@ -357,7 +356,7 @@ cogl_framebuffer_translate (CoglFramebuffer *framebuffer,
* Since: 1.10
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_framebuffer_rotate (CoglFramebuffer *framebuffer,
float angle,
float x,
@@ -375,7 +374,7 @@ cogl_framebuffer_rotate (CoglFramebuffer *framebuffer,
* Since: 2.0
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_framebuffer_rotate_euler (CoglFramebuffer *framebuffer,
const graphene_euler_t *euler);
@@ -389,7 +388,7 @@ cogl_framebuffer_rotate_euler (CoglFramebuffer *framebuffer,
* Since: 1.10
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_framebuffer_transform (CoglFramebuffer *framebuffer,
const CoglMatrix *matrix);
@@ -403,7 +402,7 @@ cogl_framebuffer_transform (CoglFramebuffer *framebuffer,
* Since: 1.10
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_framebuffer_get_modelview_matrix (CoglFramebuffer *framebuffer,
CoglMatrix *matrix);
@@ -417,7 +416,7 @@ cogl_framebuffer_get_modelview_matrix (CoglFramebuffer *framebuffer,
* Since: 1.10
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_framebuffer_set_modelview_matrix (CoglFramebuffer *framebuffer,
const CoglMatrix *matrix);
@@ -441,7 +440,7 @@ cogl_framebuffer_set_modelview_matrix (CoglFramebuffer *framebuffer,
* Since: 1.10
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_framebuffer_perspective (CoglFramebuffer *framebuffer,
float fov_y,
float aspect,
@@ -469,7 +468,7 @@ cogl_framebuffer_perspective (CoglFramebuffer *framebuffer,
* Since: 1.10
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_framebuffer_frustum (CoglFramebuffer *framebuffer,
float left,
float right,
@@ -498,7 +497,7 @@ cogl_framebuffer_frustum (CoglFramebuffer *framebuffer,
* Since: 1.10
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_framebuffer_orthographic (CoglFramebuffer *framebuffer,
float x_1,
float y_1,
@@ -517,7 +516,7 @@ cogl_framebuffer_orthographic (CoglFramebuffer *framebuffer,
* Since: 1.10
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_framebuffer_get_projection_matrix (CoglFramebuffer *framebuffer,
CoglMatrix *matrix);
@@ -531,7 +530,7 @@ cogl_framebuffer_get_projection_matrix (CoglFramebuffer *framebuffer,
* Since: 1.10
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_framebuffer_set_projection_matrix (CoglFramebuffer *framebuffer,
const CoglMatrix *matrix);
@@ -555,7 +554,7 @@ cogl_framebuffer_set_projection_matrix (CoglFramebuffer *framebuffer,
* Since: 1.10
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_framebuffer_push_scissor_clip (CoglFramebuffer *framebuffer,
int x,
int y,
@@ -582,7 +581,7 @@ cogl_framebuffer_push_scissor_clip (CoglFramebuffer *framebuffer,
* Since: 1.10
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_framebuffer_push_rectangle_clip (CoglFramebuffer *framebuffer,
float x_1,
float y_1,
@@ -618,7 +617,7 @@ cogl_framebuffer_push_rectangle_clip (CoglFramebuffer *framebuffer,
* Since: 1.10
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_framebuffer_push_primitive_clip (CoglFramebuffer *framebuffer,
CoglPrimitive *primitive,
float bounds_x1,
@@ -626,7 +625,7 @@ cogl_framebuffer_push_primitive_clip (CoglFramebuffer *framebuffer,
float bounds_x2,
float bounds_y2);
COGL_EXPORT void
void
cogl_framebuffer_push_region_clip (CoglFramebuffer *framebuffer,
cairo_region_t *region);
@@ -641,7 +640,7 @@ cogl_framebuffer_push_region_clip (CoglFramebuffer *framebuffer,
* Since: 1.10
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_framebuffer_pop_clip (CoglFramebuffer *framebuffer);
/**
@@ -655,7 +654,7 @@ cogl_framebuffer_pop_clip (CoglFramebuffer *framebuffer);
* Since: 1.8
* Stability: unstable
*/
COGL_EXPORT int
int
cogl_framebuffer_get_red_bits (CoglFramebuffer *framebuffer);
/**
@@ -669,7 +668,7 @@ cogl_framebuffer_get_red_bits (CoglFramebuffer *framebuffer);
* Since: 1.8
* Stability: unstable
*/
COGL_EXPORT int
int
cogl_framebuffer_get_green_bits (CoglFramebuffer *framebuffer);
/**
@@ -683,7 +682,7 @@ cogl_framebuffer_get_green_bits (CoglFramebuffer *framebuffer);
* Since: 1.8
* Stability: unstable
*/
COGL_EXPORT int
int
cogl_framebuffer_get_blue_bits (CoglFramebuffer *framebuffer);
/**
@@ -697,7 +696,7 @@ cogl_framebuffer_get_blue_bits (CoglFramebuffer *framebuffer);
* Since: 1.8
* Stability: unstable
*/
COGL_EXPORT int
int
cogl_framebuffer_get_alpha_bits (CoglFramebuffer *framebuffer);
/**
@@ -711,7 +710,7 @@ cogl_framebuffer_get_alpha_bits (CoglFramebuffer *framebuffer);
* Since: 2.0
* Stability: unstable
*/
COGL_EXPORT int
int
cogl_framebuffer_get_depth_bits (CoglFramebuffer *framebuffer);
/*
@@ -728,7 +727,7 @@ cogl_framebuffer_get_depth_bits (CoglFramebuffer *framebuffer);
* Since: 1.20
* Stability: unstable
*/
COGL_EXPORT gboolean
gboolean
cogl_framebuffer_get_is_stereo (CoglFramebuffer *framebuffer);
/**
@@ -746,7 +745,7 @@ cogl_framebuffer_get_is_stereo (CoglFramebuffer *framebuffer);
* Since: 1.8
* Stability: unstable
*/
COGL_EXPORT gboolean
gboolean
cogl_framebuffer_get_dither_enabled (CoglFramebuffer *framebuffer);
/**
@@ -771,7 +770,7 @@ cogl_framebuffer_get_dither_enabled (CoglFramebuffer *framebuffer);
* Since: 1.8
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_framebuffer_set_dither_enabled (CoglFramebuffer *framebuffer,
gboolean dither_enabled);
@@ -786,7 +785,7 @@ cogl_framebuffer_set_dither_enabled (CoglFramebuffer *framebuffer,
* Since: 1.18
* Stability: unstable
*/
COGL_EXPORT gboolean
gboolean
cogl_framebuffer_get_depth_write_enabled (CoglFramebuffer *framebuffer);
/**
@@ -804,7 +803,7 @@ cogl_framebuffer_get_depth_write_enabled (CoglFramebuffer *framebuffer);
* Since: 1.18
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_framebuffer_set_depth_write_enabled (CoglFramebuffer *framebuffer,
gboolean depth_write_enabled);
@@ -819,7 +818,7 @@ cogl_framebuffer_set_depth_write_enabled (CoglFramebuffer *framebuffer,
* Since: 1.20
* Stability: unstable
*/
COGL_EXPORT CoglStereoMode
CoglStereoMode
cogl_framebuffer_get_stereo_mode (CoglFramebuffer *framebuffer);
/**
@@ -839,7 +838,7 @@ cogl_framebuffer_get_stereo_mode (CoglFramebuffer *framebuffer);
* Since: 1.20
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_framebuffer_set_stereo_mode (CoglFramebuffer *framebuffer,
CoglStereoMode stereo_mode);
@@ -884,7 +883,7 @@ cogl_framebuffer_set_stereo_mode (CoglFramebuffer *framebuffer,
* Since: 1.8
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_framebuffer_set_samples_per_pixel (CoglFramebuffer *framebuffer,
int samples_per_pixel);
@@ -912,7 +911,7 @@ cogl_framebuffer_set_samples_per_pixel (CoglFramebuffer *framebuffer,
* Since: 1.10
* Stability: unstable
*/
COGL_EXPORT int
int
cogl_framebuffer_get_samples_per_pixel (CoglFramebuffer *framebuffer);
@@ -944,7 +943,7 @@ cogl_framebuffer_get_samples_per_pixel (CoglFramebuffer *framebuffer);
* Since: 1.8
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_framebuffer_resolve_samples (CoglFramebuffer *framebuffer);
/**
@@ -980,7 +979,7 @@ cogl_framebuffer_resolve_samples (CoglFramebuffer *framebuffer);
* Since: 1.8
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_framebuffer_resolve_samples_region (CoglFramebuffer *framebuffer,
int x,
int y,
@@ -1000,7 +999,7 @@ cogl_framebuffer_resolve_samples_region (CoglFramebuffer *framebuffer,
* Since: 1.8
* Stability: unstable
*/
COGL_EXPORT CoglContext *
CoglContext *
cogl_framebuffer_get_context (CoglFramebuffer *framebuffer);
/**
@@ -1017,7 +1016,7 @@ cogl_framebuffer_get_context (CoglFramebuffer *framebuffer);
* Since: 1.8
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_framebuffer_clear (CoglFramebuffer *framebuffer,
unsigned long buffers,
const CoglColor *color);
@@ -1042,7 +1041,7 @@ cogl_framebuffer_clear (CoglFramebuffer *framebuffer,
* Since: 1.8
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_framebuffer_clear4f (CoglFramebuffer *framebuffer,
unsigned long buffers,
float red,
@@ -1075,7 +1074,7 @@ cogl_framebuffer_clear4f (CoglFramebuffer *framebuffer,
* cogl_primitive_draw() instead
*/
COGL_DEPRECATED_FOR (cogl_primitive_draw)
COGL_EXPORT void
void
cogl_framebuffer_draw_primitive (CoglFramebuffer *framebuffer,
CoglPipeline *pipeline,
CoglPrimitive *primitive);
@@ -1104,7 +1103,7 @@ cogl_framebuffer_draw_primitive (CoglFramebuffer *framebuffer,
* Since: 1.10
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_framebuffer_draw_rectangle (CoglFramebuffer *framebuffer,
CoglPipeline *pipeline,
float x_1,
@@ -1155,7 +1154,7 @@ cogl_framebuffer_draw_rectangle (CoglFramebuffer *framebuffer,
* Since: 1.10
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_framebuffer_draw_textured_rectangle (CoglFramebuffer *framebuffer,
CoglPipeline *pipeline,
float x_1,
@@ -1226,7 +1225,7 @@ cogl_framebuffer_draw_textured_rectangle (CoglFramebuffer *framebuffer,
* Since: 1.10
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_framebuffer_draw_multitextured_rectangle (CoglFramebuffer *framebuffer,
CoglPipeline *pipeline,
float x_1,
@@ -1270,7 +1269,7 @@ cogl_framebuffer_draw_multitextured_rectangle (CoglFramebuffer *framebuffer,
* Since: 1.10
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_framebuffer_draw_rectangles (CoglFramebuffer *framebuffer,
CoglPipeline *pipeline,
const float *coordinates,
@@ -1324,7 +1323,7 @@ cogl_framebuffer_draw_rectangles (CoglFramebuffer *framebuffer,
* Since: 1.10
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_framebuffer_draw_textured_rectangles (CoglFramebuffer *framebuffer,
CoglPipeline *pipeline,
const float *coordinates,
@@ -1359,7 +1358,7 @@ cogl_framebuffer_draw_textured_rectangles (CoglFramebuffer *framebuffer,
* Since: 1.8
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_framebuffer_discard_buffers (CoglFramebuffer *framebuffer,
unsigned long buffers);
@@ -1380,7 +1379,7 @@ cogl_framebuffer_discard_buffers (CoglFramebuffer *framebuffer,
* Stability: unstable
* Since: 1.10
*/
COGL_EXPORT void
void
cogl_framebuffer_finish (CoglFramebuffer *framebuffer);
/**
@@ -1409,7 +1408,7 @@ cogl_framebuffer_finish (CoglFramebuffer *framebuffer);
* Since: 1.10
* Stability: unstable
*/
COGL_EXPORT gboolean
gboolean
cogl_framebuffer_read_pixels_into_bitmap (CoglFramebuffer *framebuffer,
int x,
int y,
@@ -1455,7 +1454,7 @@ cogl_framebuffer_read_pixels_into_bitmap (CoglFramebuffer *framebuffer,
* Since: 1.10
* Stability: unstable
*/
COGL_EXPORT gboolean
gboolean
cogl_framebuffer_read_pixels (CoglFramebuffer *framebuffer,
int x,
int y,
@@ -1464,7 +1463,7 @@ cogl_framebuffer_read_pixels (CoglFramebuffer *framebuffer,
CoglPixelFormat format,
uint8_t *pixels);
COGL_EXPORT uint32_t
uint32_t
cogl_framebuffer_error_quark (void);
/**
@@ -1490,7 +1489,7 @@ typedef enum /*< prefix=COGL_FRAMEBUFFER_ERROR >*/
* Since: 1.10
* Stability: unstable
*/
COGL_EXPORT gboolean
gboolean
cogl_is_framebuffer (void *object);
/**
@@ -1545,7 +1544,7 @@ cogl_is_framebuffer (void *object);
* and this function returns FALSE, an error object with a code from
* COGL_SYSTEM_ERROR will be created.
*/
COGL_EXPORT gboolean
gboolean
cogl_blit_framebuffer (CoglFramebuffer *src,
CoglFramebuffer *dest,
int src_x,
@@ -1556,18 +1555,6 @@ cogl_blit_framebuffer (CoglFramebuffer *src,
int height,
GError **error);
/**
* cogl_framebuffer_flush:
* @framebuffer: A #CoglFramebuffer pointer
*
* Flushes @framebuffer to ensure the current batch of commands is
* submitted to the GPU.
*
* Unlike cogl_framebuffer_finish(), this does not block the CPU.
*/
void
cogl_framebuffer_flush (CoglFramebuffer *framebuffer);
G_END_DECLS
#endif /* __COGL_FRAMEBUFFER_H */

View File

@@ -67,7 +67,7 @@ G_BEGIN_DECLS
* Stability: unstable
* Since: 1.10
*/
COGL_EXPORT GSource *
GSource *
cogl_glib_source_new (CoglContext *context,
int priority);
@@ -88,7 +88,7 @@ cogl_glib_source_new (CoglContext *context,
* Stability: unstable
* Since: 1.16
*/
COGL_EXPORT GSource *
GSource *
cogl_glib_renderer_source_new (CoglRenderer *renderer,
int priority);

View File

@@ -269,10 +269,8 @@ void _cogl_gtype_object_class_base_finalize (CoglObjectClass *klass);
void _cogl_gtype_object_class_init (CoglObjectClass *klass);
void _cogl_gtype_object_init (CoglObject *object);
COGL_EXPORT
void cogl_object_value_set_object (GValue *value,
gpointer object);
COGL_EXPORT
gpointer cogl_object_value_get_object (const GValue *value);
void _cogl_gtype_dummy_iface_init (gpointer iface);

View File

@@ -61,7 +61,7 @@ typedef struct _CoglIndexBuffer CoglIndexBuffer;
*
* Returns: a #GType that can be used with the GLib type system.
*/
COGL_EXPORT GType cogl_index_buffer_get_gtype (void);
GType cogl_index_buffer_get_gtype (void);
/**
* cogl_index_buffer_new:
@@ -78,7 +78,7 @@ COGL_EXPORT GType cogl_index_buffer_get_gtype (void);
* Since: 1.4
* Stability: Unstable
*/
COGL_EXPORT CoglIndexBuffer *
CoglIndexBuffer *
cogl_index_buffer_new (CoglContext *context,
size_t bytes);
@@ -94,7 +94,7 @@ cogl_index_buffer_new (CoglContext *context,
* Since: 1.4
* Stability: Unstable
*/
COGL_EXPORT gboolean
gboolean
cogl_is_index_buffer (void *object);
G_END_DECLS

View File

@@ -112,34 +112,33 @@ G_BEGIN_DECLS
*
* Returns: a #GType that can be used with the GLib type system.
*/
COGL_EXPORT
GType cogl_indices_get_gtype (void);
COGL_EXPORT CoglIndices *
CoglIndices *
cogl_indices_new (CoglContext *context,
CoglIndicesType type,
const void *indices_data,
int n_indices);
COGL_EXPORT CoglIndices *
CoglIndices *
cogl_indices_new_for_buffer (CoglIndicesType type,
CoglIndexBuffer *buffer,
size_t offset);
COGL_EXPORT CoglIndexBuffer *
CoglIndexBuffer *
cogl_indices_get_buffer (CoglIndices *indices);
COGL_EXPORT CoglIndicesType
CoglIndicesType
cogl_indices_get_type (CoglIndices *indices);
COGL_EXPORT size_t
size_t
cogl_indices_get_offset (CoglIndices *indices);
COGL_EXPORT void
void
cogl_indices_set_offset (CoglIndices *indices,
size_t offset);
COGL_EXPORT CoglIndices *
CoglIndices *
cogl_get_rectangle_indices (CoglContext *context, int n_rectangles);
/**
@@ -153,7 +152,7 @@ cogl_get_rectangle_indices (CoglContext *context, int n_rectangles);
* Since: 1.10
* Stability: unstable
*/
COGL_EXPORT gboolean
gboolean
cogl_is_indices (void *object);
G_END_DECLS

View File

@@ -75,6 +75,4 @@
#endif /* COGL_DISABLE_DEPRECATION_WARNINGS */
#define COGL_EXPORT __attribute__((visibility("default"))) extern
#endif /* __COGL_MACROS_H__ */

View File

@@ -140,7 +140,6 @@ typedef struct _CoglMatrixStack CoglMatrixStack;
*
* Returns: a #GType that can be used with the GLib type system.
*/
COGL_EXPORT
GType cogl_matrix_stack_get_gtype (void);
/**
@@ -184,7 +183,6 @@ typedef struct _CoglMatrixEntry CoglMatrixEntry;
*
* Returns: a #GType that can be used with the GLib type system.
*/
COGL_EXPORT
GType cogl_matrix_entry_get_gtype (void);
@@ -216,7 +214,7 @@ GType cogl_matrix_entry_get_gtype (void);
*
* Return value: (transfer full): A newly allocated #CoglMatrixStack
*/
COGL_EXPORT CoglMatrixStack *
CoglMatrixStack *
cogl_matrix_stack_new (CoglContext *ctx);
/**
@@ -231,7 +229,7 @@ cogl_matrix_stack_new (CoglContext *ctx);
* called when going back up one layer to restore the previous
* transform of an ancestor.
*/
COGL_EXPORT void
void
cogl_matrix_stack_push (CoglMatrixStack *stack);
/**
@@ -244,7 +242,7 @@ cogl_matrix_stack_push (CoglMatrixStack *stack);
* This is usually called while traversing a scenegraph whenever you
* return up one level in the graph towards the root node.
*/
COGL_EXPORT void
void
cogl_matrix_stack_pop (CoglMatrixStack *stack);
/**
@@ -253,7 +251,7 @@ cogl_matrix_stack_pop (CoglMatrixStack *stack);
*
* Resets the current matrix to the identity matrix.
*/
COGL_EXPORT void
void
cogl_matrix_stack_load_identity (CoglMatrixStack *stack);
/**
@@ -266,7 +264,7 @@ cogl_matrix_stack_load_identity (CoglMatrixStack *stack);
* Multiplies the current matrix by one that scales the x, y and z
* axes by the given values.
*/
COGL_EXPORT void
void
cogl_matrix_stack_scale (CoglMatrixStack *stack,
float x,
float y,
@@ -282,7 +280,7 @@ cogl_matrix_stack_scale (CoglMatrixStack *stack,
* Multiplies the current matrix by one that translates along all
* three axes according to the given values.
*/
COGL_EXPORT void
void
cogl_matrix_stack_translate (CoglMatrixStack *stack,
float x,
float y,
@@ -302,7 +300,7 @@ cogl_matrix_stack_translate (CoglMatrixStack *stack,
* the axis-vector (0, 0, 1) causes a small counter-clockwise
* rotation.
*/
COGL_EXPORT void
void
cogl_matrix_stack_rotate (CoglMatrixStack *stack,
float angle,
float x,
@@ -317,7 +315,7 @@ cogl_matrix_stack_rotate (CoglMatrixStack *stack,
* Multiplies the current matrix by one that rotates according to the
* rotation described by @euler.
*/
COGL_EXPORT void
void
cogl_matrix_stack_rotate_euler (CoglMatrixStack *stack,
const graphene_euler_t *euler);
@@ -328,7 +326,7 @@ cogl_matrix_stack_rotate_euler (CoglMatrixStack *stack,
*
* Multiplies the current matrix by the given matrix.
*/
COGL_EXPORT void
void
cogl_matrix_stack_multiply (CoglMatrixStack *stack,
const CoglMatrix *matrix);
@@ -350,7 +348,7 @@ cogl_matrix_stack_multiply (CoglMatrixStack *stack,
* viewing frustum defined by 4 side clip planes that all cross
* through the origin and 2 near and far clip planes.
*/
COGL_EXPORT void
void
cogl_matrix_stack_frustum (CoglMatrixStack *stack,
float left,
float right,
@@ -376,7 +374,7 @@ cogl_matrix_stack_frustum (CoglMatrixStack *stack,
* since there wont be enough precision to identify the depth of
* objects near to each other.</note>
*/
COGL_EXPORT void
void
cogl_matrix_stack_perspective (CoglMatrixStack *stack,
float fov_y,
float aspect,
@@ -399,7 +397,7 @@ cogl_matrix_stack_perspective (CoglMatrixStack *stack,
*
* Replaces the current matrix with an orthographic projection matrix.
*/
COGL_EXPORT void
void
cogl_matrix_stack_orthographic (CoglMatrixStack *stack,
float x_1,
float y_1,
@@ -420,7 +418,7 @@ cogl_matrix_stack_orthographic (CoglMatrixStack *stack,
* for degenerate transformations that can't be inverted (in this case the
* @inverse matrix will simply be initialized with the identity matrix)
*/
COGL_EXPORT gboolean
gboolean
cogl_matrix_stack_get_inverse (CoglMatrixStack *stack,
CoglMatrix *inverse);
@@ -442,7 +440,7 @@ cogl_matrix_stack_get_inverse (CoglMatrixStack *stack,
* Return value: (transfer none): A pointer to the #CoglMatrixEntry
* representing the current matrix stack transform.
*/
COGL_EXPORT CoglMatrixEntry *
CoglMatrixEntry *
cogl_matrix_stack_get_entry (CoglMatrixStack *stack);
/**
@@ -471,7 +469,7 @@ cogl_matrix_stack_get_entry (CoglMatrixStack *stack);
* and in that case @matrix will be initialized with
* the value of the current transform.
*/
COGL_EXPORT CoglMatrix *
CoglMatrix *
cogl_matrix_stack_get (CoglMatrixStack *stack,
CoglMatrix *matrix);
@@ -502,7 +500,7 @@ cogl_matrix_stack_get (CoglMatrixStack *stack,
* and in that case @matrix will be initialized with
* the effective transform represented by @entry.
*/
COGL_EXPORT CoglMatrix *
CoglMatrix *
cogl_matrix_entry_get (CoglMatrixEntry *entry,
CoglMatrix *matrix);
@@ -516,7 +514,7 @@ cogl_matrix_entry_get (CoglMatrixEntry *entry,
* since the last time cogl_matrix_stack_push() was called or since
* the stack was initialized.
*/
COGL_EXPORT void
void
cogl_matrix_stack_set (CoglMatrixStack *stack,
const CoglMatrix *matrix);
@@ -529,7 +527,7 @@ cogl_matrix_stack_set (CoglMatrixStack *stack,
* Return value: %TRUE if @object is a #CoglMatrixStack, otherwise
* %FALSE.
*/
COGL_EXPORT gboolean
gboolean
cogl_is_matrix_stack (void *object);
/**
@@ -551,7 +549,7 @@ cogl_is_matrix_stack (void *object);
* @entry0 and the transform of @entry1 is a translation,
* otherwise %FALSE.
*/
COGL_EXPORT gboolean
gboolean
cogl_matrix_entry_calculate_translation (CoglMatrixEntry *entry0,
CoglMatrixEntry *entry1,
float *x,
@@ -572,7 +570,7 @@ cogl_matrix_entry_calculate_translation (CoglMatrixEntry *entry0,
* Return value: %TRUE if @entry is definitely an identity transform,
* otherwise %FALSE.
*/
COGL_EXPORT gboolean
gboolean
cogl_matrix_entry_is_identity (CoglMatrixEntry *entry);
/**
@@ -590,7 +588,7 @@ cogl_matrix_entry_is_identity (CoglMatrixEntry *entry);
* Return value: %TRUE if @entry0 represents the same transform as
* @entry1, otherwise %FALSE.
*/
COGL_EXPORT gboolean
gboolean
cogl_matrix_entry_equal (CoglMatrixEntry *entry0,
CoglMatrixEntry *entry1);
@@ -601,7 +599,7 @@ cogl_matrix_entry_equal (CoglMatrixEntry *entry0,
* Allows visualizing the operations that build up the given @entry
* for debugging purposes by printing to stdout.
*/
COGL_EXPORT void
void
cogl_debug_matrix_entry_print (CoglMatrixEntry *entry);
/**
@@ -615,7 +613,7 @@ cogl_debug_matrix_entry_print (CoglMatrixEntry *entry);
* It is an error to pass an @entry pointer to cogl_object_ref() and
* cogl_object_unref()
*/
COGL_EXPORT CoglMatrixEntry *
CoglMatrixEntry *
cogl_matrix_entry_ref (CoglMatrixEntry *entry);
/**
@@ -626,7 +624,7 @@ cogl_matrix_entry_ref (CoglMatrixEntry *entry);
* cogl_matrix_entry_unref() or to release the reference given when
* calling cogl_matrix_stack_get_entry().
*/
COGL_EXPORT void
void
cogl_matrix_entry_unref (CoglMatrixEntry *entry);
#endif /* _COGL_MATRIX_STACK_H_ */

View File

@@ -135,7 +135,7 @@ COGL_STRUCT_SIZE_ASSERT (CoglMatrix, 128 + sizeof (unsigned long) * 3);
* .wx=0; .wy=0; .wz=0; .ww=1;
* ]|
*/
COGL_EXPORT void
void
cogl_matrix_init_identity (CoglMatrix *matrix);
/**
@@ -156,7 +156,7 @@ cogl_matrix_init_identity (CoglMatrix *matrix);
*
* Since: 2.0
*/
COGL_EXPORT void
void
cogl_matrix_init_translation (CoglMatrix *matrix,
float tx,
float ty,
@@ -174,7 +174,7 @@ cogl_matrix_init_translation (CoglMatrix *matrix,
* <note>It is possible to multiply the @a matrix in-place, so
* @result can be equal to @a but can't be equal to @b.</note>
*/
COGL_EXPORT void
void
cogl_matrix_multiply (CoglMatrix *result,
const CoglMatrix *a,
const CoglMatrix *b);
@@ -190,7 +190,7 @@ cogl_matrix_multiply (CoglMatrix *result,
* Multiplies @matrix with a rotation matrix that applies a rotation
* of @angle degrees around the specified 3D vector.
*/
COGL_EXPORT void
void
cogl_matrix_rotate (CoglMatrix *matrix,
float angle,
float x,
@@ -207,7 +207,7 @@ cogl_matrix_rotate (CoglMatrix *matrix,
*
* Since: 2.0
*/
COGL_EXPORT void
void
cogl_matrix_rotate_euler (CoglMatrix *matrix,
const graphene_euler_t *euler);
@@ -221,7 +221,7 @@ cogl_matrix_rotate_euler (CoglMatrix *matrix,
* Multiplies @matrix with a transform matrix that translates along
* the X, Y and Z axis.
*/
COGL_EXPORT void
void
cogl_matrix_translate (CoglMatrix *matrix,
float x,
float y,
@@ -237,7 +237,7 @@ cogl_matrix_translate (CoglMatrix *matrix,
* Multiplies @matrix with a transform matrix that scales along the X,
* Y and Z axis.
*/
COGL_EXPORT void
void
cogl_matrix_scale (CoglMatrix *matrix,
float sx,
float sy,
@@ -286,7 +286,7 @@ cogl_matrix_scale (CoglMatrix *matrix,
* Since: 1.8
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_matrix_look_at (CoglMatrix *matrix,
float eye_position_x,
float eye_position_y,
@@ -314,7 +314,7 @@ cogl_matrix_look_at (CoglMatrix *matrix,
*
* Multiplies @matrix by the given frustum perspective matrix.
*/
COGL_EXPORT void
void
cogl_matrix_frustum (CoglMatrix *matrix,
float left,
float right,
@@ -339,7 +339,7 @@ cogl_matrix_frustum (CoglMatrix *matrix,
* since there wont be enough precision to identify the depth of
* objects near to each other.</note>
*/
COGL_EXPORT void
void
cogl_matrix_perspective (CoglMatrix *matrix,
float fov_y,
float aspect,
@@ -365,7 +365,7 @@ cogl_matrix_perspective (CoglMatrix *matrix,
* Since: 1.10
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_matrix_orthographic (CoglMatrix *matrix,
float x_1,
float y_1,
@@ -404,7 +404,7 @@ cogl_matrix_orthographic (CoglMatrix *matrix,
* Since: 1.8
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_matrix_view_2d_in_frustum (CoglMatrix *matrix,
float left,
float right,
@@ -443,7 +443,7 @@ cogl_matrix_view_2d_in_frustum (CoglMatrix *matrix,
* Since: 1.8
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_matrix_view_2d_in_perspective (CoglMatrix *matrix,
float fov_y,
float aspect,
@@ -459,7 +459,7 @@ cogl_matrix_view_2d_in_perspective (CoglMatrix *matrix,
*
* Initializes @matrix with the contents of @array
*/
COGL_EXPORT void
void
cogl_matrix_init_from_array (CoglMatrix *matrix,
const float *array);
@@ -471,7 +471,7 @@ cogl_matrix_init_from_array (CoglMatrix *matrix,
*
* Return value: a pointer to the float array
*/
COGL_EXPORT const float *
const float *
cogl_matrix_get_array (const CoglMatrix *matrix);
/**
@@ -481,7 +481,7 @@ cogl_matrix_get_array (const CoglMatrix *matrix);
*
* Initializes @matrix from a #graphene_euler_t rotation.
*/
COGL_EXPORT void
void
cogl_matrix_init_from_euler (CoglMatrix *matrix,
const graphene_euler_t *euler);
@@ -497,7 +497,7 @@ cogl_matrix_init_from_euler (CoglMatrix *matrix,
*
* Since: 1.4
*/
COGL_EXPORT gboolean
gboolean
cogl_matrix_equal (const void *v1, const void *v2);
/**
@@ -512,7 +512,7 @@ cogl_matrix_equal (const void *v1, const void *v2);
*
* Since: 1.6
*/
COGL_EXPORT CoglMatrix *
CoglMatrix *
cogl_matrix_copy (const CoglMatrix *matrix);
/**
@@ -524,7 +524,7 @@ cogl_matrix_copy (const CoglMatrix *matrix);
*
* Since: 1.6
*/
COGL_EXPORT void
void
cogl_matrix_free (CoglMatrix *matrix);
/**
@@ -547,7 +547,7 @@ cogl_matrix_free (CoglMatrix *matrix);
*
* Since: 1.2
*/
COGL_EXPORT gboolean
gboolean
cogl_matrix_get_inverse (const CoglMatrix *matrix,
CoglMatrix *inverse);
@@ -566,7 +566,7 @@ cogl_matrix_get_inverse (const CoglMatrix *matrix,
* Transforms a point whos position is given and returned as four float
* components.
*/
COGL_EXPORT void
void
cogl_matrix_transform_point (const CoglMatrix *matrix,
float *x,
float *y,
@@ -622,7 +622,7 @@ cogl_matrix_transform_point (const CoglMatrix *matrix,
*
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_matrix_transform_points (const CoglMatrix *matrix,
int n_components,
size_t stride_in,
@@ -677,7 +677,7 @@ cogl_matrix_transform_points (const CoglMatrix *matrix,
*
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_matrix_project_points (const CoglMatrix *matrix,
int n_components,
size_t stride_in,
@@ -695,7 +695,7 @@ cogl_matrix_project_points (const CoglMatrix *matrix,
* Returns: %TRUE if @matrix is an identity matrix else %FALSE
* Since: 1.8
*/
COGL_EXPORT gboolean
gboolean
cogl_matrix_is_identity (const CoglMatrix *matrix);
/**
@@ -707,7 +707,7 @@ cogl_matrix_is_identity (const CoglMatrix *matrix);
*
* Since: 1.10
*/
COGL_EXPORT void
void
cogl_matrix_transpose (CoglMatrix *matrix);
/**
@@ -718,7 +718,7 @@ cogl_matrix_transpose (CoglMatrix *matrix);
*
* Since: 2.0
*/
COGL_EXPORT void
void
cogl_debug_matrix_print (const CoglMatrix *matrix);
#define COGL_GTYPE_TYPE_MATRIX (cogl_matrix_get_gtype ())
@@ -728,7 +728,6 @@ cogl_debug_matrix_print (const CoglMatrix *matrix);
*
* Returns: a #GType that can be used with the GLib type system.
*/
COGL_EXPORT
GType cogl_matrix_get_gtype (void);
/**
@@ -740,7 +739,7 @@ GType cogl_matrix_get_gtype (void);
*
* Deprecated: 1.18: Use cogl_matrix_get_gtype() instead.
*/
COGL_EXPORT GType
GType
cogl_gtype_matrix_get_type (void);
G_END_DECLS

View File

@@ -177,7 +177,7 @@ typedef void (*CoglMetaTextureCallback) (CoglTexture *sub_texture,
* Since: 1.10
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_meta_texture_foreach_in_region (CoglMetaTexture *meta_texture,
float tx_1,
float ty_1,

View File

@@ -43,7 +43,6 @@
#endif
#include <cogl/winsys/cogl-winsys-private.h>
COGL_EXPORT
void cogl_renderer_set_custom_winsys (CoglRenderer *renderer,
CoglCustomWinsysVtableGetter winsys_vtable_getter,
void *user_data);

View File

@@ -279,7 +279,7 @@ _cogl_object_set_user_data (CoglObject *object,
void *user_data,
CoglUserDataDestroyInternalCallback destroy);
COGL_EXPORT void
void
_cogl_object_default_unref (void *obj);
#endif /* __COGL_OBJECT_PRIVATE_H */

View File

@@ -52,7 +52,6 @@ typedef struct _CoglObject CoglObject;
*
* Returns: a #GType that can be used with the GLib type system.
*/
COGL_EXPORT
GType cogl_object_get_gtype (void);
/**
@@ -63,7 +62,7 @@ GType cogl_object_get_gtype (void);
*
* Returns: the @object, with its reference count increased
*/
COGL_EXPORT void *
void *
cogl_object_ref (void *object);
/**
@@ -73,7 +72,7 @@ cogl_object_ref (void *object);
* Drecreases the reference count of @object by 1; if the reference
* count reaches 0, the resources allocated by @object will be freed
*/
COGL_EXPORT void
void
cogl_object_unref (void *object);
/**
@@ -188,7 +187,7 @@ typedef void
*
* Since: 1.4
*/
COGL_EXPORT void
void
cogl_object_set_user_data (CoglObject *object,
CoglUserDataKey *key,
void *user_data,
@@ -210,7 +209,7 @@ cogl_object_set_user_data (CoglObject *object,
*
* Since: 1.4
*/
COGL_EXPORT void *
void *
cogl_object_get_user_data (CoglObject *object,
CoglUserDataKey *key);
@@ -227,7 +226,7 @@ cogl_object_get_user_data (CoglObject *object,
* Since: 1.8
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_debug_object_foreach_type (CoglDebugObjectForeachTypeCallback func,
void *user_data);
@@ -242,7 +241,7 @@ cogl_debug_object_foreach_type (CoglDebugObjectForeachTypeCallback func,
* Since: 1.8
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_debug_object_print_instances (void);
G_END_DECLS

View File

@@ -59,7 +59,6 @@ typedef struct _CoglOffscreen CoglOffscreen;
*
* Returns: a #GType that can be used with the GLib type system.
*/
COGL_EXPORT
GType cogl_offscreen_get_gtype (void);
/* Offscreen api */
@@ -96,7 +95,7 @@ GType cogl_offscreen_get_gtype (void);
* Return value: (transfer full): a newly instantiated #CoglOffscreen
* framebuffer.
*/
COGL_EXPORT CoglOffscreen *
CoglOffscreen *
cogl_offscreen_new_with_texture (CoglTexture *texture);
/**
@@ -120,7 +119,7 @@ cogl_offscreen_new_with_texture (CoglTexture *texture);
* Deprecated: 1.16: Use cogl_offscreen_new_with_texture instead.
*/
COGL_DEPRECATED_FOR (cogl_offscreen_new_with_texture)
COGL_EXPORT CoglOffscreen *
CoglOffscreen *
cogl_offscreen_new_to_texture (CoglTexture *texture);
/**
@@ -133,13 +132,13 @@ cogl_offscreen_new_to_texture (CoglTexture *texture);
* Returns: %TRUE if @object is a #CoglOffscreen framebuffer,
* %FALSE otherwise
*/
COGL_EXPORT gboolean
gboolean
cogl_is_offscreen (void *object);
/**
* cogl_offscreen_get_texture: (skip)
*/
COGL_EXPORT CoglTexture *
CoglTexture *
cogl_offscreen_get_texture (CoglOffscreen *offscreen);
G_END_DECLS

View File

@@ -78,7 +78,7 @@ struct _CoglOnscreen
CoglOnscreen *
_cogl_onscreen_new (void);
COGL_EXPORT void
void
_cogl_framebuffer_winsys_update_size (CoglFramebuffer *framebuffer,
int width, int height);
@@ -87,10 +87,10 @@ _cogl_onscreen_queue_event (CoglOnscreen *onscreen,
CoglFrameEvent type,
CoglFrameInfo *info);
COGL_EXPORT void
void
_cogl_onscreen_notify_frame_sync (CoglOnscreen *onscreen, CoglFrameInfo *info);
COGL_EXPORT void
void
_cogl_onscreen_notify_complete (CoglOnscreen *onscreen, CoglFrameInfo *info);
void

View File

@@ -52,10 +52,9 @@ typedef struct _CoglOnscreenTemplate CoglOnscreenTemplate;
*
* Returns: a #GType that can be used with the GLib type system.
*/
COGL_EXPORT
GType cogl_onscreen_template_get_gtype (void);
COGL_EXPORT CoglOnscreenTemplate *
CoglOnscreenTemplate *
cogl_onscreen_template_new (CoglSwapChain *swap_chain);
/**
@@ -81,7 +80,7 @@ cogl_onscreen_template_new (CoglSwapChain *swap_chain);
* Since: 1.10
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_onscreen_template_set_samples_per_pixel (
CoglOnscreenTemplate *onscreen_template,
int n);
@@ -100,7 +99,7 @@ cogl_onscreen_template_set_samples_per_pixel (
* Since: 1.20
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_onscreen_template_set_stereo_enabled (
CoglOnscreenTemplate *onscreen_template,
gboolean enabled);
@@ -115,7 +114,7 @@ cogl_onscreen_template_set_stereo_enabled (
* Since: 1.10
* Stability: unstable
*/
COGL_EXPORT gboolean
gboolean
cogl_is_onscreen_template (void *object);
G_END_DECLS

View File

@@ -55,7 +55,6 @@ typedef struct _CoglOnscreen CoglOnscreen;
*
* Returns: a #GType that can be used with the GLib type system.
*/
COGL_EXPORT
GType cogl_onscreen_get_gtype (void);
/**
@@ -72,7 +71,7 @@ GType cogl_onscreen_get_gtype (void);
* Since: 1.8
* Stability: unstable
*/
COGL_EXPORT CoglOnscreen *
CoglOnscreen *
cogl_onscreen_new (CoglContext *context, int width, int height);
#ifdef COGL_HAS_X11
@@ -93,7 +92,7 @@ cogl_onscreen_new (CoglContext *context, int width, int height);
* Since: 1.10
* Stability: unstable
*/
COGL_EXPORT uint32_t
uint32_t
cogl_x11_onscreen_get_window_xid (CoglOnscreen *onscreen);
#endif /* COGL_HAS_X11 */
@@ -126,7 +125,7 @@ cogl_x11_onscreen_get_window_xid (CoglOnscreen *onscreen);
* Since: 2.0
* Stability: Unstable
*/
COGL_EXPORT void
void
cogl_onscreen_show (CoglOnscreen *onscreen);
/**
@@ -151,7 +150,7 @@ cogl_onscreen_show (CoglOnscreen *onscreen);
* Since: 2.0
* Stability: Unstable
*/
COGL_EXPORT void
void
cogl_onscreen_hide (CoglOnscreen *onscreen);
/**
@@ -175,7 +174,7 @@ cogl_onscreen_hide (CoglOnscreen *onscreen);
* Since: 1.10
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_onscreen_swap_buffers (CoglOnscreen *onscreen);
@@ -228,7 +227,7 @@ cogl_onscreen_swap_buffers (CoglOnscreen *onscreen);
* Since: 1.14
* Stability: stable
*/
COGL_EXPORT int
int
cogl_onscreen_get_buffer_age (CoglOnscreen *onscreen);
/**
@@ -279,7 +278,7 @@ cogl_onscreen_get_buffer_age (CoglOnscreen *onscreen);
* Since: 1.16
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_onscreen_swap_buffers_with_damage (CoglOnscreen *onscreen,
const int *rectangles,
int n_rectangles);
@@ -304,7 +303,7 @@ cogl_onscreen_swap_buffers_with_damage (CoglOnscreen *onscreen,
* Since: 1.10
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_onscreen_swap_region (CoglOnscreen *onscreen,
const int *rectangles,
int n_rectangles);
@@ -389,7 +388,6 @@ typedef struct _CoglClosure CoglFrameClosure;
*
* Returns: a #GType that can be used with the GLib type system.
*/
COGL_EXPORT
GType cogl_frame_closure_get_gtype (void);
/**
@@ -429,7 +427,7 @@ GType cogl_frame_closure_get_gtype (void);
* Since: 1.14
* Stability: unstable
*/
COGL_EXPORT CoglFrameClosure *
CoglFrameClosure *
cogl_onscreen_add_frame_callback (CoglOnscreen *onscreen,
CoglFrameCallback callback,
void *user_data,
@@ -451,7 +449,7 @@ cogl_onscreen_add_frame_callback (CoglOnscreen *onscreen,
* Since: 1.14
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_onscreen_remove_frame_callback (CoglOnscreen *onscreen,
CoglFrameClosure *closure);
@@ -484,7 +482,7 @@ cogl_onscreen_remove_frame_callback (CoglOnscreen *onscreen,
*
* Since: 2.0
*/
COGL_EXPORT void
void
cogl_onscreen_set_resizable (CoglOnscreen *onscreen,
gboolean resizable);
@@ -511,7 +509,7 @@ cogl_onscreen_set_resizable (CoglOnscreen *onscreen,
* resizable or not.
* Since: 2.0
*/
COGL_EXPORT gboolean
gboolean
cogl_onscreen_get_resizable (CoglOnscreen *onscreen);
/**
@@ -562,7 +560,6 @@ typedef struct _CoglClosure CoglOnscreenResizeClosure;
*
* Returns: a #GType that can be used with the GLib type system.
*/
COGL_EXPORT
GType cogl_onscreen_resize_closure_get_gtype (void);
/**
@@ -597,7 +594,7 @@ GType cogl_onscreen_resize_closure_get_gtype (void);
* remove the callback and associated @user_data later.
* Since: 2.0
*/
COGL_EXPORT CoglOnscreenResizeClosure *
CoglOnscreenResizeClosure *
cogl_onscreen_add_resize_callback (CoglOnscreen *onscreen,
CoglOnscreenResizeCallback callback,
void *user_data,
@@ -613,7 +610,7 @@ cogl_onscreen_add_resize_callback (CoglOnscreen *onscreen,
*
* Since: 2.0
*/
COGL_EXPORT void
void
cogl_onscreen_remove_resize_callback (CoglOnscreen *onscreen,
CoglOnscreenResizeClosure *closure);
@@ -677,7 +674,6 @@ typedef struct _CoglClosure CoglOnscreenDirtyClosure;
*
* Returns: a #GType that can be used with the GLib type system.
*/
COGL_EXPORT
GType cogl_onscreen_dirty_closure_get_gtype (void);
/**
@@ -710,7 +706,7 @@ GType cogl_onscreen_dirty_closure_get_gtype (void);
* Since: 1.16
* Stability: unstable
*/
COGL_EXPORT CoglOnscreenDirtyClosure *
CoglOnscreenDirtyClosure *
cogl_onscreen_add_dirty_callback (CoglOnscreen *onscreen,
CoglOnscreenDirtyCallback callback,
void *user_data,
@@ -732,7 +728,7 @@ cogl_onscreen_add_dirty_callback (CoglOnscreen *onscreen,
* Since: 1.16
* Stability: unstable
*/
COGL_EXPORT void
void
cogl_onscreen_remove_dirty_callback (CoglOnscreen *onscreen,
CoglOnscreenDirtyClosure *closure);
@@ -747,7 +743,7 @@ cogl_onscreen_remove_dirty_callback (CoglOnscreen *onscreen,
* Since: 1.10
* Stability: unstable
*/
COGL_EXPORT gboolean
gboolean
cogl_is_onscreen (void *object);
/**
@@ -762,7 +758,7 @@ cogl_is_onscreen (void *object);
* Since: 1.14
* Stability: unstable
*/
COGL_EXPORT int64_t
int64_t
cogl_onscreen_get_frame_counter (CoglOnscreen *onscreen);
G_END_DECLS

View File

@@ -73,7 +73,6 @@ typedef struct _CoglOutput CoglOutput;
*
* Returns: a #GType that can be used with the GLib type system.
*/
COGL_EXPORT
GType cogl_output_get_gtype (void);
/**
@@ -128,7 +127,7 @@ typedef enum
* Since: 1.14
* Stability: unstable
*/
COGL_EXPORT gboolean
gboolean
cogl_is_output (void *object);
/**
@@ -143,7 +142,7 @@ cogl_is_output (void *object);
* Since: 1.14
* Stability: unstable
*/
COGL_EXPORT int
int
cogl_output_get_x (CoglOutput *output);
/**
@@ -158,7 +157,7 @@ cogl_output_get_x (CoglOutput *output);
* Since: 1.14
* Stability: unstable
*/
COGL_EXPORT int
int
cogl_output_get_y (CoglOutput *output);
/**
@@ -171,7 +170,7 @@ cogl_output_get_y (CoglOutput *output);
* Since: 1.14
* Stability: unstable
*/
COGL_EXPORT int
int
cogl_output_get_width (CoglOutput *output);
/**
@@ -184,7 +183,7 @@ cogl_output_get_width (CoglOutput *output);
* Since: 1.14
* Stability: unstable
*/
COGL_EXPORT int
int
cogl_output_get_height (CoglOutput *output);
/**
@@ -201,7 +200,7 @@ cogl_output_get_height (CoglOutput *output);
* Since: 1.14
* Stability: unstable
*/
COGL_EXPORT int
int
cogl_output_get_mm_width (CoglOutput *output);
/**
@@ -218,7 +217,7 @@ cogl_output_get_mm_width (CoglOutput *output);
* Since: 1.14
* Stability: unstable
*/
COGL_EXPORT int
int
cogl_output_get_mm_height (CoglOutput *output);
/**
@@ -233,7 +232,7 @@ cogl_output_get_mm_height (CoglOutput *output);
* Since: 1.14
* Stability: unstable
*/
COGL_EXPORT CoglSubpixelOrder
CoglSubpixelOrder
cogl_output_get_subpixel_order (CoglOutput *output);
/**
@@ -248,7 +247,7 @@ cogl_output_get_subpixel_order (CoglOutput *output);
* Since: 1.14
* Stability: unstable
*/
COGL_EXPORT float
float
cogl_output_get_refresh_rate (CoglOutput *output);
G_END_DECLS

View File

@@ -332,7 +332,7 @@ typedef enum
CoglPipelineLayerType
_cogl_pipeline_layer_get_type (CoglPipelineLayer *layer);
COGL_EXPORT CoglTexture *
CoglTexture *
_cogl_pipeline_layer_get_texture (CoglPipelineLayer *layer);
CoglTexture *

Some files were not shown because too many files have changed in this diff Show More