Merge ~3v1n0/ubuntu/+source/mutter:ubuntu/master into ~ubuntu-desktop/ubuntu/+source/mutter:ubuntu/master

Proposed by Marco Trevisan (Treviño)
Status: Merged
Merged at revision: e8829a3d4521e265b2886246001cf78372cc7f35
Proposed branch: ~3v1n0/ubuntu/+source/mutter:ubuntu/master
Merge into: ~ubuntu-desktop/ubuntu/+source/mutter:ubuntu/master
Diff against target: 100018 lines (+18412/-26783)
601 files modified
NEWS (+118/-26)
clutter/clutter/cally/cally-actor.c (+2/-6)
clutter/clutter/cally/cally-text.c (+3/-7)
clutter/clutter/cally/cally.c (+0/-3)
clutter/clutter/cally/cally.h (+0/-1)
clutter/clutter/clutter-actor-box.c (+3/-3)
clutter/clutter/clutter-actor-meta.c (+4/-8)
clutter/clutter/clutter-actor-private.h (+6/-7)
clutter/clutter/clutter-actor.c (+519/-969)
clutter/clutter/clutter-actor.h (+22/-10)
clutter/clutter/clutter-animatable.c (+0/-75)
clutter/clutter/clutter-autocleanups.h (+1/-4)
clutter/clutter/clutter-backend-private.h (+2/-17)
clutter/clutter/clutter-backend.c (+24/-92)
clutter/clutter/clutter-backend.h (+2/-4)
clutter/clutter/clutter-base-types.c (+12/-1279)
clutter/clutter/clutter-bin-layout.c (+1/-185)
clutter/clutter/clutter-bind-constraint.c (+3/-1)
clutter/clutter/clutter-blur-effect.c (+8/-5)
clutter/clutter/clutter-brightness-contrast-effect.c (+19/-16)
clutter/clutter/clutter-canvas.c (+4/-3)
clutter/clutter/clutter-click-action.c (+14/-47)
clutter/clutter/clutter-clone.c (+4/-4)
clutter/clutter/clutter-colorize-effect.c (+7/-4)
clutter/clutter/clutter-constraint.c (+1/-1)
clutter/clutter/clutter-container.c (+1/-195)
clutter/clutter/clutter-container.h (+1/-16)
clutter/clutter/clutter-content-private.h (+4/-3)
clutter/clutter/clutter-content.c (+12/-8)
clutter/clutter/clutter-content.h (+4/-3)
clutter/clutter/clutter-debug.h (+0/-39)
clutter/clutter/clutter-deform-effect.c (+8/-6)
clutter/clutter/clutter-deprecated.h (+0/-11)
clutter/clutter/clutter-desaturate-effect.c (+7/-4)
clutter/clutter/clutter-drag-action.c (+15/-19)
clutter/clutter/clutter-drag-action.h (+3/-3)
clutter/clutter/clutter-drop-action.c (+2/-4)
clutter/clutter/clutter-effect-private.h (+6/-3)
clutter/clutter/clutter-effect.c (+24/-18)
clutter/clutter/clutter-effect.h (+8/-3)
clutter/clutter/clutter-enums.h (+1/-29)
clutter/clutter/clutter-event.c (+21/-21)
clutter/clutter/clutter-event.h (+1/-1)
clutter/clutter/clutter-feature.c (+3/-12)
clutter/clutter/clutter-gesture-action.c (+6/-13)
clutter/clutter/clutter-graphene.c (+111/-0)
clutter/clutter/clutter-graphene.h (+8/-20)
clutter/clutter/clutter-grid-layout.c (+4/-4)
clutter/clutter/clutter-image.c (+4/-3)
clutter/clutter/clutter-input-device-private.h (+96/-147)
clutter/clutter/clutter-input-device.c (+40/-25)
clutter/clutter/clutter-input-device.h (+33/-1)
clutter/clutter/clutter-input-focus.c (+2/-2)
clutter/clutter/clutter-input-focus.h (+2/-2)
clutter/clutter/clutter-input-method-private.h (+2/-2)
clutter/clutter/clutter-input-method.c (+7/-8)
clutter/clutter/clutter-input-method.h (+2/-2)
clutter/clutter/clutter-input-pointer-a11y.c (+26/-30)
clutter/clutter/clutter-keymap.c (+6/-0)
clutter/clutter/clutter-keymap.h (+4/-0)
clutter/clutter/clutter-keysyms-update.pl (+0/-37)
clutter/clutter/clutter-layout-manager.c (+5/-11)
clutter/clutter/clutter-layout-manager.h (+0/-9)
clutter/clutter/clutter-main.c (+44/-21)
clutter/clutter/clutter-main.h (+48/-0)
clutter/clutter/clutter-mutter.h (+1/-1)
clutter/clutter/clutter-offscreen-effect.c (+90/-68)
clutter/clutter/clutter-offscreen-effect.h (+5/-3)
clutter/clutter/clutter-paint-context-private.h (+29/-0)
clutter/clutter/clutter-paint-context.c (+161/-0)
clutter/clutter/clutter-paint-context.h (+62/-0)
clutter/clutter/clutter-paint-node-private.h (+9/-28)
clutter/clutter/clutter-paint-node.c (+17/-15)
clutter/clutter/clutter-paint-node.h (+2/-1)
clutter/clutter/clutter-paint-nodes.c (+248/-98)
clutter/clutter/clutter-paint-nodes.h (+67/-0)
clutter/clutter/clutter-paint-volume-private.h (+1/-1)
clutter/clutter/clutter-paint-volume.c (+20/-26)
clutter/clutter/clutter-path.c (+1/-8)
clutter/clutter/clutter-pick-context-private.h (+25/-0)
clutter/clutter/clutter-pick-context.c (+83/-0)
clutter/clutter/clutter-pick-context.h (+49/-0)
clutter/clutter/clutter-private.h (+16/-18)
clutter/clutter/clutter-script-parser.c (+55/-54)
clutter/clutter/clutter-script-private.h (+6/-6)
clutter/clutter/clutter-script.c (+5/-70)
clutter/clutter/clutter-scroll-actor.c (+16/-16)
clutter/clutter/clutter-scroll-actor.h (+4/-4)
clutter/clutter/clutter-seat.c (+582/-0)
clutter/clutter/clutter-seat.h (+84/-85)
clutter/clutter/clutter-shader-effect.c (+29/-52)
clutter/clutter/clutter-stage-manager.c (+0/-19)
clutter/clutter/clutter-stage-private.h (+13/-12)
clutter/clutter/clutter-stage-view-private.h (+4/-2)
clutter/clutter/clutter-stage-view.c (+2/-2)
clutter/clutter/clutter-stage-window.c (+5/-6)
clutter/clutter/clutter-stage-window.h (+2/-5)
clutter/clutter/clutter-stage.c (+247/-528)
clutter/clutter/clutter-stage.h (+3/-31)
clutter/clutter/clutter-text.c (+42/-61)
clutter/clutter/clutter-text.h (+2/-2)
clutter/clutter/clutter-timeline.c (+23/-23)
clutter/clutter/clutter-timeline.h (+6/-6)
clutter/clutter/clutter-types.h (+6/-356)
clutter/clutter/clutter-util.c (+30/-66)
clutter/clutter/clutter-virtual-input-device.c (+13/-30)
clutter/clutter/clutter-virtual-input-device.h (+1/-4)
clutter/clutter/clutter-zoom-action.c (+10/-10)
clutter/clutter/clutter-zoom-action.h (+3/-3)
clutter/clutter/clutter.h (+0/-2)
clutter/clutter/cogl/clutter-stage-cogl.c (+329/-224)
clutter/clutter/cogl/clutter-stage-cogl.h (+1/-7)
clutter/clutter/deprecated/clutter-actor.h (+0/-40)
clutter/clutter/deprecated/clutter-alpha.c (+8/-139)
clutter/clutter/deprecated/clutter-alpha.h (+0/-12)
clutter/clutter/deprecated/clutter-animation.c (+1/-830)
clutter/clutter/deprecated/clutter-animation.h (+0/-58)
clutter/clutter/deprecated/clutter-container.h (+0/-20)
clutter/clutter/deprecated/clutter-group.c (+21/-28)
clutter/clutter/deprecated/clutter-rectangle.c (+24/-17)
clutter/clutter/deprecated/clutter-stage.h (+0/-14)
clutter/clutter/deprecated/clutter-state.c (+0/-352)
clutter/clutter/deprecated/clutter-state.h (+0/-31)
clutter/clutter/egl/clutter-backend-eglnative.c (+1/-1)
clutter/clutter/egl/clutter-backend-eglnative.h (+1/-4)
clutter/clutter/egl/clutter-egl.h (+0/-6)
clutter/clutter/meson.build (+11/-26)
clutter/clutter/x11/clutter-backend-x11.c (+0/-1)
clutter/clutter/x11/clutter-backend-x11.h (+0/-2)
cogl/cogl-pango/cogl-pango-display-list.c (+5/-15)
cogl/cogl-pango/cogl-pango-render.c (+0/-41)
cogl/cogl-pango/cogl-pango.h (+0/-65)
cogl/cogl-pango/cogl-pango.symbols (+0/-3)
cogl/cogl-path/cogl-path-functions.h (+0/-49)
cogl/cogl-path/cogl-path.c (+0/-38)
cogl/cogl/cogl-atlas-texture.c (+4/-18)
cogl/cogl/cogl-atlas.c (+9/-3)
cogl/cogl/cogl-attribute-private.h (+2/-3)
cogl/cogl/cogl-attribute.c (+4/-43)
cogl/cogl/cogl-bitmap-private.h (+0/-18)
cogl/cogl/cogl-bitmap.c (+18/-87)
cogl/cogl/cogl-blend-string.c (+7/-28)
cogl/cogl/cogl-blit.c (+5/-1)
cogl/cogl/cogl-buffer-private.h (+0/-3)
cogl/cogl/cogl-buffer.c (+0/-6)
cogl/cogl/cogl-clip-stack.c (+31/-2)
cogl/cogl/cogl-clip-stack.h (+13/-1)
cogl/cogl/cogl-color.c (+0/-22)
cogl/cogl/cogl-color.h (+0/-42)
cogl/cogl/cogl-context-private.h (+3/-47)
cogl/cogl/cogl-context.c (+19/-120)
cogl/cogl/cogl-context.h (+3/-25)
cogl/cogl/cogl-debug-options.h (+0/-5)
cogl/cogl/cogl-debug.c (+0/-1)
cogl/cogl/cogl-debug.h (+0/-1)
cogl/cogl/cogl-depth-state.h (+0/-7)
cogl/cogl/cogl-driver.h (+6/-0)
cogl/cogl/cogl-egl.h (+0/-20)
cogl/cogl/cogl-feature-private.c (+1/-1)
cogl/cogl/cogl-feature-private.h (+0/-2)
cogl/cogl/cogl-framebuffer-private.h (+4/-65)
cogl/cogl/cogl-framebuffer.c (+53/-259)
cogl/cogl/cogl-framebuffer.h (+12/-318)
cogl/cogl/cogl-indices.h (+1/-1)
cogl/cogl/cogl-journal-private.h (+2/-0)
cogl/cogl/cogl-journal.c (+126/-65)
cogl/cogl/cogl-matrix-stack-private.h (+3/-36)
cogl/cogl/cogl-matrix-stack.c (+31/-218)
cogl/cogl/cogl-matrix-stack.h (+3/-14)
cogl/cogl/cogl-matrix.c (+26/-94)
cogl/cogl/cogl-matrix.h (+7/-59)
cogl/cogl/cogl-object-private.h (+0/-31)
cogl/cogl/cogl-object.c (+0/-12)
cogl/cogl/cogl-offscreen.h (+0/-28)
cogl/cogl/cogl-onscreen-private.h (+0/-6)
cogl/cogl/cogl-onscreen.c (+4/-123)
cogl/cogl/cogl-onscreen.h (+0/-117)
cogl/cogl/cogl-pipeline-debug.c (+1/-19)
cogl/cogl/cogl-pipeline-layer-private.h (+1/-5)
cogl/cogl/cogl-pipeline-layer-state.c (+2/-119)
cogl/cogl/cogl-pipeline-layer-state.h (+2/-42)
cogl/cogl/cogl-pipeline-layer.c (+3/-7)
cogl/cogl/cogl-pipeline-private.h (+5/-122)
cogl/cogl/cogl-pipeline-state-private.h (+0/-24)
cogl/cogl/cogl-pipeline-state.c (+6/-440)
cogl/cogl/cogl-pipeline-state.h (+1/-190)
cogl/cogl/cogl-pipeline.c (+26/-288)
cogl/cogl/cogl-pipeline.h (+1/-1)
cogl/cogl/cogl-pixel-buffer.h (+0/-31)
cogl/cogl/cogl-pixel-format.c (+119/-86)
cogl/cogl/cogl-pixel-format.h (+28/-7)
cogl/cogl/cogl-primitives-private.h (+8/-2)
cogl/cogl/cogl-primitives.c (+29/-403)
cogl/cogl/cogl-private.h (+3/-23)
cogl/cogl/cogl-renderer-private.h (+0/-4)
cogl/cogl/cogl-renderer.c (+1/-40)
cogl/cogl/cogl-renderer.h (+0/-14)
cogl/cogl/cogl-sampler-cache-private.h (+1/-3)
cogl/cogl/cogl-sampler-cache.c (+3/-16)
cogl/cogl/cogl-snippet.h (+1/-2)
cogl/cogl/cogl-sub-texture.c (+2/-5)
cogl/cogl/cogl-texture-2d-private.h (+0/-1)
cogl/cogl/cogl-texture-2d-sliced-private.h (+0/-10)
cogl/cogl/cogl-texture-2d-sliced.c (+15/-137)
cogl/cogl/cogl-texture-2d.c (+2/-11)
cogl/cogl/cogl-texture-driver.h (+0/-11)
cogl/cogl/cogl-texture-private.h (+1/-8)
cogl/cogl/cogl-texture.c (+17/-20)
cogl/cogl/cogl-types.h (+1/-119)
cogl/cogl/cogl-xlib-private.h (+0/-6)
cogl/cogl/cogl-xlib-renderer-private.h (+0/-3)
cogl/cogl/cogl-xlib-renderer.c (+0/-28)
cogl/cogl/cogl-xlib-renderer.h (+1/-29)
cogl/cogl/cogl-xlib.h (+0/-57)
cogl/cogl/cogl.c (+0/-466)
cogl/cogl/cogl.h (+2/-12)
cogl/cogl/cogl1-context.h (+0/-599)
cogl/cogl/deprecated/cogl-auto-texture.c (+2/-2)
cogl/cogl/deprecated/cogl-auto-texture.h (+1/-2)
cogl/cogl/deprecated/cogl-clutter.c (+0/-59)
cogl/cogl/deprecated/cogl-clutter.h (+0/-9)
cogl/cogl/deprecated/cogl-framebuffer-deprecated.h (+0/-107)
cogl/cogl/deprecated/cogl-material-compat.c (+0/-299)
cogl/cogl/deprecated/cogl-material-compat.h (+0/-748)
cogl/cogl/deprecated/cogl-program-private.h (+0/-3)
cogl/cogl/deprecated/cogl-program.c (+8/-125)
cogl/cogl/deprecated/cogl-shader-private.h (+0/-6)
cogl/cogl/deprecated/cogl-shader.c (+2/-85)
cogl/cogl/deprecated/cogl-shader.h (+0/-208)
cogl/cogl/driver/gl/cogl-attribute-gl.c (+2/-223)
cogl/cogl/driver/gl/cogl-bitmap-gl-private.h (+21/-6)
cogl/cogl/driver/gl/cogl-bitmap-gl.c (+122/-0)
cogl/cogl/driver/gl/cogl-buffer-gl.c (+1/-1)
cogl/cogl/driver/gl/cogl-clip-stack-gl.c (+144/-210)
cogl/cogl/driver/gl/cogl-framebuffer-gl.c (+18/-62)
cogl/cogl/driver/gl/cogl-pipeline-fragend-glsl.c (+1/-11)
cogl/cogl/driver/gl/cogl-pipeline-opengl-private.h (+2/-10)
cogl/cogl/driver/gl/cogl-pipeline-opengl.c (+26/-281)
cogl/cogl/driver/gl/cogl-pipeline-progend-glsl.c (+19/-38)
cogl/cogl/driver/gl/cogl-pipeline-vertend-glsl.c (+2/-24)
cogl/cogl/driver/gl/cogl-texture-2d-gl-private.h (+1/-2)
cogl/cogl/driver/gl/cogl-texture-2d-gl.c (+23/-270)
cogl/cogl/driver/gl/cogl-texture-gl-private.h (+1/-2)
cogl/cogl/driver/gl/cogl-texture-gl.c (+4/-8)
cogl/cogl/driver/gl/cogl-util-gl-private.h (+7/-0)
cogl/cogl/driver/gl/gl/cogl-driver-gl.c (+64/-59)
cogl/cogl/driver/gl/gl/cogl-texture-driver-gl.c (+17/-26)
cogl/cogl/driver/gl/gles/cogl-driver-gles.c (+7/-34)
cogl/cogl/driver/gl/gles/cogl-texture-driver-gles.c (+24/-20)
cogl/cogl/driver/nop/cogl-driver-nop.c (+14/-1)
cogl/cogl/driver/nop/cogl-texture-2d-nop-private.h (+1/-2)
cogl/cogl/driver/nop/cogl-texture-2d-nop.c (+1/-2)
cogl/cogl/gl-prototypes/cogl-all-functions.h (+0/-46)
cogl/cogl/gl-prototypes/cogl-core-functions.h (+21/-28)
cogl/cogl/gl-prototypes/cogl-glsl-functions.h (+0/-82)
cogl/cogl/gl-prototypes/cogl-in-gles-core-functions.h (+0/-77)
cogl/cogl/gl-prototypes/cogl-in-gles2-core-functions.h (+0/-43)
cogl/cogl/libmutter-cogl.map.in (+0/-1)
cogl/cogl/meson.build (+8/-37)
cogl/cogl/winsys/cogl-glx-renderer-private.h (+0/-2)
cogl/cogl/winsys/cogl-glx.h (+0/-20)
cogl/cogl/winsys/cogl-texture-pixmap-x11.c (+17/-24)
cogl/cogl/winsys/cogl-texture-pixmap-x11.h (+0/-25)
cogl/cogl/winsys/cogl-winsys-egl-x11.c (+2/-48)
cogl/cogl/winsys/cogl-winsys-egl.c (+21/-11)
cogl/cogl/winsys/cogl-winsys-glx.c (+25/-116)
cogl/meson.build (+1/-0)
cogl/test-fixtures/test-utils.c (+0/-18)
cogl/tests/conform/meson.build (+1/-6)
cogl/tests/conform/test-backface-culling.c (+48/-42)
cogl/tests/conform/test-blend-strings.c (+29/-84)
cogl/tests/conform/test-conform-main.c (+1/-1)
cogl/tests/conform/test-declarations.h (+1/-1)
cogl/tests/conform/test-depth-test.c (+16/-47)
cogl/tests/conform/test-euler.c (+3/-17)
cogl/tests/conform/test-just-vertex-shader.c (+9/-95)
cogl/tests/conform/test-multitexture.c (+7/-5)
cogl/tests/conform/test-offscreen.c (+34/-35)
cogl/tests/conform/test-path.c (+1/-3)
cogl/tests/conform/test-pipeline-uniforms.c (+2/-2)
cogl/tests/conform/test-premult.c (+10/-30)
cogl/tests/conform/test-readpixels.c (+7/-7)
cogl/tests/conform/test-texture-mipmaps.c (+6/-4)
cogl/tests/conform/test-texture-pixmap-x11.c (+6/-4)
cogl/tests/conform/test-viewport.c (+7/-7)
cogl/tests/conform/test-wrap-modes.c (+23/-73)
cogl/tests/data/valgrind.suppressions (+0/-8)
debian/changelog (+39/-0)
debian/control (+11/-9)
debian/control.in (+11/-9)
debian/gbp.conf (+1/-1)
debian/gir1.2-mutter-6.install (+1/-0)
debian/libmutter-6-0.install (+2/-0)
debian/libmutter-6-0.symbols (+67/-452)
debian/libmutter-6-dev.install (+2/-2)
debian/mutter.install (+1/-1)
debian/patches/debian/synaptics-support.patch (+38/-38)
debian/patches/debian/tests-Tag-closed-transient-no-input-tests-as-flaky.patch (+2/-2)
debian/patches/meson-add-back-default_driver-option.patch (+4/-4)
debian/patches/series (+0/-1)
debian/patches/theme-load-icons-as-Gtk-does-with-fallback-and-RTL-suppor.patch (+6/-8)
debian/patches/theme-use-gtk_render_icon_suface-to-paint-button-icon.patch (+1/-1)
debian/patches/x11-Add-support-for-fractional-scaling-using-Randr.patch (+59/-59)
debian/rules (+2/-2)
debian/tests/control (+2/-2)
debian/tests/libmutter-6-dev (+1/-1)
debian/watch (+1/-1)
dev/null (+0/-7)
meson.build (+5/-2)
mutter.doap (+24/-3)
po/POTFILES.in (+0/-1)
po/gl.po (+41/-1236)
po/ja.po (+63/-102)
po/ms.po (+1411/-2364)
po/zh_CN.po (+126/-90)
src/backends/meta-backend-private.h (+4/-26)
src/backends/meta-backend.c (+91/-132)
src/backends/meta-crtc.c (+2/-0)
src/backends/meta-cursor-renderer.c (+9/-9)
src/backends/meta-cursor-renderer.h (+3/-3)
src/backends/meta-cursor-tracker-private.h (+0/-1)
src/backends/meta-cursor-tracker.c (+4/-43)
src/backends/meta-egl-ext.h (+1/-0)
src/backends/meta-egl.c (+1/-0)
src/backends/meta-egl.h (+1/-0)
src/backends/meta-idle-monitor-dbus.c (+0/-47)
src/backends/meta-idle-monitor-private.h (+1/-1)
src/backends/meta-idle-monitor.c (+20/-40)
src/backends/meta-input-mapper.c (+7/-7)
src/backends/meta-input-settings.c (+93/-56)
src/backends/meta-monitor-config-manager.c (+129/-24)
src/backends/meta-monitor-manager.c (+5/-5)
src/backends/meta-orientation-manager.c (+3/-3)
src/backends/meta-profiler.c (+2/-5)
src/backends/meta-remote-desktop-session.c (+7/-11)
src/backends/meta-remote-desktop.c (+3/-3)
src/backends/meta-renderer.c (+2/-0)
src/backends/meta-screen-cast-monitor-stream-src.c (+17/-26)
src/backends/meta-screen-cast-window-stream-src.c (+15/-26)
src/backends/meta-screen-cast-window-stream.c (+2/-3)
src/backends/meta-screen-cast-window.c (+6/-6)
src/backends/meta-screen-cast-window.h (+8/-8)
src/backends/meta-stage-private.h (+4/-4)
src/backends/meta-stage.c (+23/-18)
src/backends/native/gen-default-modes.py (+2/-2)
src/backends/native/meta-backend-native.c (+48/-70)
src/backends/native/meta-backend-native.h (+2/-0)
src/backends/native/meta-barrier-native.c (+2/-2)
src/backends/native/meta-clutter-backend-native.c (+29/-31)
src/backends/native/meta-clutter-backend-native.h (+2/-0)
src/backends/native/meta-crtc-kms.c (+5/-1)
src/backends/native/meta-cursor-renderer-native.c (+171/-111)
src/backends/native/meta-drm-buffer-gbm.c (+18/-78)
src/backends/native/meta-drm-buffer-import.c (+197/-0)
src/backends/native/meta-drm-buffer-import.h (+54/-0)
src/backends/native/meta-gpu-kms.c (+75/-0)
src/backends/native/meta-gpu-kms.h (+17/-0)
src/backends/native/meta-input-device-native.c (+37/-58)
src/backends/native/meta-input-device-native.h (+2/-4)
src/backends/native/meta-input-settings-native.c (+4/-2)
src/backends/native/meta-keymap-native.c (+14/-9)
src/backends/native/meta-keymap-native.h (+4/-0)
src/backends/native/meta-kms-connector.c (+5/-0)
src/backends/native/meta-kms-crtc.c (+1/-0)
src/backends/native/meta-kms-device.c (+52/-13)
src/backends/native/meta-kms-device.h (+7/-0)
src/backends/native/meta-kms-impl-device.c (+30/-2)
src/backends/native/meta-kms-impl-device.h (+9/-0)
src/backends/native/meta-kms-impl-simple.c (+246/-44)
src/backends/native/meta-kms-impl.c (+4/-5)
src/backends/native/meta-kms-impl.h (+4/-6)
src/backends/native/meta-kms-plane-private.h (+33/-0)
src/backends/native/meta-kms-plane.c (+1/-1)
src/backends/native/meta-kms-plane.h (+0/-5)
src/backends/native/meta-kms-private.h (+2/-2)
src/backends/native/meta-kms-types.h (+2/-0)
src/backends/native/meta-kms-update-private.h (+23/-0)
src/backends/native/meta-kms-update.c (+111/-6)
src/backends/native/meta-kms-update.h (+41/-8)
src/backends/native/meta-kms.c (+31/-33)
src/backends/native/meta-kms.h (+1/-2)
src/backends/native/meta-launcher.c (+6/-5)
src/backends/native/meta-monitor-manager-kms.c (+14/-6)
src/backends/native/meta-renderer-native-gles3.c (+3/-0)
src/backends/native/meta-renderer-native.c (+160/-91)
src/backends/native/meta-seat-native.c (+2528/-112)
src/backends/native/meta-seat-native.h (+174/-8)
src/backends/native/meta-udev.c (+2/-2)
src/backends/native/meta-virtual-input-device-native.c (+13/-6)
src/backends/x11/cm/meta-backend-x11-cm.c (+6/-5)
src/backends/x11/meta-backend-x11.c (+17/-21)
src/backends/x11/meta-clutter-backend-x11.c (+16/-77)
src/backends/x11/meta-input-device-x11.c (+16/-6)
src/backends/x11/meta-keymap-x11.c (+29/-22)
src/backends/x11/meta-keymap-x11.h (+0/-2)
src/backends/x11/meta-seat-x11.c (+744/-681)
src/backends/x11/meta-seat-x11.h (+42/-0)
src/backends/x11/meta-stage-x11.c (+5/-56)
src/backends/x11/meta-stage-x11.h (+0/-4)
src/backends/x11/meta-virtual-input-device-x11.c (+2/-1)
src/backends/x11/meta-xkb-a11y-x11.c (+11/-14)
src/backends/x11/meta-xkb-a11y-x11.h (+3/-3)
src/backends/x11/nested/meta-stage-x11-nested.c (+0/-26)
src/compositor/clutter-utils.c (+6/-23)
src/compositor/clutter-utils.h (+5/-8)
src/compositor/compositor.c (+41/-34)
src/compositor/meta-background-actor.c (+6/-4)
src/compositor/meta-background.c (+28/-6)
src/compositor/meta-compositor-x11.c (+35/-18)
src/compositor/meta-cullable.c (+45/-2)
src/compositor/meta-cullable.h (+2/-0)
src/compositor/meta-dnd-actor.c (+1/-1)
src/compositor/meta-dnd.c (+1/-4)
src/compositor/meta-feedback-actor.c (+1/-1)
src/compositor/meta-shadow-factory.c (+3/-9)
src/compositor/meta-shaped-texture-private.h (+6/-1)
src/compositor/meta-shaped-texture.c (+132/-43)
src/compositor/meta-surface-actor-wayland.c (+10/-22)
src/compositor/meta-surface-actor-x11.c (+12/-35)
src/compositor/meta-surface-actor-x11.h (+6/-0)
src/compositor/meta-surface-actor.c (+68/-66)
src/compositor/meta-surface-actor.h (+5/-13)
src/compositor/meta-sync-ring.c (+1/-1)
src/compositor/meta-texture-tower.c (+12/-6)
src/compositor/meta-texture-tower.h (+2/-1)
src/compositor/meta-window-actor-private.h (+6/-13)
src/compositor/meta-window-actor-wayland.c (+35/-0)
src/compositor/meta-window-actor-x11.c (+1044/-20)
src/compositor/meta-window-actor-x11.h (+13/-0)
src/compositor/meta-window-actor.c (+86/-905)
src/compositor/meta-window-group.c (+10/-10)
src/compositor/region-utils.c (+4/-4)
src/compositor/region-utils.h (+4/-4)
src/core/boxes-private.h (+7/-7)
src/core/boxes.c (+19/-17)
src/core/constraints.c (+9/-44)
src/core/display-private.h (+0/-1)
src/core/display.c (+21/-51)
src/core/edge-resistance.c (+9/-17)
src/core/events.c (+3/-22)
src/core/frame.c (+4/-3)
src/core/frame.h (+3/-2)
src/core/main-private.h (+8/-0)
src/core/main.c (+1/-1)
src/core/meta-clipboard-manager.c (+13/-3)
src/core/meta-close-dialog-default.c (+2/-7)
src/core/meta-gesture-tracker.c (+8/-13)
src/core/meta-selection-source-memory.c (+1/-1)
src/core/meta-selection.c (+19/-0)
src/core/meta-sound-player.c (+3/-3)
src/core/meta-workspace-manager.c (+2/-2)
src/core/prefs.c (+2/-2)
src/core/stack.c (+7/-144)
src/core/startup-notification.c (+3/-8)
src/core/util.c (+18/-5)
src/core/window-private.h (+13/-1)
src/core/window.c (+63/-55)
src/meson.build (+29/-8)
src/meta/common.h (+0/-8)
src/meta/meta-cursor-tracker.h (+0/-7)
src/meta/meta-idle-monitor.h (+0/-3)
src/meta/meta-workspace-manager.h (+1/-0)
src/meta/util.h (+10/-0)
src/meta/window.h (+2/-0)
src/tests/clutter-test-utils.c (+13/-15)
src/tests/clutter-test-utils.h (+10/-10)
src/tests/clutter/accessibility/cally-atktext-example.c (+9/-9)
src/tests/clutter/clutter-1.0.suppressions (+0/-8)
src/tests/clutter/conform/actor-anchors.c (+4/-4)
src/tests/clutter/conform/actor-destroy.c (+7/-33)
src/tests/clutter/conform/actor-layout.c (+8/-8)
src/tests/clutter/conform/actor-offscreen-redirect.c (+24/-14)
src/tests/clutter/conform/actor-shader-effect.c (+6/-4)
src/tests/clutter/conform/binding-pool.c (+16/-4)
src/tests/clutter/conform/meson.build (+0/-2)
src/tests/clutter/conform/script-parser.c (+0/-39)
src/tests/clutter/conform/text-cache.c (+3/-1)
src/tests/clutter/conform/texture-fbo.c (+0/-8)
src/tests/clutter/conform/timeline.c (+1/-1)
src/tests/clutter/interactive/meson.build (+2/-9)
src/tests/clutter/interactive/test-actors.c (+3/-27)
src/tests/clutter/interactive/test-binding-pool.c (+13/-4)
src/tests/clutter/interactive/test-cogl-multitexture.c (+29/-23)
src/tests/clutter/interactive/test-cogl-offscreen.c (+59/-51)
src/tests/clutter/interactive/test-cogl-point-sprites.c (+12/-25)
src/tests/clutter/interactive/test-cogl-shader-glsl.c (+13/-15)
src/tests/clutter/interactive/test-cogl-tex-convert.c (+51/-36)
src/tests/clutter/interactive/test-cogl-tex-polygon.c (+90/-61)
src/tests/clutter/interactive/test-cogl-tex-tile.c (+22/-11)
src/tests/clutter/interactive/test-content.c (+4/-3)
src/tests/clutter/interactive/test-devices.c (+26/-22)
src/tests/clutter/interactive/test-easing.c (+16/-10)
src/tests/clutter/interactive/test-events.c (+1/-1)
src/tests/clutter/interactive/test-grab.c (+3/-3)
src/tests/clutter/interactive/test-image.c (+4/-3)
src/tests/clutter/interactive/test-layout.c (+6/-5)
src/tests/clutter/interactive/test-main.c (+13/-0)
src/tests/clutter/interactive/test-paint-wrapper.c (+32/-40)
src/tests/clutter/interactive/test-script.c (+0/-29)
src/tests/clutter/interactive/test-script.json (+1/-21)
src/tests/clutter/interactive/test-shader-effects.c (+2/-1)
src/tests/clutter/interactive/test-state.c (+2/-1)
src/tests/clutter/interactive/test-text-field.c (+9/-9)
src/tests/clutter/interactive/test-touch-events.c (+15/-31)
src/tests/clutter/meson.build (+2/-0)
src/tests/clutter/micro-bench/test-cogl-perf.c (+36/-22)
src/tests/clutter/micro-bench/test-picking.c (+3/-1)
src/tests/clutter/micro-bench/test-text-perf.c (+3/-1)
src/tests/clutter/micro-bench/test-text.c (+3/-1)
src/tests/clutter/performance/meson.build (+4/-1)
src/tests/clutter/performance/test-common.h (+11/-3)
src/tests/clutter/performance/test-state-interactive.c (+2/-1)
src/tests/clutter/performance/test-state-mini.c (+2/-1)
src/tests/clutter/performance/test-state-pick.c (+2/-1)
src/tests/clutter/performance/test-state.c (+2/-1)
src/tests/clutter/test-utils.h (+30/-0)
src/tests/meson.build (+6/-0)
src/tests/stacking/set-override-redirect-parent.metatest (+13/-0)
src/tests/test-utils.c (+2/-3)
src/tests/unit-tests.c (+3/-0)
src/tests/wayland-test-clients/meson.build (+61/-0)
src/tests/wayland-test-clients/subsurface-remap-toplevel.c (+397/-0)
src/tests/wayland-test-clients/test-driver.xml (+9/-0)
src/tests/wayland-test-clients/wayland-test-client-utils.c (+88/-0)
src/tests/wayland-test-clients/wayland-test-client-utils.h (+8/-0)
src/tests/wayland-unit-tests.c (+203/-0)
src/tests/wayland-unit-tests.h (+25/-0)
src/ui/frames.c (+87/-79)
src/ui/frames.h (+9/-3)
src/ui/theme.c (+2/-2)
src/ui/ui.c (+2/-2)
src/wayland/meta-pointer-confinement-wayland.c (+5/-2)
src/wayland/meta-wayland-actor-surface.c (+61/-33)
src/wayland/meta-wayland-actor-surface.h (+4/-1)
src/wayland/meta-wayland-buffer.c (+49/-18)
src/wayland/meta-wayland-buffer.h (+0/-1)
src/wayland/meta-wayland-cursor-surface.c (+13/-13)
src/wayland/meta-wayland-data-device-private.h (+1/-7)
src/wayland/meta-wayland-data-device.c (+174/-134)
src/wayland/meta-wayland-data-device.h (+2/-0)
src/wayland/meta-wayland-dma-buf.c (+30/-2)
src/wayland/meta-wayland-dma-buf.h (+0/-1)
src/wayland/meta-wayland-dnd-surface.c (+5/-5)
src/wayland/meta-wayland-egl-stream.c (+18/-9)
src/wayland/meta-wayland-egl-stream.h (+1/-1)
src/wayland/meta-wayland-gtk-shell.c (+2/-2)
src/wayland/meta-wayland-inhibit-shortcuts-dialog.c (+1/-1)
src/wayland/meta-wayland-inhibit-shortcuts.c (+6/-6)
src/wayland/meta-wayland-keyboard.c (+10/-6)
src/wayland/meta-wayland-legacy-xdg-shell.c (+79/-89)
src/wayland/meta-wayland-outputs.c (+30/-5)
src/wayland/meta-wayland-outputs.h (+2/-0)
src/wayland/meta-wayland-pointer-constraints.c (+22/-19)
src/wayland/meta-wayland-pointer.c (+27/-36)
src/wayland/meta-wayland-pointer.h (+1/-1)
src/wayland/meta-wayland-seat.c (+20/-18)
src/wayland/meta-wayland-shell-surface.c (+10/-24)
src/wayland/meta-wayland-shell-surface.h (+4/-12)
src/wayland/meta-wayland-subsurface.c (+32/-20)
src/wayland/meta-wayland-surface.c (+223/-220)
src/wayland/meta-wayland-surface.h (+66/-31)
src/wayland/meta-wayland-tablet-manager.c (+0/-5)
src/wayland/meta-wayland-tablet-pad.c (+2/-2)
src/wayland/meta-wayland-tablet-seat.c (+14/-10)
src/wayland/meta-wayland-tablet-seat.h (+1/-1)
src/wayland/meta-wayland-tablet-tool.c (+3/-10)
src/wayland/meta-wayland-tablet-tool.h (+1/-1)
src/wayland/meta-wayland-text-input-legacy.c (+2/-2)
src/wayland/meta-wayland-text-input.c (+2/-2)
src/wayland/meta-wayland-touch.c (+15/-8)
src/wayland/meta-wayland-touch.h (+0/-1)
src/wayland/meta-wayland-types.h (+2/-1)
src/wayland/meta-wayland-viewporter.c (+21/-14)
src/wayland/meta-wayland-window-configuration.c (+68/-0)
src/wayland/meta-wayland-window-configuration.h (+50/-0)
src/wayland/meta-wayland-wl-shell.c (+29/-15)
src/wayland/meta-wayland-xdg-foreign.c (+6/-6)
src/wayland/meta-wayland-xdg-shell.c (+108/-99)
src/wayland/meta-wayland.c (+2/-1)
src/wayland/meta-window-wayland.c (+114/-74)
src/wayland/meta-window-wayland.h (+8/-18)
src/wayland/meta-window-xwayland.c (+169/-0)
src/wayland/meta-xwayland-dnd.c (+9/-5)
src/wayland/meta-xwayland-grab-keyboard.c (+9/-16)
src/wayland/meta-xwayland.c (+1/-50)
src/x11/atomnames.h (+3/-0)
src/x11/events.c (+14/-4)
src/x11/meta-selection-source-x11.c (+1/-0)
src/x11/meta-startup-notification-x11.c (+6/-0)
src/x11/meta-x11-display-private.h (+2/-0)
src/x11/meta-x11-display.c (+61/-6)
src/x11/meta-x11-selection-input-stream.c (+15/-0)
src/x11/meta-x11-selection-output-stream.c (+19/-16)
src/x11/meta-x11-selection.c (+64/-9)
src/x11/meta-x11-window-control.c (+59/-85)
src/x11/meta-x11-window-control.h (+81/-0)
src/x11/session.c (+1/-1)
src/x11/window-props.c (+30/-7)
src/x11/window-x11-private.h (+7/-0)
src/x11/window-x11.c (+237/-24)
src/x11/window-x11.h (+12/-0)
Reviewer Review Type Date Requested Status
Ubuntu Desktop Pending
Review via email: mp+379812@code.launchpad.net

