core: Added attach_surface() to the renderer interface.
authorTaekyun Kim <tkq.kim@samsung.com>
Wed, 20 May 2015 04:26:58 +0000 (13:26 +0900)
committerTaekyun Kim <tkq.kim@samsung.com>
Fri, 19 Jun 2015 09:06:41 +0000 (18:06 +0900)
commitd3949fff192a28d82f0c25c1f1866bcb4898e6fc
tree59988be3118cb812fced0d147b641783f92938f4
parent833ad0dcc19c3bc09261c8d29d8916069215ab8f
core: Added attach_surface() to the renderer interface.

In order to draw a view, the surface of the view should be attached to the
renderer first. For pixman renderer, we need a pixman_image_t for the given
surface's current buffer. For gl renderer, we need a texture.

Size of a buffer is unknown until it is attached to a renderer for some types
of buffers, for example, size of an EGL buffer can be queried via
eglQueryWaylandBufferWL() so the core should attach the buffer to a renderer
in order to get its size.

Normaly, only shm buffers can be attached to pixman renderers. But there're
platforms that can map DMABUFs into CPU address so that pixman renderer can
serve those types of buffers.

Change-Id: I4c07b48d1879a3c2d2d4c26db67b41019071458b
src/buffer.c
src/pepper.h
src/pixman-renderer.c