summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Expose EGL context/display and GLX contextwip/rib/cogl-1.18Robert Bragg2014-03-208-29/+148
| | | | | | | | | | | | | | | | | | | | To help facilitate integration with third party frameworks this exposes the EGL context and display to applications as well as the GLX context. (Note that the GLX display is already available via cogl_xlib_renderer_get_display()) This adds a new top-level <cogl/cogl-glx.h> header that needs to be included explicitly to access the glx specific api. Anyone using these apis will be responsible for checking that Cogl is indeed using EGL or GLX by calling cogl_renderer_get_winsys_id() This will enable GStreamer, for example, to be able to create a GL context that shares resources with Cogl's context. https://bugzilla.gnome.org/show_bug.cgi?id=724992 Reviewed-by: Neil Roberts <neil@linux.intel.com>
* move GLeglImageOES define into cogl-egl-private.hRobert Bragg2014-03-204-10/+85
| | | | | | | | | | This splits out the GLeglImageOES define in cogl-egl.h into a private cogl-egl-private.h header and updates the guards in cogl-egl.h to be consistent with other top-level headers where we need to be careful about how __COGL_H_INSIDE__ is defined and undefined, esp when the gobject introspection scanner is running. Reviewed-by: Neil Roberts <neil@linux.intel.com>
* egl: remove NativeWindowType/NativeDisplayType definesRobert Bragg2014-03-208-16/+9
| | | | | | | | | | This ensures we use EGLNativeWindowType and EGLNativeDisplayType everywhere instead. The previous names come from EGL 1.2 but it seems reasonable to require more recent EGL versions. If someone wanted to add compatibility for EGL 1.2 later it would be straightforward to define the new names to the old. Reviewed-by: Neil Roberts <neil@linux.intel.com>
* sdl2: fix GL driver selectionRobert Bragg2014-03-201-4/+16
| | | | | | | | | SDL2 supports selecting between full OpenGL or OpenGL ES 1/2 but our selection code was written before SDL 2.0 was officially released and since then a new SDL_GL_CONTEXT_PROFILE_MASK attribute was added and we have to explicitly set the SDL_GL_CONTEXT_MINOR_VERSION attribute. Reviewed-by: Neil Roberts <neil@linux.intel.com>
* cogl-gst: add cogl_gst_video_sink_get_natural_size() apiRobert Bragg2014-03-202-0/+119
| | | | | | | | | This adds api for querying a "natural" width and height for a video which has the correct aspect ratio for displaying on square, 1:1 pixels. The natural size is the minimum size where downscaling is not required. Reviewed-by: Neil Roberts <neil@linux.intel.com>
* basic-video-player: don't try and sample mipmapRobert Bragg2014-03-201-16/+0
| | | | | | | | | | | | Since we don't generate a mipmap chain for uploaded video frames this avoids setting the min filter to COGL_PIPELINE_FILTER_LINEAR_MIPMAP_LINEAR. Since COGL_PIPELINE_FILTER_LINEAR is the default and since it is also dubious that cogl-basic-video-player is directly manipulating layers that are conceptually internal to cogl-gst this removes the loop that updates the filtering for cogl-gst layers. Reviewed-by: Neil Roberts <neil@linux.intel.com>
* cogl-gst: allocate textures synchronouslyRobert Bragg2014-03-201-3/+10
| | | | | | | | | | | | | | | This makes sure video textures being uploaded via video_texture_new_from_data are allocated before the function returns. This function create a CoglBitmap to wrap the data from gstreamer and by allowing cogl to allocate the texture lazily it's possible that the data being pointed to by the bitmap won't remain valid until we actually come to allocate the texture. Note: we don't simply use cogl_texture_2d_[sliced_]new_from_data() here because we need to be able to call cogl_texture_set_premultiplied() before allocating the texture. Reviewed-by: Neil Roberts <neil@linux.intel.com>
* Expose COGL_FEATURE_ID_BUFFER_AGE feature idRobert Bragg2014-03-204-3/+18
| | | | | | | | | This adds a new COGL_FEATURE_ID_BUFFER_AGE feature id that can be used to determine if cogl_onscreen_get_buffer_age() will ever return an age other than 0. This should be used instead of querying the winsys feature via cogl_clutter_winsys_has_feature(). Reviewed-by: Neil Roberts <neil@linux.intel.com>
* glx-feature-functions: update misleading commentRobert Bragg2014-03-201-1/+1
| | | | Reviewed-by: Neil Roberts <neil@linux.intel.com>
* egl: fix incorrect #ifdef guarding of featuresRobert Bragg2014-03-201-2/+1
| | | | | | | | | | We have an #ifdef EGL_WL_bind_wayland_display guard in cogl-winsys-egl-feature-functions.h to avoid referencing wayland types when the EGL header doesn't know about them, but somehow this guard also ended up around the KHR_create_context and EXT_buffer age features too even though they aren't wayland specific. Reviewed-by: Neil Roberts <neil@linux.intel.com>
* Set COGL_WINSYS_FEATURE_BUFFER_AGE on EGLNeil Roberts2014-03-141-0/+5
| | | | | | | | | | | | | | This winsys feature flag is exposed via the deprecated cogl_clutter_winsys_has_feature function and Clutter is curently relying on it. Previously the EGL winsys was only setting the internal COGL_EGL_WINSYS_FEATURE_BUFFER_AGE flag and there was no mapping to the public flag. Therefore the feature would only be used on GLX. This patch just adds the mapping. Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit 8418e98b2b1b25515a961ad1bb9f0c4770d6eb1d) Reviewed-by: Neil Roberts <neil@linux.intel.com>
* cogl-winsys-egl-kms: Make sure to close our connection to DRM at shutdownJasper St. Pierre2014-03-121-0/+3
| | | | | Reviewed-by: Neil Roberts <neil@linux.intel.com> (cherry picked from commit dcdba60e95ae7be1b0253d28686d1562c35374ba)
* cogl-winsys-egl-kms: Add cogl_kms_renderer_set_kms_fdJasper St. Pierre2014-03-124-8/+56
| | | | | | | | Reviewed-by: Neil Roberts <neil@linux.intel.com> (cherry picked from commit 7bc7ea4cb5e8134a3aeed9615477f4152b558509) Conflicts: cogl/winsys/cogl-winsys-egl-kms.c
* cogl-winsys-egl-wayland: Report an error if we can't find the globals we needJasper St. Pierre2014-03-121-6/+10
| | | | | | | | | | | | | Instead of spinning forever, do a roundtrip, which guarantees that the global messages have been sent by the time we read the sync message. If the proper globals aren't initialized yet, error out immediately. This does mean that users can't use CoglOnscreen with foreign custom surface types without xdg_shell, but when a use case comes for this, we'll investigate then... Reviewed-by: Neil Roberts <neil@linux.intel.com> (cherry picked from commit af9057d35f331e2c9509958fb40627917c477b80)
* build/win32/vs9/Makefile.am: Remove Non-Existing EntryChun-wei Fan2014-03-121-1/+0
| | | | | A project file was removed, which was not updated in Makefile.am, so make up for that.
* Updated Chinese (China) translationWylmer Wang2014-03-081-117/+116
|
* Visual Studio 2010 Projects: Add a PlatformToolset TagChun-wei Fan2014-03-0610-0/+48
| | | | | | | This adds a PlatformToolset tag in order to make upgrading the projects to Visual Studio 2012/2013 formats easier, especially when done with a script. The script, for example, can change the value inside these tags apporpriately to do the upgrade job quite easily.
* Visual Studio 2010 Builds: Fix Header InstallationChun-wei Fan2014-03-041-13/+22
| | | | Some headers were deprecated and therefore moved, so update for that.
* Visual C++ 2008 Builds: Fix Installation of BinariesChun-wei Fan2014-03-041-8/+28
| | | | | The *.dll, *.exe and *.lib files weren't being copied in the *_SDL configs as the project looked for them in the wrong place. Correct that problem.
* Update the Visual Studio 2010 ProjectsChun-wei Fan2014-03-0328-2539/+2439
| | | | | | | | | | | | | | | | | | This updates the Visual Studio 2010 Projects in the following ways, similar to the recent changes to the Visual Studio 2008 projects: -Make all the copying of the pre-configured header files custom build rules, so that it is cleaner when people clean their builds, and the files can be re-copied when updated. -Split up the property sheets, so to ease future maintenance -Make the cogl-path library built as a DLL -Build and link against SDL-2.x for SDL builds -Make everything except the .sln file and the README.txt file use UNIX line endings, for easier maintenance. -Merge cogl_sdl.sln and install-sdl.vcxproj into cogl.sln and install.vcxproj respectively. -Update build of the conformance test to not use COGL_COMPILATION, and make it link to cogl-path.
* build/win32/vs9/cogl.sln: UpdateChun-wei Fan2014-03-031-0/+1
| | | | | Make the install project depend on cogl-path, so that we are certain that the cogl-path DLL gets "installed".
* MSVC 2008 Builds: Split Up the Property SheetsChun-wei Fan2014-03-0318-1209/+1051
| | | | | | | | | | Split up the property sheets, so that it is easier to maintain, and update the project files accordingly. Also clean up the project files by finishing up the merge of the *_sdl.vcproj items into their regular counterparts, and dropping all the *_sdl.* files. Make use of UNIX line endings for all the MSVC 2008 build files, except the .sln file and the README.txt files, for easier maintenance.
* MSVC 2008 Builds: Link Conformance Test to cogl-pathChun-wei Fan2014-03-031-0/+1
| | | | | | We need to link the conformance test executable to cogl-path, so make that project depend on the cogl-path project, so that it will link to it as well.
* MSVC 2008 Builds: Build the SDL-2.x exampleChun-wei Fan2014-03-033-9/+9
| | | | | ...instead of the SDL-1.x example. The SDL-1.x example is not going to run well against Cogl built against SDL-2.x.
* build/win32/vs9/cogl.vsprops: Update Header InstallationChun-wei Fan2014-02-271-7/+13
| | | | | Update the headers "installation" as some headers have been made deprecated.
* MSVC 2008 Projects: Build cogl-path as a DLLChun-wei Fan2014-02-273-324/+139
| | | | | So that it will be like what is done in the autotools builds now. Also clean up the cogl-path and cogl-pango projects.
* Fix Conformance Test MSVC 2008 ProjectChun-wei Fan2014-02-272-8/+4
| | | | Don't define COGL_COMPILATION when we build the conformance tests.
* build/win32/vs9/cogl.vcprojin: Use SDL 2.x for SDL SupportChun-wei Fan2014-02-271-5/+5
| | | | | As SDL-2.x has been officially released for a while, update the Visual Studio 2008 projects to build and link against the SDL-2.x libraries.
* Update Visual Studio 2008 Solution FileChun-wei Fan2014-02-271-11/+93
| | | | | Combine the parts to build Cogl with SDL support into a single solution file, so to ease future maintenance.
* MSVC 2008 Projects: Use Custom Build RulesChun-wei Fan2014-02-272-59/+202
| | | | | | | | | | | | ...for all of the copying of the pre-configured headers for Cogl. This makes it much easier for people using the projects for building Cogl to clean up files that are "generated", and this commit is the last bit for it. Also clean up the property sheets as a result. Also fix the Cogl project that it does indeed look for headers in cogl/deprecated, so that the build is fixed. Similar updates to the Visual Studio 2010 Projects will follow.
* This re-licenses Cogl 1.18 under the MIT licenseRobert Bragg2014-02-22361-4886/+7207
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since the Cogl 1.18 branch is actively maintained in parallel with the master branch; this is a counter part to commit 1b83ef938fc16b which re-licensed the master branch to use the MIT license. This re-licensing is a follow up to the proposal that was sent to the Cogl mailing list: http://lists.freedesktop.org/archives/cogl/2013-December/001465.html Note: there was a copyright assignment policy in place for Clutter (and therefore Cogl which was part of Clutter at the time) until the 11th of June 2010 and so we only checked the details after that point (commit 0bbf50f905) For each file, authors were identified via this Git command: $ git blame -p -C -C -C20 -M -M10 0bbf50f905..HEAD We received blanket approvals for re-licensing all Red Hat and Collabora contributions which reduced how many people needed to be contacted individually: - http://lists.freedesktop.org/archives/cogl/2013-December/001470.html - http://lists.freedesktop.org/archives/cogl/2014-January/001536.html Individual approval requests were sent to all the other identified authors who all confirmed the re-license on the Cogl mailinglist: http://lists.freedesktop.org/archives/cogl/2014-January As well as updating the copyright header in all sources files, the COPYING file has been updated to reflect the license change and also document the other licenses used in Cogl such as the SGI Free Software License B, version 2.0 and the 3-clause BSD license. This patch was not simply cherry-picked from master; but the same methodology was used to check the source files.
* Post-release version bump to 1.17.5Robert Bragg2014-02-201-2/+2
|
* Release 1.17.4 (snapshot)1.17.4Robert Bragg2014-02-201-3/+6
|
* Updates NEWS for the 1.17.4 releaseRobert Bragg2014-02-201-0/+30
|
* kms: include stddef.h before drm.hAndreas Oberritter2014-02-201-0/+1
| | | | | | | | | | | | | Not doing so leads to the following error, if stddef.h is not included indirectly through EGL headers: | libdrm/drm.h:132:2: error: unknown type name 'size_t' | size_t name_len; /**< Length of name buffer */ Signed-off-by: Andreas Oberritter <obi@saftware.de> Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit 55c82476a93366a3e7d1a2537fccc3a7aab87c66)
* fix experimental pc files dep on cogl-1.0Lionel Landwerlin2014-02-204-7/+7
| | | | Reviewed-by: Robert Bragg <robert@linux.intel.com>
* Allocate immediately in _cogl_egl_texture_2d_new_from_imageNeil Roberts2014-02-201-1/+10
| | | | | | | | | | | | | | | | | | | | The _cogl_egl_texture_2d_new_from_image function has a CoglError argument which implies that it is unlike the other texture constructors and returns errors immediately rather than having a delayed-allocation mechanism. cogl_wayland_texture_2d_new_from_buffer which calls it is also like this. We can't rely on delayed-allocation semantics for this without changing the applications because the texture needs to be allocated before the corresponding EGLImage is destroyed. This patch just makes it immediately allocate. A better patch might be to remove the error argument to make it obvious that there are delayed-allocation semantics and then fix all of the applications. This was breaking Cogland and Mutter. Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit 0206c03d54823b2f6cbb2aa420d07a4db9bcd8a3)
* Don't dereference an unitialised pointer in _cogl_container_ofNeil Roberts2014-02-206-32/+46
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The previous implementation was dereferencing the sample pointer in order to get the offset to subtract from the member pointer. The resulting value is then only used to get a pointer to the member in order to calculate the offset so it doesn't actually read from the memory location and shouldn't cause any problems. However this is probably technically invalid and could have undefined behaviour. It looks like clang takes advantage of this undefined behaviour and doesn't actually offset the pointer. It also generates a warning when it does this. This patch splits the _cogl_container_of macro into two implementations. Previously the macro was always used in the list iterator macros like this: SomeType *sample = _cogl_container_of(list_node, sample, link) Instead of doing that there is now a new macro called _cogl_list_set_iterator which explicitly assigns to the sample pointer with an initial value before assigning to it again with the real offset. This redundant initialisation gets optimised out by compiler. The second macro is still called _cogl_container_of but instead of taking a sample pointer it just directly takes the type name. That way it can use the standard offsetof macro. https://bugzilla.gnome.org/show_bug.cgi?id=723530 Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit 1efed1e0a2bce706eb4901979ed4e717bb13e4e2)
* Added uk translationDaniel Korostil2014-02-141-99/+121
|
* Updated Norwegian bokmål translationKjartan Maraas2014-02-121-5/+35
|
* GLX winsys: fix feature handling for INTEL_swap_eventOwen W. Taylor2014-02-052-1/+2
| | | | | | | | | | | The declaration of INTEL_swap_event was treating winsys features as if they were a bitfield, but they aren't. The end result was that instead of reporting two features when INTEL_swap_event is present, we report none. https://bugzilla.gnome.org/show_bug.cgi?id=719741 Reviewed-by: Robert Bragg <robert@linux.intel.com>
* cogl-basic-video-player: Allow passing a GStreamer pipelineNeil Roberts2014-01-311-12/+122
| | | | | | | | | | | | | | | If the URI argument given on the command line doesn't look like a URI then the basic video player will now try to parse it as a GStreamer pipeline description. The pipeline must contain a coglsink element which the player will look for. This can be used to test Cogl GST. For example, to test NV12 this can be used: ./cogl-basic-video-player 'videotestsrc ! video/x-raw,format=(string)NV12 ! coglsink' Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit 49e47c8329d50774e365fc7c3a7504b5fc005dc7)
* cogl-gst: Fix get_caps implementation when no context is setNeil Roberts2014-01-311-1/+5
| | | | | | | | | | | | | | | If no context is set on the CoglGstVideoSink then it would previously call gst_caps_ref with a NULL pointer. This patch makes it just return NULL instead. I think that is a valid thing to do because that is what gst_base_sink_default_get_caps does. If we don't do this then it's not possible to use CoglGstVideoSink with GstParse because that tries to link the pipeline after parsing the string. That was previously causing a critical error because the freshly parsed sink doesn't have a CoglContext. Reviewed-by: Robert Bragg <robert@linux.intel.com> Reviewed-by: Lionel Landwerlin <llandwerlin@gmail.com> (cherry picked from commit cf26da2964e372c9fe5bd6da060a57006a83af38)
* cogl-gst: video-sink: add NV12 supportNeil Roberts2014-01-311-6/+111
| | | | | | | | | | | | | | | | | | | This adds a cogl-gst renderer to decode NV12 data. NV12 is split into two buffers, one for the luma component and another for the two chrominance components at a quarter of the resolution. The second buffer is uploaded to a two-component RG texture. RG-component textures are only supported if COGL_FEATURE_ID_TEXTURE_RG is advertised by Cogl so the NV12 cap is also only advertised when that is available. Based on a patch by Lionel Landwerlin which was in turn based on a patch from Edward Hervey and Matthieu Bouron for Clutter-Gst: https://bugzilla.gnome.org/show_bug.cgi?id=712832 Reviewed-by: Robert Bragg <robert@linux.intel.com> Reviewed-by: Lionel Landwerlin <llandwerlin@gmail.com> (cherry picked from commit 2c619216964b46aab313be3ef1c405dfc720d258)
* cogl-gst-video-sink: Premultiply the colors coming from the videoNeil Roberts2014-01-312-38/+125
| | | | | | | | | | | | | | | | | | | | | | | | | Commit 99a53c82e9ab0a1e5 removed the internal format argument when uploading a video frame to a texture so that the format will just be determined automatically from the image format. However this also leaves the premultiplied state at the default and the default is TRUE. That means that when we upload RGBA data Cogl will do a premultiplied conversion on the CPU. We probably don't want to be putting a CPU conversion in the way of video frames so this patch changes it to set the premultiplied state to FALSE on the textures and then do the premultiplied conversion in the shader. This is particularly important for AYUV which uses the alpha channel for the V component so doing a premultiplied conversion on the CPU just creates garbage and messes up the image. The RGB and RGBA renderers have each been split into two; one that uses GLSL and one that uses a regular pipeline. The RGBA pipeline without GLSL is then changed to use 2 layers so we that we can do the premultiplied conversion in the second layer with a special layer combine string. Reviewed-by: Robert Bragg <robert@linux.intel.com> (cherry picked from commit 07a57f26596c72507035369c90ed6d62568330b5)
* cogl-path: Fix the exported symbols regular expressionEmmanuele Bassi2014-01-221-1/+1
| | | | | | | | | | The Cogl 1.x API exports cogl_set_path() and cogl_get_path(), which means that the regular expression needs to catch those two symbols as well. https://bugzilla.gnome.org/show_bug.cgi?id=722765 Reviewed-by: Neil Roberts <neil@linux.intel.com>
* cogl-gst: video-sink: fix not installed rgb shaderLionel Landwerlin2014-01-221-1/+3
| | | | | Reviewed-by: Neil Roberts <neil@linux.intel.com> (cherry picked from commit 07114acc40406e3e0fa79ae6195836d56397fdfa)
* Post-release version bump to 1.17.3Neil Roberts2014-01-201-2/+2
|
* Release 1.17.2 (snapshot)1.17.2Neil Roberts2014-01-201-4/+4
|
* Updates NEWS for the 1.17.2 releaseNeil Roberts2014-01-201-0/+53
|