Description of the change

Update to 3.35.91

To post a comment you must log in.

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1diff --git a/NEWS b/NEWS
2index 38e94df..769cadd 100644
3--- a/NEWS
4+++ b/NEWS
5@@ -1,45 +1,137 @@
6-3.34.3
7+3.35.91
8+=======
9+* Honor accelerometer orientation on monitor config changes [Hans; !959]
10+* Enable culling for integer-scaled actors [Robert; !1036]
11+* Add ClutterSeat::touch-mode property [Carlos; !1044]
12+* Fix mis-scaling when streaming windows [Olivier; !1022]
13+* Make the cursor renderer use the transactional KMS API [Jonas; !930]
14+* Advertise MetaMonitor as wl_output [Olivier; !994]
15+* Fix culling of XWayland windows [Robert; !1049]
16+* Only consider enabled effects when disabling culling [Robert; !1052]
17+* Misc. bug fixes and cleanups [Olivier, Sergio, Adam, Carlos, Björn; !1040,
18+ #985, !1024, !1039, !1051]
19+
20+Contributors:
21+ Sergio Costas, Björn Daase, Olivier Fourdan, Carlos Garnacho, Hans de Goede,
22+ Adam Jackson, Robert Mader, Jonas Ådahl
23+
24+Translators:
25+ sicklylife [ja]
26+
27+3.35.90
28+=======
29+* Cull out clip region [Robert; !985]
30+* Always enable tap-to-click/drag on opaque Wacom tablets [Carlos; !968]
31+* Fix visual glitches with offscreen effects applied [Georges; !992]
32+* Fix "sticky corner" in multi-head setups [Jonas D.; #774]
33+* Fix black shadows around XWayland windows during resizes [Ray, Olivier; #858]
34+* Zero-copy path for GPU-less secondary GPUs [Pekka; !810]
35+* Cancel DND on Esc [Carlos; #1020]
36+* Sync XWayland window shadows to frame during resizes [Olivier; !1009]
37+* Add support for per-monitor workareas [Alberts; !370]
38+* Ensure newly mapped wayland windows receive ENTER event [Olivier; !1026]
39+* Add ClutterSeat object [Carlos; !852]
40+* Honour CLUTTER_ACTOR_NO_LAYOUT flag more efficiently [Daniel; !575]
41+* Fix interoperation with wl_data_device_manager v1 [Carlos; #965]
42+* Favor text over images in clipboard manager [Carlos; #919]
43+* Apply monitor scale after background texture creation [Daniel; !1004]
44+* Plugged memory leaks [Sebastian, Adam; !991, #1000, !1011, !1020, !1030,
45+ !1001, !1033]
46+* Fixed crashes [Jonas Å., Florian, Olivier; !961, #1029, !1037]
47+* Misc. bug fixes and cleanups [Björn, Jonas Å., Adam, Sebastian, Jonas D.,
48+ Daniel, Carlos, Corentin, Sebastian, Robert, Daniel; #385, !998, !1007, !995,
49+ !1016, !1018, !1017, !1005, !1019, !1025, !1028, !1029, !1031, !1015, !1032,
50+ !1034, #1025]
51+
52+Contributors:
53+ Björn Daase, Jonas Dreßler, Olivier Fourdan, Carlos Garnacho, Adam Jackson,
54+ Sebastian Keller, Robert Mader, Alberts Muktupāvels, Florian Müllner,
55+ Georges Basile Stavracas Neto, Corentin Noël, Pekka Paalanen, Ray Strode,
56+ Daniel van Vugt, Jonas Ådahl
57+
58+Translators:
59+ sicklylife [ja], Umarzuki Bin Mochlis Moktar [ms]
60+
61+3.35.3
62 ======
63+* backends/native: Correct dy value in pinch gesture event [Yariv; !974]
64+* Upload clipping rectangles in parallel [Daniel; !969]
65+* More cogl API cleanups [Adam; !978, !977, !973]
66 * Fix window recording on HiDPI [Pascal; !976]
67 * Fix top-left pixel being insensitive to clicks [Sebastian; #893]
68+* Misc. bug fixes and cleanups [Daniel, Adam; !979, !980]
69
70 Contributors:
71- Sebastian Keller, Pascal Nowack
72+ Yariv Barkan, Adam Jackson, Sebastian Keller, Pascal Nowack, Daniel van Vugt
73+
74+Translators:
75+ Fran Dieguez [gl], Dz Chen [zh_CN]
76
77-3.34.2
78+3.35.2
79 ======
80-* Fix immediate screen blank after releasing inhibitor [Tim; #573]
81-* Respond to frame callbacks regardless of damage [Jonas Å.; !839]
82-* Translate well-known selection atoms to mimetypes [Carlos; !842]
83-* Fix Night Light on wayland [Jonas Å.; !840]
84-* Fix various copy+paste/DND regressions [Carlos; !848, #789, #842,
85- #793, #845, #854]
86-* Don't emit focus event after desctruction [Marco; gnome-shell#1704, !860]
87+* Don't emit focus event after destruction [Marco; gnome-shell#1704, !860]
88+* Add a notion of pixel format planes [Niels; !858]
89+* Replace various Cogl/Clutter types with Graphene [Georges; !458]
90+* Improve CoglJournal [Georges, Jasper; !402]
91+* Split pick and paint [Georges; !865]
92+* Remove deprecated/unused cogl/clutter APIs [Adam; !866, !878, !879, !880,
93+ !885, !900, !902, !904, !896, !913, !922, !883, !903, !921, !933, !819]
94 * Fix hang when opening not-responding dialog on Xorg [Carlos; !876]
95-* Fix frozen grabs on Xorg after weeks of inactivity [Jonas Å.; !886]
96-* Fix triggering popups from stylus devices on wayland [Carlos; #886]
97-* Support shadow framebuffers for offscreen rendering [Olivier; !917]
98+* Allow changing Clutter debug flags at runtime [Georges; !862]
99+* Fix frozen grabs on Xorg after weeks of inactivity [Jonas; !886]
100+* Fix triggering popups from stylus devices o wayland [Carlos; #886]
101+* Fix fallback to GLES2 [Adam; #635]
102+* Fix buffer age checks on multiple monitors [Carlos; !906]
103+* Adjust to Sysprof API change [Christian; !908]
104+* Improve support for (X11) fullscreen games under wayland [Hans; !739]
105+* Support shadow framebuffers for offscreen rendering [Olivier; !877]
106 * Fix hang after interacting with desktop icons on X11 [Marco; !909]
107 * Don't double scale when getting absolute surface coordinates [Xiang; !915]
108+* Respect NET_WM_TRANSIENT_FOR for override-redirect windows [Marco; !920]
109 * Kill window effects on destroy [Robert; !924]
110+* Remove deprecated ClutterTexture [Jonas; !932]
111+* Use regions instead of bounding box for clipping and culling [Carlos; !867]
112 * Use partial damage for dma-buf and EGLImage buffers on wayland [Robert; #947]
113 * Do not stack transients underneath their always-on-top parent [Florian; #587]
114-* Fix KMS freeze after pageflip [Pekka; !953]
115-* Fixed crashes [Robert, Jonas Å., Marco, Hans, Carlos, Tim; !856, !912, !895,
116- !928, #591, !823, !960]
117-* Plugged memory leaks [Niels, Robert, Carlos; !847, !868, !873]
118-* Misc. bug fixes and cleanups [Daniel, Marco, Jonas Å., Georges, Cosimo,
119- Florian, Hans, Robert, Jonas D.; !841, !764, !837, !846, !673, !811, !893,
120- !925, !927, !940, !832]
121-
122-Contributors:
123- Marco Trevisan (Treviño), Cosimo Cecchi, Tim Crawford, Jonas Dreßler,
124- Xiang Fan, Olivier Fourdan, Carlos Garnacho, Hans de Goede, Niels De Graef,
125- Tim Klocke, Robert Mader, Florian Müllner, Georges Basile Stavracas Neto,
126- Pekka Paalanen, Daniel van Vugt, Jonas Ådahl
127+* Add explicit paint/pick contexts [Jonas; !935]
128+* Fix KMS freeze after pageflip fallback [Pekka; !953]
129+* Fixed crashes [Robert, Carlos, Jonas, Marco, Hans, Tim; !856, !869, !912,
130+ !895, !928, #591, !823, !960]
131+* Plugged memory leaks [Niels, Robert, Carlos, Marco; !847, !868, !873, #908]
132+* Misc. bug fixes and cleanups [Niels, Robert, Jonas, Marco, Carlos, Daniel,
133+ Jan, Adam, Cosimo, Florian, Thomas, Georges, Hans, Corentin, Christian,
134+ Benjamin; !853, !822, !451, !854, !816, !857, !859, !734, !844, !851, #876,
135+ !874, !673, !692, !888, !889, !894, !901, !905, !872, !898, !911, !918, !863,
136+ #878, !811, !893, !925, !926, !890, !931, !927, !934, !938, !940, !947, !941,
137+ !929, !949, !952, !871, !955, !956, !958, !907, !965, !964, !966]
138+
139+Contributors:
140+ Marco Trevisan (Treviño), Jan Alexander Steffens (heftig),
141+ Thomas Hindoe Paaboel Andersen, Benjamin Berg, Cosimo Cecchi, Tim Crawford,
142+ Piotr Drąg, Xiang Fan, Olivier Fourdan, Carlos Garnacho, Hans de Goede,
143+ Niels De Graef, Christian Hergert, Adam Jackson, Robert Mader,
144+ Florian Müllner, Georges Basile Stavracas Neto, Bastien Nocera, Corentin Noël,
145+ Pekka Paalanen, Jasper St. Pierre, Christian Rauch, Daniel van Vugt,
146+ Jonas Ådahl
147
148 Translators:
149 Bruce Cowan [en_GB]
150+
151+3.35.1
152+======
153+* Fix immediate screen blank after releaseing inhibitor [Tim; #573]
154+* Respond to frame callbacks regardless of damage [Jonas; !839]
155+* selection [Carlos; !842]
156+* Fix Night Light on wayland [Jonas; !840]
157+* Fix various copy+paste/DND regressions [Carlos; !848, #789, #842,
158+ #793, #845, #854]
159+* Misc. bug fixes and cleanups [Daniel, Marco, Jonas, Georges;
160+ !841, !764, !837, !846]
161+
162+Contributors:
163+ Marco Trevisan (Treviño), Carlos Garnacho, Tim Klocke,
164+ Georges Basile Stavracas Neto, Daniel van Vugt, Jonas Ådahl
165+
166 3.34.1
167 ======
168 * Fix startup of X11 session services on wayland [Carlos; #771]
169diff --git a/clutter/clutter/cally/cally-actor.c b/clutter/clutter/cally/cally-actor.c
170index d97357d..c92b576 100644
171--- a/clutter/clutter/cally/cally-actor.c
172+++ b/clutter/clutter/cally/cally-actor.c
173@@ -310,11 +310,7 @@ cally_actor_finalize (GObject *obj)
174
175 _cally_actor_clean_action_list (cally_actor);
176
177- if (priv->action_idle_handler)
178- {
179- g_source_remove (priv->action_idle_handler);
180- priv->action_idle_handler = 0;
181- }
182+ g_clear_handle_id (&priv->action_idle_handler, g_source_remove);
183
184 if (priv->action_queue)
185 {
186@@ -657,7 +653,7 @@ cally_actor_get_extents (AtkComponent *component,
187 ClutterActor *actor = NULL;
188 gint top_level_x, top_level_y;
189 gfloat f_width, f_height;
190- ClutterVertex verts[4];
191+ graphene_point3d_t verts[4];
192 ClutterActor *stage = NULL;
193
194 g_return_if_fail (CALLY_IS_ACTOR (component));
195diff --git a/clutter/clutter/cally/cally-text.c b/clutter/clutter/cally/cally-text.c
196index 6375a38..2b34f09 100644
197--- a/clutter/clutter/cally/cally-text.c
198+++ b/clutter/clutter/cally/cally-text.c
199@@ -247,11 +247,7 @@ cally_text_finalize (GObject *obj)
200 /* g_object_unref (cally_text->priv->textutil); */
201 /* cally_text->priv->textutil = NULL; */
202
203- if (cally_text->priv->insert_idle_handler)
204- {
205- g_source_remove (cally_text->priv->insert_idle_handler);
206- cally_text->priv->insert_idle_handler = 0;
207- }
208+ g_clear_handle_id (&cally_text->priv->insert_idle_handler, g_source_remove);
209
210 G_OBJECT_CLASS (cally_text_parent_class)->finalize (obj);
211 }
212@@ -1438,7 +1434,7 @@ static void cally_text_get_character_extents (AtkText *text,
213 PangoLayout *layout;
214 PangoRectangle extents;
215 const gchar *text_value;
216- ClutterVertex verts[4];
217+ graphene_point3d_t verts[4];
218
219 actor = CALLY_GET_CLUTTER_ACTOR (text);
220 if (actor == NULL) /* State is defunct */
221@@ -2294,7 +2290,7 @@ _cally_misc_get_index_at_point (ClutterText *clutter_text,
222 gint index, x_window, y_window, x_toplevel, y_toplevel;
223 gint x_temp, y_temp;
224 gboolean ret;
225- ClutterVertex verts[4];
226+ graphene_point3d_t verts[4];
227 PangoLayout *layout;
228 gint x_layout, y_layout;
229
230diff --git a/clutter/clutter/cally/cally-texture.c b/clutter/clutter/cally/cally-texture.c
231deleted file mode 100644
232index e7df619..0000000
233--- a/clutter/clutter/cally/cally-texture.c
234+++ /dev/null
235@@ -1,98 +0,0 @@
236-/* CALLY - The Clutter Accessibility Implementation Library
237- *
238- * Copyright (C) 2009 Igalia, S.L.
239- *
240- * Author: Alejandro Piñeiro Iglesias <apinheiro@igalia.com>
241- *
242- * This library is free software; you can redistribute it and/or
243- * modify it under the terms of the GNU Lesser General Public
244- * License as published by the Free Software Foundation; either
245- * version 2 of the License, or (at your option) any later version.
246- *
247- * This library is distributed in the hope that it will be useful,
248- * but WITHOUT ANY WARRANTY; without even the implied warranty of
249- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
250- * Lesser General Public License for more details.
251- *
252- * You should have received a copy of the GNU Lesser General Public
253- * License along with this library; if not, write to the
254- * Free Software Foundation, Inc., 59 Temple Place - Suite 330,
255- * Boston, MA 02111-1307, USA.
256- */
257-
258-/**
259- * SECTION:cally-texture
260- * @Title: CallyTexture
261- * @short_description: Implementation of the ATK interfaces for a #ClutterTexture
262- * @see_also: #ClutterTexture
263- *
264- * #CallyTexture implements the required ATK interfaces of #ClutterTexture
265- *
266- * In particular it sets a proper role for the texture.
267- */
268-#include "clutter-build-config.h"
269-
270-#define CLUTTER_DISABLE_DEPRECATION_WARNINGS
271-
272-#include "cally-texture.h"
273-#include "cally-actor-private.h"
274-
275-#include "deprecated/clutter-texture.h"
276-
277-/* AtkObject */
278-static void cally_texture_real_initialize (AtkObject *obj,
279- gpointer data);
280-
281-G_DEFINE_TYPE (CallyTexture, cally_texture, CALLY_TYPE_ACTOR)
282-
283-static void
284-cally_texture_class_init (CallyTextureClass *klass)
285-{
286-/* GObjectClass *gobject_class = G_OBJECT_CLASS (klass); */
287- AtkObjectClass *class = ATK_OBJECT_CLASS (klass);
288-
289- class->initialize = cally_texture_real_initialize;
290-}
291-
292-static void
293-cally_texture_init (CallyTexture *texture)
294-{
295- /* nothing to do yet */
296-}
297-
298-/**
299- * cally_texture_new:
300- * @actor: a #ClutterActor
301- *
302- * Creates a new #CallyTexture for the given @actor. @actor must be
303- * a #ClutterTexture.
304- *
305- * Return value: the newly created #AtkObject
306- *
307- * Since: 1.4
308- */
309-AtkObject*
310-cally_texture_new (ClutterActor *actor)
311-{
312- GObject *object = NULL;
313- AtkObject *accessible = NULL;
314-
315- g_return_val_if_fail (CLUTTER_IS_TEXTURE (actor), NULL);
316-
317- object = g_object_new (CALLY_TYPE_TEXTURE, NULL);
318-
319- accessible = ATK_OBJECT (object);
320- atk_object_initialize (accessible, actor);
321-
322- return accessible;
323-}
324-
325-static void
326-cally_texture_real_initialize (AtkObject *obj,
327- gpointer data)
328-{
329- ATK_OBJECT_CLASS (cally_texture_parent_class)->initialize (obj, data);
330-
331- /* default role */
332- obj->role = ATK_ROLE_IMAGE;
333-}
334diff --git a/clutter/clutter/cally/cally-texture.h b/clutter/clutter/cally/cally-texture.h
335deleted file mode 100644
336index 909a533..0000000
337--- a/clutter/clutter/cally/cally-texture.h
338+++ /dev/null
339@@ -1,84 +0,0 @@
340-/* CALLY - The Clutter Accessibility Implementation Library
341- *
342- * Copyright (C) 2009 Igalia, S.L.
343- *
344- * Author: Alejandro Piñeiro Iglesias <apinheiro@igalia.com>
345- *
346- * This library is free software; you can redistribute it and/or
347- * modify it under the terms of the GNU Lesser General Public
348- * License as published by the Free Software Foundation; either
349- * version 2 of the License, or (at your option) any later version.
350- *
351- * This library is distributed in the hope that it will be useful,
352- * but WITHOUT ANY WARRANTY; without even the implied warranty of
353- * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
354- * Lesser General Public License for more details.
355- *
356- * You should have received a copy of the GNU Lesser General Public
357- * License along with this library. If not, see <http://www.gnu.org/licenses/>.
358- */
359-
360-#ifndef __CALLY_TEXTURE_H__
361-#define __CALLY_TEXTURE_H__
362-
363-#if !defined(__CALLY_H_INSIDE__) && !defined(CLUTTER_COMPILATION)
364-#error "Only <cally/cally.h> can be included directly."
365-#endif
366-
367-#include <clutter/clutter.h>
368-#include <cally/cally-actor.h>
369-
370-G_BEGIN_DECLS
371-
372-#define CALLY_TYPE_TEXTURE (cally_texture_get_type ())
373-#define CALLY_TEXTURE(obj) (G_TYPE_CHECK_INSTANCE_CAST ((obj), CALLY_TYPE_TEXTURE, CallyTexture))
374-#define CALLY_TEXTURE_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CALLY_TYPE_TEXTURE, CallyTextureClass))
375-#define CALLY_IS_TEXTURE(obj) (G_TYPE_CHECK_INSTANCE_TYPE ((obj), CALLY_TYPE_TEXTURE))
376-#define CALLY_IS_TEXTURE_CLASS(klass) (G_TYPE_CHECK_CLASS_TYPE ((klass), CALLY_TYPE_TEXTURE))
377-#define CALLY_TEXTURE_GET_CLASS(obj) (G_TYPE_INSTANCE_GET_CLASS ((obj), CALLY_TYPE_TEXTURE, CallyTextureClass))
378-
379-typedef struct _CallyTexture CallyTexture;
380-typedef struct _CallyTextureClass CallyTextureClass;
381-typedef struct _CallyTexturePrivate CallyTexturePrivate;
382-
383-/**
384- * CallyTexture:
385- *
386- * The <structname>CallyTexture</structname> structure contains only
387- * private data and should be accessed using the provided API
388- *
389- * Since: 1.4
390- */
391-struct _CallyTexture
392-{
393- /*< private >*/
394- CallyActor parent;
395-
396- CallyTexturePrivate *priv;
397-};
398-
399-/**
400- * CallyTextureClass:
401- *
402- * The <structname>CallyTextureClass</structname> structure contains
403- * only private data
404- *
405- * Since: 1.4
406- */
407-struct _CallyTextureClass
408-{
409- /*< private >*/
410- CallyActorClass parent_class;
411-
412- /* padding for future expansion */
413- gpointer _padding_dummy[8];
414-};
415-
416-CLUTTER_EXPORT
417-GType cally_texture_get_type (void) G_GNUC_CONST;
418-CLUTTER_EXPORT
419-AtkObject *cally_texture_new (ClutterActor *actor);
420-
421-G_END_DECLS
422-
423-#endif /* __CALLY_TEXTURE_H__ */
424diff --git a/clutter/clutter/cally/cally.c b/clutter/clutter/cally/cally.c
425index 4e1b79a..8b92682 100644
426--- a/clutter/clutter/cally/cally.c
427+++ b/clutter/clutter/cally/cally.c
428@@ -39,7 +39,6 @@
429 #include "cally-group.h"
430 #include "cally-stage.h"
431 #include "cally-text.h"
432-#include "cally-texture.h"
433 #include "cally-rectangle.h"
434 #include "cally-clone.h"
435
436@@ -56,7 +55,6 @@ CALLY_ACCESSIBLE_FACTORY (CALLY_TYPE_ACTOR, cally_actor, cally_actor_new)
437 CALLY_ACCESSIBLE_FACTORY (CALLY_TYPE_GROUP, cally_group, cally_group_new)
438 CALLY_ACCESSIBLE_FACTORY (CALLY_TYPE_STAGE, cally_stage, cally_stage_new)
439 CALLY_ACCESSIBLE_FACTORY (CALLY_TYPE_TEXT, cally_text, cally_text_new)
440-CALLY_ACCESSIBLE_FACTORY (CALLY_TYPE_TEXTURE, cally_texture, cally_texture_new)
441 CALLY_ACCESSIBLE_FACTORY (CALLY_TYPE_RECTANGLE, cally_rectangle, cally_rectangle_new)
442 CALLY_ACCESSIBLE_FACTORY (CALLY_TYPE_CLONE, cally_clone, cally_clone_new)
443
444@@ -78,7 +76,6 @@ cally_accessibility_init (void)
445 CALLY_ACTOR_SET_FACTORY (CLUTTER_TYPE_GROUP, cally_group);
446 CALLY_ACTOR_SET_FACTORY (CLUTTER_TYPE_STAGE, cally_stage);
447 CALLY_ACTOR_SET_FACTORY (CLUTTER_TYPE_TEXT, cally_text);
448- CALLY_ACTOR_SET_FACTORY (CLUTTER_TYPE_TEXTURE, cally_texture);
449 CALLY_ACTOR_SET_FACTORY (CLUTTER_TYPE_RECTANGLE, cally_rectangle);
450 CALLY_ACTOR_SET_FACTORY (CLUTTER_TYPE_CLONE, cally_clone);
451
452diff --git a/clutter/clutter/cally/cally.h b/clutter/clutter/cally/cally.h
453index 11fa9fc..440c30b 100644
454--- a/clutter/clutter/cally/cally.h
455+++ b/clutter/clutter/cally/cally.h
456@@ -32,7 +32,6 @@
457 #include "cally-root.h"
458 #include "cally-stage.h"
459 #include "cally-text.h"
460-#include "cally-texture.h"
461 #include "cally-util.h"
462
463 #undef __CALLY_H_INSIDE__
464diff --git a/clutter/clutter/clutter-actor-box.c b/clutter/clutter/clutter-actor-box.c
465index 6871274..a2308ac 100644
466--- a/clutter/clutter/clutter-actor-box.c
467+++ b/clutter/clutter/clutter-actor-box.c
468@@ -340,7 +340,7 @@ clutter_actor_box_contains (const ClutterActorBox *box,
469 /**
470 * clutter_actor_box_from_vertices:
471 * @box: a #ClutterActorBox
472- * @verts: (array fixed-size=4): array of four #ClutterVertex
473+ * @verts: (array fixed-size=4): array of four #graphene_point3d_t
474 *
475 * Calculates the bounding box represented by the four vertices; for details
476 * of the vertex array see clutter_actor_get_abs_allocation_vertices().
477@@ -348,8 +348,8 @@ clutter_actor_box_contains (const ClutterActorBox *box,
478 * Since: 1.0
479 */
480 void
481-clutter_actor_box_from_vertices (ClutterActorBox *box,
482- const ClutterVertex verts[])
483+clutter_actor_box_from_vertices (ClutterActorBox *box,
484+ const graphene_point3d_t verts[])
485 {
486 gfloat x_1, x_2, y_1, y_2;
487
488diff --git a/clutter/clutter/clutter-actor-meta.c b/clutter/clutter/clutter-actor-meta.c
489index d7f4fd7..eba0985 100644
490--- a/clutter/clutter/clutter-actor-meta.c
491+++ b/clutter/clutter/clutter-actor-meta.c
492@@ -51,7 +51,7 @@
493 struct _ClutterActorMetaPrivate
494 {
495 ClutterActor *actor;
496- guint destroy_id;
497+ gulong destroy_id;
498
499 gchar *name;
500
501@@ -91,11 +91,7 @@ clutter_actor_meta_real_set_actor (ClutterActorMeta *meta,
502 if (meta->priv->actor == actor)
503 return;
504
505- if (meta->priv->destroy_id != 0)
506- {
507- g_signal_handler_disconnect (meta->priv->actor, meta->priv->destroy_id);
508- meta->priv->destroy_id = 0;
509- }
510+ g_clear_signal_handler (&meta->priv->destroy_id, meta->priv->actor);
511
512 meta->priv->actor = actor;
513
514@@ -162,8 +158,8 @@ clutter_actor_meta_finalize (GObject *gobject)
515 {
516 ClutterActorMetaPrivate *priv = CLUTTER_ACTOR_META (gobject)->priv;
517
518- if (priv->destroy_id != 0 && priv->actor != NULL)
519- g_signal_handler_disconnect (priv->actor, priv->destroy_id);
520+ if (priv->actor != NULL)
521+ g_clear_signal_handler (&priv->destroy_id, priv->actor);
522
523 g_free (priv->name);
524
525diff --git a/clutter/clutter/clutter-actor-private.h b/clutter/clutter/clutter-actor-private.h
526index fa2d4c3..9ff4b2d 100644
527--- a/clutter/clutter/clutter-actor-private.h
528+++ b/clutter/clutter/clutter-actor-private.h
529@@ -135,7 +135,7 @@ struct _AnchorCoord
530 } fraction;
531
532 /* Use when is_fractional == FALSE */
533- ClutterVertex units;
534+ graphene_point3d_t units;
535 } v;
536 };
537
538@@ -163,7 +163,7 @@ struct _SizeRequest
539 struct _ClutterLayoutInfo
540 {
541 /* fixed position coordinates */
542- ClutterPoint fixed_pos;
543+ graphene_point_t fixed_pos;
544
545 ClutterMargin margin;
546
547@@ -173,8 +173,8 @@ struct _ClutterLayoutInfo
548 guint x_expand : 1;
549 guint y_expand : 1;
550
551- ClutterSize minimum;
552- ClutterSize natural;
553+ graphene_size_t minimum;
554+ graphene_size_t natural;
555 };
556
557 const ClutterLayoutInfo * _clutter_actor_get_layout_info_or_defaults (ClutterActor *self);
558@@ -203,13 +203,13 @@ struct _ClutterTransformInfo
559 AnchorCoord anchor;
560
561 /* translation */
562- ClutterVertex translation;
563+ graphene_point3d_t translation;
564
565 /* z_position */
566 gfloat z_position;
567
568 /* transformation center */
569- ClutterPoint pivot;
570+ graphene_point_t pivot;
571 gfloat pivot_z;
572
573 CoglMatrix transform;
574@@ -315,7 +315,6 @@ void _clutter_actor_queue_relayout_on_clones
575 void _clutter_actor_queue_only_relayout (ClutterActor *actor);
576 void _clutter_actor_queue_update_resource_scale_recursive (ClutterActor *actor);
577
578-CoglFramebuffer * _clutter_actor_get_active_framebuffer (ClutterActor *actor);
579 gboolean _clutter_actor_get_real_resource_scale (ClutterActor *actor,
580 float *resource_scale);
581
582diff --git a/clutter/clutter/clutter-actor.c b/clutter/clutter/clutter-actor.c
583index ecf9a59..610741a 100644
584--- a/clutter/clutter/clutter-actor.c
585+++ b/clutter/clutter/clutter-actor.c
586@@ -643,6 +643,7 @@
587 #include "clutter-main.h"
588 #include "clutter-marshal.h"
589 #include "clutter-mutter.h"
590+#include "clutter-paint-context-private.h"
591 #include "clutter-paint-nodes.h"
592 #include "clutter-paint-node-private.h"
593 #include "clutter-paint-volume-private.h"
594@@ -656,7 +657,6 @@
595 #include "clutter-units.h"
596
597 #include "deprecated/clutter-actor.h"
598-#include "deprecated/clutter-behaviour.h"
599 #include "deprecated/clutter-container.h"
600
601 /* Internal enum used to control mapped state update. This is a hint
602@@ -701,7 +701,7 @@ struct _ClutterActorPrivate
603 ClutterAllocationFlags allocation_flags;
604
605 /* clip, in actor coordinates */
606- ClutterRect clip;
607+ graphene_rect_t clip;
608
609 /* the cached transformation matrix; see apply_transform() */
610 CoglMatrix transform;
611@@ -746,9 +746,6 @@ struct _ClutterActorPrivate
612 */
613 ClutterTextDirection text_direction;
614
615- /* a counter used to toggle the CLUTTER_INTERNAL_CHILD flag */
616- gint internal_child;
617-
618 /* meta classes */
619 ClutterMetaGroup *actions;
620 ClutterMetaGroup *constraints;
621@@ -812,8 +809,8 @@ struct _ClutterActorPrivate
622 gpointer create_child_data;
623 GDestroyNotify create_child_notify;
624
625- guint resolution_changed_id;
626- guint font_changed_id;
627+ gulong resolution_changed_id;
628+ gulong font_changed_id;
629
630 /* bitfields: KEEP AT THE END */
631
632@@ -905,7 +902,6 @@ enum
633 PROP_DEPTH, /* XXX:2.0 remove */
634 PROP_Z_POSITION,
635
636- PROP_CLIP, /* XXX:2.0 remove */
637 PROP_CLIP_RECT,
638 PROP_HAS_CLIP,
639 PROP_CLIP_TO_ALLOCATION,
640@@ -1291,10 +1287,12 @@ clutter_actor_verify_map_state (ClutterActor *self)
641 static gboolean
642 _clutter_actor_transform_local_box_to_stage (ClutterActor *self,
643 ClutterStage *stage,
644+ ClutterPickContext *pick_context,
645 const ClutterActorBox *box,
646- ClutterPoint vertices[4])
647+ graphene_point_t vertices[4])
648 {
649- CoglFramebuffer *fb = cogl_get_draw_framebuffer ();
650+ CoglFramebuffer *fb =
651+ clutter_pick_context_get_framebuffer (pick_context);
652 CoglMatrix stage_transform, inv_stage_transform;
653 CoglMatrix modelview, transform_to_stage;
654 int v;
655@@ -1335,6 +1333,7 @@ _clutter_actor_transform_local_box_to_stage (ClutterActor *self,
656 /**
657 * clutter_actor_pick_box:
658 * @self: The #ClutterActor being "pick" painted.
659+ * @pick_context: The #ClutterPickContext
660 * @box: A rectangle in the actor's own local coordinates.
661 *
662 * Logs (does a virtual paint of) a rectangle for picking. Note that @box is
663@@ -1345,10 +1344,11 @@ _clutter_actor_transform_local_box_to_stage (ClutterActor *self,
664 */
665 void
666 clutter_actor_pick_box (ClutterActor *self,
667+ ClutterPickContext *pick_context,
668 const ClutterActorBox *box)
669 {
670 ClutterStage *stage;
671- ClutterPoint vertices[4];
672+ graphene_point_t vertices[4];
673
674 g_return_if_fail (CLUTTER_IS_ACTOR (self));
675 g_return_if_fail (box != NULL);
676@@ -1358,20 +1358,23 @@ clutter_actor_pick_box (ClutterActor *self,
677
678 stage = CLUTTER_STAGE (_clutter_actor_get_stage_internal (self));
679
680- if (_clutter_actor_transform_local_box_to_stage (self, stage, box, vertices))
681+ if (_clutter_actor_transform_local_box_to_stage (self, stage, pick_context,
682+ box, vertices))
683 clutter_stage_log_pick (stage, vertices, self);
684 }
685
686 static gboolean
687 _clutter_actor_push_pick_clip (ClutterActor *self,
688+ ClutterPickContext *pick_context,
689 const ClutterActorBox *clip)
690 {
691 ClutterStage *stage;
692- ClutterPoint vertices[4];
693+ graphene_point_t vertices[4];
694
695 stage = CLUTTER_STAGE (_clutter_actor_get_stage_internal (self));
696
697- if (!_clutter_actor_transform_local_box_to_stage (self, stage, clip, vertices))
698+ if (!_clutter_actor_transform_local_box_to_stage (self, stage, pick_context,
699+ clip, vertices))
700 return FALSE;
701
702 clutter_stage_push_pick_clip (stage, vertices);
703@@ -1776,6 +1779,15 @@ clutter_actor_unmap (ClutterActor *self)
704 }
705
706 static void
707+clutter_actor_queue_shallow_relayout (ClutterActor *self)
708+{
709+ ClutterActor *stage = _clutter_actor_get_stage_internal (self);
710+
711+ if (stage != NULL)
712+ clutter_stage_queue_actor_relayout (CLUTTER_STAGE (stage), self);
713+}
714+
715+static void
716 clutter_actor_real_show (ClutterActor *self)
717 {
718 ClutterActorPrivate *priv = self->priv;
719@@ -1808,6 +1820,11 @@ clutter_actor_real_show (ClutterActor *self)
720
721 clutter_actor_queue_relayout (self);
722 }
723+ else /* but still don't leave the actor un-allocated before showing it */
724+ {
725+ clutter_actor_queue_shallow_relayout (self);
726+ clutter_actor_queue_redraw (self);
727+ }
728 }
729
730 static inline void
731@@ -2034,29 +2051,6 @@ clutter_actor_hide (ClutterActor *self)
732 }
733
734 /**
735- * clutter_actor_hide_all:
736- * @self: a #ClutterActor
737- *
738- * Calls clutter_actor_hide() on all child actors (if any).
739- *
740- * Since: 0.2
741- *
742- * Deprecated: 1.10: Using clutter_actor_hide() on the actor will
743- * prevent its children from being painted as well.
744- */
745-void
746-clutter_actor_hide_all (ClutterActor *self)
747-{
748- ClutterActorClass *klass;
749-
750- g_return_if_fail (CLUTTER_IS_ACTOR (self));
751-
752- klass = CLUTTER_ACTOR_GET_CLASS (self);
753- if (klass->hide_all)
754- klass->hide_all (self);
755-}
756-
757-/**
758 * clutter_actor_realize:
759 * @self: A #ClutterActor
760 *
761@@ -2350,7 +2344,7 @@ _clutter_actor_rerealize (ClutterActor *self,
762
763 static void
764 clutter_actor_real_pick (ClutterActor *self,
765- const ClutterColor *color)
766+ ClutterPickContext *pick_context)
767 {
768 if (clutter_actor_should_pick_paint (self))
769 {
770@@ -2361,7 +2355,7 @@ clutter_actor_real_pick (ClutterActor *self,
771 .y2 = clutter_actor_get_height (self),
772 };
773
774- clutter_actor_pick_box (self, &box);
775+ clutter_actor_pick_box (self, pick_context, &box);
776 }
777
778 /* XXX - this thoroughly sucks, but we need to maintain compatibility
779@@ -2378,7 +2372,7 @@ clutter_actor_real_pick (ClutterActor *self,
780 for (iter = self->priv->first_child;
781 iter != NULL;
782 iter = iter->priv->next_sibling)
783- clutter_actor_paint (iter);
784+ clutter_actor_pick (iter, pick_context);
785 }
786 }
787
788@@ -2884,9 +2878,23 @@ clutter_actor_real_queue_relayout (ClutterActor *self)
789 memset (priv->height_requests, 0,
790 N_CACHED_SIZE_REQUESTS * sizeof (SizeRequest));
791
792- /* We need to go all the way up the hierarchy */
793+ /* We may need to go all the way up the hierarchy */
794 if (priv->parent != NULL)
795- _clutter_actor_queue_only_relayout (priv->parent);
796+ {
797+ if (priv->parent->flags & CLUTTER_ACTOR_NO_LAYOUT)
798+ {
799+ clutter_actor_queue_shallow_relayout (self);
800+
801+ /* The above might have invalidated the parent's paint volume if self
802+ * has moved or resized. DnD seems to require this...
803+ */
804+ priv->parent->priv->needs_paint_volume_update = TRUE;
805+ }
806+ else
807+ {
808+ _clutter_actor_queue_only_relayout (priv->parent);
809+ }
810+ }
811 }
812
813 /**
814@@ -2894,8 +2902,8 @@ clutter_actor_real_queue_relayout (ClutterActor *self)
815 * @self: A #ClutterActor
816 * @ancestor: (allow-none): A #ClutterActor ancestor, or %NULL to use the
817 * default #ClutterStage
818- * @point: A point as #ClutterVertex
819- * @vertex: (out caller-allocates): The translated #ClutterVertex
820+ * @point: A point as #graphene_point3d_t
821+ * @vertex: (out caller-allocates): The translated #graphene_point3d_t
822 *
823 * Transforms @point in coordinates relative to the actor into
824 * ancestor-relative coordinates using the relevant transform
825@@ -2909,10 +2917,10 @@ clutter_actor_real_queue_relayout (ClutterActor *self)
826 * Since: 0.6
827 */
828 void
829-clutter_actor_apply_relative_transform_to_point (ClutterActor *self,
830- ClutterActor *ancestor,
831- const ClutterVertex *point,
832- ClutterVertex *vertex)
833+clutter_actor_apply_relative_transform_to_point (ClutterActor *self,
834+ ClutterActor *ancestor,
835+ const graphene_point3d_t *point,
836+ graphene_point3d_t *vertex)
837 {
838 gfloat w;
839 CoglMatrix matrix;
840@@ -2939,10 +2947,10 @@ clutter_actor_apply_relative_transform_to_point (ClutterActor *self,
841 }
842
843 static gboolean
844-_clutter_actor_fully_transform_vertices (ClutterActor *self,
845- const ClutterVertex *vertices_in,
846- ClutterVertex *vertices_out,
847- int n_vertices)
848+_clutter_actor_fully_transform_vertices (ClutterActor *self,
849+ const graphene_point3d_t *vertices_in,
850+ graphene_point3d_t *vertices_out,
851+ int n_vertices)
852 {
853 ClutterActor *stage;
854 CoglMatrix modelview;
855@@ -2984,8 +2992,8 @@ _clutter_actor_fully_transform_vertices (ClutterActor *self,
856 /**
857 * clutter_actor_apply_transform_to_point:
858 * @self: A #ClutterActor
859- * @point: A point as #ClutterVertex
860- * @vertex: (out caller-allocates): The translated #ClutterVertex
861+ * @point: A point as #graphene_point3d_t
862+ * @vertex: (out caller-allocates): The translated #graphene_point3d_t
863 *
864 * Transforms @point in coordinates relative to the actor
865 * into screen-relative coordinates with the current actor
866@@ -2994,9 +3002,9 @@ _clutter_actor_fully_transform_vertices (ClutterActor *self,
867 * Since: 0.4
868 **/
869 void
870-clutter_actor_apply_transform_to_point (ClutterActor *self,
871- const ClutterVertex *point,
872- ClutterVertex *vertex)
873+clutter_actor_apply_transform_to_point (ClutterActor *self,
874+ const graphene_point3d_t *point,
875+ graphene_point3d_t *vertex)
876 {
877 g_return_if_fail (point != NULL);
878 g_return_if_fail (vertex != NULL);
879@@ -3046,10 +3054,10 @@ _clutter_actor_get_relative_transformation_matrix (ClutterActor *self,
880 * transformed vertices to @verts[]. */
881 static gboolean
882 _clutter_actor_transform_and_project_box (ClutterActor *self,
883- const ClutterActorBox *box,
884- ClutterVertex verts[])
885+ const ClutterActorBox *box,
886+ graphene_point3d_t *verts)
887 {
888- ClutterVertex box_vertices[4];
889+ graphene_point3d_t box_vertices[4];
890
891 box_vertices[0].x = box->x1;
892 box_vertices[0].y = box->y1;
893@@ -3073,8 +3081,8 @@ _clutter_actor_transform_and_project_box (ClutterActor *self,
894 * @self: A #ClutterActor
895 * @ancestor: (allow-none): A #ClutterActor to calculate the vertices
896 * against, or %NULL to use the #ClutterStage
897- * @verts: (out) (array fixed-size=4) (element-type Clutter.Vertex): return
898- * location for an array of 4 #ClutterVertex in which to store the result
899+ * @verts: (out) (array fixed-size=4): return
900+ * location for an array of 4 #graphene_point3d_t in which to store the result
901 *
902 * Calculates the transformed coordinates of the four corners of the
903 * actor in the plane of @ancestor. The returned vertices relate to
904@@ -3093,13 +3101,13 @@ _clutter_actor_transform_and_project_box (ClutterActor *self,
905 * Since: 0.6
906 */
907 void
908-clutter_actor_get_allocation_vertices (ClutterActor *self,
909- ClutterActor *ancestor,
910- ClutterVertex verts[])
911+clutter_actor_get_allocation_vertices (ClutterActor *self,
912+ ClutterActor *ancestor,
913+ graphene_point3d_t *verts)
914 {
915 ClutterActorPrivate *priv;
916 ClutterActorBox box;
917- ClutterVertex vertices[4];
918+ graphene_point3d_t vertices[4];
919 CoglMatrix modelview;
920
921 g_return_if_fail (CLUTTER_IS_ACTOR (self));
922@@ -3151,9 +3159,9 @@ clutter_actor_get_allocation_vertices (ClutterActor *self,
923
924 cogl_matrix_transform_points (&modelview,
925 3,
926- sizeof (ClutterVertex),
927+ sizeof (graphene_point3d_t),
928 vertices,
929- sizeof (ClutterVertex),
930+ sizeof (graphene_point3d_t),
931 vertices,
932 4);
933 }
934@@ -3162,7 +3170,7 @@ clutter_actor_get_allocation_vertices (ClutterActor *self,
935 * clutter_actor_get_abs_allocation_vertices:
936 * @self: A #ClutterActor
937 * @verts: (out) (array fixed-size=4): Pointer to a location of an array
938- * of 4 #ClutterVertex where to store the result.
939+ * of 4 #graphene_point3d_t where to store the result.
940 *
941 * Calculates the transformed screen coordinates of the four corners of
942 * the actor; the returned vertices relate to the #ClutterActorBox
943@@ -3176,8 +3184,8 @@ clutter_actor_get_allocation_vertices (ClutterActor *self,
944 * Since: 0.4
945 */
946 void
947-clutter_actor_get_abs_allocation_vertices (ClutterActor *self,
948- ClutterVertex verts[])
949+clutter_actor_get_abs_allocation_vertices (ClutterActor *self,
950+ graphene_point3d_t *verts)
951 {
952 ClutterActorPrivate *priv;
953 ClutterActorBox actor_space_allocation;
954@@ -3411,20 +3419,20 @@ _clutter_actor_apply_relative_transformation_matrix (ClutterActor *self,
955 }
956
957 static void
958-_clutter_actor_draw_paint_volume_full (ClutterActor *self,
959+_clutter_actor_draw_paint_volume_full (ClutterActor *self,
960 ClutterPaintVolume *pv,
961- const char *label,
962- const CoglColor *color)
963+ const char *label,
964+ const ClutterColor *color,
965+ ClutterPaintNode *node)
966 {
967+ g_autoptr (ClutterPaintNode) pipeline_node = NULL;
968 static CoglPipeline *outline = NULL;
969 CoglPrimitive *prim;
970- ClutterVertex line_ends[12 * 2];
971+ graphene_point3d_t line_ends[12 * 2];
972 int n_vertices;
973 CoglContext *ctx =
974 clutter_backend_get_cogl_context (clutter_get_default_backend ());
975- /* XXX: at some point we'll query this from the stage but we can't
976- * do that until the osx backend uses Cogl natively. */
977- CoglFramebuffer *fb = cogl_get_draw_framebuffer ();
978+ CoglColor cogl_color;
979
980 if (outline == NULL)
981 outline = cogl_pipeline_new (ctx);
982@@ -3458,29 +3466,50 @@ _clutter_actor_draw_paint_volume_full (ClutterActor *self,
983 n_vertices,
984 (CoglVertexP3 *)line_ends);
985
986- cogl_pipeline_set_color (outline, color);
987- cogl_framebuffer_draw_primitive (fb, outline, prim);
988+ cogl_color_init_from_4ub (&cogl_color,
989+ color->red,
990+ color->green,
991+ color->blue,
992+ color->alpha);
993+ cogl_pipeline_set_color (outline, &cogl_color);
994+
995+ pipeline_node = clutter_pipeline_node_new (outline);
996+ clutter_paint_node_set_name (pipeline_node,
997+ "ClutterActor (paint volume outline)");
998+ clutter_paint_node_add_primitive (pipeline_node, prim);
999+ clutter_paint_node_add_child (node, pipeline_node);
1000 cogl_object_unref (prim);
1001
1002 if (label)
1003 {
1004+ g_autoptr (ClutterPaintNode) text_node = NULL;
1005 PangoLayout *layout;
1006+
1007 layout = pango_layout_new (clutter_actor_get_pango_context (self));
1008 pango_layout_set_text (layout, label, -1);
1009- cogl_pango_render_layout (layout,
1010- pv->vertices[0].x,
1011- pv->vertices[0].y,
1012- color,
1013- 0);
1014+
1015+ text_node = clutter_text_node_new (layout, color);
1016+ clutter_paint_node_set_name (text_node,
1017+ "ClutterActor (paint volume label)");
1018+ clutter_paint_node_add_rectangle (text_node,
1019+ &(ClutterActorBox) {
1020+ .x1 = pv->vertices[0].x,
1021+ .y1 = pv->vertices[0].y,
1022+ .x2 = pv->vertices[2].x,
1023+ .y2 = pv->vertices[2].y,
1024+ });
1025+ clutter_paint_node_add_child (node, text_node);
1026+
1027 g_object_unref (layout);
1028 }
1029 }
1030
1031 static void
1032-_clutter_actor_draw_paint_volume (ClutterActor *self)
1033+_clutter_actor_draw_paint_volume (ClutterActor *self,
1034+ ClutterPaintNode *node)
1035 {
1036 ClutterPaintVolume *pv;
1037- CoglColor color;
1038+ ClutterColor color;
1039
1040 pv = _clutter_actor_get_paint_volume_mutable (self);
1041 if (!pv)
1042@@ -3495,61 +3524,79 @@ _clutter_actor_draw_paint_volume (ClutterActor *self)
1043 clutter_paint_volume_set_width (&fake_pv, width);
1044 clutter_paint_volume_set_height (&fake_pv, height);
1045
1046- cogl_color_init_from_4f (&color, 0, 0, 1, 1);
1047+ clutter_color_init (&color, 0, 0, 255, 255);
1048 _clutter_actor_draw_paint_volume_full (self, &fake_pv,
1049 _clutter_actor_get_debug_name (self),
1050- &color);
1051+ &color,
1052+ node);
1053
1054 clutter_paint_volume_free (&fake_pv);
1055 }
1056 else
1057 {
1058- cogl_color_init_from_4f (&color, 0, 1, 0, 1);
1059+ clutter_color_init (&color, 0, 255, 0, 255);
1060 _clutter_actor_draw_paint_volume_full (self, pv,
1061 _clutter_actor_get_debug_name (self),
1062- &color);
1063+ &color,
1064+ node);
1065 }
1066 }
1067
1068 static void
1069-_clutter_actor_paint_cull_result (ClutterActor *self,
1070- gboolean success,
1071- ClutterCullResult result)
1072+_clutter_actor_paint_cull_result (ClutterActor *self,
1073+ gboolean success,
1074+ ClutterCullResult result,
1075+ ClutterPaintNode *node)
1076 {
1077+ ClutterActorPrivate *priv = self->priv;
1078 ClutterPaintVolume *pv;
1079- CoglColor color;
1080+ ClutterColor color;
1081
1082 if (success)
1083 {
1084 if (result == CLUTTER_CULL_RESULT_IN)
1085- cogl_color_init_from_4f (&color, 0, 1, 0, 1);
1086+ clutter_color_init (&color, 0, 255, 0, 255);
1087 else if (result == CLUTTER_CULL_RESULT_OUT)
1088- cogl_color_init_from_4f (&color, 0, 0, 1, 1);
1089+ clutter_color_init (&color, 0, 0, 255, 255);
1090 else
1091- cogl_color_init_from_4f (&color, 0, 1, 1, 1);
1092+ clutter_color_init (&color, 0, 255, 255, 255);
1093 }
1094 else
1095- cogl_color_init_from_4f (&color, 1, 1, 1, 1);
1096+ clutter_color_init (&color, 255, 255, 255, 255);
1097
1098 if (success && (pv = _clutter_actor_get_paint_volume_mutable (self)))
1099 _clutter_actor_draw_paint_volume_full (self, pv,
1100 _clutter_actor_get_debug_name (self),
1101- &color);
1102+ &color,
1103+ node);
1104 else
1105 {
1106+ g_autoptr (ClutterPaintNode) text_node = NULL;
1107 PangoLayout *layout;
1108+ float width;
1109+ float height;
1110 char *label =
1111 g_strdup_printf ("CULL FAILURE: %s", _clutter_actor_get_debug_name (self));
1112- cogl_color_init_from_4f (&color, 1, 1, 1, 1);
1113- cogl_set_source_color (&color);
1114+ clutter_color_init (&color, 255, 255, 255, 255);
1115+
1116+ width = clutter_actor_box_get_width (&priv->allocation);
1117+ height = clutter_actor_box_get_height (&priv->allocation);
1118
1119 layout = pango_layout_new (clutter_actor_get_pango_context (self));
1120 pango_layout_set_text (layout, label, -1);
1121- cogl_pango_render_layout (layout,
1122- 0,
1123- 0,
1124- &color,
1125- 0);
1126+
1127+ text_node = clutter_text_node_new (layout, &color);
1128+ clutter_paint_node_set_name (text_node,
1129+ "ClutterActor (paint volume text)");
1130+ clutter_paint_node_add_rectangle (text_node,
1131+ &(ClutterActorBox) {
1132+ .x1 = 0.f,
1133+ .y1 = 0.f,
1134+ .x2 = width,
1135+ .y2 = height,
1136+ });
1137+ clutter_paint_node_add_child (node, text_node);
1138+
1139 g_free (label);
1140 g_object_unref (layout);
1141 }
1142@@ -3581,8 +3628,9 @@ in_clone_paint (void)
1143 * means there's no point in trying to cull descendants of the current
1144 * node. */
1145 static gboolean
1146-cull_actor (ClutterActor *self,
1147- ClutterCullResult *result_out)
1148+cull_actor (ClutterActor *self,
1149+ ClutterPaintContext *paint_context,
1150+ ClutterCullResult *result_out)
1151 {
1152 ClutterActorPrivate *priv = self->priv;
1153 ClutterStage *stage;
1154@@ -3609,10 +3657,10 @@ cull_actor (ClutterActor *self,
1155 return FALSE;
1156 }
1157
1158- if (cogl_get_draw_framebuffer () != _clutter_stage_get_active_framebuffer (stage))
1159+ if (clutter_paint_context_is_drawing_off_stage (paint_context))
1160 {
1161 CLUTTER_NOTE (CLIPPING, "Bail from cull_actor without culling (%s): "
1162- "Current framebuffer doesn't correspond to stage",
1163+ "Drawing off stage",
1164 _clutter_actor_get_debug_name (self));
1165 return FALSE;
1166 }
1167@@ -3750,7 +3798,8 @@ add_or_remove_flatten_effect (ClutterActor *self)
1168 }
1169
1170 static void
1171-clutter_actor_real_paint (ClutterActor *actor)
1172+clutter_actor_real_paint (ClutterActor *actor,
1173+ ClutterPaintContext *paint_context)
1174 {
1175 ClutterActorPrivate *priv = actor->priv;
1176 ClutterActor *iter;
1177@@ -3767,21 +3816,19 @@ clutter_actor_real_paint (ClutterActor *actor)
1178 iter->priv->allocation.x2 - iter->priv->allocation.x1,
1179 iter->priv->allocation.y2 - iter->priv->allocation.y1);
1180
1181- clutter_actor_paint (iter);
1182+ clutter_actor_paint (iter, paint_context);
1183 }
1184 }
1185
1186 static gboolean
1187-clutter_actor_paint_node (ClutterActor *actor,
1188- ClutterPaintNode *root)
1189+clutter_actor_paint_node (ClutterActor *actor,
1190+ ClutterPaintNode *root,
1191+ ClutterPaintContext *paint_context)
1192 {
1193 ClutterActorPrivate *priv = actor->priv;
1194 ClutterActorBox box;
1195 ClutterColor bg_color;
1196
1197- if (root == NULL)
1198- return FALSE;
1199-
1200 box.x1 = 0.f;
1201 box.y1 = 0.f;
1202 box.x2 = clutter_actor_box_get_width (&priv->allocation);
1203@@ -3795,7 +3842,7 @@ clutter_actor_paint_node (ClutterActor *actor,
1204 CoglFramebuffer *fb;
1205 CoglBufferBit clear_flags;
1206
1207- fb = _clutter_stage_get_active_framebuffer (CLUTTER_STAGE (actor));
1208+ fb = clutter_paint_context_get_base_framebuffer (paint_context);
1209
1210 if (clutter_stage_get_use_alpha (CLUTTER_STAGE (actor)))
1211 {
1212@@ -3813,8 +3860,6 @@ clutter_actor_paint_node (ClutterActor *actor,
1213 bg_color.alpha);
1214
1215 clear_flags = COGL_BUFFER_BIT_DEPTH;
1216- if (!clutter_stage_get_no_clear_hint (CLUTTER_STAGE (actor)))
1217- clear_flags |= COGL_BUFFER_BIT_COLOR;
1218
1219 node = clutter_root_node_new (fb, &bg_color, clear_flags);
1220 clutter_paint_node_set_name (node, "stageClear");
1221@@ -3839,7 +3884,7 @@ clutter_actor_paint_node (ClutterActor *actor,
1222 }
1223
1224 if (priv->content != NULL)
1225- _clutter_content_paint_content (priv->content, actor, root);
1226+ _clutter_content_paint_content (priv->content, actor, root, paint_context);
1227
1228 if (CLUTTER_ACTOR_GET_CLASS (actor)->paint_node != NULL)
1229 CLUTTER_ACTOR_GET_CLASS (actor)->paint_node (actor, root);
1230@@ -3855,7 +3900,7 @@ clutter_actor_paint_node (ClutterActor *actor,
1231 }
1232 #endif /* CLUTTER_ENABLE_DEBUG */
1233
1234- clutter_paint_node_paint (root);
1235+ clutter_paint_node_paint (root, paint_context);
1236
1237 return TRUE;
1238 }
1239@@ -3879,13 +3924,14 @@ clutter_actor_paint_node (ClutterActor *actor,
1240 * unless it is performing a pick paint.
1241 */
1242 void
1243-clutter_actor_paint (ClutterActor *self)
1244+clutter_actor_paint (ClutterActor *self,
1245+ ClutterPaintContext *paint_context)
1246 {
1247+ g_autoptr (ClutterPaintNode) actor_node = NULL;
1248+ g_autoptr (ClutterPaintNode) root_node = NULL;
1249 ClutterActorPrivate *priv;
1250- ClutterPickMode pick_mode;
1251 ClutterActorBox clip;
1252 gboolean clip_set = FALSE;
1253- ClutterStage *stage;
1254
1255 g_return_if_fail (CLUTTER_IS_ACTOR (self));
1256
1257@@ -3893,16 +3939,11 @@ clutter_actor_paint (ClutterActor *self)
1258 return;
1259
1260 priv = self->priv;
1261-
1262- pick_mode = _clutter_context_get_pick_mode ();
1263-
1264- if (pick_mode == CLUTTER_PICK_NONE)
1265- priv->propagated_one_redraw = FALSE;
1266+ priv->propagated_one_redraw = FALSE;
1267
1268 /* It's an important optimization that we consider painting of
1269 * actors with 0 opacity to be a NOP... */
1270- if (pick_mode == CLUTTER_PICK_NONE &&
1271- /* ignore top-levels, since they might be transparent */
1272+ if (/* ignore top-levels, since they might be transparent */
1273 !CLUTTER_ACTOR_IS_TOPLEVEL (self) &&
1274 /* Use the override opacity if its been set */
1275 ((priv->opacity_override >= 0) ?
1276@@ -3917,22 +3958,50 @@ clutter_actor_paint (ClutterActor *self)
1277
1278 clutter_actor_ensure_resource_scale (self);
1279
1280- stage = (ClutterStage *) _clutter_actor_get_stage_internal (self);
1281+ actor_node = clutter_actor_node_new (self);
1282+ root_node = clutter_paint_node_ref (actor_node);
1283
1284- /* mark that we are in the paint process */
1285- CLUTTER_SET_PRIVATE_FLAGS (self, CLUTTER_IN_PAINT);
1286+ if (priv->has_clip)
1287+ {
1288+ clip.x1 = priv->clip.origin.x;
1289+ clip.y1 = priv->clip.origin.y;
1290+ clip.x2 = priv->clip.origin.x + priv->clip.size.width;
1291+ clip.y2 = priv->clip.origin.y + priv->clip.size.height;
1292+ clip_set = TRUE;
1293+ }
1294+ else if (priv->clip_to_allocation)
1295+ {
1296+ clip.x1 = 0.f;
1297+ clip.y1 = 0.f;
1298+ clip.x2 = priv->allocation.x2 - priv->allocation.x1;
1299+ clip.y2 = priv->allocation.y2 - priv->allocation.y1;
1300+ clip_set = TRUE;
1301+ }
1302+
1303+ if (clip_set)
1304+ {
1305+ ClutterPaintNode *clip_node;
1306+
1307+ clip_node = clutter_clip_node_new ();
1308+ clutter_paint_node_add_rectangle (clip_node, &clip);
1309+ clutter_paint_node_add_child (clip_node, root_node);
1310+ clutter_paint_node_unref (root_node);
1311
1312- cogl_push_matrix ();
1313+ root_node = g_steal_pointer (&clip_node);
1314+ }
1315
1316 if (priv->enable_model_view_transform)
1317 {
1318- CoglMatrix matrix;
1319+ ClutterPaintNode *transform_node;
1320+ CoglMatrix transform;
1321+
1322+ clutter_actor_get_transform (self, &transform);
1323+
1324+ transform_node = clutter_transform_node_new (&transform);
1325+ clutter_paint_node_add_child (transform_node, root_node);
1326+ clutter_paint_node_unref (root_node);
1327
1328- /* XXX: It could be better to cache the modelview with the actor
1329- * instead of progressively building up the transformations on
1330- * the matrix stack every time we paint. */
1331- cogl_get_modelview_matrix (&matrix);
1332- _clutter_actor_apply_modelview_transform (self, &matrix);
1333+ root_node = g_steal_pointer (&transform_node);
1334
1335 #ifdef CLUTTER_ENABLE_DEBUG
1336 /* Catch when out-of-band transforms have been made by actors not as part
1337@@ -3944,7 +4013,7 @@ clutter_actor_paint (ClutterActor *self)
1338 _clutter_actor_get_relative_transformation_matrix (self, NULL,
1339 &expected_matrix);
1340
1341- if (!cogl_matrix_equal (&matrix, &expected_matrix))
1342+ if (!cogl_matrix_equal (&transform, &expected_matrix))
1343 {
1344 GString *buf = g_string_sized_new (1024);
1345 ClutterActor *parent;
1346@@ -3971,54 +4040,14 @@ clutter_actor_paint (ClutterActor *self)
1347 }
1348 }
1349 #endif /* CLUTTER_ENABLE_DEBUG */
1350-
1351- cogl_set_modelview_matrix (&matrix);
1352- }
1353-
1354- if (priv->has_clip)
1355- {
1356- clip.x1 = priv->clip.origin.x;
1357- clip.y1 = priv->clip.origin.y;
1358- clip.x2 = priv->clip.origin.x + priv->clip.size.width;
1359- clip.y2 = priv->clip.origin.y + priv->clip.size.height;
1360- clip_set = TRUE;
1361- }
1362- else if (priv->clip_to_allocation)
1363- {
1364- clip.x1 = 0.f;
1365- clip.y1 = 0.f;
1366- clip.x2 = priv->allocation.x2 - priv->allocation.x1;
1367- clip.y2 = priv->allocation.y2 - priv->allocation.y1;
1368- clip_set = TRUE;
1369- }
1370-
1371- if (clip_set)
1372- {
1373- if (pick_mode == CLUTTER_PICK_NONE)
1374- {
1375- CoglFramebuffer *fb = _clutter_stage_get_active_framebuffer (stage);
1376-
1377- cogl_framebuffer_push_rectangle_clip (fb,
1378- clip.x1,
1379- clip.y1,
1380- clip.x2,
1381- clip.y2);
1382- }
1383- else
1384- {
1385- if (!_clutter_actor_push_pick_clip (self, &clip))
1386- clip_set = FALSE;
1387- }
1388 }
1389
1390- if (pick_mode == CLUTTER_PICK_NONE)
1391- {
1392- /* We check whether we need to add the flatten effect before
1393- each paint so that we can avoid having a mechanism for
1394- applications to notify when the value of the
1395- has_overlaps virtual changes. */
1396- add_or_remove_flatten_effect (self);
1397- }
1398+ /* We check whether we need to add the flatten effect before
1399+ * each paint so that we can avoid having a mechanism for
1400+ * applications to notify when the value of the
1401+ * has_overlaps virtual changes.
1402+ */
1403+ add_or_remove_flatten_effect (self);
1404
1405 /* We save the current paint volume so that the next time the
1406 * actor queues a redraw we can constrain the redraw to just
1407@@ -4047,7 +4076,7 @@ clutter_actor_paint (ClutterActor *self)
1408 * paint then the last-paint-volume would likely represent the new
1409 * actor position not the old.
1410 */
1411- if (!in_clone_paint () && pick_mode == CLUTTER_PICK_NONE)
1412+ if (!in_clone_paint ())
1413 {
1414 gboolean success;
1415 /* annoyingly gcc warns if uninitialized even though
1416@@ -4061,12 +4090,12 @@ clutter_actor_paint (ClutterActor *self)
1417 CLUTTER_DEBUG_DISABLE_CLIPPED_REDRAWS)))
1418 _clutter_actor_update_last_paint_volume (self);
1419
1420- success = cull_actor (self, &result);
1421+ success = cull_actor (self, paint_context, &result);
1422
1423 if (G_UNLIKELY (clutter_paint_debug_flags & CLUTTER_DEBUG_REDRAWS))
1424- _clutter_actor_paint_cull_result (self, success, result);
1425+ _clutter_actor_paint_cull_result (self, success, result, actor_node);
1426 else if (result == CLUTTER_CULL_RESULT_OUT && success)
1427- goto done;
1428+ return;
1429 }
1430
1431 if (priv->effects == NULL)
1432@@ -4075,36 +4104,14 @@ clutter_actor_paint (ClutterActor *self)
1433 priv->next_effect_to_paint =
1434 _clutter_meta_group_peek_metas (priv->effects);
1435
1436- clutter_actor_continue_paint (self);
1437+ if (G_UNLIKELY (clutter_paint_debug_flags & CLUTTER_DEBUG_PAINT_VOLUMES))
1438+ _clutter_actor_draw_paint_volume (self, actor_node);
1439
1440- if (G_UNLIKELY (clutter_paint_debug_flags & CLUTTER_DEBUG_PAINT_VOLUMES &&
1441- pick_mode == CLUTTER_PICK_NONE))
1442- _clutter_actor_draw_paint_volume (self);
1443+ clutter_paint_node_paint (root_node, paint_context);
1444
1445 /* If we make it here then the actor has run through a complete
1446 paint run including all the effects so it's no longer dirty */
1447- if (pick_mode == CLUTTER_PICK_NONE)
1448- priv->is_dirty = FALSE;
1449-
1450-done:
1451- if (clip_set)
1452- {
1453- if (pick_mode == CLUTTER_PICK_NONE)
1454- {
1455- CoglFramebuffer *fb = _clutter_stage_get_active_framebuffer (stage);
1456-
1457- cogl_framebuffer_pop_clip (fb);
1458- }
1459- else
1460- {
1461- _clutter_actor_pop_pick_clip (self);
1462- }
1463- }
1464-
1465- cogl_pop_matrix ();
1466-
1467- /* paint sequence complete */
1468- CLUTTER_UNSET_PRIVATE_FLAGS (self, CLUTTER_IN_PAINT);
1469+ priv->is_dirty = FALSE;
1470 }
1471
1472 /**
1473@@ -4120,7 +4127,8 @@ done:
1474 * Since: 1.8
1475 */
1476 void
1477-clutter_actor_continue_paint (ClutterActor *self)
1478+clutter_actor_continue_paint (ClutterActor *self,
1479+ ClutterPaintContext *paint_context)
1480 {
1481 ClutterActorPrivate *priv;
1482
1483@@ -4140,50 +4148,30 @@ clutter_actor_continue_paint (ClutterActor *self)
1484 actual actor */
1485 if (priv->next_effect_to_paint == NULL)
1486 {
1487- if (_clutter_context_get_pick_mode () == CLUTTER_PICK_NONE)
1488- {
1489- ClutterPaintNode *dummy;
1490+ CoglFramebuffer *framebuffer;
1491+ ClutterPaintNode *dummy;
1492
1493- /* XXX - this will go away in 2.0, when we can get rid of this
1494- * stuff and switch to a pure retained render tree of PaintNodes
1495- * for the entire frame, starting from the Stage; the paint()
1496- * virtual function can then be called directly.
1497- */
1498- dummy = _clutter_dummy_node_new (self);
1499- clutter_paint_node_set_name (dummy, "Root");
1500+ /* XXX - this will go away in 2.0, when we can get rid of this
1501+ * stuff and switch to a pure retained render tree of PaintNodes
1502+ * for the entire frame, starting from the Stage; the paint()
1503+ * virtual function can then be called directly.
1504+ */
1505+ framebuffer = clutter_paint_context_get_base_framebuffer (paint_context);
1506+ dummy = _clutter_dummy_node_new (self, framebuffer);
1507+ clutter_paint_node_set_name (dummy, "Root");
1508
1509- /* XXX - for 1.12, we use the return value of paint_node() to
1510- * decide whether we should emit the ::paint signal.
1511- */
1512- clutter_actor_paint_node (self, dummy);
1513- clutter_paint_node_unref (dummy);
1514+ /* XXX - for 1.12, we use the return value of paint_node() to
1515+ * decide whether we should emit the ::paint signal.
1516+ */
1517+ clutter_actor_paint_node (self, dummy, paint_context);
1518+ clutter_paint_node_unref (dummy);
1519
1520- /* XXX:2.0 - Call the paint() virtual directly */
1521- if (g_signal_has_handler_pending (self, actor_signals[PAINT],
1522- 0, TRUE))
1523- g_signal_emit (self, actor_signals[PAINT], 0);
1524- else
1525- CLUTTER_ACTOR_GET_CLASS (self)->paint (self);
1526- }
1527+ /* XXX:2.0 - Call the paint() virtual directly */
1528+ if (g_signal_has_handler_pending (self, actor_signals[PAINT],
1529+ 0, TRUE))
1530+ g_signal_emit (self, actor_signals[PAINT], 0, paint_context);
1531 else
1532- {
1533- ClutterColor col = { 0, };
1534-
1535- /* The actor will log a silhouette of itself to the stage pick log.
1536- * Note that the picking color is no longer used as the "log" instead
1537- * keeps a weak pointer to the actor itself. But we keep the color
1538- * parameter for now so as to maintain ABI compatibility. The color
1539- * parameter can be removed when someone feels like breaking the ABI
1540- * along with gnome-shell.
1541- *
1542- * XXX:2.0 - Call the pick() virtual directly
1543- */
1544- if (g_signal_has_handler_pending (self, actor_signals[PICK],
1545- 0, TRUE))
1546- g_signal_emit (self, actor_signals[PICK], 0, &col);
1547- else
1548- CLUTTER_ACTOR_GET_CLASS (self)->pick (self, &col);
1549- }
1550+ CLUTTER_ACTOR_GET_CLASS (self)->paint (self, paint_context);
1551 }
1552 else
1553 {
1554@@ -4197,31 +4185,161 @@ clutter_actor_continue_paint (ClutterActor *self)
1555 priv->current_effect = priv->next_effect_to_paint->data;
1556 priv->next_effect_to_paint = priv->next_effect_to_paint->next;
1557
1558- if (_clutter_context_get_pick_mode () == CLUTTER_PICK_NONE)
1559+ if (priv->is_dirty)
1560 {
1561- if (priv->is_dirty)
1562- {
1563- /* If there's an effect queued with this redraw then all
1564- effects up to that one will be considered dirty. It
1565- is expected the queued effect will paint the cached
1566- image and not call clutter_actor_continue_paint again
1567- (although it should work ok if it does) */
1568- if (priv->effect_to_redraw == NULL ||
1569- priv->current_effect != priv->effect_to_redraw)
1570- run_flags |= CLUTTER_EFFECT_PAINT_ACTOR_DIRTY;
1571- }
1572-
1573- _clutter_effect_paint (priv->current_effect, run_flags);
1574+ /* If there's an effect queued with this redraw then all
1575+ * effects up to that one will be considered dirty. It
1576+ * is expected the queued effect will paint the cached
1577+ * image and not call clutter_actor_continue_paint again
1578+ * (although it should work ok if it does)
1579+ */
1580+ if (priv->effect_to_redraw == NULL ||
1581+ priv->current_effect != priv->effect_to_redraw)
1582+ run_flags |= CLUTTER_EFFECT_PAINT_ACTOR_DIRTY;
1583 }
1584+
1585+ _clutter_effect_paint (priv->current_effect, paint_context, run_flags);
1586+
1587+ priv->current_effect = old_current_effect;
1588+ }
1589+}
1590+
1591+/**
1592+ * clutter_actor_pick:
1593+ * @actor: A #ClutterActor
1594+ *
1595+ * Asks @actor to perform a pick.
1596+ */
1597+void
1598+clutter_actor_pick (ClutterActor *actor,
1599+ ClutterPickContext *pick_context)
1600+{
1601+ ClutterActorPrivate *priv;
1602+ CoglFramebuffer *framebuffer;
1603+ ClutterActorBox clip;
1604+ gboolean clip_set = FALSE;
1605+
1606+ if (CLUTTER_ACTOR_IN_DESTRUCTION (actor))
1607+ return;
1608+
1609+ priv = actor->priv;
1610+
1611+ /* if we aren't paintable (not in a toplevel with all
1612+ * parents paintable) then do nothing.
1613+ */
1614+ if (!CLUTTER_ACTOR_IS_MAPPED (actor))
1615+ return;
1616+
1617+ clutter_actor_ensure_resource_scale (actor);
1618+
1619+ /* mark that we are in the paint process */
1620+ CLUTTER_SET_PRIVATE_FLAGS (actor, CLUTTER_IN_PICK);
1621+
1622+ framebuffer = clutter_pick_context_get_framebuffer (pick_context);
1623+ cogl_framebuffer_push_matrix (framebuffer);
1624+
1625+ if (priv->enable_model_view_transform)
1626+ {
1627+ CoglMatrix matrix;
1628+
1629+ cogl_framebuffer_get_modelview_matrix (framebuffer, &matrix);
1630+ _clutter_actor_apply_modelview_transform (actor, &matrix);
1631+ cogl_framebuffer_set_modelview_matrix (framebuffer, &matrix);
1632+ }
1633+
1634+ if (priv->has_clip)
1635+ {
1636+ clip.x1 = priv->clip.origin.x;
1637+ clip.y1 = priv->clip.origin.y;
1638+ clip.x2 = priv->clip.origin.x + priv->clip.size.width;
1639+ clip.y2 = priv->clip.origin.y + priv->clip.size.height;
1640+ clip_set = TRUE;
1641+ }
1642+ else if (priv->clip_to_allocation)
1643+ {
1644+ clip.x1 = 0.f;
1645+ clip.y1 = 0.f;
1646+ clip.x2 = priv->allocation.x2 - priv->allocation.x1;
1647+ clip.y2 = priv->allocation.y2 - priv->allocation.y1;
1648+ clip_set = TRUE;
1649+ }
1650+
1651+ if (clip_set)
1652+ clip_set = _clutter_actor_push_pick_clip (actor, pick_context, &clip);
1653+
1654+ priv->next_effect_to_paint = NULL;
1655+ if (priv->effects)
1656+ {
1657+ priv->next_effect_to_paint =
1658+ _clutter_meta_group_peek_metas (priv->effects);
1659+ }
1660+
1661+ clutter_actor_continue_pick (actor, pick_context);
1662+
1663+ if (clip_set)
1664+ _clutter_actor_pop_pick_clip (actor);
1665+
1666+ cogl_framebuffer_pop_matrix (framebuffer);
1667+
1668+ /* paint sequence complete */
1669+ CLUTTER_UNSET_PRIVATE_FLAGS (actor, CLUTTER_IN_PICK);
1670+}
1671+
1672+/**
1673+ * clutter_actor_continue_pick:
1674+ * @actor: A #ClutterActor
1675+ *
1676+ * Run the next stage of the pick sequence. This function should only
1677+ * be called within the implementation of the ‘pick’ virtual of a
1678+ * #ClutterEffect. It will cause the run method of the next effect to
1679+ * be applied, or it will pick the actual actor if the current effect
1680+ * is the last effect in the chain.
1681+ */
1682+void
1683+clutter_actor_continue_pick (ClutterActor *actor,
1684+ ClutterPickContext *pick_context)
1685+{
1686+ ClutterActorPrivate *priv;
1687+
1688+ g_return_if_fail (CLUTTER_IS_ACTOR (actor));
1689+
1690+ g_return_if_fail (CLUTTER_ACTOR_IN_PICK (actor));
1691+
1692+ priv = actor->priv;
1693+
1694+ /* Skip any effects that are disabled */
1695+ while (priv->next_effect_to_paint &&
1696+ !clutter_actor_meta_get_enabled (priv->next_effect_to_paint->data))
1697+ priv->next_effect_to_paint = priv->next_effect_to_paint->next;
1698+
1699+ /* If this has come from the last effect then we'll just pick the
1700+ * actual actor.
1701+ */
1702+ if (priv->next_effect_to_paint == NULL)
1703+ {
1704+ /* The actor will log a silhouette of itself to the stage pick log.
1705+ *
1706+ * XXX:2.0 - Call the pick() virtual directly
1707+ */
1708+ if (g_signal_has_handler_pending (actor, actor_signals[PICK],
1709+ 0, TRUE))
1710+ g_signal_emit (actor, actor_signals[PICK], 0, pick_context);
1711 else
1712- {
1713- /* We can't determine when an actor has been modified since
1714- its last pick so lets just assume it has always been
1715- modified */
1716- run_flags |= CLUTTER_EFFECT_PAINT_ACTOR_DIRTY;
1717+ CLUTTER_ACTOR_GET_CLASS (actor)->pick (actor, pick_context);
1718+ }
1719+ else
1720+ {
1721+ ClutterEffect *old_current_effect;
1722
1723- _clutter_effect_pick (priv->current_effect, run_flags);
1724- }
1725+ /* Cache the current effect so that we can put it back before
1726+ * returning.
1727+ */
1728+ old_current_effect = priv->current_effect;
1729+
1730+ priv->current_effect = priv->next_effect_to_paint->data;
1731+ priv->next_effect_to_paint = priv->next_effect_to_paint->next;
1732+
1733+ _clutter_effect_pick (priv->current_effect, pick_context);
1734
1735 priv->current_effect = old_current_effect;
1736 }
1737@@ -4435,7 +4553,6 @@ clutter_actor_remove_child_internal (ClutterActor *self,
1738 clutter_actor_queue_compute_expand (self);
1739 }
1740
1741- /* clutter_actor_reparent() will emit ::parent-set for us */
1742 if (emit_parent_set && !CLUTTER_ACTOR_IN_REPARENT (child) &&
1743 !CLUTTER_ACTOR_IN_DESTRUCTION (child))
1744 {
1745@@ -4477,11 +4594,11 @@ static const ClutterTransformInfo default_transform_info = {
1746
1747 { 0, }, /* anchor XXX:2.0 - remove*/
1748
1749- CLUTTER_VERTEX_INIT_ZERO, /* translation */
1750+ GRAPHENE_POINT3D_INIT_ZERO, /* translation */
1751
1752 0.f, /* z-position */
1753
1754- CLUTTER_POINT_INIT_ZERO, /* pivot */
1755+ GRAPHENE_POINT_INIT_ZERO, /* pivot */
1756 0.f, /* pivot-z */
1757
1758 CLUTTER_MATRIX_INIT_IDENTITY,
1759@@ -4560,8 +4677,8 @@ _clutter_actor_get_transform_info (ClutterActor *self)
1760 }
1761
1762 static inline void
1763-clutter_actor_set_pivot_point_internal (ClutterActor *self,
1764- const ClutterPoint *pivot)
1765+clutter_actor_set_pivot_point_internal (ClutterActor *self,
1766+ const graphene_point_t *pivot)
1767 {
1768 ClutterTransformInfo *info;
1769
1770@@ -4866,11 +4983,11 @@ clutter_actor_get_rotation_angle (ClutterActor *self,
1771 * rotation angle.
1772 */
1773 static inline void
1774-clutter_actor_set_rotation_center_internal (ClutterActor *self,
1775- ClutterRotateAxis axis,
1776- const ClutterVertex *center)
1777+clutter_actor_set_rotation_center_internal (ClutterActor *self,
1778+ ClutterRotateAxis axis,
1779+ const graphene_point3d_t *center)
1780 {
1781- ClutterVertex v = CLUTTER_VERTEX_INIT_ZERO;
1782+ graphene_point3d_t v = GRAPHENE_POINT3D_INIT_ZERO;
1783 GObject *obj = G_OBJECT (self);
1784 ClutterTransformInfo *info;
1785
1786@@ -5097,8 +5214,8 @@ clutter_actor_set_anchor_coord (ClutterActor *self,
1787 }
1788
1789 static void
1790-clutter_actor_set_clip_rect (ClutterActor *self,
1791- const ClutterRect *clip)
1792+clutter_actor_set_clip_rect (ClutterActor *self,
1793+ const graphene_rect_t *clip)
1794 {
1795 ClutterActorPrivate *priv = self->priv;
1796 GObject *obj = G_OBJECT (self);
1797@@ -5113,7 +5230,6 @@ clutter_actor_set_clip_rect (ClutterActor *self,
1798
1799 clutter_actor_queue_redraw (self);
1800
1801- g_object_notify_by_pspec (obj, obj_props[PROP_CLIP]); /* XXX:2.0 - remove */
1802 g_object_notify_by_pspec (obj, obj_props[PROP_CLIP_RECT]);
1803 g_object_notify_by_pspec (obj, obj_props[PROP_HAS_CLIP]);
1804 }
1805@@ -5139,7 +5255,7 @@ clutter_actor_set_property (GObject *object,
1806
1807 case PROP_POSITION:
1808 {
1809- const ClutterPoint *pos = g_value_get_boxed (value);
1810+ const graphene_point_t *pos = g_value_get_boxed (value);
1811
1812 if (pos != NULL)
1813 clutter_actor_set_position (actor, pos->x, pos->y);
1814@@ -5158,7 +5274,7 @@ clutter_actor_set_property (GObject *object,
1815
1816 case PROP_SIZE:
1817 {
1818- const ClutterSize *size = g_value_get_boxed (value);
1819+ const graphene_size_t *size = g_value_get_boxed (value);
1820
1821 if (size != NULL)
1822 clutter_actor_set_size (actor, size->width, size->height);
1823@@ -5244,10 +5360,10 @@ clutter_actor_set_property (GObject *object,
1824
1825 case PROP_PIVOT_POINT:
1826 {
1827- const ClutterPoint *pivot = g_value_get_boxed (value);
1828+ const graphene_point_t *pivot = g_value_get_boxed (value);
1829
1830 if (pivot == NULL)
1831- pivot = clutter_point_zero ();
1832+ pivot = graphene_point_zero ();
1833
1834 clutter_actor_set_pivot_point (actor, pivot->x, pivot->y);
1835 }
1836@@ -5301,16 +5417,6 @@ clutter_actor_set_property (GObject *object,
1837 clutter_actor_set_scale_gravity (actor, g_value_get_enum (value));
1838 break;
1839
1840- case PROP_CLIP: /* XXX:2.0 - remove */
1841- {
1842- const ClutterGeometry *geom = g_value_get_boxed (value);
1843-
1844- clutter_actor_set_clip (actor,
1845- geom->x, geom->y,
1846- geom->width, geom->height);
1847- }
1848- break;
1849-
1850 case PROP_CLIP_RECT:
1851 clutter_actor_set_clip_rect (actor, g_value_get_boxed (value));
1852 break;
1853@@ -5503,11 +5609,11 @@ clutter_actor_get_property (GObject *object,
1854
1855 case PROP_POSITION:
1856 {
1857- ClutterPoint position;
1858+ graphene_point_t position;
1859
1860- clutter_point_init (&position,
1861- clutter_actor_get_x (actor),
1862- clutter_actor_get_y (actor));
1863+ graphene_point_init (&position,
1864+ clutter_actor_get_x (actor),
1865+ clutter_actor_get_y (actor));
1866 g_value_set_boxed (value, &position);
1867 }
1868 break;
1869@@ -5522,11 +5628,11 @@ clutter_actor_get_property (GObject *object,
1870
1871 case PROP_SIZE:
1872 {
1873- ClutterSize size;
1874+ graphene_size_t size;
1875
1876- clutter_size_init (&size,
1877- clutter_actor_get_width (actor),
1878- clutter_actor_get_height (actor));
1879+ graphene_size_init (&size,
1880+ clutter_actor_get_width (actor),
1881+ clutter_actor_get_height (actor));
1882 g_value_set_boxed (value, &size);
1883 }
1884 break;
1885@@ -5649,19 +5755,6 @@ clutter_actor_get_property (GObject *object,
1886 g_value_set_boolean (value, priv->has_clip);
1887 break;
1888
1889- case PROP_CLIP: /* XXX:2.0 - remove */
1890- {
1891- ClutterGeometry clip;
1892-
1893- clip.x = CLUTTER_NEARBYINT (priv->clip.origin.x);
1894- clip.y = CLUTTER_NEARBYINT (priv->clip.origin.y);
1895- clip.width = CLUTTER_NEARBYINT (priv->clip.size.width);
1896- clip.height = CLUTTER_NEARBYINT (priv->clip.size.height);
1897-
1898- g_value_set_boxed (value, &clip);
1899- }
1900- break;
1901-
1902 case PROP_CLIP_RECT:
1903 g_value_set_boxed (value, &priv->clip);
1904 break;
1905@@ -5809,7 +5902,7 @@ clutter_actor_get_property (GObject *object,
1906
1907 case PROP_ROTATION_CENTER_X: /* XXX:2.0 - remove */
1908 {
1909- ClutterVertex center;
1910+ graphene_point3d_t center;
1911
1912 clutter_actor_get_rotation (actor, CLUTTER_X_AXIS,
1913 &center.x,
1914@@ -5822,7 +5915,7 @@ clutter_actor_get_property (GObject *object,
1915
1916 case PROP_ROTATION_CENTER_Y: /* XXX:2.0 - remove */
1917 {
1918- ClutterVertex center;
1919+ graphene_point3d_t center;
1920
1921 clutter_actor_get_rotation (actor, CLUTTER_Y_AXIS,
1922 &center.x,
1923@@ -5835,7 +5928,7 @@ clutter_actor_get_property (GObject *object,
1924
1925 case PROP_ROTATION_CENTER_Z: /* XXX:2.0 - remove */
1926 {
1927- ClutterVertex center;
1928+ graphene_point3d_t center;
1929
1930 clutter_actor_get_rotation (actor, CLUTTER_Z_AXIS,
1931 &center.x,
1932@@ -6080,18 +6173,7 @@ clutter_actor_dispose (GObject *object)
1933 if (priv->parent != NULL)
1934 {
1935 ClutterActor *parent = priv->parent;
1936-
1937- /* go through the Container implementation unless this
1938- * is an internal child and has been marked as such.
1939- *
1940- * removing the actor from its parent will reset the
1941- * realized and mapped states.
1942- */
1943- if (!CLUTTER_ACTOR_IS_INTERNAL_CHILD (self))
1944- clutter_container_remove_actor (CLUTTER_CONTAINER (parent), self);
1945- else
1946- clutter_actor_remove_child_internal (parent, self,
1947- REMOVE_CHILD_LEGACY_FLAGS);
1948+ clutter_container_remove_actor (CLUTTER_CONTAINER (parent), self);
1949 }
1950
1951 /* parent must be gone at this point */
1952@@ -6104,17 +6186,8 @@ clutter_actor_dispose (GObject *object)
1953 g_assert (!CLUTTER_ACTOR_IS_REALIZED (self));
1954 }
1955
1956- if (priv->resolution_changed_id)
1957- {
1958- g_signal_handler_disconnect (backend, priv->resolution_changed_id);
1959- priv->resolution_changed_id = 0;
1960- }
1961-
1962- if (priv->font_changed_id)
1963- {
1964- g_signal_handler_disconnect (backend, priv->font_changed_id);
1965- priv->font_changed_id = 0;
1966- }
1967+ g_clear_signal_handler (&priv->resolution_changed_id, backend);
1968+ g_clear_signal_handler (&priv->font_changed_id, backend);
1969
1970 g_clear_object (&priv->pango_context);
1971 g_clear_object (&priv->actions);
1972@@ -6263,7 +6336,7 @@ clutter_actor_update_default_paint_volume (ClutterActor *self,
1973 priv->clip.size.width >= 0 &&
1974 priv->clip.size.height >= 0)
1975 {
1976- ClutterVertex origin;
1977+ graphene_point3d_t origin;
1978
1979 origin.x = priv->clip.origin.x;
1980 origin.y = priv->clip.origin.y;
1981@@ -6539,7 +6612,7 @@ clutter_actor_class_init (ClutterActorClass *klass)
1982 g_param_spec_boxed ("position",
1983 P_("Position"),
1984 P_("The position of the origin of the actor"),
1985- CLUTTER_TYPE_POINT,
1986+ GRAPHENE_TYPE_POINT,
1987 G_PARAM_READWRITE |
1988 G_PARAM_STATIC_STRINGS |
1989 CLUTTER_PARAM_ANIMATABLE);
1990@@ -6557,7 +6630,7 @@ clutter_actor_class_init (ClutterActorClass *klass)
1991 g_param_spec_float ("width",
1992 P_("Width"),
1993 P_("Width of the actor"),
1994- 0.0, G_MAXFLOAT,
1995+ -1.0f, G_MAXFLOAT,
1996 0.0,
1997 G_PARAM_READWRITE |
1998 G_PARAM_STATIC_STRINGS |
1999@@ -6576,7 +6649,7 @@ clutter_actor_class_init (ClutterActorClass *klass)
2000 g_param_spec_float ("height",
2001 P_("Height"),
2002 P_("Height of the actor"),
2003- 0.0, G_MAXFLOAT,
2004+ -1.0f, G_MAXFLOAT,
2005 0.0,
2006 G_PARAM_READWRITE |
2007 G_PARAM_STATIC_STRINGS |
2008@@ -6598,7 +6671,7 @@ clutter_actor_class_init (ClutterActorClass *klass)
2009 g_param_spec_boxed ("size",
2010 P_("Size"),
2011 P_("The size of the actor"),
2012- CLUTTER_TYPE_SIZE,
2013+ GRAPHENE_TYPE_SIZE,
2014 G_PARAM_READWRITE |
2015 G_PARAM_STATIC_STRINGS |
2016 CLUTTER_PARAM_ANIMATABLE);
2017@@ -7041,24 +7114,10 @@ clutter_actor_class_init (ClutterActorClass *klass)
2018 CLUTTER_PARAM_READABLE);
2019
2020 /**
2021- * ClutterActor:clip:
2022- *
2023- * The visible region of the actor, in actor-relative coordinates
2024- *
2025- * Deprecated: 1.12: Use #ClutterActor:clip-rect instead.
2026- */
2027- obj_props[PROP_CLIP] = /* XXX:2.0 - remove */
2028- g_param_spec_boxed ("clip",
2029- P_("Clip"),
2030- P_("The clip region for the actor"),
2031- CLUTTER_TYPE_GEOMETRY,
2032- CLUTTER_PARAM_READWRITE);
2033-
2034- /**
2035 * ClutterActor:clip-rect:
2036 *
2037 * The visible region of the actor, in actor-relative coordinates,
2038- * expressed as a #ClutterRect.
2039+ * expressed as a #graphene_rect_t.
2040 *
2041 * Setting this property to %NULL will unset the existing clip.
2042 *
2043@@ -7071,7 +7130,7 @@ clutter_actor_class_init (ClutterActorClass *klass)
2044 g_param_spec_boxed ("clip-rect",
2045 P_("Clip Rectangle"),
2046 P_("The visible region of the actor"),
2047- CLUTTER_TYPE_RECT,
2048+ GRAPHENE_TYPE_RECT,
2049 G_PARAM_READWRITE |
2050 G_PARAM_STATIC_STRINGS);
2051
2052@@ -7108,7 +7167,7 @@ clutter_actor_class_init (ClutterActorClass *klass)
2053 g_param_spec_boxed ("pivot-point",
2054 P_("Pivot Point"),
2055 P_("The point around which the scaling and rotation occur"),
2056- CLUTTER_TYPE_POINT,
2057+ GRAPHENE_TYPE_POINT,
2058 G_PARAM_READWRITE |
2059 G_PARAM_STATIC_STRINGS |
2060 CLUTTER_PARAM_ANIMATABLE);
2061@@ -7330,7 +7389,7 @@ clutter_actor_class_init (ClutterActorClass *klass)
2062 g_param_spec_boxed ("rotation-center-x",
2063 P_("Rotation Center X"),
2064 P_("The rotation center on the X axis"),
2065- CLUTTER_TYPE_VERTEX,
2066+ GRAPHENE_TYPE_POINT3D,
2067 G_PARAM_READWRITE |
2068 G_PARAM_STATIC_STRINGS |
2069 G_PARAM_DEPRECATED);
2070@@ -7348,7 +7407,7 @@ clutter_actor_class_init (ClutterActorClass *klass)
2071 g_param_spec_boxed ("rotation-center-y",
2072 P_("Rotation Center Y"),
2073 P_("The rotation center on the Y axis"),
2074- CLUTTER_TYPE_VERTEX,
2075+ GRAPHENE_TYPE_POINT3D,
2076 G_PARAM_READWRITE |
2077 G_PARAM_STATIC_STRINGS |
2078 G_PARAM_DEPRECATED);
2079@@ -7366,7 +7425,7 @@ clutter_actor_class_init (ClutterActorClass *klass)
2080 g_param_spec_boxed ("rotation-center-z",
2081 P_("Rotation Center Z"),
2082 P_("The rotation center on the Z axis"),
2083- CLUTTER_TYPE_VERTEX,
2084+ GRAPHENE_TYPE_POINT3D,
2085 G_PARAM_READWRITE |
2086 G_PARAM_STATIC_STRINGS |
2087 G_PARAM_DEPRECATED);
2088@@ -8520,6 +8579,7 @@ clutter_actor_class_init (ClutterActorClass *klass)
2089 /**
2090 * ClutterActor::paint:
2091 * @actor: the #ClutterActor that received the signal
2092+ * @paint_context: a #ClutterPaintContext
2093 *
2094 * The ::paint signal is emitted each time an actor is being painted.
2095 *
2096@@ -8547,7 +8607,8 @@ clutter_actor_class_init (ClutterActorClass *klass)
2097 G_SIGNAL_DEPRECATED,
2098 G_STRUCT_OFFSET (ClutterActorClass, paint),
2099 NULL, NULL, NULL,
2100- G_TYPE_NONE, 0);
2101+ G_TYPE_NONE, 1,
2102+ CLUTTER_TYPE_PAINT_CONTEXT);
2103 /**
2104 * ClutterActor::realize:
2105 * @actor: the #ClutterActor that received the signal
2106@@ -8590,12 +8651,11 @@ clutter_actor_class_init (ClutterActorClass *klass)
2107 /**
2108 * ClutterActor::pick:
2109 * @actor: the #ClutterActor that received the signal
2110- * @color: the #ClutterColor to be used when picking
2111+ * @pick_context: a #ClutterPickContext
2112 *
2113 * The ::pick signal is emitted each time an actor is being painted
2114 * in "pick mode". The pick mode is used to identify the actor during
2115 * the event handling phase, or by clutter_stage_get_actor_at_pos().
2116- * The actor should paint its shape using the passed @pick_color.
2117 *
2118 * Subclasses of #ClutterActor should override the class signal handler
2119 * and paint themselves in that function.
2120@@ -8614,7 +8674,7 @@ clutter_actor_class_init (ClutterActorClass *klass)
2121 G_STRUCT_OFFSET (ClutterActorClass, pick),
2122 NULL, NULL, NULL,
2123 G_TYPE_NONE, 1,
2124- CLUTTER_TYPE_COLOR | G_SIGNAL_TYPE_STATIC_SCOPE);
2125+ CLUTTER_TYPE_PICK_CONTEXT);
2126
2127 /**
2128 * ClutterActor::allocation-changed:
2129@@ -9021,7 +9081,7 @@ _clutter_actor_queue_redraw_full (ClutterActor *self,
2130 if (flags & CLUTTER_REDRAW_CLIPPED_TO_ALLOCATION)
2131 {
2132 ClutterActorBox allocation_clip;
2133- ClutterVertex origin;
2134+ graphene_point3d_t origin;
2135
2136 /* If the actor doesn't have a valid allocation then we will
2137 * queue a full stage redraw. */
2138@@ -9225,7 +9285,7 @@ clutter_actor_queue_redraw_with_clip (ClutterActor *self,
2139 const cairo_rectangle_int_t *clip)
2140 {
2141 ClutterPaintVolume volume;
2142- ClutterVertex origin;
2143+ graphene_point3d_t origin;
2144
2145 g_return_if_fail (CLUTTER_IS_ACTOR (self));
2146
2147@@ -9693,6 +9753,23 @@ clutter_actor_get_preferred_width (ClutterActor *self,
2148 return;
2149 }
2150
2151+ /* if the request mode is CONTENT_SIZE we simply return the content width */
2152+ if (priv->request_mode == CLUTTER_REQUEST_CONTENT_SIZE)
2153+ {
2154+ float content_width = 0.f;
2155+
2156+ if (priv->content != NULL)
2157+ clutter_content_get_preferred_size (priv->content, &content_width, NULL);
2158+
2159+ if (min_width_p != NULL)
2160+ *min_width_p = content_width;
2161+
2162+ if (natural_width_p != NULL)
2163+ *natural_width_p = content_width;
2164+
2165+ return;
2166+ }
2167+
2168 CLUTTER_SET_PRIVATE_FLAGS (self, CLUTTER_IN_PREF_WIDTH);
2169
2170 /* the remaining cases are:
2171@@ -9841,6 +9918,23 @@ clutter_actor_get_preferred_height (ClutterActor *self,
2172 return;
2173 }
2174
2175+ /* if the request mode is CONTENT_SIZE we simply return the content height */
2176+ if (priv->request_mode == CLUTTER_REQUEST_CONTENT_SIZE)
2177+ {
2178+ float content_height = 0.f;
2179+
2180+ if (priv->content != NULL)
2181+ clutter_content_get_preferred_size (priv->content, NULL, &content_height);
2182+
2183+ if (min_height_p != NULL)
2184+ *min_height_p = content_height;
2185+
2186+ if (natural_height_p != NULL)
2187+ *natural_height_p = content_height;
2188+
2189+ return;
2190+ }
2191+
2192 CLUTTER_SET_PRIVATE_FLAGS (self, CLUTTER_IN_PREF_HEIGHT);
2193
2194 /* the remaining cases are:
2195@@ -10452,17 +10546,17 @@ clutter_actor_set_position (ClutterActor *self,
2196 gfloat x,
2197 gfloat y)
2198 {
2199- ClutterPoint new_position;
2200- ClutterPoint cur_position;
2201+ graphene_point_t new_position;
2202+ graphene_point_t cur_position;
2203
2204 g_return_if_fail (CLUTTER_IS_ACTOR (self));
2205
2206- clutter_point_init (&new_position, x, y);
2207+ graphene_point_init (&new_position, x, y);
2208
2209 cur_position.x = clutter_actor_get_x (self);
2210 cur_position.y = clutter_actor_get_y (self);
2211
2212- if (!clutter_point_equals (&cur_position, &new_position))
2213+ if (!graphene_point_equal (&cur_position, &new_position))
2214 _clutter_actor_create_transition (self, obj_props[PROP_POSITION],
2215 &cur_position,
2216 &new_position);
2217@@ -10897,8 +10991,8 @@ clutter_actor_set_height_internal (ClutterActor *self,
2218 }
2219
2220 static void
2221-clutter_actor_set_size_internal (ClutterActor *self,
2222- const ClutterSize *size)
2223+clutter_actor_set_size_internal (ClutterActor *self,
2224+ const graphene_size_t *size)
2225 {
2226 if (size != NULL)
2227 {
2228@@ -10934,11 +11028,11 @@ clutter_actor_set_size (ClutterActor *self,
2229 gfloat width,
2230 gfloat height)
2231 {
2232- ClutterSize new_size;
2233+ graphene_size_t new_size;
2234
2235 g_return_if_fail (CLUTTER_IS_ACTOR (self));
2236
2237- clutter_size_init (&new_size, width, height);
2238+ graphene_size_init (&new_size, width, height);
2239
2240 /* minor optimization: if we don't have a duration then we can
2241 * skip the get_size() below, to avoid the chance of going through
2242@@ -10957,11 +11051,11 @@ clutter_actor_set_size (ClutterActor *self,
2243 }
2244 else
2245 {
2246- ClutterSize cur_size;
2247+ graphene_size_t cur_size;
2248
2249- clutter_size_init (&cur_size,
2250- clutter_actor_get_width (self),
2251- clutter_actor_get_height (self));
2252+ graphene_size_init (&cur_size,
2253+ clutter_actor_get_width (self),
2254+ clutter_actor_get_height (self));
2255
2256 _clutter_actor_create_transition (self,
2257 obj_props[PROP_SIZE],
2258@@ -11047,8 +11141,8 @@ clutter_actor_get_transformed_position (ClutterActor *self,
2259 gfloat *x,
2260 gfloat *y)
2261 {
2262- ClutterVertex v1;
2263- ClutterVertex v2;
2264+ graphene_point3d_t v1;
2265+ graphene_point3d_t v2;
2266
2267 v1.x = v1.y = v1.z = 0;
2268 clutter_actor_apply_transform_to_point (self, &v1, &v2);
2269@@ -11094,7 +11188,7 @@ clutter_actor_get_transformed_size (ClutterActor *self,
2270 gfloat *height)
2271 {
2272 ClutterActorPrivate *priv;
2273- ClutterVertex v[4];
2274+ graphene_point3d_t v[4];
2275 gfloat x_min, x_max, y_min, y_max;
2276 gint i;
2277
2278@@ -11416,8 +11510,8 @@ clutter_actor_set_y_internal (ClutterActor *self,
2279 }
2280
2281 static void
2282-clutter_actor_set_position_internal (ClutterActor *self,
2283- const ClutterPoint *position)
2284+clutter_actor_set_position_internal (ClutterActor *self,
2285+ const graphene_point_t *position)
2286 {
2287 ClutterActorPrivate *priv = self->priv;
2288 ClutterLayoutInfo *linfo;
2289@@ -11426,7 +11520,7 @@ clutter_actor_set_position_internal (ClutterActor *self,
2290 linfo = _clutter_actor_get_layout_info (self);
2291
2292 if (priv->position_set &&
2293- clutter_point_equals (position, &linfo->fixed_pos))
2294+ graphene_point_equal (position, &linfo->fixed_pos))
2295 return;
2296
2297 clutter_actor_store_old_geometry (self, &old);
2298@@ -11511,8 +11605,7 @@ clutter_actor_set_y (ClutterActor *self,
2299 * the X coordinate of the origin of the allocation box.
2300 *
2301 * If the actor has any fixed coordinate set using clutter_actor_set_x(),
2302- * clutter_actor_set_position() or clutter_actor_set_geometry(), this
2303- * function will return that coordinate.
2304+ * clutter_actor_set_position(), this function will return that coordinate.
2305 *
2306 * If both the allocation and a fixed position are missing, this function
2307 * will return 0.
2308@@ -11559,8 +11652,7 @@ clutter_actor_get_x (ClutterActor *self)
2309 * the Y coordinate of the origin of the allocation box.
2310 *
2311 * If the actor has any fixed coordinate set using clutter_actor_set_y(),
2312- * clutter_actor_set_position() or clutter_actor_set_geometry(), this
2313- * function will return that coordinate.
2314+ * clutter_actor_set_position(), this function will return that coordinate.
2315 *
2316 * If both the allocation and a fixed position are missing, this function
2317 * will return 0.
2318@@ -11686,45 +11778,6 @@ clutter_actor_set_scale_full (ClutterActor *self,
2319 }
2320
2321 /**
2322- * clutter_actor_set_scale_with_gravity:
2323- * @self: A #ClutterActor
2324- * @scale_x: double factor to scale actor by horizontally.
2325- * @scale_y: double factor to scale actor by vertically.
2326- * @gravity: the location of the scale center expressed as a compass
2327- * direction.
2328- *
2329- * Scales an actor with the given factors around the given
2330- * center point. The center point is specified as one of the compass
2331- * directions in #ClutterGravity. For example, setting it to north
2332- * will cause the top of the actor to remain unchanged and the rest of
2333- * the actor to expand left, right and downwards.
2334- *
2335- * The #ClutterActor:scale-x and #ClutterActor:scale-y properties are
2336- * animatable.
2337- *
2338- * Since: 1.0
2339- *
2340- * Deprecated: 1.12: Use clutter_actor_set_pivot_point() to set the
2341- * scale center using normalized coordinates instead.
2342- */
2343-void
2344-clutter_actor_set_scale_with_gravity (ClutterActor *self,
2345- gdouble scale_x,
2346- gdouble scale_y,
2347- ClutterGravity gravity)
2348-{
2349- g_return_if_fail (CLUTTER_IS_ACTOR (self));
2350-
2351- g_object_freeze_notify (G_OBJECT (self));
2352-
2353- clutter_actor_set_scale_factor (self, CLUTTER_X_AXIS, scale_x);
2354- clutter_actor_set_scale_factor (self, CLUTTER_Y_AXIS, scale_y);
2355- clutter_actor_set_scale_gravity (self, gravity);
2356-
2357- g_object_thaw_notify (G_OBJECT (self));
2358-}
2359-
2360-/**
2361 * clutter_actor_get_scale:
2362 * @self: A #ClutterActor
2363 * @scale_x: (out) (allow-none): Location to store horizonal
2364@@ -12114,27 +12167,6 @@ clutter_actor_get_name (ClutterActor *self)
2365 return self->priv->name;
2366 }
2367
2368-/**
2369- * clutter_actor_get_gid:
2370- * @self: A #ClutterActor
2371- *
2372- * Retrieves the unique id for @self.
2373- *
2374- * Return value: Globally unique value for this object instance.
2375- *
2376- * Since: 0.6
2377- *
2378- * Deprecated: 1.8: The id is not used any longer, and this function
2379- * always returns 0.
2380- */
2381-guint32
2382-clutter_actor_get_gid (ClutterActor *self)
2383-{
2384- g_return_val_if_fail (CLUTTER_IS_ACTOR (self), 0);
2385-
2386- return 0;
2387-}
2388-
2389 static inline void
2390 clutter_actor_set_depth_internal (ClutterActor *self,
2391 float depth)
2392@@ -12245,7 +12277,7 @@ clutter_actor_set_pivot_point (ClutterActor *self,
2393 gfloat pivot_x,
2394 gfloat pivot_y)
2395 {
2396- ClutterPoint pivot = CLUTTER_POINT_INIT (pivot_x, pivot_y);
2397+ graphene_point_t pivot = GRAPHENE_POINT_INIT (pivot_x, pivot_y);
2398 const ClutterTransformInfo *info;
2399
2400 g_return_if_fail (CLUTTER_IS_ACTOR (self));
2401@@ -12406,7 +12438,7 @@ clutter_actor_set_rotation (ClutterActor *self,
2402 gfloat y,
2403 gfloat z)
2404 {
2405- ClutterVertex v;
2406+ graphene_point3d_t v;
2407
2408 g_return_if_fail (CLUTTER_IS_ACTOR (self));
2409
2410@@ -12603,7 +12635,6 @@ clutter_actor_set_clip (ClutterActor *self,
2411
2412 clutter_actor_queue_redraw (self);
2413
2414- g_object_notify_by_pspec (obj, obj_props[PROP_CLIP]);
2415 g_object_notify_by_pspec (obj, obj_props[PROP_CLIP_RECT]);
2416 g_object_notify_by_pspec (obj, obj_props[PROP_HAS_CLIP]);
2417 }
2418@@ -13106,12 +13137,6 @@ clutter_actor_add_child_internal (ClutterActor *self,
2419 if (self->priv->in_cloned_branch)
2420 clutter_actor_push_in_cloned_branch (child, self->priv->in_cloned_branch);
2421
2422- /* if push_internal() has been called then we automatically set
2423- * the flag on the actor
2424- */
2425- if (self->priv->internal_child)
2426- CLUTTER_SET_PRIVATE_FLAGS (child, CLUTTER_INTERNAL_CHILD);
2427-
2428 /* children may cause their parent to expand, if they are set
2429 * to expand; if a child is not expanded then it cannot change
2430 * its parent's state. any further change later on will queue
2431@@ -13129,7 +13154,6 @@ clutter_actor_add_child_internal (ClutterActor *self,
2432 clutter_actor_queue_compute_expand (self);
2433 }
2434
2435- /* clutter_actor_reparent() will emit ::parent-set for us */
2436 if (emit_parent_set && !CLUTTER_ACTOR_IN_REPARENT (child))
2437 {
2438 child->priv->needs_compute_resource_scale = TRUE;
2439@@ -13639,115 +13663,15 @@ clutter_actor_replace_child (ClutterActor *self,
2440 * Deprecated: 1.10: Use clutter_actor_remove_child() instead.
2441 */
2442 void
2443-clutter_actor_unparent (ClutterActor *self)
2444-{
2445- g_return_if_fail (CLUTTER_IS_ACTOR (self));
2446-
2447- if (self->priv->parent == NULL)
2448- return;
2449-
2450- clutter_actor_remove_child_internal (self->priv->parent, self,
2451- REMOVE_CHILD_LEGACY_FLAGS);
2452-}
2453-
2454-/**
2455- * clutter_actor_reparent:
2456- * @self: a #ClutterActor
2457- * @new_parent: the new #ClutterActor parent
2458- *
2459- * Resets the parent actor of @self.
2460- *
2461- * This function is logically equivalent to calling clutter_actor_unparent()
2462- * and clutter_actor_set_parent(), but more efficiently implemented, as it
2463- * ensures the child is not finalized when unparented, and emits the
2464- * #ClutterActor::parent-set signal only once.
2465- *
2466- * In reality, calling this function is less useful than it sounds, as some
2467- * application code may rely on changes in the intermediate state between
2468- * removal and addition of the actor from its old parent to the @new_parent.
2469- * Thus, it is strongly encouraged to avoid using this function in application
2470- * code.
2471- *
2472- * Since: 0.2
2473- *
2474- * Deprecated: 1.10: Use clutter_actor_remove_child() and
2475- * clutter_actor_add_child() instead; remember to take a reference on
2476- * the actor being removed before calling clutter_actor_remove_child()
2477- * to avoid the reference count dropping to zero and the actor being
2478- * destroyed.
2479- */
2480-void
2481-clutter_actor_reparent (ClutterActor *self,
2482- ClutterActor *new_parent)
2483+clutter_actor_unparent (ClutterActor *self)
2484 {
2485- ClutterActorPrivate *priv;
2486-
2487 g_return_if_fail (CLUTTER_IS_ACTOR (self));
2488- g_return_if_fail (CLUTTER_IS_ACTOR (new_parent));
2489- g_return_if_fail (self != new_parent);
2490-
2491- if (CLUTTER_ACTOR_IS_TOPLEVEL (self))
2492- {
2493- g_warning ("Cannot set a parent on a toplevel actor");
2494- return;
2495- }
2496-
2497- if (CLUTTER_ACTOR_IN_DESTRUCTION (self))
2498- {
2499- g_warning ("Cannot set a parent currently being destroyed");
2500- return;
2501- }
2502-
2503- priv = self->priv;
2504-
2505- if (priv->parent != new_parent)
2506- {
2507- ClutterActor *old_parent;
2508-
2509- CLUTTER_SET_PRIVATE_FLAGS (self, CLUTTER_IN_REPARENT);
2510-
2511- old_parent = priv->parent;
2512-
2513- g_object_ref (self);
2514-
2515- if (old_parent != NULL)
2516- {
2517- /* go through the Container implementation if this is a regular
2518- * child and not an internal one
2519- */
2520- if (!CLUTTER_ACTOR_IS_INTERNAL_CHILD (self))
2521- {
2522- ClutterContainer *parent = CLUTTER_CONTAINER (old_parent);
2523-
2524- /* this will have to call unparent() */
2525- clutter_container_remove_actor (parent, self);
2526- }
2527- else
2528- clutter_actor_remove_child_internal (old_parent, self,
2529- REMOVE_CHILD_LEGACY_FLAGS);
2530- }
2531-
2532- /* Note, will call set_parent() */
2533- if (!CLUTTER_ACTOR_IS_INTERNAL_CHILD (self))
2534- clutter_container_add_actor (CLUTTER_CONTAINER (new_parent), self);
2535- else
2536- clutter_actor_add_child_internal (new_parent, self,
2537- ADD_CHILD_LEGACY_FLAGS,
2538- insert_child_at_depth,
2539- NULL);
2540-
2541- priv->needs_compute_resource_scale = TRUE;
2542-
2543- /* we emit the ::parent-set signal once */
2544- g_signal_emit (self, actor_signals[PARENT_SET], 0, old_parent);
2545-
2546- CLUTTER_UNSET_PRIVATE_FLAGS (self, CLUTTER_IN_REPARENT);
2547
2548- /* the IN_REPARENT flag suspends state updates */
2549- clutter_actor_update_map_state (self, MAP_STATE_CHECK);
2550+ if (self->priv->parent == NULL)
2551+ return;
2552
2553- g_object_unref (self);
2554- }
2555+ clutter_actor_remove_child_internal (self->priv->parent, self,
2556+ REMOVE_CHILD_LEGACY_FLAGS);
2557 }
2558
2559 /**
2560@@ -13917,134 +13841,6 @@ clutter_actor_set_child_at_index (ClutterActor *self,
2561 clutter_actor_queue_relayout (self);
2562 }
2563
2564-/**
2565- * clutter_actor_raise:
2566- * @self: A #ClutterActor
2567- * @below: (allow-none): A #ClutterActor to raise above.
2568- *
2569- * Puts @self above @below.
2570- *
2571- * Both actors must have the same parent, and the parent must implement
2572- * the #ClutterContainer interface
2573- *
2574- * This function calls clutter_container_raise_child() internally.
2575- *
2576- * Deprecated: 1.10: Use clutter_actor_set_child_above_sibling() instead.
2577- */
2578-void
2579-clutter_actor_raise (ClutterActor *self,
2580- ClutterActor *below)
2581-{
2582- ClutterActor *parent;
2583-
2584- g_return_if_fail (CLUTTER_IS_ACTOR (self));
2585-
2586- parent = clutter_actor_get_parent (self);
2587- if (parent == NULL)
2588- {
2589- g_warning ("%s: Actor '%s' is not inside a container",
2590- G_STRFUNC,
2591- _clutter_actor_get_debug_name (self));
2592- return;
2593- }
2594-
2595- if (below != NULL)
2596- {
2597- if (parent != clutter_actor_get_parent (below))
2598- {
2599- g_warning ("%s Actor '%s' is not in the same container as "
2600- "actor '%s'",
2601- G_STRFUNC,
2602- _clutter_actor_get_debug_name (self),
2603- _clutter_actor_get_debug_name (below));
2604- return;
2605- }
2606- }
2607-
2608- clutter_container_raise_child (CLUTTER_CONTAINER (parent), self, below);
2609-}
2610-
2611-/**
2612- * clutter_actor_lower:
2613- * @self: A #ClutterActor
2614- * @above: (allow-none): A #ClutterActor to lower below
2615- *
2616- * Puts @self below @above.
2617- *
2618- * Both actors must have the same parent, and the parent must implement
2619- * the #ClutterContainer interface.
2620- *
2621- * This function calls clutter_container_lower_child() internally.
2622- *
2623- * Deprecated: 1.10: Use clutter_actor_set_child_below_sibling() instead.
2624- */
2625-void
2626-clutter_actor_lower (ClutterActor *self,
2627- ClutterActor *above)
2628-{
2629- ClutterActor *parent;
2630-
2631- g_return_if_fail (CLUTTER_IS_ACTOR (self));
2632-
2633- parent = clutter_actor_get_parent (self);
2634- if (parent == NULL)
2635- {
2636- g_warning ("%s: Actor of type %s is not inside a container",
2637- G_STRFUNC,
2638- _clutter_actor_get_debug_name (self));
2639- return;
2640- }
2641-
2642- if (above)
2643- {
2644- if (parent != clutter_actor_get_parent (above))
2645- {
2646- g_warning ("%s: Actor '%s' is not in the same container as "
2647- "actor '%s'",
2648- G_STRFUNC,
2649- _clutter_actor_get_debug_name (self),
2650- _clutter_actor_get_debug_name (above));
2651- return;
2652- }
2653- }
2654-
2655- clutter_container_lower_child (CLUTTER_CONTAINER (parent), self, above);
2656-}
2657-
2658-/**
2659- * clutter_actor_raise_top:
2660- * @self: A #ClutterActor
2661- *
2662- * Raises @self to the top.
2663- *
2664- * This function calls clutter_actor_raise() internally.
2665- *
2666- * Deprecated: 1.10: Use clutter_actor_set_child_above_sibling() with
2667- * a %NULL sibling, instead.
2668- */
2669-void
2670-clutter_actor_raise_top (ClutterActor *self)
2671-{
2672- clutter_actor_raise (self, NULL);
2673-}
2674-
2675-/**
2676- * clutter_actor_lower_bottom:
2677- * @self: A #ClutterActor
2678- *
2679- * Lowers @self to the bottom.
2680- *
2681- * This function calls clutter_actor_lower() internally.
2682- *
2683- * Deprecated: 1.10: Use clutter_actor_set_child_below_sibling() with
2684- * a %NULL sibling, instead.
2685- */
2686-void
2687-clutter_actor_lower_bottom (ClutterActor *self)
2688-{
2689- clutter_actor_lower (self, NULL);
2690-}
2691-
2692 /*
2693 * Event handling
2694 */
2695@@ -14188,34 +13984,6 @@ clutter_actor_get_reactive (ClutterActor *actor)
2696 }
2697
2698 /**
2699- * clutter_actor_get_anchor_point:
2700- * @self: a #ClutterActor
2701- * @anchor_x: (out): return location for the X coordinate of the anchor point
2702- * @anchor_y: (out): return location for the Y coordinate of the anchor point
2703- *
2704- * Gets the current anchor point of the @actor in pixels.
2705- *
2706- * Since: 0.6
2707- *
2708- * Deprecated: 1.12: Use #ClutterActor:pivot-point instead
2709- */
2710-void
2711-clutter_actor_get_anchor_point (ClutterActor *self,
2712- gfloat *anchor_x,
2713- gfloat *anchor_y)
2714-{
2715- const ClutterTransformInfo *info;
2716-
2717- g_return_if_fail (CLUTTER_IS_ACTOR (self));
2718-
2719- info = _clutter_actor_get_transform_info_or_defaults (self);
2720- clutter_anchor_coord_get_units (self, &info->anchor,
2721- anchor_x,
2722- anchor_y,
2723- NULL);
2724-}
2725-
2726-/**
2727 * clutter_actor_set_anchor_point:
2728 * @self: a #ClutterActor
2729 * @anchor_x: X coordinate of the anchor point
2730@@ -14729,40 +14497,6 @@ parse_actor_metas (ClutterScript *script,
2731 return g_slist_reverse (retval);
2732 }
2733
2734-static GSList *
2735-parse_behaviours (ClutterScript *script,
2736- ClutterActor *actor,
2737- JsonNode *node)
2738-{
2739- GList *elements, *l;
2740- GSList *retval = NULL;
2741-
2742- if (!JSON_NODE_HOLDS_ARRAY (node))
2743- return NULL;
2744-
2745- elements = json_array_get_elements (json_node_get_array (node));
2746-
2747- for (l = elements; l != NULL; l = l->next)
2748- {
2749- JsonNode *element = l->data;
2750- const gchar *id_ = _clutter_script_get_id_from_node (element);
2751- GObject *behaviour;
2752-
2753- if (id_ == NULL || *id_ == '\0')
2754- continue;
2755-
2756- behaviour = clutter_script_get_object (script, id_);
2757- if (behaviour == NULL)
2758- continue;
2759-
2760- retval = g_slist_prepend (retval, behaviour);
2761- }
2762-
2763- g_list_free (elements);
2764-
2765- return g_slist_reverse (retval);
2766-}
2767-
2768 static ClutterMargin *
2769 parse_margin (ClutterActor *self,
2770 JsonNode *node)
2771@@ -14878,24 +14612,6 @@ clutter_actor_parse_custom_node (ClutterScriptable *scriptable,
2772 else
2773 g_slice_free (RotationInfo, info);
2774 }
2775- else if (strcmp (name, "behaviours") == 0)
2776- {
2777- GSList *l;
2778-
2779-#ifdef CLUTTER_ENABLE_DEBUG
2780- if (G_UNLIKELY (_clutter_diagnostic_enabled ()))
2781- _clutter_diagnostic_message ("The 'behaviours' key is deprecated "
2782- "and it should not be used in newly "
2783- "written ClutterScript definitions.");
2784-#endif
2785-
2786- l = parse_behaviours (script, actor, node);
2787-
2788- g_value_init (value, G_TYPE_POINTER);
2789- g_value_set_pointer (value, l);
2790-
2791- retval = TRUE;
2792- }
2793 else if (strcmp (name, "actions") == 0 ||
2794 strcmp (name, "constraints") == 0 ||
2795 strcmp (name, "effects") == 0)
2796@@ -14966,26 +14682,6 @@ clutter_actor_set_custom_property (ClutterScriptable *scriptable,
2797 return;
2798 }
2799
2800- if (strcmp (name, "behaviours") == 0)
2801- {
2802- GSList *behaviours, *l;
2803-
2804- if (!G_VALUE_HOLDS (value, G_TYPE_POINTER))
2805- return;
2806-
2807- behaviours = g_value_get_pointer (value);
2808- for (l = behaviours; l != NULL; l = l->next)
2809- {
2810- ClutterBehaviour *behaviour = l->data;
2811-
2812- clutter_behaviour_apply (behaviour, actor);
2813- }
2814-
2815- g_slist_free (behaviours);
2816-
2817- return;
2818- }
2819-
2820 if (strcmp (name, "actions") == 0 ||
2821 strcmp (name, "constraints") == 0 ||
2822 strcmp (name, "effects") == 0)
2823@@ -15409,7 +15105,7 @@ clutter_actor_transform_stage_point (ClutterActor *self,
2824 gfloat *x_out,
2825 gfloat *y_out)
2826 {
2827- ClutterVertex v[4];
2828+ graphene_point3d_t v[4];
2829 double ST[3][3];
2830 double RQ[3][3];
2831 int du, dv;
2832@@ -16047,7 +15743,7 @@ update_pango_context (ClutterBackend *backend,
2833 * stored by the #ClutterBackend change.
2834 *
2835 * You can use the returned #PangoContext to create a #PangoLayout
2836- * and render text using cogl_pango_render_layout() to reuse the
2837+ * and render text using cogl_pango_show_layout() to reuse the
2838 * glyphs cache also used by Clutter.
2839 *
2840 * Return value: (transfer none): the #PangoContext for a #ClutterActor.
2841@@ -16546,25 +16242,6 @@ clutter_actor_unset_flags (ClutterActor *self,
2842 g_object_thaw_notify (obj);
2843 }
2844
2845-/**
2846- * clutter_actor_get_transformation_matrix:
2847- * @self: a #ClutterActor
2848- * @matrix: (out caller-allocates): the return location for a #ClutterMatrix
2849- *
2850- * Retrieves the transformations applied to @self relative to its
2851- * parent.
2852- *
2853- * Since: 1.0
2854- *
2855- * Deprecated: 1.12: Use clutter_actor_get_transform() instead
2856- */
2857-void
2858-clutter_actor_get_transformation_matrix (ClutterActor *self,
2859- ClutterMatrix *matrix)
2860-{
2861- clutter_actor_get_transform (self, matrix);
2862-}
2863-
2864 static void
2865 clutter_actor_set_transform_internal (ClutterActor *self,
2866 const ClutterMatrix *transform)
2867@@ -16827,100 +16504,6 @@ clutter_actor_get_text_direction (ClutterActor *self)
2868 }
2869
2870 /**
2871- * clutter_actor_push_internal:
2872- * @self: a #ClutterActor
2873- *
2874- * Should be used by actors implementing the #ClutterContainer and with
2875- * internal children added through clutter_actor_set_parent(), for instance:
2876- *
2877- * |[<!-- language="C" -->
2878- * static void
2879- * my_actor_init (MyActor *self)
2880- * {
2881- * self->priv = my_actor_get_instance_private (self);
2882- *
2883- * clutter_actor_push_internal (CLUTTER_ACTOR (self));
2884- *
2885- * // calling clutter_actor_set_parent() now will result in
2886- * // the internal flag being set on a child of MyActor
2887- *
2888- * // internal child - a background texture
2889- * self->priv->background_tex = clutter_texture_new ();
2890- * clutter_actor_set_parent (self->priv->background_tex,
2891- * CLUTTER_ACTOR (self));
2892- *
2893- * // internal child - a label
2894- * self->priv->label = clutter_text_new ();
2895- * clutter_actor_set_parent (self->priv->label,
2896- * CLUTTER_ACTOR (self));
2897- *
2898- * clutter_actor_pop_internal (CLUTTER_ACTOR (self));
2899- *
2900- * // calling clutter_actor_set_parent() now will not result in
2901- * // the internal flag being set on a child of MyActor
2902- * }
2903- * ]|
2904- *
2905- * This function will be used by Clutter to toggle an "internal child"
2906- * flag whenever clutter_actor_set_parent() is called; internal children
2907- * are handled differently by Clutter, specifically when destroying their
2908- * parent.
2909- *
2910- * Call clutter_actor_pop_internal() when you finished adding internal
2911- * children.
2912- *
2913- * Nested calls to clutter_actor_push_internal() are allowed, but each
2914- * one must by followed by a clutter_actor_pop_internal() call.
2915- *
2916- * Since: 1.2
2917- *
2918- * Deprecated: 1.10: All children of an actor are accessible through
2919- * the #ClutterActor API, and #ClutterActor implements the
2920- * #ClutterContainer interface, so this function is only useful
2921- * for legacy containers overriding the default implementation.
2922- */
2923-void
2924-clutter_actor_push_internal (ClutterActor *self)
2925-{
2926- g_return_if_fail (CLUTTER_IS_ACTOR (self));
2927-
2928- self->priv->internal_child += 1;
2929-}
2930-
2931-/**
2932- * clutter_actor_pop_internal:
2933- * @self: a #ClutterActor
2934- *
2935- * Disables the effects of clutter_actor_push_internal().
2936- *
2937- * Since: 1.2
2938- *
2939- * Deprecated: 1.10: All children of an actor are accessible through
2940- * the #ClutterActor API. This function is only useful for legacy
2941- * containers overriding the default implementation of the
2942- * #ClutterContainer interface.
2943- */
2944-void
2945-clutter_actor_pop_internal (ClutterActor *self)
2946-{
2947- ClutterActorPrivate *priv;
2948-
2949- g_return_if_fail (CLUTTER_IS_ACTOR (self));
2950-
2951- priv = self->priv;
2952-
2953- if (priv->internal_child == 0)
2954- {
2955- g_warning ("Mismatched %s: you need to call "
2956- "clutter_actor_push_composite() at least once before "
2957- "calling this function", G_STRFUNC);
2958- return;
2959- }
2960-
2961- priv->internal_child -= 1;
2962-}
2963-
2964-/**
2965 * clutter_actor_has_pointer:
2966 * @self: a #ClutterActor
2967 *
2968@@ -17979,9 +17562,9 @@ clutter_actor_get_paint_box (ClutterActor *self,
2969 }
2970
2971 static gboolean
2972-_clutter_actor_get_resource_scale_for_rect (ClutterActor *self,
2973- ClutterRect *bounding_rect,
2974- float *resource_scale)
2975+_clutter_actor_get_resource_scale_for_rect (ClutterActor *self,
2976+ graphene_rect_t *bounding_rect,
2977+ float *resource_scale)
2978 {
2979 ClutterActor *stage;
2980 float max_scale = 0;
2981@@ -18004,7 +17587,7 @@ static gboolean
2982 _clutter_actor_compute_resource_scale (ClutterActor *self,
2983 float *resource_scale)
2984 {
2985- ClutterRect bounding_rect;
2986+ graphene_rect_t bounding_rect;
2987 ClutterActorPrivate *priv = self->priv;
2988
2989 if (CLUTTER_ACTOR_IN_DESTRUCTION (self) ||
2990@@ -18548,13 +18131,13 @@ clutter_actor_get_layout_manager (ClutterActor *self)
2991 }
2992
2993 static const ClutterLayoutInfo default_layout_info = {
2994- CLUTTER_POINT_INIT_ZERO, /* fixed-pos */
2995+ GRAPHENE_POINT_INIT_ZERO, /* fixed-pos */
2996 { 0, 0, 0, 0 }, /* margin */
2997 CLUTTER_ACTOR_ALIGN_FILL, /* x-align */
2998 CLUTTER_ACTOR_ALIGN_FILL, /* y-align */
2999 FALSE, FALSE, /* expand */
3000- CLUTTER_SIZE_INIT_ZERO, /* minimum */
3001- CLUTTER_SIZE_INIT_ZERO, /* natural */
3002+ GRAPHENE_SIZE_INIT_ZERO, /* minimum */
3003+ GRAPHENE_SIZE_INIT_ZERO, /* natural */
3004 };
3005
3006 static void
3007@@ -19500,7 +19083,7 @@ transition_closure_free (gpointer data)
3008 * so that we don't end up inside on_transition_stopped() from
3009 * a call to g_hash_table_remove().
3010 */
3011- g_signal_handler_disconnect (clos->transition, clos->completed_id);
3012+ g_clear_signal_handler (&clos->completed_id, clos->transition);
3013
3014 if (clutter_timeline_is_playing (timeline))
3015 clutter_timeline_stop (timeline);
3016@@ -19682,8 +19265,8 @@ _clutter_actor_create_transition (ClutterActor *actor,
3017 gboolean call_restore = FALSE;
3018 TransitionClosure *clos;
3019 va_list var_args;
3020- GValue initial = G_VALUE_INIT;
3021- GValue final = G_VALUE_INIT;
3022+ g_auto (GValue) initial = G_VALUE_INIT;
3023+ g_auto (GValue) final = G_VALUE_INIT;
3024 GType ptype;
3025 char *error;
3026
3027@@ -19732,7 +19315,6 @@ _clutter_actor_create_transition (ClutterActor *actor,
3028 if (error != NULL)
3029 {
3030 g_critical ("%s: %s", G_STRLOC, error);
3031- g_value_unset (&initial);
3032 g_free (error);
3033 goto out;
3034 }
3035@@ -19754,9 +19336,6 @@ _clutter_actor_create_transition (ClutterActor *actor,
3036 &final,
3037 pspec);
3038
3039- g_value_unset (&initial);
3040- g_value_unset (&final);
3041-
3042 goto out;
3043 }
3044
3045@@ -19804,9 +19383,6 @@ _clutter_actor_create_transition (ClutterActor *actor,
3046
3047 /* the actor now owns the transition */
3048 g_object_unref (res);
3049-
3050- g_value_unset (&initial);
3051- g_value_unset (&final);
3052 }
3053 else
3054 {
3055@@ -21293,32 +20869,6 @@ clutter_actor_has_mapped_clones (ClutterActor *self)
3056 return FALSE;
3057 }
3058
3059-CoglFramebuffer *
3060-_clutter_actor_get_active_framebuffer (ClutterActor *self)
3061-{
3062- ClutterStage *stage;
3063-
3064- if (!CLUTTER_ACTOR_IN_PAINT (self))
3065- {
3066- g_critical ("The active framebuffer of actor '%s' can only be "
3067- "retrieved during the paint sequence. Please, check "
3068- "your code.",
3069- _clutter_actor_get_debug_name (self));
3070- return NULL;
3071- }
3072-
3073- stage = (ClutterStage *) _clutter_actor_get_stage_internal (self);
3074- if (stage == NULL)
3075- {
3076- g_critical ("The active framebuffer of actor '%s' is only available "
3077- "if the actor is associated to a ClutterStage.",
3078- _clutter_actor_get_debug_name (self));
3079- return NULL;
3080- }
3081-
3082- return _clutter_stage_get_active_framebuffer (stage);
3083-}
3084-
3085 static void
3086 clutter_actor_child_model__items_changed (GListModel *model,
3087 guint position,
3088diff --git a/clutter/clutter/clutter-actor.h b/clutter/clutter/clutter-actor.h
3089index b1abff8..bb968dd 100644
3090--- a/clutter/clutter/clutter-actor.h
3091+++ b/clutter/clutter/clutter-actor.h
3092@@ -39,6 +39,8 @@
3093
3094 #include <clutter/clutter-types.h>
3095 #include <clutter/clutter-event.h>
3096+#include <clutter/clutter-paint-context.h>
3097+#include <clutter/clutter-pick-context.h>
3098
3099 G_BEGIN_DECLS
3100
3101@@ -228,13 +230,14 @@ struct _ClutterActorClass
3102 void (* unrealize) (ClutterActor *self);
3103 void (* map) (ClutterActor *self);
3104 void (* unmap) (ClutterActor *self);
3105- void (* paint) (ClutterActor *self);
3106+ void (* paint) (ClutterActor *self,
3107+ ClutterPaintContext *paint_context);
3108 void (* parent_set) (ClutterActor *actor,
3109 ClutterActor *old_parent);
3110
3111 void (* destroy) (ClutterActor *self);
3112 void (* pick) (ClutterActor *actor,
3113- const ClutterColor *color);
3114+ ClutterPickContext *pick_context);
3115
3116 gboolean (* queue_redraw) (ClutterActor *actor,
3117 ClutterActor *leaf_that_queued,
3118@@ -350,9 +353,17 @@ void clutter_actor_map
3119 CLUTTER_EXPORT
3120 void clutter_actor_unmap (ClutterActor *self);
3121 CLUTTER_EXPORT
3122-void clutter_actor_paint (ClutterActor *self);
3123+void clutter_actor_paint (ClutterActor *self,
3124+ ClutterPaintContext *paint_context);
3125 CLUTTER_EXPORT
3126-void clutter_actor_continue_paint (ClutterActor *self);
3127+void clutter_actor_continue_paint (ClutterActor *self,
3128+ ClutterPaintContext *paint_context);
3129+CLUTTER_EXPORT
3130+void clutter_actor_pick (ClutterActor *actor,
3131+ ClutterPickContext *pick_context);
3132+CLUTTER_EXPORT
3133+void clutter_actor_continue_pick (ClutterActor *actor,
3134+ ClutterPickContext *pick_context);
3135 CLUTTER_EXPORT
3136 void clutter_actor_queue_redraw (ClutterActor *self);
3137 CLUTTER_EXPORT
3138@@ -431,7 +442,7 @@ void clutter_actor_get_allocation_box
3139 CLUTTER_EXPORT
3140 void clutter_actor_get_allocation_vertices (ClutterActor *self,
3141 ClutterActor *ancestor,
3142- ClutterVertex verts[]);
3143+ graphene_point3d_t *verts);
3144 CLUTTER_EXPORT
3145 gboolean clutter_actor_has_allocation (ClutterActor *self);
3146 CLUTTER_EXPORT
3147@@ -817,16 +828,16 @@ gboolean clutter_actor_transform_stage_point
3148 gfloat *y_out);
3149 CLUTTER_EXPORT
3150 void clutter_actor_get_abs_allocation_vertices (ClutterActor *self,
3151- ClutterVertex verts[]);
3152+ graphene_point3d_t *verts);
3153 CLUTTER_EXPORT
3154 void clutter_actor_apply_transform_to_point (ClutterActor *self,
3155- const ClutterVertex *point,
3156- ClutterVertex *vertex);
3157+ const graphene_point3d_t *point,
3158+ graphene_point3d_t *vertex);
3159 CLUTTER_EXPORT
3160 void clutter_actor_apply_relative_transform_to_point (ClutterActor *self,
3161 ClutterActor *ancestor,
3162- const ClutterVertex *point,
3163- ClutterVertex *vertex);
3164+ const graphene_point3d_t *point,
3165+ graphene_point3d_t *vertex);
3166
3167 /* Implicit animations */
3168 CLUTTER_EXPORT
3169@@ -904,6 +915,7 @@ void clutter_actor_bind_model_with_properties
3170
3171 CLUTTER_EXPORT
3172 void clutter_actor_pick_box (ClutterActor *self,
3173+ ClutterPickContext *pick_context,
3174 const ClutterActorBox *box);
3175
3176 G_END_DECLS
3177diff --git a/clutter/clutter/clutter-animatable.c b/clutter/clutter/clutter-animatable.c
3178index 0bb3409..e8c9511 100644
3179--- a/clutter/clutter/clutter-animatable.c
3180+++ b/clutter/clutter/clutter-animatable.c
3181@@ -54,7 +54,6 @@
3182 #include "clutter-debug.h"
3183 #include "clutter-private.h"
3184
3185-#include "deprecated/clutter-animatable.h"
3186 #include "deprecated/clutter-animation.h"
3187
3188 G_DEFINE_INTERFACE (ClutterAnimatable, clutter_animatable, G_TYPE_OBJECT);
3189@@ -65,80 +64,6 @@ clutter_animatable_default_init (ClutterAnimatableInterface *iface)
3190 }
3191
3192 /**
3193- * clutter_animatable_animate_property:
3194- * @animatable: a #ClutterAnimatable
3195- * @animation: a #ClutterAnimation
3196- * @property_name: the name of the animated property
3197- * @initial_value: the initial value of the animation interval
3198- * @final_value: the final value of the animation interval
3199- * @progress: the progress factor
3200- * @value: return location for the animation value
3201- *
3202- * Calls the animate_property() virtual function for @animatable.
3203- *
3204- * The @initial_value and @final_value #GValue<!-- -->s must contain
3205- * the same type; @value must have been initialized to the same
3206- * type of @initial_value and @final_value.
3207- *
3208- * All implementation of the #ClutterAnimatable interface must
3209- * implement this function.
3210- *
3211- * Return value: %TRUE if the value has been validated and can
3212- * be applied to the #ClutterAnimatable, and %FALSE otherwise
3213- *
3214- * Since: 1.0
3215- *
3216- * Deprecated: 1.8: Use clutter_animatable_interpolate_value()
3217- * instead
3218- */
3219-gboolean
3220-clutter_animatable_animate_property (ClutterAnimatable *animatable,
3221- ClutterAnimation *animation,
3222- const gchar *property_name,
3223- const GValue *initial_value,
3224- const GValue *final_value,
3225- gdouble progress,
3226- GValue *value)
3227-{
3228- ClutterAnimatableInterface *iface;
3229- gboolean res;
3230-
3231- g_return_val_if_fail (CLUTTER_IS_ANIMATABLE (animatable), FALSE);
3232- g_return_val_if_fail (CLUTTER_IS_ANIMATION (animation), FALSE);
3233- g_return_val_if_fail (property_name != NULL, FALSE);
3234- g_return_val_if_fail (initial_value != NULL && final_value != NULL, FALSE);
3235- g_return_val_if_fail (G_VALUE_TYPE (initial_value) != G_TYPE_INVALID, FALSE);
3236- g_return_val_if_fail (G_VALUE_TYPE (final_value) != G_TYPE_INVALID, FALSE);
3237- g_return_val_if_fail (value != NULL, FALSE);
3238- g_return_val_if_fail (G_VALUE_TYPE (value) == G_VALUE_TYPE (initial_value) &&
3239- G_VALUE_TYPE (value) == G_VALUE_TYPE (final_value),
3240- FALSE);
3241-
3242- iface = CLUTTER_ANIMATABLE_GET_IFACE (animatable);
3243- if (iface->animate_property == NULL)
3244- {
3245- ClutterInterval *interval;
3246-
3247- interval = clutter_animation_get_interval (animation, property_name);
3248- if (interval == NULL)
3249- return FALSE;
3250-
3251- res = clutter_animatable_interpolate_value (animatable, property_name,
3252- interval,
3253- progress,
3254- value);
3255- }
3256- else
3257- res = iface->animate_property (animatable, animation,
3258- property_name,
3259- initial_value, final_value,
3260- progress,
3261- value);
3262-
3263- return res;
3264-}
3265-
3266-/**
3267 * clutter_animatable_find_property:
3268 * @animatable: a #ClutterAnimatable
3269 * @property_name: the name of the animatable property to find
3270diff --git a/clutter/clutter/clutter-autocleanups.h b/clutter/clutter/clutter-autocleanups.h
3271index 0a68c05..8e17d00 100644
3272--- a/clutter/clutter/clutter-autocleanups.h
3273+++ b/clutter/clutter/clutter-autocleanups.h
3274@@ -90,13 +90,10 @@ G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterActorBox, clutter_actor_box_free)
3275 G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterColor, clutter_color_free)
3276 G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterMargin, clutter_margin_free)
3277 G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterMatrix, clutter_matrix_free)
3278+G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterPaintContext, clutter_paint_context_unref)
3279 G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterPaintNode, clutter_paint_node_unref)
3280 G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterPaintVolume, clutter_paint_volume_free)
3281 G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterPathNode, clutter_path_node_free)
3282-G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterPoint, clutter_point_free)
3283-G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterRect, clutter_rect_free)
3284-G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterSize, clutter_size_free)
3285-G_DEFINE_AUTOPTR_CLEANUP_FUNC (ClutterVertex, clutter_vertex_free)
3286
3287 #endif /* __GI_SCANNER__ */
3288
3289diff --git a/clutter/clutter/clutter-backend-private.h b/clutter/clutter/clutter-backend-private.h
3290index f0855e1..c7c54f8 100644
3291--- a/clutter/clutter/clutter-backend-private.h
3292+++ b/clutter/clutter/clutter-backend-private.h
3293@@ -23,8 +23,7 @@
3294 #define __CLUTTER_BACKEND_PRIVATE_H__
3295
3296 #include <clutter/clutter-backend.h>
3297-#include <clutter/clutter-device-manager.h>
3298-#include <clutter/clutter-keymap.h>
3299+#include <clutter/clutter-seat.h>
3300 #include <clutter/clutter-stage-window.h>
3301
3302 #define CLUTTER_BACKEND_CLASS(klass) (G_TYPE_CHECK_CLASS_CAST ((klass), CLUTTER_TYPE_BACKEND, ClutterBackendClass))
3303@@ -47,8 +46,6 @@ struct _ClutterBackend
3304
3305 CoglOnscreen *dummy_onscreen;
3306
3307- ClutterDeviceManager *device_manager;
3308-
3309 cairo_font_options_t *font_options;
3310
3311 gchar *font_name;
3312@@ -59,8 +56,6 @@ struct _ClutterBackend
3313 ClutterStageWindow *stage_window;
3314
3315 ClutterInputMethod *input_method;
3316-
3317- ClutterKeymap *keymap;
3318 };
3319
3320 struct _ClutterBackendClass
3321@@ -89,17 +84,12 @@ struct _ClutterBackendClass
3322 GError **error);
3323 gboolean (* create_context) (ClutterBackend *backend,
3324 GError **error);
3325- ClutterDeviceManager *(* get_device_manager) (ClutterBackend *backend);
3326
3327 gboolean (* translate_event) (ClutterBackend *backend,
3328 gpointer native,
3329 ClutterEvent *event);
3330
3331- PangoDirection (* get_keymap_direction) (ClutterBackend *backend);
3332-
3333- void (* bell_notify) (ClutterBackend *backend);
3334-
3335- ClutterKeymap * (* get_keymap) (ClutterBackend *backend);
3336+ ClutterSeat * (* get_default_seat) (ClutterBackend *backend);
3337
3338 /* signals */
3339 void (* resolution_changed) (ClutterBackend *backend);
3340@@ -139,11 +129,6 @@ gfloat _clutter_backend_get_units_per_em (Clutter
3341 PangoFontDescription *font_desc);
3342 gint32 _clutter_backend_get_units_serial (ClutterBackend *backend);
3343
3344-PangoDirection _clutter_backend_get_keymap_direction (ClutterBackend *backend);
3345-
3346-CLUTTER_EXPORT
3347-void _clutter_backend_reset_cogl_framebuffer (ClutterBackend *backend);
3348-
3349 void clutter_set_allowed_drivers (const char *drivers);
3350
3351 CLUTTER_EXPORT
3352diff --git a/clutter/clutter/clutter-backend.c b/clutter/clutter/clutter-backend.c
3353index 4652bc7..3cc4ca2 100644
3354--- a/clutter/clutter/clutter-backend.c
3355+++ b/clutter/clutter/clutter-backend.c
3356@@ -51,7 +51,6 @@
3357 #include "clutter-stage-manager-private.h"
3358 #include "clutter-stage-private.h"
3359 #include "clutter-stage-window.h"
3360-#include "clutter-device-manager-private.h"
3361
3362 #ifdef CLUTTER_HAS_WAYLAND_COMPOSITOR_SUPPORT
3363 #include "wayland/clutter-wayland-compositor.h"
3364@@ -528,30 +527,6 @@ clutter_backend_real_init_events (ClutterBackend *backend)
3365 g_error ("Unknown input backend");
3366 }
3367
3368-static ClutterDeviceManager *
3369-clutter_backend_real_get_device_manager (ClutterBackend *backend)
3370-{
3371- if (G_UNLIKELY (backend->device_manager == NULL))
3372- {
3373- g_critical ("No device manager available, expect broken input");
3374- return NULL;
3375- }
3376-
3377- return backend->device_manager;
3378-}
3379-
3380-static ClutterKeymap *
3381-clutter_backend_real_get_keymap (ClutterBackend *backend)
3382-{
3383- if (G_UNLIKELY (backend->keymap == NULL))
3384- {
3385- g_critical ("No keymap available, expect broken keyboard input");
3386- return NULL;
3387- }
3388-
3389- return backend->keymap;
3390-}
3391-
3392 static void
3393 clutter_backend_class_init (ClutterBackendClass *klass)
3394 {
3395@@ -615,10 +590,8 @@ clutter_backend_class_init (ClutterBackendClass *klass)
3396 klass->font_changed = clutter_backend_real_font_changed;
3397
3398 klass->init_events = clutter_backend_real_init_events;
3399- klass->get_device_manager = clutter_backend_real_get_device_manager;
3400 klass->create_context = clutter_backend_real_create_context;
3401 klass->get_features = clutter_backend_real_get_features;
3402- klass->get_keymap = clutter_backend_real_get_keymap;
3403 }
3404
3405 static void
3406@@ -627,7 +600,7 @@ clutter_backend_init (ClutterBackend *self)
3407 self->units_per_em = -1.0;
3408 self->units_serial = 1;
3409
3410- self->dummy_onscreen = COGL_INVALID_HANDLE;
3411+ self->dummy_onscreen = NULL;
3412 }
3413
3414 void
3415@@ -783,24 +756,24 @@ _clutter_backend_copy_event_data (ClutterBackend *backend,
3416 const ClutterEvent *src,
3417 ClutterEvent *dest)
3418 {
3419- ClutterDeviceManagerClass *device_manager_class;
3420- ClutterDeviceManager *device_manager;
3421+ ClutterSeatClass *seat_class;
3422+ ClutterSeat *seat;
3423
3424- device_manager = clutter_device_manager_get_default ();
3425- device_manager_class = CLUTTER_DEVICE_MANAGER_GET_CLASS (device_manager);
3426- device_manager_class->copy_event_data (device_manager, src, dest);
3427+ seat = clutter_backend_get_default_seat (backend);
3428+ seat_class = CLUTTER_SEAT_GET_CLASS (seat);
3429+ seat_class->copy_event_data (seat, src, dest);
3430 }
3431
3432 void
3433 _clutter_backend_free_event_data (ClutterBackend *backend,
3434 ClutterEvent *event)
3435 {
3436- ClutterDeviceManagerClass *device_manager_class;
3437- ClutterDeviceManager *device_manager;
3438+ ClutterSeatClass *seat_class;
3439+ ClutterSeat *seat;
3440
3441- device_manager = clutter_device_manager_get_default ();
3442- device_manager_class = CLUTTER_DEVICE_MANAGER_GET_CLASS (device_manager);
3443- device_manager_class->free_event_data (device_manager, event);
3444+ seat = clutter_backend_get_default_seat (backend);
3445+ seat_class = CLUTTER_SEAT_GET_CLASS (seat);
3446+ seat_class->free_event_data (seat, event);
3447 }
3448
3449 /**
3450@@ -997,39 +970,6 @@ clutter_wayland_set_compositor_display (void *display)
3451 }
3452 #endif
3453
3454-PangoDirection
3455-_clutter_backend_get_keymap_direction (ClutterBackend *backend)
3456-{
3457- ClutterBackendClass *klass;
3458-
3459- klass = CLUTTER_BACKEND_GET_CLASS (backend);
3460- if (klass->get_keymap_direction != NULL)
3461- return klass->get_keymap_direction (backend);
3462-
3463- return PANGO_DIRECTION_NEUTRAL;
3464-}
3465-
3466-void
3467-_clutter_backend_reset_cogl_framebuffer (ClutterBackend *backend)
3468-{
3469- if (backend->dummy_onscreen == COGL_INVALID_HANDLE)
3470- {
3471- GError *internal_error = NULL;
3472-
3473- backend->dummy_onscreen = cogl_onscreen_new (backend->cogl_context, 1, 1);
3474-
3475- if (!cogl_framebuffer_allocate (COGL_FRAMEBUFFER (backend->dummy_onscreen),
3476- &internal_error))
3477- {
3478- g_critical ("Unable to create dummy onscreen: %s", internal_error->message);
3479- g_error_free (internal_error);
3480- return;
3481- }
3482- }
3483-
3484- cogl_set_framebuffer (COGL_FRAMEBUFFER (backend->dummy_onscreen));
3485-}
3486-
3487 void
3488 clutter_set_allowed_drivers (const char *drivers)
3489 {
3490@@ -1042,16 +982,6 @@ clutter_set_allowed_drivers (const char *drivers)
3491 allowed_drivers = g_strdup (drivers);
3492 }
3493
3494-void
3495-clutter_backend_bell_notify (ClutterBackend *backend)
3496-{
3497- ClutterBackendClass *klass;
3498-
3499- klass = CLUTTER_BACKEND_GET_CLASS (backend);
3500- if (klass->bell_notify)
3501- klass->bell_notify (backend);
3502-}
3503-
3504 /**
3505 * clutter_backend_get_input_method:
3506 * @backend: the #CLutterBackend
3507@@ -1080,22 +1010,24 @@ clutter_backend_set_input_method (ClutterBackend *backend,
3508 g_set_object (&backend->input_method, method);
3509 }
3510
3511+ClutterStageWindow *
3512+clutter_backend_get_stage_window (ClutterBackend *backend)
3513+{
3514+ return backend->stage_window;
3515+}
3516+
3517 /**
3518- * clutter_backend_get_keymap:
3519+ * clutter_backend_get_default_seat:
3520 * @backend: the #ClutterBackend
3521 *
3522- * Gets the keymap used by Clutter
3523+ * Returns the default seat
3524 *
3525- * Returns: (transfer none): the keymap
3526+ * Returns: (transfer none): the default seat
3527 **/
3528-ClutterKeymap *
3529-clutter_backend_get_keymap (ClutterBackend *backend)
3530+ClutterSeat *
3531+clutter_backend_get_default_seat (ClutterBackend *backend)
3532 {
3533- return CLUTTER_BACKEND_GET_CLASS (backend)->get_keymap (backend);
3534-}
3535+ g_return_val_if_fail (CLUTTER_IS_BACKEND (backend), NULL);
3536
3537-ClutterStageWindow *
3538-clutter_backend_get_stage_window (ClutterBackend *backend)
3539-{
3540- return backend->stage_window;
3541+ return CLUTTER_BACKEND_GET_CLASS (backend)->get_default_seat (backend);
3542 }
3543diff --git a/clutter/clutter/clutter-backend.h b/clutter/clutter/clutter-backend.h
3544index fde57d8..14f6c24 100644
3545--- a/clutter/clutter/clutter-backend.h
3546+++ b/clutter/clutter/clutter-backend.h
3547@@ -36,6 +36,7 @@
3548 #include <clutter/clutter-config.h>
3549 #include <clutter/clutter-keymap.h>
3550 #include <clutter/clutter-types.h>
3551+#include <clutter/clutter-seat.h>
3552
3553 G_BEGIN_DECLS
3554
3555@@ -73,16 +74,13 @@ CLUTTER_EXPORT
3556 CoglContext * clutter_backend_get_cogl_context (ClutterBackend *backend);
3557
3558 CLUTTER_EXPORT
3559-void clutter_backend_bell_notify (ClutterBackend *backend);
3560-
3561-CLUTTER_EXPORT
3562 ClutterInputMethod * clutter_backend_get_input_method (ClutterBackend *backend);
3563
3564 CLUTTER_EXPORT
3565 void clutter_backend_set_input_method (ClutterBackend *backend,
3566 ClutterInputMethod *method);
3567 CLUTTER_EXPORT
3568-ClutterKeymap * clutter_backend_get_keymap (ClutterBackend *backend);
3569+ClutterSeat * clutter_backend_get_default_seat (ClutterBackend *backend);
3570
3571 G_END_DECLS
3572
3573diff --git a/clutter/clutter/clutter-base-types.c b/clutter/clutter/clutter-base-types.c
3574index 61e6fcd..fcbcd2e 100644
3575--- a/clutter/clutter/clutter-base-types.c
3576+++ b/clutter/clutter/clutter-base-types.c
3577@@ -42,286 +42,6 @@
3578
3579
3580
3581 /*
3582- * ClutterGeometry
3583- */
3584-
3585-static ClutterGeometry*
3586-clutter_geometry_copy (const ClutterGeometry *geometry)
3587-{
3588- return g_slice_dup (ClutterGeometry, geometry);
3589-}
3590-
3591-static void
3592-clutter_geometry_free (ClutterGeometry *geometry)
3593-{
3594- if (G_LIKELY (geometry != NULL))
3595- g_slice_free (ClutterGeometry, geometry);
3596-}
3597-
3598-/**
3599- * clutter_geometry_union:
3600- * @geometry_a: a #ClutterGeometry
3601- * @geometry_b: another #ClutterGeometry
3602- * @result: (out): location to store the result
3603- *
3604- * Find the union of two rectangles represented as #ClutterGeometry.
3605- *
3606- * Since: 1.4
3607- *
3608- * Deprecated: 1.16: Use #ClutterRect and clutter_rect_union()
3609- */
3610-void
3611-clutter_geometry_union (const ClutterGeometry *geometry_a,
3612- const ClutterGeometry *geometry_b,
3613- ClutterGeometry *result)
3614-{
3615- /* We don't try to handle rectangles that can't be represented
3616- * as a signed integer box */
3617- gint x_1 = MIN (geometry_a->x, geometry_b->x);
3618- gint y_1 = MIN (geometry_a->y, geometry_b->y);
3619- gint x_2 = MAX (geometry_a->x + (gint)geometry_a->width,
3620- geometry_b->x + (gint)geometry_b->width);
3621- gint y_2 = MAX (geometry_a->y + (gint)geometry_a->height,
3622- geometry_b->y + (gint)geometry_b->height);
3623- result->x = x_1;
3624- result->y = y_1;
3625- result->width = x_2 - x_1;
3626- result->height = y_2 - y_1;
3627-}
3628-
3629-/**
3630- * clutter_geometry_intersects:
3631- * @geometry0: The first geometry to test
3632- * @geometry1: The second geometry to test
3633- *
3634- * Determines if @geometry0 and geometry1 intersect returning %TRUE if
3635- * they do else %FALSE.
3636- *
3637- * Return value: %TRUE of @geometry0 and geometry1 intersect else
3638- * %FALSE.
3639- *
3640- * Since: 1.4
3641- *
3642- * Deprecated: 1.16: Use #ClutterRect and clutter_rect_intersection()
3643- */
3644-gboolean
3645-clutter_geometry_intersects (const ClutterGeometry *geometry0,
3646- const ClutterGeometry *geometry1)
3647-{
3648- if (geometry1->x >= (geometry0->x + (gint)geometry0->width) ||
3649- geometry1->y >= (geometry0->y + (gint)geometry0->height) ||
3650- (geometry1->x + (gint)geometry1->width) <= geometry0->x ||
3651- (geometry1->y + (gint)geometry1->height) <= geometry0->y)
3652- return FALSE;
3653- else
3654- return TRUE;
3655-}
3656-
3657-static gboolean
3658-clutter_geometry_progress (const GValue *a,
3659- const GValue *b,
3660- gdouble progress,
3661- GValue *retval)
3662-{
3663- const ClutterGeometry *a_geom = g_value_get_boxed (a);
3664- const ClutterGeometry *b_geom = g_value_get_boxed (b);
3665- ClutterGeometry res = { 0, };
3666- gint a_width = a_geom->width;
3667- gint b_width = b_geom->width;
3668- gint a_height = a_geom->height;
3669- gint b_height = b_geom->height;
3670-
3671- res.x = a_geom->x + (b_geom->x - a_geom->x) * progress;
3672- res.y = a_geom->y + (b_geom->y - a_geom->y) * progress;
3673-
3674- res.width = a_width + (b_width - a_width) * progress;
3675- res.height = a_height + (b_height - a_height) * progress;
3676-
3677- g_value_set_boxed (retval, &res);
3678-
3679- return TRUE;
3680-}
3681-
3682-G_DEFINE_BOXED_TYPE_WITH_CODE (ClutterGeometry, clutter_geometry,
3683- clutter_geometry_copy,
3684- clutter_geometry_free,
3685- CLUTTER_REGISTER_INTERVAL_PROGRESS (clutter_geometry_progress));
3686-
3687-
3688
3689-
3690-/*
3691- * ClutterVertices
3692- */
3693-
3694-/**
3695- * clutter_vertex_new:
3696- * @x: X coordinate
3697- * @y: Y coordinate
3698- * @z: Z coordinate
3699- *
3700- * Creates a new #ClutterVertex for the point in 3D space
3701- * identified by the 3 coordinates @x, @y, @z.
3702- *
3703- * This function is the logical equivalent of:
3704- *
3705- * |[
3706- * clutter_vertex_init (clutter_vertex_alloc (), x, y, z);
3707- * ]|
3708- *
3709- * Return value: (transfer full): the newly allocated #ClutterVertex.
3710- * Use clutter_vertex_free() to free the resources
3711- *
3712- * Since: 1.0
3713- */
3714-ClutterVertex *
3715-clutter_vertex_new (gfloat x,
3716- gfloat y,
3717- gfloat z)
3718-{
3719- return clutter_vertex_init (clutter_vertex_alloc (), x, y, z);
3720-}
3721-
3722-/**
3723- * clutter_vertex_alloc: (constructor)
3724- *
3725- * Allocates a new, empty #ClutterVertex.
3726- *
3727- * Return value: (transfer full): the newly allocated #ClutterVertex.
3728- * Use clutter_vertex_free() to free its resources
3729- *
3730- * Since: 1.12
3731- */
3732-ClutterVertex *
3733-clutter_vertex_alloc (void)
3734-{
3735- return g_slice_new0 (ClutterVertex);
3736-}
3737-
3738-/**
3739- * clutter_vertex_init:
3740- * @vertex: a #ClutterVertex
3741- * @x: X coordinate
3742- * @y: Y coordinate
3743- * @z: Z coordinate
3744- *
3745- * Initializes @vertex with the given coordinates.
3746- *
3747- * Return value: (transfer none): the initialized #ClutterVertex
3748- *
3749- * Since: 1.10
3750- */
3751-ClutterVertex *
3752-clutter_vertex_init (ClutterVertex *vertex,
3753- gfloat x,
3754- gfloat y,
3755- gfloat z)
3756-{
3757- g_return_val_if_fail (vertex != NULL, NULL);
3758-
3759- vertex->x = x;
3760- vertex->y = y;
3761- vertex->z = z;
3762-
3763- return vertex;
3764-}
3765-
3766-/**
3767- * clutter_vertex_copy:
3768- * @vertex: a #ClutterVertex
3769- *
3770- * Copies @vertex
3771- *
3772- * Return value: (transfer full): a newly allocated copy of #ClutterVertex.
3773- * Use clutter_vertex_free() to free the allocated resources
3774- *
3775- * Since: 1.0
3776- */
3777-ClutterVertex *
3778-clutter_vertex_copy (const ClutterVertex *vertex)
3779-{
3780- if (G_LIKELY (vertex != NULL))
3781- return g_slice_dup (ClutterVertex, vertex);
3782-
3783- return NULL;
3784-}
3785-
3786-/**
3787- * clutter_vertex_free:
3788- * @vertex: a #ClutterVertex
3789- *
3790- * Frees a #ClutterVertex allocated using clutter_vertex_alloc() or
3791- * clutter_vertex_copy().
3792- *
3793- * Since: 1.0
3794- */
3795-void
3796-clutter_vertex_free (ClutterVertex *vertex)
3797-{
3798- if (G_UNLIKELY (vertex != NULL))
3799- g_slice_free (ClutterVertex, vertex);
3800-}
3801-
3802-/**
3803- * clutter_vertex_equal:
3804- * @vertex_a: a #ClutterVertex
3805- * @vertex_b: a #ClutterVertex
3806- *
3807- * Compares @vertex_a and @vertex_b for equality
3808- *
3809- * Return value: %TRUE if the passed #ClutterVertex are equal
3810- *
3811- * Since: 1.0
3812- */
3813-gboolean
3814-clutter_vertex_equal (const ClutterVertex *vertex_a,
3815- const ClutterVertex *vertex_b)
3816-{
3817- g_return_val_if_fail (vertex_a != NULL && vertex_b != NULL, FALSE);
3818-
3819- if (vertex_a == vertex_b)
3820- return TRUE;
3821-
3822- return fabsf (vertex_a->x - vertex_b->x) < FLOAT_EPSILON &&
3823- fabsf (vertex_a->y - vertex_b->y) < FLOAT_EPSILON &&
3824- fabsf (vertex_a->z - vertex_b->z) < FLOAT_EPSILON;
3825-}
3826-
3827-static void
3828-clutter_vertex_interpolate (const ClutterVertex *a,
3829- const ClutterVertex *b,
3830- double progress,
3831- ClutterVertex *res)
3832-{
3833- res->x = a->x + (b->x - a->x) * progress;
3834- res->y = a->y + (b->y - a->y) * progress;
3835- res->z = a->z + (b->z - a->z) * progress;
3836-}
3837-
3838-static gboolean
3839-clutter_vertex_progress (const GValue *a,
3840- const GValue *b,
3841- gdouble progress,
3842- GValue *retval)
3843-{
3844- const ClutterVertex *av = g_value_get_boxed (a);
3845- const ClutterVertex *bv = g_value_get_boxed (b);
3846- ClutterVertex res;
3847-
3848- clutter_vertex_interpolate (av, bv, progress, &res);
3849-
3850- g_value_set_boxed (retval, &res);
3851-
3852- return TRUE;
3853-}
3854-
3855-G_DEFINE_BOXED_TYPE_WITH_CODE (ClutterVertex, clutter_vertex,
3856- clutter_vertex_copy,
3857- clutter_vertex_free,
3858- CLUTTER_REGISTER_INTERVAL_PROGRESS (clutter_vertex_progress));
3859-
3860-
3861
3862-
3863-/*
3864 * ClutterMargin
3865 */
3866
3867@@ -382,993 +102,6 @@ G_DEFINE_BOXED_TYPE (ClutterMargin, clutter_margin,
3868 clutter_margin_copy,
3869 clutter_margin_free)
3870
3871-
3872
3873-
3874-/*
3875- * ClutterPoint
3876- */
3877-
3878-static const ClutterPoint _clutter_point_zero = CLUTTER_POINT_INIT_ZERO;
3879-
3880-/**
3881- * clutter_point_zero:
3882- *
3883- * A point centered at (0, 0).
3884- *
3885- * The returned value can be used as a guard.
3886- *
3887- * Return value: a point centered in (0, 0); the returned #ClutterPoint
3888- * is owned by Clutter and it should not be modified or freed.
3889- *
3890- * Since: 1.12
3891- */
3892-const ClutterPoint *
3893-clutter_point_zero (void)
3894-{
3895- return &_clutter_point_zero;
3896-}
3897-
3898-/**
3899- * clutter_point_alloc: (constructor)
3900- *
3901- * Allocates a new #ClutterPoint.
3902- *
3903- * Return value: (transfer full): the newly allocated #ClutterPoint.
3904- * Use clutter_point_free() to free its resources.
3905- *
3906- * Since: 1.12
3907- */
3908-ClutterPoint *
3909-clutter_point_alloc (void)
3910-{
3911- return g_slice_new0 (ClutterPoint);
3912-}
3913-
3914-/**
3915- * clutter_point_init:
3916- * @point: a #ClutterPoint
3917- * @x: the X coordinate of the point
3918- * @y: the Y coordinate of the point
3919- *
3920- * Initializes @point with the given coordinates.
3921- *
3922- * Return value: (transfer none): the initialized #ClutterPoint
3923- *
3924- * Since: 1.12
3925- */
3926-ClutterPoint *
3927-clutter_point_init (ClutterPoint *point,
3928- float x,
3929- float y)
3930-{
3931- g_return_val_if_fail (point != NULL, NULL);
3932-
3933- point->x = x;
3934- point->y = y;
3935-
3936- return point;
3937-}
3938-
3939-/**
3940- * clutter_point_copy:
3941- * @point: a #ClutterPoint
3942- *
3943- * Creates a new #ClutterPoint with the same coordinates of @point.
3944- *
3945- * Return value: (transfer full): a newly allocated #ClutterPoint.
3946- * Use clutter_point_free() to free its resources.
3947- *
3948- * Since: 1.12
3949- */
3950-ClutterPoint *
3951-clutter_point_copy (const ClutterPoint *point)
3952-{
3953- return g_slice_dup (ClutterPoint, point);
3954-}
3955-
3956-/**
3957- * clutter_point_free:
3958- * @point: a #ClutterPoint
3959- *
3960- * Frees the resources allocated for @point.
3961- *
3962- * Since: 1.12
3963- */
3964-void
3965-clutter_point_free (ClutterPoint *point)
3966-{
3967- if (point != NULL && point != &_clutter_point_zero)
3968- g_slice_free (ClutterPoint, point);
3969-}
3970-
3971-/**
3972- * clutter_point_equals:
3973- * @a: the first #ClutterPoint to compare
3974- * @b: the second #ClutterPoint to compare
3975- *
3976- * Compares two #ClutterPoint for equality.
3977- *
3978- * Return value: %TRUE if the #ClutterPoints are equal
3979- *
3980- * Since: 1.12
3981- */
3982-gboolean
3983-clutter_point_equals (const ClutterPoint *a,
3984- const ClutterPoint *b)
3985-{
3986- if (a == b)
3987- return TRUE;
3988-
3989- if (a == NULL || b == NULL)
3990- return FALSE;
3991-
3992- return fabsf (a->x - b->x) < FLOAT_EPSILON &&
3993- fabsf (a->y - b->y) < FLOAT_EPSILON;
3994-}
3995-
3996-/**
3997- * clutter_point_distance:
3998- * @a: a #ClutterPoint
3999- * @b: a #ClutterPoint
4000- * @x_distance: (out) (allow-none): return location for the horizontal
4001- * distance between the points
4002- * @y_distance: (out) (allow-none): return location for the vertical
4003- * distance between the points
4004- *
4005- * Computes the distance between two #ClutterPoint.
4006- *
4007- * Return value: the distance between the points.
4008- *
4009- * Since: 1.12
4010- */
4011-float
4012-clutter_point_distance (const ClutterPoint *a,
4013- const ClutterPoint *b,
4014- float *x_distance,
4015- float *y_distance)
4016-{
4017- float x_d, y_d;
4018-
4019- g_return_val_if_fail (a != NULL, 0.f);
4020- g_return_val_if_fail (b != NULL, 0.f);
4021-
4022- if (clutter_point_equals (a, b))
4023- return 0.f;
4024-
4025- x_d = (a->x - b->x);
4026- y_d = (a->y - b->y);
4027-
4028- if (x_distance != NULL)
4029- *x_distance = fabsf (x_d);
4030-
4031- if (y_distance != NULL)
4032- *y_distance = fabsf (y_d);
4033-
4034- return sqrt ((x_d * x_d) + (y_d * y_d));
4035-}
4036-
4037-static gboolean
4038-clutter_point_progress (const GValue *a,
4039- const GValue *b,
4040- gdouble progress,
4041- GValue *retval)
4042-{
4043- const ClutterPoint *ap = g_value_get_boxed (a);
4044- const ClutterPoint *bp = g_value_get_boxed (b);
4045- ClutterPoint res = CLUTTER_POINT_INIT (0, 0);
4046-
4047- res.x = ap->x + (bp->x - ap->x) * progress;
4048- res.y = ap->y + (bp->y - ap->y) * progress;
4049-
4050- g_value_set_boxed (retval, &res);
4051-
4052- return TRUE;
4053-}
4054-
4055-G_DEFINE_BOXED_TYPE_WITH_CODE (ClutterPoint, clutter_point,
4056- clutter_point_copy,
4057- clutter_point_free,
4058- CLUTTER_REGISTER_INTERVAL_PROGRESS (clutter_point_progress))
4059-
4060-static int
4061-clutter_point_compare_line (const ClutterPoint *p,
4062- const ClutterPoint *a,
4063- const ClutterPoint *b)
4064-{
4065- float x1 = b->x - a->x;
4066- float y1 = b->y - a->y;
4067- float x2 = p->x - a->x;
4068- float y2 = p->y - a->y;
4069- float cross_z = x1 * y2 - y1 * x2;
4070-
4071- if (cross_z > 0.f)
4072- return 1;
4073- else if (cross_z < 0.f)
4074- return -1;
4075- else
4076- return 0;
4077-}
4078-
4079-/**
4080- * clutter_point_inside_quadrilateral:
4081- * @point: a #ClutterPoint to test
4082- * @vertices: array of vertices of the quadrilateral, in either clockwise or
4083- * anticlockwise order.
4084- *
4085- * Determines whether a point is inside the convex quadrilateral provided,
4086- * or on any of its edges or vertices.
4087- *
4088- * Returns: %TRUE if @point is inside or touching the quadrilateral
4089- */
4090-gboolean
4091-clutter_point_inside_quadrilateral (const ClutterPoint *point,
4092- const ClutterPoint *vertices)
4093-{
4094- unsigned int i;
4095- int first_side;
4096-
4097- first_side = 0;
4098-
4099- for (i = 0; i < 4; i++)
4100- {
4101- int side;
4102-
4103- side = clutter_point_compare_line (point,
4104- &vertices[i],
4105- &vertices[(i + 1) % 4]);
4106-
4107- if (side)
4108- {
4109- if (first_side == 0)
4110- first_side = side;
4111- else if (side != first_side)
4112- return FALSE;
4113- }
4114- }
4115-
4116- if (first_side == 0)
4117- return FALSE;
4118-
4119- return TRUE;
4120-}
4121-
4122-
4123
4124-
4125-/*
4126- * ClutterSize
4127- */
4128-
4129-/**
4130- * clutter_size_alloc: (constructor)
4131- *
4132- * Allocates a new #ClutterSize.
4133- *
4134- * Return value: (transfer full): the newly allocated #ClutterSize.
4135- * Use clutter_size_free() to free its resources.
4136- *
4137- * Since: 1.12
4138- */
4139-ClutterSize *
4140-clutter_size_alloc (void)
4141-{
4142- return g_slice_new0 (ClutterSize);
4143-}
4144-
4145-/**
4146- * clutter_size_init:
4147- * @size: a #ClutterSize
4148- * @width: the width
4149- * @height: the height
4150- *
4151- * Initializes a #ClutterSize with the given dimensions.
4152- *
4153- * Return value: (transfer none): the initialized #ClutterSize
4154- *
4155- * Since: 1.12
4156- */
4157-ClutterSize *
4158-clutter_size_init (ClutterSize *size,
4159- float width,
4160- float height)
4161-{
4162- g_return_val_if_fail (size != NULL, NULL);
4163-
4164- size->width = width;
4165- size->height = height;
4166-
4167- return size;
4168-}
4169-
4170-/**
4171- * clutter_size_copy:
4172- * @size: a #ClutterSize
4173- *
4174- * Creates a new #ClutterSize and duplicates @size.
4175- *
4176- * Return value: (transfer full): the newly allocated #ClutterSize.
4177- * Use clutter_size_free() to free its resources.
4178- *
4179- * Since: 1.12
4180- */
4181-ClutterSize *
4182-clutter_size_copy (const ClutterSize *size)
4183-{
4184- return g_slice_dup (ClutterSize, size);
4185-}
4186-
4187-/**
4188- * clutter_size_free:
4189- * @size: a #ClutterSize
4190- *
4191- * Frees the resources allocated for @size.
4192- *
4193- * Since: 1.12
4194- */
4195-void
4196-clutter_size_free (ClutterSize *size)
4197-{
4198- if (size != NULL)
4199- g_slice_free (ClutterSize, size);
4200-}
4201-
4202-/**
4203- * clutter_size_equals:
4204- * @a: a #ClutterSize to compare
4205- * @b: a #ClutterSize to compare
4206- *
4207- * Compares two #ClutterSize for equality.
4208- *
4209- * Return value: %TRUE if the two #ClutterSize are equal
4210- *
4211- * Since: 1.12
4212- */
4213-gboolean
4214-clutter_size_equals (const ClutterSize *a,
4215- const ClutterSize *b)
4216-{
4217- if (a == b)
4218- return TRUE;
4219-
4220- if (a == NULL || b == NULL)
4221- return FALSE;
4222-
4223- return fabsf (a->width - b->width) < FLOAT_EPSILON &&
4224- fabsf (a->height - b->height) < FLOAT_EPSILON;
4225-}
4226-
4227-static gboolean
4228-clutter_size_progress (const GValue *a,
4229- const GValue *b,
4230- gdouble progress,
4231- GValue *retval)
4232-{
4233- const ClutterSize *as = g_value_get_boxed (a);
4234- const ClutterSize *bs = g_value_get_boxed (b);
4235- ClutterSize res = CLUTTER_SIZE_INIT (0, 0);
4236-
4237- res.width = as->width + (bs->width - as->width) * progress;
4238- res.height = as->height + (bs->height - as->height) * progress;
4239-
4240- g_value_set_boxed (retval, &res);
4241-
4242- return TRUE;
4243-}
4244-
4245-G_DEFINE_BOXED_TYPE_WITH_CODE (ClutterSize, clutter_size,
4246- clutter_size_copy,
4247- clutter_size_free,
4248- CLUTTER_REGISTER_INTERVAL_PROGRESS (clutter_size_progress))
4249-
4250-
4251
4252-
4253-/*
4254- * ClutterRect
4255- */
4256-
4257-static const ClutterRect _clutter_rect_zero = CLUTTER_RECT_INIT_ZERO;
4258-
4259-static gboolean clutter_rect_progress (const GValue *a,
4260- const GValue *b,
4261- gdouble progress,
4262- GValue *res);
4263-
4264-G_DEFINE_BOXED_TYPE_WITH_CODE (ClutterRect, clutter_rect,
4265- clutter_rect_copy,
4266- clutter_rect_free,
4267- CLUTTER_REGISTER_INTERVAL_PROGRESS (clutter_rect_progress))
4268-
4269-static inline void
4270-clutter_rect_normalize_internal (ClutterRect *rect)
4271-{
4272- if (rect->size.width >= 0.f && rect->size.height >= 0.f)
4273- return;
4274-
4275- if (rect->size.width < 0.f)
4276- {
4277- float size = fabsf (rect->size.width);
4278-
4279- rect->origin.x -= size;
4280- rect->size.width = size;
4281- }
4282-
4283- if (rect->size.height < 0.f)
4284- {
4285- float size = fabsf (rect->size.height);
4286-
4287- rect->origin.y -= size;
4288- rect->size.height = size;
4289- }
4290-}
4291-
4292-/**
4293- * clutter_rect_zero:
4294- *
4295- * A #ClutterRect with #ClutterRect.origin set at (0, 0) and a size
4296- * of 0.
4297- *
4298- * The returned value can be used as a guard.
4299- *
4300- * Return value: a rectangle with origin in (0, 0) and a size of 0.
4301- * The returned #ClutterRect is owned by Clutter and it should not
4302- * be modified or freed.
4303- *
4304- * Since: 1.12
4305- */
4306-const ClutterRect *
4307-clutter_rect_zero (void)
4308-{
4309- return &_clutter_rect_zero;
4310-}
4311-
4312-/**
4313- * clutter_rect_alloc: (constructor)
4314- *
4315- * Creates a new, empty #ClutterRect.
4316- *
4317- * You can use clutter_rect_init() to initialize the returned rectangle,
4318- * for instance:
4319- *
4320- * |[
4321- * rect = clutter_rect_init (clutter_rect_alloc (), x, y, width, height);
4322- * ]|
4323- *
4324- * Return value: (transfer full): the newly allocated #ClutterRect.
4325- * Use clutter_rect_free() to free its resources
4326- *
4327- * Since: 1.12
4328- */
4329-ClutterRect *
4330-clutter_rect_alloc (void)
4331-{
4332- return g_slice_new0 (ClutterRect);
4333-}
4334-
4335-/**
4336- * clutter_rect_init:
4337- * @rect: a #ClutterRect
4338- * @x: X coordinate of the origin
4339- * @y: Y coordinate of the origin
4340- * @width: width of the rectangle
4341- * @height: height of the rectangle
4342- *
4343- * Initializes a #ClutterRect with the given origin and size.
4344- *
4345- * Return value: (transfer none): the updated rectangle
4346- *
4347- * Since: 1.12
4348- */
4349-ClutterRect *
4350-clutter_rect_init (ClutterRect *rect,
4351- float x,
4352- float y,
4353- float width,
4354- float height)
4355-{
4356- g_return_val_if_fail (rect != NULL, NULL);
4357-
4358- rect->origin.x = x;
4359- rect->origin.y = y;
4360-
4361- rect->size.width = width;
4362- rect->size.height = height;
4363-
4364- return rect;
4365-}
4366-
4367-/**
4368- * clutter_rect_copy:
4369- * @rect: a #ClutterRect
4370- *
4371- * Copies @rect into a new #ClutterRect instance.
4372- *
4373- * Return value: (transfer full): the newly allocate copy of @rect.
4374- * Use clutter_rect_free() to free the associated resources
4375- *
4376- * Since: 1.12
4377- */
4378-ClutterRect *
4379-clutter_rect_copy (const ClutterRect *rect)
4380-{
4381- if (rect != NULL)
4382- {
4383- ClutterRect *res;
4384-
4385- res = g_slice_dup (ClutterRect, rect);
4386- clutter_rect_normalize_internal (res);
4387-
4388- return res;
4389- }
4390-
4391- return NULL;
4392-}
4393-
4394-/**
4395- * clutter_rect_free:
4396- * @rect: a #ClutterRect
4397- *
4398- * Frees the resources allocated by @rect.
4399- *
4400- * Since: 1.12
4401- */
4402-void
4403-clutter_rect_free (ClutterRect *rect)
4404-{
4405- if (rect != NULL && rect != &_clutter_rect_zero)
4406- g_slice_free (ClutterRect, rect);
4407-}
4408-
4409-/**
4410- * clutter_rect_equals:
4411- * @a: a #ClutterRect
4412- * @b: a #ClutterRect
4413- *
4414- * Checks whether @a and @b are equals.
4415- *
4416- * This function will normalize both @a and @b before comparing
4417- * their origin and size.
4418- *
4419- * Return value: %TRUE if the rectangles match in origin and size.
4420- *
4421- * Since: 1.12
4422- */
4423-gboolean
4424-clutter_rect_equals (ClutterRect *a,
4425- ClutterRect *b)
4426-{
4427- if (a == b)
4428- return TRUE;
4429-
4430- if (a == NULL || b == NULL)
4431- return FALSE;
4432-
4433- clutter_rect_normalize_internal (a);
4434- clutter_rect_normalize_internal (b);
4435-
4436- return clutter_point_equals (&a->origin, &b->origin) &&
4437- clutter_size_equals (&a->size, &b->size);
4438-}
4439-
4440-/**
4441- * clutter_rect_normalize:
4442- * @rect: a #ClutterRect
4443- *
4444- * Normalizes a #ClutterRect.
4445- *
4446- * A #ClutterRect is defined by the area covered by its size; this means
4447- * that a #ClutterRect with #ClutterRect.origin in [ 0, 0 ] and a
4448- * #ClutterRect.size of [ 10, 10 ] is equivalent to a #ClutterRect with
4449- * #ClutterRect.origin in [ 10, 10 ] and a #ClutterRect.size of [ -10, -10 ].
4450- *
4451- * This function is useful to ensure that a rectangle has positive width
4452- * and height; it will modify the passed @rect and normalize its size.
4453- *
4454- * Since: 1.12
4455- */
4456-ClutterRect *
4457-clutter_rect_normalize (ClutterRect *rect)
4458-{
4459- g_return_val_if_fail (rect != NULL, NULL);
4460-
4461- clutter_rect_normalize_internal (rect);
4462-
4463- return rect;
4464-}
4465-
4466-/**
4467- * clutter_rect_get_center:
4468- * @rect: a #ClutterRect
4469- * @center: (out caller-allocates): a #ClutterPoint
4470- *
4471- * Retrieves the center of @rect, after normalizing the rectangle,
4472- * and updates @center with the correct coordinates.
4473- *
4474- * Since: 1.12
4475- */
4476-void
4477-clutter_rect_get_center (ClutterRect *rect,
4478- ClutterPoint *center)
4479-{
4480- g_return_if_fail (rect != NULL);
4481- g_return_if_fail (center != NULL);
4482-
4483- clutter_rect_normalize_internal (rect);
4484-
4485- center->x = rect->origin.x + (rect->size.width / 2.0f);
4486- center->y = rect->origin.y + (rect->size.height / 2.0f);
4487-}
4488-
4489-/**
4490- * clutter_rect_contains_point:
4491- * @rect: a #ClutterRect
4492- * @point: the point to check
4493- *
4494- * Checks whether @point is contained by @rect, after normalizing the
4495- * rectangle.
4496- *
4497- * Return value: %TRUE if the @point is contained by @rect.
4498- *
4499- * Since: 1.12
4500- */
4501-gboolean
4502-clutter_rect_contains_point (ClutterRect *rect,
4503- ClutterPoint *point)
4504-{
4505- g_return_val_if_fail (rect != NULL, FALSE);
4506- g_return_val_if_fail (point != NULL, FALSE);
4507-
4508- clutter_rect_normalize_internal (rect);
4509-
4510- return (point->x >= rect->origin.x) &&
4511- (point->y >= rect->origin.y) &&
4512- (point->x <= (rect->origin.x + rect->size.width)) &&
4513- (point->y <= (rect->origin.y + rect->size.height));
4514-}
4515-
4516-/**
4517- * clutter_rect_contains_rect:
4518- * @a: a #ClutterRect
4519- * @b: a #ClutterRect
4520- *
4521- * Checks whether @a contains @b.
4522- *
4523- * The first rectangle contains the second if the union of the
4524- * two #ClutterRect is equal to the first rectangle.
4525- *
4526- * Return value: %TRUE if the first rectangle contains the second.
4527- *
4528- * Since: 1.12
4529- */
4530-gboolean
4531-clutter_rect_contains_rect (ClutterRect *a,
4532- ClutterRect *b)
4533-{
4534- ClutterRect res;
4535-
4536- g_return_val_if_fail (a != NULL, FALSE);
4537- g_return_val_if_fail (b != NULL, FALSE);
4538-
4539- clutter_rect_union (a, b, &res);
4540-
4541- return clutter_rect_equals (a, &res);
4542-}
4543-
4544-/**
4545- * clutter_rect_union:
4546- * @a: a #ClutterRect
4547- * @b: a #ClutterRect
4548- * @res: (out caller-allocates): a #ClutterRect
4549- *
4550- * Computes the smallest possible rectangle capable of fully containing
4551- * both @a and @b, and places it into @res.
4552- *
4553- * This function will normalize both @a and @b prior to computing their
4554- * union.
4555- *
4556- * Since: 1.12
4557- */
4558-void
4559-clutter_rect_union (ClutterRect *a,
4560- ClutterRect *b,
4561- ClutterRect *res)
4562-{
4563- g_return_if_fail (a != NULL);
4564- g_return_if_fail (b != NULL);
4565- g_return_if_fail (res != NULL);
4566-
4567- clutter_rect_normalize_internal (a);
4568- clutter_rect_normalize_internal (b);
4569-
4570- res->origin.x = MIN (a->origin.x, b->origin.x);
4571- res->origin.y = MIN (a->origin.y, b->origin.y);
4572-
4573- res->size.width = MAX (a->size.width, b->size.width);
4574- res->size.height = MAX (a->size.height, b->size.height);
4575-}
4576-
4577-/**
4578- * clutter_rect_intersection:
4579- * @a: a #ClutterRect
4580- * @b: a #ClutterRect
4581- * @res: (out caller-allocates) (allow-none): a #ClutterRect, or %NULL
4582- *
4583- * Computes the intersection of @a and @b, and places it in @res, if @res
4584- * is not %NULL.
4585- *
4586- * This function will normalize both @a and @b prior to computing their
4587- * intersection.
4588- *
4589- * This function can be used to simply check if the intersection of @a and @b
4590- * is not empty, by using %NULL for @res.
4591- *
4592- * Return value: %TRUE if the intersection of @a and @b is not empty
4593- *
4594- * Since: 1.12
4595- */
4596-gboolean
4597-clutter_rect_intersection (ClutterRect *a,
4598- ClutterRect *b,
4599- ClutterRect *res)
4600-{
4601- float x_1, y_1, x_2, y_2;
4602-
4603- g_return_val_if_fail (a != NULL, FALSE);
4604- g_return_val_if_fail (b != NULL, FALSE);
4605-
4606- clutter_rect_normalize_internal (a);
4607- clutter_rect_normalize_internal (b);
4608-
4609- x_1 = MAX (a->origin.x, b->origin.x);
4610- y_1 = MAX (a->origin.y, b->origin.y);
4611- x_2 = MIN (a->origin.x + a->size.width, b->origin.x + b->size.width);
4612- y_2 = MIN (a->origin.y + a->size.height, b->origin.y + b->size.height);
4613-
4614- if (x_1 >= x_2 || y_1 >= y_2)
4615- {
4616- if (res != NULL)
4617- clutter_rect_init (res, 0.f, 0.f, 0.f, 0.f);
4618-
4619- return FALSE;
4620- }
4621-
4622- if (res != NULL)
4623- clutter_rect_init (res, x_1, y_1, x_2 - x_1, y_2 - y_1);
4624-
4625- return TRUE;
4626-}
4627-
4628-/**
4629- * clutter_rect_offset:
4630- * @rect: a #ClutterRect
4631- * @d_x: the horizontal offset value
4632- * @d_y: the vertical offset value
4633- *
4634- * Offsets the origin of @rect by the given values, after normalizing
4635- * the rectangle.
4636- *
4637- * Since: 1.12
4638- */
4639-void
4640-clutter_rect_offset (ClutterRect *rect,
4641- float d_x,
4642- float d_y)
4643-{
4644- g_return_if_fail (rect != NULL);
4645-
4646- clutter_rect_normalize_internal (rect);
4647-
4648- rect->origin.x += d_x;
4649- rect->origin.y += d_y;
4650-}
4651-
4652-/**
4653- * clutter_rect_inset:
4654- * @rect: a #ClutterRect
4655- * @d_x: an horizontal value; a positive @d_x will create an inset rectangle,
4656- * and a negative value will create a larger rectangle
4657- * @d_y: a vertical value; a positive @d_x will create an inset rectangle,
4658- * and a negative value will create a larger rectangle
4659- *
4660- * Normalizes the @rect and offsets its origin by the @d_x and @d_y values;
4661- * the size is adjusted by (2 * @d_x, 2 * @d_y).
4662- *
4663- * If @d_x and @d_y are positive the size of the rectangle is decreased; if
4664- * the values are negative, the size of the rectangle is increased.
4665- *
4666- * If the resulting rectangle has a negative width or height, the size is
4667- * set to 0.
4668- *
4669- * Since: 1.12
4670- */
4671-void
4672-clutter_rect_inset (ClutterRect *rect,
4673- float d_x,
4674- float d_y)
4675-{
4676- g_return_if_fail (rect != NULL);
4677-
4678- clutter_rect_normalize_internal (rect);
4679-
4680- rect->origin.x += d_x;
4681- rect->origin.y += d_y;
4682-
4683- if (d_x >= 0.f)
4684- rect->size.width -= (d_x * 2.f);
4685- else
4686- rect->size.width += (d_x * -2.f);
4687-
4688- if (d_y >= 0.f)
4689- rect->size.height -= (d_y * 2.f);
4690- else
4691- rect->size.height += (d_y * -2.f);
4692-
4693- if (rect->size.width < 0.f)
4694- rect->size.width = 0.f;
4695-
4696- if (rect->size.height < 0.f)
4697- rect->size.height = 0.f;
4698-}
4699-
4700-/**
4701- * clutter_rect_scale:
4702- * @rect: a #ClutterRect
4703- * @s_x: an horizontal scale value
4704- * @s_y: a vertical scale value
4705- *
4706- * Scale the rectangle coordinates and size by @s_x horizontally and
4707- * @s_y vertically.
4708- */
4709-void
4710-clutter_rect_scale (ClutterRect *rect,
4711- float s_x,
4712- float s_y)
4713-{
4714- g_return_if_fail (rect != NULL);
4715- g_return_if_fail (s_x > 0.f);
4716- g_return_if_fail (s_y > 0.f);
4717-
4718- clutter_rect_normalize_internal (rect);
4719-
4720- rect->origin.x *= s_x;
4721- rect->origin.y *= s_y;
4722- rect->size.width *= s_x;
4723- rect->size.height *= s_y;
4724-}
4725-
4726-/**
4727- * clutter_rect_clamp_to_pixel:
4728- * @rect: a #ClutterRect
4729- *
4730- * Rounds the origin of @rect downwards to the nearest integer, and recompute the
4731- * the size using the @rect origin and size rounded upwards to the nearest integer,
4732- * so that @rect is updated to the smallest rectangle capable of fully containing
4733- * the original, fractional rectangle in the coordinates space.
4734- *
4735- * Since: 1.12
4736- */
4737-void
4738-clutter_rect_clamp_to_pixel (ClutterRect *rect)
4739-{
4740- float x2, y2;
4741-
4742- g_return_if_fail (rect != NULL);
4743-
4744- clutter_rect_normalize_internal (rect);
4745-
4746- x2 = rect->origin.x + rect->size.width;
4747- y2 = rect->origin.y + rect->size.height;
4748-
4749- rect->origin.x = floorf (rect->origin.x);
4750- rect->origin.y = floorf (rect->origin.y);
4751-
4752- rect->size.width = ceilf (x2) - rect->origin.x;
4753- rect->size.height = ceilf (y2) - rect->origin.y;
4754-}
4755-
4756-/**
4757- * clutter_rect_get_x:
4758- * @rect: a #ClutterRect
4759- *
4760- * Retrieves the X coordinate of the origin of @rect.
4761- *
4762- * Return value: the X coordinate of the origin of the rectangle
4763- *
4764- * Since: 1.12
4765- */
4766-float
4767-clutter_rect_get_x (ClutterRect *rect)
4768-{
4769- g_return_val_if_fail (rect != NULL, 0.f);
4770-
4771- clutter_rect_normalize_internal (rect);
4772-
4773- return rect->origin.x;
4774-}
4775-
4776-/**
4777- * clutter_rect_get_y:
4778- * @rect: a #ClutterRect
4779- *
4780- * Retrieves the Y coordinate of the origin of @rect.
4781- *
4782- * Return value: the Y coordinate of the origin of the rectangle
4783- *
4784- * Since: 1.12
4785- */
4786-float
4787-clutter_rect_get_y (ClutterRect *rect)
4788-{
4789- g_return_val_if_fail (rect != NULL, 0.f);
4790-
4791- clutter_rect_normalize_internal (rect);
4792-
4793- return rect->origin.y;
4794-}
4795-
4796-/**
4797- * clutter_rect_get_width:
4798- * @rect: a #ClutterRect
4799- *
4800- * Retrieves the width of @rect.
4801- *
4802- * Return value: the width of the rectangle
4803- *
4804- * Since: 1.12
4805- */
4806-float
4807-clutter_rect_get_width (ClutterRect *rect)
4808-{
4809- g_return_val_if_fail (rect != NULL, 0.f);
4810-
4811- clutter_rect_normalize_internal (rect);
4812-
4813- return rect->size.width;
4814-}
4815-
4816-/**
4817- * clutter_rect_get_height:
4818- * @rect: a #ClutterRect
4819- *
4820- * Retrieves the height of @rect.
4821- *
4822- * Return value: the height of the rectangle
4823- *
4824- * Since: 1.12
4825- */
4826-float
4827-clutter_rect_get_height (ClutterRect *rect)
4828-{
4829- g_return_val_if_fail (rect != NULL, 0.f);
4830-
4831- clutter_rect_normalize_internal (rect);
4832-
4833- return rect->size.height;
4834-}
4835-
4836-static gboolean
4837-clutter_rect_progress (const GValue *a,
4838- const GValue *b,
4839- gdouble progress,
4840- GValue *retval)
4841-{
4842- const ClutterRect *rect_a = g_value_get_boxed (a);
4843- const ClutterRect *rect_b = g_value_get_boxed (b);
4844- ClutterRect res = CLUTTER_RECT_INIT_ZERO;
4845-
4846-#define INTERPOLATE(r_a,r_b,member,field,factor) ((r_a)->member.field + (((r_b)->member.field - ((r_a)->member.field)) * (factor)))
4847-
4848- res.origin.x = INTERPOLATE (rect_a, rect_b, origin, x, progress);
4849- res.origin.y = INTERPOLATE (rect_a, rect_b, origin, y, progress);
4850-
4851- res.size.width = INTERPOLATE (rect_a, rect_b, size, width, progress);
4852- res.size.height = INTERPOLATE (rect_a, rect_b, size, height, progress);
4853-
4854-#undef INTERPOLATE
4855-
4856- g_value_set_boxed (retval, &res);
4857-
4858- return TRUE;
4859-}
4860-
4861 /**
4862 * ClutterMatrix:
4863 *
4864@@ -1393,20 +126,20 @@ clutter_matrix_progress (const GValue *a,
4865 {
4866 const ClutterMatrix *matrix1 = g_value_get_boxed (a);
4867 const ClutterMatrix *matrix2 = g_value_get_boxed (b);
4868- ClutterVertex scale1 = CLUTTER_VERTEX_INIT (1.f, 1.f, 1.f);
4869+ graphene_point3d_t scale1 = GRAPHENE_POINT3D_INIT (1.f, 1.f, 1.f);
4870 float shear1[3] = { 0.f, 0.f, 0.f };
4871- ClutterVertex rotate1 = CLUTTER_VERTEX_INIT_ZERO;
4872- ClutterVertex translate1 = CLUTTER_VERTEX_INIT_ZERO;
4873+ graphene_point3d_t rotate1 = GRAPHENE_POINT3D_INIT_ZERO;
4874+ graphene_point3d_t translate1 = GRAPHENE_POINT3D_INIT_ZERO;
4875 ClutterVertex4 perspective1 = { 0.f, 0.f, 0.f, 0.f };
4876- ClutterVertex scale2 = CLUTTER_VERTEX_INIT (1.f, 1.f, 1.f);
4877+ graphene_point3d_t scale2 = GRAPHENE_POINT3D_INIT (1.f, 1.f, 1.f);
4878 float shear2[3] = { 0.f, 0.f, 0.f };
4879- ClutterVertex rotate2 = CLUTTER_VERTEX_INIT_ZERO;
4880- ClutterVertex translate2 = CLUTTER_VERTEX_INIT_ZERO;
4881+ graphene_point3d_t rotate2 = GRAPHENE_POINT3D_INIT_ZERO;
4882+ graphene_point3d_t translate2 = GRAPHENE_POINT3D_INIT_ZERO;
4883 ClutterVertex4 perspective2 = { 0.f, 0.f, 0.f, 0.f };
4884- ClutterVertex scale_res = CLUTTER_VERTEX_INIT (1.f, 1.f, 1.f);
4885+ graphene_point3d_t scale_res = GRAPHENE_POINT3D_INIT (1.f, 1.f, 1.f);
4886 float shear_res = 0.f;
4887- ClutterVertex rotate_res = CLUTTER_VERTEX_INIT_ZERO;
4888- ClutterVertex translate_res = CLUTTER_VERTEX_INIT_ZERO;
4889+ graphene_point3d_t rotate_res = GRAPHENE_POINT3D_INIT_ZERO;
4890+ graphene_point3d_t translate_res = GRAPHENE_POINT3D_INIT_ZERO;
4891 ClutterVertex4 perspective_res = { 0.f, 0.f, 0.f, 0.f };
4892 ClutterMatrix res;
4893
4894@@ -1427,11 +160,11 @@ clutter_matrix_progress (const GValue *a,
4895 res.ww = perspective_res.w;
4896
4897 /* translation */
4898- clutter_vertex_interpolate (&translate1, &translate2, progress, &translate_res);
4899+ graphene_point3d_interpolate (&translate1, &translate2, progress, &translate_res);
4900 cogl_matrix_translate (&res, translate_res.x, translate_res.y, translate_res.z);
4901
4902 /* rotation */
4903- clutter_vertex_interpolate (&rotate1, &rotate2, progress, &rotate_res);
4904+ graphene_point3d_interpolate (&rotate1, &rotate2, progress, &rotate_res);
4905 cogl_matrix_rotate (&res, rotate_res.x, 1.0f, 0.0f, 0.0f);
4906 cogl_matrix_rotate (&res, rotate_res.y, 0.0f, 1.0f, 0.0f);
4907 cogl_matrix_rotate (&res, rotate_res.z, 0.0f, 0.0f, 1.0f);
4908@@ -1450,7 +183,7 @@ clutter_matrix_progress (const GValue *a,
4909 _clutter_util_matrix_skew_xy (&res, shear_res);
4910
4911 /* scale */
4912- clutter_vertex_interpolate (&scale1, &scale2, progress, &scale_res);
4913+ graphene_point3d_interpolate (&scale1, &scale2, progress, &scale_res);
4914 cogl_matrix_scale (&res, scale_res.x, scale_res.y, scale_res.z);
4915
4916 g_value_set_boxed (retval, &res);
4917diff --git a/clutter/clutter/clutter-bin-layout.c b/clutter/clutter/clutter-bin-layout.c
4918index 6bcdbe7..8c63b80 100644
4919--- a/clutter/clutter/clutter-bin-layout.c
4920+++ b/clutter/clutter/clutter-bin-layout.c
4921@@ -49,10 +49,10 @@
4922
4923 #define CLUTTER_DISABLE_DEPRECATION_WARNINGS
4924 #include "deprecated/clutter-container.h"
4925-#include "deprecated/clutter-bin-layout.h"
4926
4927 #include "clutter-actor-private.h"
4928 #include "clutter-animatable.h"
4929+#include "clutter-bin-layout.h"
4930 #include "clutter-child-meta.h"
4931 #include "clutter-debug.h"
4932 #include "clutter-enum-types.h"
4933@@ -698,187 +698,3 @@ clutter_bin_layout_new (ClutterBinAlignment x_align,
4934 "y-align", y_align,
4935 NULL);
4936 }
4937-
4938-/**
4939- * clutter_bin_layout_set_alignment:
4940- * @self: a #ClutterBinLayout
4941- * @child: (allow-none): a child of @container
4942- * @x_align: the horizontal alignment policy to be used for the @child
4943- * inside @container
4944- * @y_align: the vertical aligment policy to be used on the @child
4945- * inside @container
4946- *
4947- * Sets the horizontal and vertical alignment policies to be applied
4948- * to a @child of @self
4949- *
4950- * If @child is %NULL then the @x_align and @y_align values will
4951- * be set as the default alignment policies
4952- *
4953- * Since: 1.2
4954- *
4955- * Deprecated: 1.12: Use the #ClutterActor:x-align and
4956- * #ClutterActor:y-align properties of #ClutterActor instead.
4957- */
4958-void
4959-clutter_bin_layout_set_alignment (ClutterBinLayout *self,
4960- ClutterActor *child,
4961- ClutterBinAlignment x_align,
4962- ClutterBinAlignment y_align)
4963-{
4964- ClutterBinLayoutPrivate *priv;
4965- ClutterLayoutManager *manager;
4966- ClutterLayoutMeta *meta;
4967-
4968- g_return_if_fail (CLUTTER_IS_BIN_LAYOUT (self));
4969- g_return_if_fail (child == NULL || CLUTTER_IS_ACTOR (child));
4970-
4971- priv = self->priv;
4972-
4973- if (priv->container == NULL)
4974- {
4975- if (child == NULL)
4976- {
4977- set_x_align (self, x_align);
4978- set_y_align (self, y_align);
4979- }
4980- else
4981- g_warning ("The layout of type '%s' must be associated to "
4982- "a ClutterContainer before setting the alignment "
4983- "on its children",
4984- G_OBJECT_TYPE_NAME (self));
4985-
4986- return;
4987- }
4988-
4989- manager = CLUTTER_LAYOUT_MANAGER (self);
4990- meta = clutter_layout_manager_get_child_meta (manager,
4991- priv->container,
4992- child);
4993- g_assert (CLUTTER_IS_BIN_LAYER (meta));
4994-
4995- set_layer_x_align (CLUTTER_BIN_LAYER (meta), x_align);
4996- set_layer_y_align (CLUTTER_BIN_LAYER (meta), y_align);
4997-}
4998-
4999-/**
5000- * clutter_bin_layout_get_alignment:
The diff has been truncated for viewing.

Subscribers

People subscribed via source and target branches