Commit Graph

15 Commits

Author SHA1 Message Date
Emmanuele Bassi
2abf56fe92 Merge remote-tracking branch 'nobled/wayland-fixes2'
* nobled/wayland-fixes2:
  wayland: fix shm buffers
  wayland: set renderable type on dummy surface
  wayland: check for egl extensions explicitly
  wayland: fall back to shm buffers if drm fails
  wayland: add shm buffer code
  wayland: make buffer handling generic
  wayland: really fix buffer format selection
  wayland: fix pixel format
  wayland: clean up buffer creation code
  wayland: don't require the surfaceless extensions
  wayland: check for API-specific surfaceless extension
  wayland: fix GLES context creation
  wayland: use EGL_NO_SURFACE
  wayland: update to new api
  wayland: fix connecting to default socket
  fix ClutterContainer docs
2011-02-11 16:45:45 +00:00
nobled
734a236a97 wayland: fix shm buffers
We need to *write* to the shared memory, not read from it.
cogl_texture_from_data() is read-only, it doesn't keep
the data in sync with the texture.

Instead, we have to call cogl_texture_get_data() ourselves
to sync manually.
2011-02-08 16:17:29 +00:00
nobled
e855bc45a2 wayland: fall back to shm buffers if drm fails 2011-02-01 02:58:15 +00:00
nobled
d84f31ef3a wayland: add shm buffer code
It's not enabled to do anything yet.
2011-02-01 02:58:11 +00:00
nobled
d4ccef786b wayland: make buffer handling generic
Separate the code specific to DRM buffers into
its own functions/subclass to prepare for adding SHM buffers.
2011-01-31 03:16:29 +00:00
nobled
15cd4705db wayland: really fix buffer format selection
Wayland visuals refer to a pixel's bytes in order from
most significant to least significant, while the
one-byte-per-component Cogl formats refer to the order
of increasing memory addresses, so converting between
the two depends on the system's endianness.
2011-01-31 02:45:01 +00:00
nobled
2ff5cf5aa0 wayland: fix pixel format
This matches to the Wayland premultiplied_argb_visual
the rest of the code is using.

The format needs to differ based on endianness, though...
2011-01-31 02:44:23 +00:00
nobled
f6a6a44fe7 wayland: clean up buffer creation code
The height was being set from the ClutterGeometry in some parts
and from the stage in others. And since both callers of this
function pass &stage_wayland->allocation as the geometry anyway,
the stage argument isn't really even needed.
2011-01-31 02:14:17 +00:00
nobled
0886452dc2 wayland: update to new api
Adapt to changes from this Wayland commit:
"Update surface.attach and change surface.map to surface.map_toplevel"
(82da52b15b49da3f3c7b4bd85d334ddfaa375ebc)
2011-01-28 17:29:48 +00:00
Robert Bragg
142b229c5c cogl: Adds _cogl_swap_buffers_notify for clutter backends
This adds a stop-gap mechanism for Cogl to know when the window system
is requested to present the current backbuffer to the frontbuffer by
adding a _cogl_swap_buffers_notify function that backends are now
expected to call right after issuing the equivalent request to OpenGL
vie the platforms OpenGL binding layer. This (blindly) updates all the
backends to call this new function.

For now Cogl doesn't do anything with the notification but the intention
is to use it as part of a planned read-pixel optimization which will
need to reset some state at the start of each new frame.
2011-01-21 16:18:10 +00:00
Emmanuele Bassi
24133ddadc Rename the EGLDisplay accessors
The accessor for the EGL display should be namespaced for the correct
backend-specific API.
2010-12-09 15:34:22 +00:00
Emmanuele Bassi
46c597a1f6 Clean up clutter-private.h/6
Move all Actor private API to a separate file.
2010-10-21 12:22:17 +01:00
Emmanuele Bassi
8613013ab0 Clean up clutter-private.h/3
Move Stage private API to a separate header.
2010-10-21 11:33:26 +01:00
Kristian Høgsberg
134ce072e7 The amazing lazy-copy-back-repaint-page-flip
Always use pageflipping, but avoid full repaint by copying back dirty
regions from front to back.  Additionally, we dealy copying back until
we're ready to paint the new frame, so we can avoid copying areas that
will be repainted anyway.

This is the least amount of copying per frame we can get away with at all
and at the same time we don't have to worry about stalling the GPU on
synchronized blits since we always pageflip.
2010-10-14 16:23:05 +01:00
Kristian Høgsberg
cb5582c4ab Add wayland backend
This adds a clutter backend for running under the wayland window system.
Initial cogl framebuffer integration by Robert Bragg.
2010-10-14 16:23:05 +01:00