Commit Graph

3131 Commits

Author SHA1 Message Date
Robert Bragg
0bf128198d configure: improve the error message if gbm missing
This improves the error message in the case where libgbm is missing when
the KMS egl platform has been enabled.

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

Reviewed-by: Neil Roberts <neil@linux.intel.com>
2013-11-27 20:38:00 +00:00
Robert Bragg
6436cd073d Declare interface types as void and remove cast macros
This declares the interface types CoglFramebuffer, CoglBuffer,
CoglTexture, CoglMetaTexture and CoglPrimitiveTexture as void when
including the public cogl.h header so that users don't have to use lots
of C type casts between instance types and interface types.

This also removes all of the COGL_XYZ() type cast macros since they do
nothing more than compile time type casting but it's less readable if
you haven't seen that coding pattern before.

Unlike with gobject based apis that use per-type macros for casting and
performing runtime type checking we instead prefer to do our runtime
type checking internally within the front-end public apis when objects
are passed into Cogl. This greatly reduces the verbosity for users of
the api and may help reduce the chance of excessive runtime type
checking that can sometimes be a problem.

(cherry picked from commit 248a76f5eac7e5ae4fb45208577f9a55360812a7)

Since we can't break the 1.x api this version of the patch actually
defines compatible NOP macros within deprecated/cogl-type-casts.h
2013-11-27 19:33:44 +00:00
Neil Roberts
d24f632d91 Revert "framebuffer: Don't mark the clip dirty at mid scene"
This patch doesn't look right because now nothing will ever set
clear_clip_dirty = TRUE. Presumably that would mean that if a
rectangle is drawn and then the journal is flushed before the
framebuffer is read, then it would think it could return the clear
color even though it shouldn't.

Perhaps a better approach would be to make a second version of
_cogl_framebuffer_mark_mid_scene that doesn't set the clear_clip_dirty
flag and call that from the journal instead. As this patch was pushed
without review and without first going into the master branch I think
it makes sense to just revert it and apply a new version to master.

This reverts commit 3eb63f67a3.
2013-11-21 12:12:21 +00:00
Jasper St. Pierre
08ee344fa5 Revert "framebuffer: Fix clip tracking in the unclipped case"
This broke gnome-shell's StScrollViewFade.

This reverts commit 5c5715f4da.
2013-11-19 18:09:55 -05:00
Jasper St. Pierre
af480a2b8b cogl-texture-2d: Add update_area equivalent for Wayland 2013-11-18 00:43:51 -05:00
Jasper St. Pierre
5c5715f4da framebuffer: Fix clip tracking in the unclipped case
Leaving the clip bounds untouched means that it will retain the stale value
of whatever it was when we last had a clip; reset it so that it contains the
full framebuffer contents instead.

https://bugzilla.gnome.org/show_bug.cgi?id=712562
2013-11-18 00:43:51 -05:00
Jasper St. Pierre
3eb63f67a3 framebuffer: Don't mark the clip dirty at mid scene
https://bugzilla.gnome.org/show_bug.cgi?id=712562
2013-11-18 00:43:50 -05:00
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
99a0be890e conform: check we invalidate ancestor cached state
In the cases where we cache vertex state with an ancestor pipeline (whose
vertex processing state is equivalent) we need to invalidate that state
if that ancestor is later modified.

This conformance test checks this case but currently fails because we
only notify the progend directly associated with the pipeline being
changed.

In this case the pipeline can be using a different progend to the
ancestor which it is caching state with so when the ancestor is changed
it needs to notify all the progends that they may need to clear their
private state.

Reviewed-by: Neil Roberts <neil@linux.intel.com>
(cherry picked from commit e112af5f770d6c46688fdcb5ba38b75ca0778891)
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
6328a42f35 Bump version to 1.17.1 2013-09-23 18:38:23 +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
Neil Roberts
922241a2ac Build a .xz file on release instead of a .bzip2 file
Previously when we released a .bzip2 file the Gnome release scripts
will just convert this to a .xz file and generate its own checksum.
The .bzip2 is never actually available on the FTP server. This isn't
ideal because we were listing the checksum of the .bzip2 file in the
release message but that is useless information. This patch changes it
to generate a .xz file instead which is also what Clutter does.

Reviewed-by: Robert Bragg <robert@linux.intel.com>
(cherry picked from commit cd20c869f303a3526335e77b1913c0555e226a3f)
2013-09-23 18:22:32 +01:00
Robert Bragg
fd29893b2c Post-release version bump to 1.16.1 2013-09-23 16:27:09 +01:00
Robert Bragg
05299fc2ea Release 1.16.0 (release) 2013-09-23 15:27:41 +01:00
Robert Bragg
522069a55a Updates NEWS for the 1.16.0 release 2013-09-23 15:24:19 +01:00
Lionel Landwerlin
447488dd5b cogl-gst: add missing annotations
Reviewed-by: Robert Bragg <robert@linux.intel.com>
2013-09-23 15:02:32 +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