1
0
Fork 0
Commit graph

8 commits

Author SHA1 Message Date
Jasper St. Pierre
da27735265 cursor: Refactor code to load cursor images out
We're going to make MetaCursorReference specialized and per-backend soon.
2014-03-31 19:14:55 -04:00
Jasper St. Pierre
78dbf8cb56 cursor: Split out the structure for the actual textures / buffers out
This will allow us to have a MetaCursorReference 'subclass' that's
lazily loaded. We currently always load all the images.

The long-term plan is to have a subclass for each "backend" and only
have CoglTexture as a common denominator. For the nested X11 backend,
we use XDefineCursor on our stage window. For the Wayland backend, we
would use set_cursor on our stage surface. For the native backend, we
would use the GBM code that's there right now.

The CoglTexture is there to be a "shared fallback" between all devices,
and also for the get_sprite API.

The odd man out is the X11 compositor case. For that, we need to move
the responsibility of setting the final cursor image out of
MetaCursorTracker, and simply have it be about tracking the used sprite
image and pointer position.
2014-03-31 19:09:08 -04:00
Jasper St. Pierre
f4e299ca46 cursor: Split out code that frees the MetaCursorReference 2014-03-31 18:27:20 -04:00
Jasper St. Pierre
0efb0b47eb cursor: Move cursor caching layer to meta_cursor_reference_from_theme 2014-03-31 18:27:18 -04:00
Jasper St. Pierre
0f810a4e21 cursor: Refactor out code that loads from XcursorImage 2014-03-31 18:27:18 -04:00
Jasper St. Pierre
383d4c7e4e cursor: Introduce accessors for the texture / GBM bo
We want to make this private, and have MetaCursorReference be
backend-defined, with the texture possibly loaded on demand.

We can't make the definition of MetaCursorReference truly private yet
because of the XFixes cursor. A victim of MetaCursorTracker trying to
do too many things at once...
2014-03-31 18:27:18 -04:00
Jasper St. Pierre
21425b5833 cursor-tracker: Split the code that loads MetaCursorReferences out
The plan here is to move the usage of these interfaces to the consumer,
and then slam the code into backends.
2014-03-31 18:27:18 -04:00
Jasper St. Pierre
5f52f55916 cursor-tracker: Start moving some code to a new file
I want the MetaCursorTracker to mostly be about retrieving cursor
information. Start moving the code that loads cursor images to a
new file, MetaCursor. Eventually, MetaCursorTracker's APIs will
all take MetaCursorReferences, and we can have a clean backend
split here.
2014-03-31 18:27:17 -04:00