1
0
Fork 0
Commit graph

1864 commits

Author SHA1 Message Date
Hans Petter Jansson
a8e04a7d6b Add API to control per-framebuffer depth writing
Add framebuffer methods cogl_framebuffer_[gs]et_depth_write_enabled()
and backend bits to pass the state on to glDepthMask().

This allows us to enable or disable depth writing per-framebuffer, which
if disabled saves us some work in glClear(). When rendering, the flag
is combined with the pipeline's depth writing flag using a logical AND.

Depth writing is enabled by default.

https://bugzilla.gnome.org/show_bug.cgi?id=709827

Reviewed-by: Robert Bragg <robert@linux.intel.com>
(cherry picked from commit 71406438c5357eb4e0ef03e940c5456a536602a0)
2013-10-28 16:34:58 +00:00
Robert Bragg
18486a6aa9 egl: forward declare wl_resource for compatibility
Depending on what version of Mesa you have then eglQueryWaylandBuffer
may take a wl_buffer or wl_resource argument and the EGL header will
only forward declare the corresponding type.

The use of wl_buffer has been deprecated and so internally we assume
that eglQueryWaylandBuffer takes a wl_resource but for compatibility we
forward declare wl_resource in case we are building with EGL headers
that still use wl_buffer.

https://bugzilla.gnome.org/show_bug.cgi?id=710926

Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit 9bd1ee544667cfe7ecae479ec7f778446dd8f326)
2013-10-28 16:34:58 +00:00
Chun-wei Fan
e0e3eba0dd cogl.symbols: Make Sure cogl_is_atlas_texture is Exported
cogl_is_atlas_texture is supposed to be exported from the DLL/.so, so
update the cogl.symbols file to ensure this.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
(cherry picked from commit 13e037f096de5742db769500b4c0018249d8f8e4)
2013-10-28 16:34:57 +00:00
Robert Bragg
c1724eff60 framebuffer: NOP _set_color_mask if mask isn't changing
This makes cogl_framebuffer_set_color_mask immediately bail out if the
given mask equals the framebuffer's current mask, since the cost of
flushing the journal and flushing the gl state will hugely outweigh the
cost of the check.

Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit 925174d99df7f1f4b11098e748bcc23eaa396a21)
2013-10-28 16:34:57 +00:00
Robert Bragg
8d998b64c9 util: simplify _COGL_STATIC_ASSERT definition
This updates the definition of _COGL_STATIC_ASSERT to just use
_Static_assert if available or be NOP if not. We no longer worry about
supporting static assertions with older compilers. This fixes some
verbose warnings that newer compilers were giving with the old typedef
based static assertion method.

Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit 645e3607ea7f210d6dcb9d217204790051de7c82)
2013-10-28 16:34:57 +00:00
Robert Bragg
669b3ad864 pipeline: notify all progends of changes
When a pipeline is notified of a change we now make sure to notify all
progends of that change not just the progend directly associated with
that pipeline. A pipeline can have private state associated with it from
multiple progends because descendants will always try and cache state on
ancestors to maximize the chance that the state can later be re-used.
Descendants may be using different progends than the ancestors that they
cache state with.

Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit 873939a18934185fb3c9c84c373cb86d1278add7)
2013-10-28 16:34:57 +00:00
Robert Bragg
a93e789a7c Avoid conflicting client/server wayland includes
This avoids including wayland-server.h in cogl-display-private.h which
avoid lots of compile time warnings that wl_buffer is deprecated. The
problem is that wl_buffer is also exposed in the client side headers and
isn't deprecated for clients. If we end up including the client and
server headers in the same compilation unit we can get conflicting
definitions.

Reviewed-by: Neil Roberts <neil@linux.intel.com>

(cherry picked from commit 60fcd9c87cf5d8ae8c41134217ee0e1fa2fbd46e)
2013-10-28 16:34:57 +00:00
Neil Roberts
8392420244 wayland-server: Use wl_resource instead of wl_buffer
wl_buffer has been deprecated in the server API and instead
compositors should be directly passing the wl_resource pointer to
eglQueryWaylandBuffer.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
(cherry picked from commit f13278bcf3f1475b7afc7d55a5218f409d119658)
2013-10-24 17:39:40 +01:00
Emilio Pozuelo Monfort
9bbb8a79c3 Fix build on big-endian
Commit 50d1285b updated the wl_shm enum values but left
one out. Update it to fix the build on big-endian.

https://bugzilla.gnome.org/show_bug.cgi?id=710135

Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit 9246286846d0428b03e646b2f5ec14f0eff4edc6)
2013-10-15 19:07:50 +01:00
Robert Bragg
fa855b7c45 Start clearly separating deprecated code
This makes a start on clearly factoring the deprecated code of core Cogl
into a deprecated/ directory. Ideally we want to get to the point where
all code here can be re-worked in terms of the public 2.0 api so that it
can be kept indefinitely for cogl 1.x api compatibility without
cluttering the core code base itself. If we can do this then we can
avoid maintaining the Cogl 1.x branches in parallel with master which
would reduce the maintenance effort.
2013-09-23 18:38:49 +01:00
Robert Bragg
3b14acdbcc remove spurious COGL_GTYPE_DEFINE_CLASS reference
Commit 7b25c8f5ca mistakenly added a reference to a
COGL_GTYPE_DEFINE_CLASS() macro that does not yet exist so this patch
removes it.

Reviewed-by: Neil Roberts <neil@linux.intel.com>
2013-09-23 18:37:29 +01:00
Lionel Landwerlin
d33f8ca070 texture: add missing annotations
Reviewed-by: Robert Bragg <robert@linux.intel.com>
2013-09-23 15:02:31 +01:00
Lionel Landwerlin
fbba3478a8 fence: add scope annotation
Reviewed-by: Robert Bragg <robert@linux.intel.com>
2013-09-23 15:02:31 +01:00
Lionel Landwerlin
84bdd679df buffer: add missing transfer annotations
Reviewed-by: Robert Bragg <robert@linux.intel.com>
2013-09-23 15:02:31 +01:00
Lionel Landwerlin
c1597a3364 pixel-buffer: add missing transfer annotation
Reviewed-by: Robert Bragg <robert@linux.intel.com>
2013-09-23 15:02:31 +01:00
Lionel Landwerlin
bd69f5963c frame-info: add missing annotation
Reviewed-by: Robert Bragg <robert@linux.intel.com>
2013-09-23 15:02:31 +01:00
Lionel Landwerlin
232842c1f7 matrix-stack: add missing transfer annotation
Reviewed-by: Robert Bragg <robert@linux.intel.com>
2013-09-23 15:02:31 +01:00
Lionel Landwerlin
28e37775c0 matrix: add missing transfer annotation
Reviewed-by: Robert Bragg <robert@linux.intel.com>
2013-09-23 15:02:31 +01:00
Lionel Landwerlin
59fa8b22bd index-buffer: add missing transfer annotation
Reviewed-by: Robert Bragg <robert@linux.intel.com>
2013-09-23 15:02:31 +01:00
Lionel Landwerlin
8dc7480002 attribute-buffer: add missing annotation
Reviewed-by: Robert Bragg <robert@linux.intel.com>
2013-09-23 15:02:31 +01:00
Lionel Landwerlin
de0cb3aba2 attribute-buffer: add missing transfer annotations
Reviewed-by: Robert Bragg <robert@linux.intel.com>
2013-09-23 15:02:31 +01:00
Lionel Landwerlin
7583f5fc3f attribute: add constructor annotation
Reviewed-by: Robert Bragg <robert@linux.intel.com>
2013-09-23 15:02:31 +01:00
Lionel Landwerlin
7b25c8f5ca attribute: add missing transfer annotations
Reviewed-by: Robert Bragg <robert@linux.intel.com>
2013-09-23 15:02:31 +01:00
Lionel Landwerlin
db513174f0 primitive: add missing description
Reviewed-by: Robert Bragg <robert@linux.intel.com>
2013-09-23 15:02:31 +01:00
Lionel Landwerlin
34838553c0 primitive: add scope annotation
Reviewed-by: Robert Bragg <robert@linux.intel.com>
2013-09-23 15:02:31 +01:00
Lionel Landwerlin
dc5b440f07 primitive: add missing transfer annotations
Reviewed-by: Robert Bragg <robert@linux.intel.com>
2013-09-23 15:02:31 +01:00
Lionel Landwerlin
5516235921 display: add missing transfer annotation
Reviewed-by: Robert Bragg <robert@linux.intel.com>
2013-09-23 15:02:31 +01:00
Lionel Landwerlin
2008493a46 renderer: add missing scope annotation
Reviewed-by: Robert Bragg <robert@linux.intel.com>
2013-09-23 15:02:31 +01:00
Lionel Landwerlin
c042051c01 renderer: add missing transfer annotation
Reviewed-by: Robert Bragg <robert@linux.intel.com>
2013-09-23 15:02:31 +01:00
Lionel Landwerlin
3ad8307ab3 context: add scope annotation
Reviewed-by: Robert Bragg <robert@linux.intel.com>
2013-09-23 15:02:31 +01:00
Lionel Landwerlin
d25b5f0314 context: improve constructor annotation
Reviewed-by: Robert Bragg <robert@linux.intel.com>
2013-09-23 15:02:31 +01:00
Lionel Landwerlin
9d2fc82077 onscreen: add scope annotations
Reviewed-by: Robert Bragg <robert@linux.intel.com>
2013-09-23 15:02:31 +01:00
Lionel Landwerlin
6ed5a43b82 onscreen: add constructor annotation
Reviewed-by: Robert Bragg <robert@linux.intel.com>
2013-09-23 15:02:31 +01:00
Lionel Landwerlin
777be3895d onscreen: add missing transfer annotation
Reviewed-by: Robert Bragg <robert@linux.intel.com>
2013-09-23 15:02:31 +01:00
Lionel Landwerlin
6e3e14bb50 framebuffer: add missing transfer annotation
Reviewed-by: Robert Bragg <robert@linux.intel.com>
2013-09-23 15:02:31 +01:00
Lionel Landwerlin
95b0c4c558 bitmap: add missing annotations
Reviewed-by: Robert Bragg <robert@linux.intel.com>
2013-09-23 15:02:31 +01:00
Lionel Landwerlin
7cc83d58a2 sub-texture: add missing transfer annotaion
Reviewed-by: Robert Bragg <robert@linux.intel.com>
2013-09-23 15:02:30 +01:00
Lionel Landwerlin
7fa9b0dfdd atlas-texture: add missing transfer annontations
Reviewed-by: Robert Bragg <robert@linux.intel.com>
2013-09-23 15:02:30 +01:00
Lionel Landwerlin
1cb2747ea0 texture-rectangle: add missing transfer annotations
Reviewed-by: Robert Bragg <robert@linux.intel.com>
2013-09-23 15:02:30 +01:00
Lionel Landwerlin
dfa0bdc9ed texture-3d: add missing transfer annotations
Reviewed-by: Robert Bragg <robert@linux.intel.com>
2013-09-23 15:02:30 +01:00
Lionel Landwerlin
c1f6ec77b5 texture-2d-sliced: add missing transfer annotations
Reviewed-by: Robert Bragg <robert@linux.intel.com>
2013-09-23 15:02:30 +01:00
Lionel Landwerlin
c56e87043d texture-2d: add missing annotations
Reviewed-by: Robert Bragg <robert@linux.intel.com>
2013-09-23 15:02:30 +01:00
Lionel Landwerlin
6b7c543663 pipeline: add scope annotation
Reviewed-by: Robert Bragg <robert@linux.intel.com>
2013-09-23 15:02:30 +01:00
Lionel Landwerlin
44f17fbd8d pipeline: add missing transfer annotations
Reviewed-by: Robert Bragg <robert@linux.intel.com>
2013-09-23 15:02:30 +01:00
Lionel Landwerlin
b53de33521 object: use GLib's DestroyNotify if compiled with GLib
Reviewed-by: Robert Bragg <robert@linux.intel.com>
2013-09-23 15:02:30 +01:00
Lionel Landwerlin
a34f4f46b6 object: add missing annotation
Reviewed-by: Robert Bragg <robert@linux.intel.com>
2013-09-23 15:02:30 +01:00
Giovanni Campagna
b635b68756 egl: don't bind the wayland display if the extension is not available
When running in a purely swrast environment (such as with
LIBGL_ALWAYS_SOFTWARE), the extension is not exposed by mesa,
but wayland is still possible with wl_shm.

https://bugzilla.gnome.org/show_bug.cgi?id=704750

Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit 8d4e4b0e8062708cece4d4c929abccc492ee21cc)
2013-09-16 18:57:23 +01:00
Lionel Landwerlin
f3c930ceb7 glib-source: fix argument description
Reviewed-by: Robert Bragg <robert@linux.intel.com>
2013-09-06 18:42:10 +01:00
Lionel Landwerlin
31246d418f attribute: fix argument description
Reviewed-by: Robert Bragg <robert@linux.intel.com>
2013-09-06 18:42:10 +01:00
Lionel Landwerlin
4e11b784f0 atlas-texture: fix argument description
Reviewed-by: Robert Bragg <robert@linux.intel.com>
2013-09-06 18:42:10 +01:00