platform/core/uifw/pepper.git
9 years agopepper: Accumulate output damage and automatically schedule repaint.
Taekyun Kim [Tue, 23 Jun 2015 05:35:58 +0000 (14:35 +0900)]
pepper: Accumulate output damage and automatically schedule repaint.

Damage is maintained per output and is passed to the repaint function.
Damage region is in output local coordinate space so an output backend should
be careful not to translate it to global compositor space.

No damage, we have nothing to repaint. So, we can safely schedule repaint
whenever damage is generated. Essentially, we don't have to expose repaint
scheduling APIs.

Change-Id: Iebff5fec5f93d764a8ea8894b7f84c8ded9c59c3

9 years agosamples:x11: add desktop_shell_init()
Jaehoon Jeong [Fri, 19 Jun 2015 04:14:08 +0000 (13:14 +0900)]
samples:x11: add desktop_shell_init()

Change-Id: I6ef909e34d6ac4f6740c267e315240a6271df8ff

9 years agodesktop-shell: implement shell_surface's ping-pong
Jaehoon Jeong [Fri, 19 Jun 2015 03:51:31 +0000 (12:51 +0900)]
desktop-shell: implement shell_surface's ping-pong

    - TODO: display/undisplay the \'wait cursor\'

Change-Id: I8f725f534784fea48b000fbd26b484e1c31727e9

9 years agodrm: apply dynamic render target setup
Junghoon [Fri, 19 Jun 2015 01:39:32 +0000 (10:39 +0900)]
drm: apply dynamic render target setup

    - create gl & pixman renderers
    - set render target
    - minor bug fixes

Change-Id: I7f02e538b99869e22832b775478b0662f188100c

9 years agofbdev: minor bugfix
Junghoon [Fri, 19 Jun 2015 01:19:05 +0000 (10:19 +0900)]
fbdev: minor bugfix

    - fix size parameter in mmap()

Change-Id: Id970f24e13ff3d455959fe4f4f0e7173263ce4b6

9 years agox11: Fixed incorrect height value on shm put image.
Taekyun Kim [Thu, 18 Jun 2015 08:29:55 +0000 (17:29 +0900)]
x11: Fixed incorrect height value on shm put image.

Typo error.

Change-Id: Iadf379715b927aaa2979b785c92417f6a8066a79

9 years agox11: Don't check success of gl renderer creation as it is optional.
Taekyun Kim [Thu, 18 Jun 2015 08:27:17 +0000 (17:27 +0900)]
x11: Don't check success of gl renderer creation as it is optional.

Fall back to pixman renderer when gl renderer creation fails.

Change-Id: I530ae4f2e1425c13902d2b9c0e57f586513919c0

9 years agodesktop-shell: implement wl_shell::get_shell_surface, wl_shell_surface::set_toplevel
Jaehoon Jeong [Thu, 18 Jun 2015 07:45:50 +0000 (16:45 +0900)]
desktop-shell: implement wl_shell::get_shell_surface, wl_shell_surface::set_toplevel

    - a little implementation

Change-Id: I72ea10abcdc781ba1c3e0141d6203cbb894aea77

9 years agorender: add dummy output_damage parameter
Yuyeon Oh [Wed, 17 Jun 2015 07:01:17 +0000 (16:01 +0900)]
render: add dummy output_damage parameter

Change-Id: If9c18f10a85a4d1200ffe3ed1fa2a8b30fafcde0

9 years agorender: Refactored to support dynamic render target setup.
Taekyun Kim [Wed, 17 Jun 2015 09:30:15 +0000 (18:30 +0900)]
render: Refactored to support dynamic render target setup.

Now, we can switch the render target of a renderer dynamically. With this, we
can create one EGLContext for multiple native windows so that we can save OpenGL
resources and texture download cost.

Additionally, some renderer APIs are added for surface attach and damage flush.

Modules that were using old APIs are modified to use new APIs. Essentially, the
root object (i.e. pepper_drm_t) creates renderers, and each output chooses its
desired renderer and points to the renderer. pepper_render_target_t is created
for an output and it is set as a render target of the renderer when repaint.

Some messy codes are cleaned up while rewriting for the new APIs. But still got
a lot more, especially, codes taken from weston.

Change-Id: I5c9796c44f74efa3aa735396f58c6499a817937b

9 years agodesktop-shell: Add xdg-shell.xml and generate .c/.h from xml
Jaehoon Jeong [Wed, 17 Jun 2015 06:32:26 +0000 (15:32 +0900)]
desktop-shell: Add xdg-shell.xml and generate .c/.h from xml

Change-Id: Ida4655ac98cf0fdbfe82d4a3419f4d0733310064

9 years agofbdev
Junghoon [Tue, 16 Jun 2015 07:29:32 +0000 (16:29 +0900)]
fbdev

    - add renderer parameter to pepper_fbdev_create()

Change-Id: I4c153f95b502d03564f551a6257827aae2209797

9 years agobugfix
Junghoon [Tue, 16 Jun 2015 07:21:59 +0000 (16:21 +0900)]
bugfix

Change-Id: Ic64fd9bfe42867ea896c46a2ada41cbf966514de

9 years agopepper: Introducing generic pepper_object_t.
Taekyun Kim [Tue, 16 Jun 2015 04:37:56 +0000 (13:37 +0900)]
pepper: Introducing generic pepper_object_t.

Pepper objects have several similar functions, so abstracting such functions
into a generic object would be more convenient.

* List of pepper_object_t
    - pepper_compositor_t
    - pepper_output_t
    - pepper_surface_t
    - pepper_buffer_t
    - pepper_view_t
    - pepper_seat_t
    - pepper_pointer_t
    - pepper_keyboard_t
    - pepper_touch_t

Change-Id: I6812a596fe2363a1261ebcd8d9fd715d29f4fda3

9 years agopepper: Commit only newly attached buffer.
Taekyun Kim [Mon, 15 Jun 2015 08:31:07 +0000 (17:31 +0900)]
pepper: Commit only newly attached buffer.

As a client can attach a NULL buffer, it is impossible to know that the buffer
is newly attached or not by doing NULL check.

Change-Id: Ieeecc8530b8afa5c5058ad0cc8354265a782495a

9 years agoRemove useless "return;" statements
Junghoon [Mon, 15 Jun 2015 07:49:57 +0000 (16:49 +0900)]
Remove useless "return;" statements

Change-Id: Ie0492ace4e059b4ef283bbf00ca5c8945267ca17

9 years agofbdev: initial implementation
Junghoon [Fri, 12 Jun 2015 08:12:46 +0000 (17:12 +0900)]
fbdev: initial implementation

    - use libinput & pixman renderer
    - just clear screen once

Change-Id: I1b2470734d220c51a7b816a6d38a0d3bdbc9f996

9 years agopepper: fix variable name
Yuyeon Oh [Fri, 12 Jun 2015 07:38:49 +0000 (16:38 +0900)]
pepper: fix variable name

Change-Id: I0a4841201a9a3a26a43b936c9f0d0e67a77e5e9b

9 years agopepper: Basic matrix APIs
Taekyun Kim [Fri, 12 Jun 2015 04:19:45 +0000 (13:19 +0900)]
pepper: Basic matrix APIs

Matrix initialization, multiplication and some utility functions.

Change-Id: I3e40cc503d6d7109547e05739321ea64d393117b

9 years agopepper: add initial log system
Yuyeon Oh [Thu, 11 Jun 2015 12:36:53 +0000 (21:36 +0900)]
pepper: add initial log system

Default output file is stdout.

log example is below.

"Date: 2015-06-11 KST
"[21:36:35.164] DOCTOR: start doctor server 0
"[21:36:35.164] PEPPER: compositor.c:pepper_compositor_create: Failed to add socket display = 0xe60a20 socket_name = wayland-0
(" is added to avoid git commit ID recognition)

Change-Id: I32cf1d5fed59e5dbcef1f3ba49540df476246de6

9 years agoreview: pepper: surface: add some codes
jh01.j [Thu, 11 Jun 2015 06:17:40 +0000 (15:17 +0900)]
review: pepper: surface: add some codes

    - Add pepper_surface_schedule_repaint() function
    - Add wl_list_remove() for remove surface from compositor->surfaces list in destroy

Change-Id: I5ac6a701028db75c1fcd7c7c046c2329181b22dc

9 years agox11: bug fix
jh01.j [Thu, 11 Jun 2015 05:46:23 +0000 (14:46 +0900)]
x11: bug fix

    - input: bug fix
    - output: add pepper_pixman_renderer_set_target() function

Change-Id: I919db33f5ade8134545c1e0d9792a93b8b52c278

9 years agopepper: input
jh01.j [Thu, 11 Jun 2015 05:35:10 +0000 (14:35 +0900)]
pepper: input

    - Add wl_seat_send_capabilities() in bind_seat()
    - Add tiny pointer_motion and pointer_button event handler

Change-Id: I8d2dfd537535cda6e7b8f29896e65e86fca12f0a

9 years agopepper: View damage processing
Taekyun Kim [Thu, 11 Jun 2015 02:19:30 +0000 (11:19 +0900)]
pepper: View damage processing

Damage processing algorithm.

1. inflict damage for current visible area of a view when geometry or z-order
   change. Mark those views as "need_damage" so that damages for updated
   visible regions are getting inflicted.

2. Build a list of views sorted in z-order.

3. Do following things while traversing the view list from front to back

    a. update view geometry
    b. calculate visible region of the view : visible = bounding - opaque
    c. inflict damage for visible region of the view if marked as "need_damage"
    d. inflict damage for surface damage set by the client
    e. accumulate view's opaque region on the global opaque region

Now we have total damage region in compositor->damage_region.

Change-Id: I06c7098bb7edc954172177ee36442800d2b3ce26

9 years agopepper: Fixed a bug in pepper_map_get().
Taekyun Kim [Wed, 10 Jun 2015 09:43:12 +0000 (18:43 +0900)]
pepper: Fixed a bug in pepper_map_get().

Change-Id: Iecc5dccb455379637b86b365d769dd90b8c7f2ce

9 years agopepper: Merged pepper-utils package into pepper.
Taekyun Kim [Tue, 9 Jun 2015 07:07:29 +0000 (16:07 +0900)]
pepper: Merged pepper-utils package into pepper.

Change-Id: I00c82ea2e0e8745ee83a74647cfa7a35e732ec07

9 years agopepper: APIs for accessing root views of a compositor
Taekyun Kim [Tue, 9 Jun 2015 06:38:51 +0000 (15:38 +0900)]
pepper: APIs for accessing root views of a compositor

These APIs are required for users to be able to traverse the view tree.

Change-Id: Icbd188a37ec5dca28a15a9d90182386163b27762

9 years agox11: fix some logics
jh01.j [Tue, 9 Jun 2015 06:16:01 +0000 (15:16 +0900)]
x11: fix some logics

    - implement destroy functions
    - input: add capabilities
    - output: move wl_event_source_timer_update() function to generate frame_callback in
              gl-rendering case

Change-Id: Ia31e988092bb62f44febfcaf9355e94187d210e3

9 years agodrm: output - handle drm output device add/remove
jh13.son [Mon, 8 Jun 2015 10:34:54 +0000 (19:34 +0900)]
drm: output - handle drm output device add/remove

Change-Id: I7e7c8dac815f9b804341033d26a138b3c85845dc

9 years agopepper: View API Refactoring
Taekyun Kim [Thu, 4 Jun 2015 09:40:02 +0000 (18:40 +0900)]
pepper: View API Refactoring

Change-Id: Ide15b28522cac54ab67ce820b3b62ae4f62258b3

9 years agoCorrectly specified pkgconfig Requires.private field
Taekyun Kim [Thu, 4 Jun 2015 09:09:47 +0000 (18:09 +0900)]
Correctly specified pkgconfig Requires.private field

Change-Id: Iace43a6546fbbbe497084250fb70eba4b3bbe491

9 years agoReplace wl_container_of with pepper_container_of
Taekyun Kim [Thu, 4 Jun 2015 08:16:02 +0000 (17:16 +0900)]
Replace wl_container_of with pepper_container_of

wl_container_of requires a variable to be declared to get the pointer to the
container. We can avoid this by using pepper_container_of by giving a type name
instead of the variable name.

Change-Id: I9afbe84f3177e41e577f0c9d6cad628e9216ceb3

9 years agopepper: APIs for accessing surface region information
Taekyun Kim [Wed, 3 Jun 2015 05:57:32 +0000 (14:57 +0900)]
pepper: APIs for accessing surface region information

Change-Id: I6d5fe86a308b757dc28b577a70a34f425a49bf86

9 years agoFixed various errors & bugs
Taekyun Kim [Wed, 3 Jun 2015 05:47:30 +0000 (14:47 +0900)]
Fixed various errors & bugs

Change-Id: I536531a3507fc493b7162e6b73fd548c12757265

9 years agoSplit source tree into separate libraries
Taekyun Kim [Mon, 1 Jun 2015 08:50:36 +0000 (17:50 +0900)]
Split source tree into separate libraries

Now the repository contains several packages. Each package is a separate
library or a bin program. Followings are brief descriptions of directories.

===============================================================================
pepper       |  Pepper core library package.
-------------------------------------------------------------------------------
render        |  Rendering library (pixman, OpenGL)
-------------------------------------------------------------------------------
desktop-shell |  Desktop shell library
-------------------------------------------------------------------------------
drm           |  DRM output backend library
-------------------------------------------------------------------------------
libinput      |  Libinput input backend library
-------------------------------------------------------------------------------
wayland       |  Wayland output/input backend library
-------------------------------------------------------------------------------
x11           |  X11 output/input backend library
-------------------------------------------------------------------------------
utils         |  Utility library
-------------------------------------------------------------------------------
samples       |  Sample programs for testing pepper libraries
-------------------------------------------------------------------------------
doctor        |  Reference server using pepper libraries
===============================================================================

Renderer is no longer a core object, instead, output libraries can freely use
it by linking against separate libpepper-render.

pepper_output_schedule_repaint() is now exposed as an API.

Put utility functions on the pepper-utils package.

Need a build script which takes options for enabling or disabling each library.

Change-Id: I5c686d158ea61056cd517f29c4eda4b2d4c7877a

9 years agoevent: function rename
jaehoon01.jeong [Mon, 1 Jun 2015 08:40:17 +0000 (17:40 +0900)]
event: function rename
    pepper_compositor_remove_event_hook -> pepper_event_hook_destroy

Change-Id: Ie0a1701094a5b79f79fc34d0516c34ca459f996d

9 years agoevent: add event hook
jaehoon01.jeong [Fri, 29 May 2015 05:45:33 +0000 (14:45 +0900)]
event: add event hook
    1. Every modules, to want to handle input events, are use
       pepper_compositor_add_event_hook() to placing event handler, even
       compositor itself
    2. pepper_compositor_add_hook() insert a new hook at the head of hook_list
    3. pepper_seat_handle_event() traversing hook_list from head to tail, and
       call hook_handlers
    4. last installed hook called first.

Change-Id: I6b26754dee0c6129afd67010175df395df67fdd4

9 years agogl-renderer: bugfix
jh13.son [Wed, 27 May 2015 05:09:41 +0000 (14:09 +0900)]
gl-renderer: bugfix

Change-Id: Idb11798b139ce97eb925df67f173757bccc2380b

9 years agoFix warnings
jh13.son [Tue, 26 May 2015 11:02:22 +0000 (20:02 +0900)]
Fix warnings

Change-Id: I1a67ad4b5ed7aec35084ae991e07590a1ccbbbe8

9 years agoInput implementation
jh13.son [Tue, 26 May 2015 10:36:58 +0000 (19:36 +0900)]
Input implementation

    - implement open & close functions for libinput library
    - bug fix

Change-Id: If9a061be4a85a0385b14bd1a03f466892732e67c

9 years agodrm backend implementation
jh13.son [Fri, 22 May 2015 11:07:33 +0000 (20:07 +0900)]
drm backend implementation

    - output implementation
        - initial version
        - create framebuffers
        - draw using gl-renderer or pixman-renderer
        - add test code

Change-Id: I136872213c54ef887c3a58cbccad95b7f01d1801

9 years agogl-renderer: bugfix
jh13.son [Fri, 22 May 2015 10:28:54 +0000 (19:28 +0900)]
gl-renderer: bugfix

Change-Id: Ibff85542e89f4233de7b84103b90e5d8788c5490

9 years agogl-renderer: pixman-renderer: Refactor surface attach code
Taekyun Kim [Fri, 22 May 2015 05:03:32 +0000 (14:03 +0900)]
gl-renderer: pixman-renderer: Refactor surface attach code

Change-Id: I14874b2b653b56ddcc22b3002f42f200f66026c4

9 years agogl-renderer: Surface attach.
Taekyun Kim [Wed, 20 May 2015 10:02:41 +0000 (19:02 +0900)]
gl-renderer: Surface attach.

Change-Id: I4734f39d27d6d6d43cd9b0b3bb7c1bba1b3c8a55

9 years agogl-renderer: EGL and GL extension initialization.
Taekyun Kim [Wed, 20 May 2015 05:06:21 +0000 (14:06 +0900)]
gl-renderer: EGL and GL extension initialization.

Change-Id: Id6274ac8fe46c084d38030eb574b5cb449728c7d

9 years agocore: Added attach_surface() to the renderer interface.
Taekyun Kim [Wed, 20 May 2015 04:26:58 +0000 (13:26 +0900)]
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

9 years agocore: Surface user set/get APIs.
Taekyun Kim [Tue, 19 May 2015 08:41:25 +0000 (17:41 +0900)]
core: Surface user set/get APIs.

Given a pointer key value, one can set a user data for the key. This can be
used for maintaining user-side objects for a pepper_surface_t. For, example,
sub-compositing application can set an evas image object.

Change-Id: I791e891340d69a47b3dc566a5766e0d67760721e

9 years agoutil: Simple hash table implementation.
Taekyun Kim [Tue, 19 May 2015 08:07:59 +0000 (17:07 +0900)]
util: Simple hash table implementation.

Change-Id: I5992e76740ea1b3d4a78539ab377d3e7146b9af7

9 years agocore: Removed pepper-util.h from API header file.
Taekyun Kim [Tue, 19 May 2015 05:22:40 +0000 (14:22 +0900)]
core: Removed pepper-util.h from API header file.

Change-Id: I4959f5fefbb0cf0bb68b0da8a9cd667e0533136b

9 years agocore: Buffer APIs are now exposed to users.
Taekyun Kim [Tue, 19 May 2015 05:19:34 +0000 (14:19 +0900)]
core: Buffer APIs are now exposed to users.

Change-Id: I35a94b2a29d1d96c2244ddc7e3e32bd18c6ff504

9 years agocore: APIs for accessing surface's current buffer and etc.
Taekyun Kim [Tue, 19 May 2015 05:17:49 +0000 (14:17 +0900)]
core: APIs for accessing surface's current buffer and etc.

Change-Id: Ic9508440c605c39fc09c825dfb391cc7ff02c527

9 years agocore: Layer & View implementation
Taekyun Kim [Tue, 12 May 2015 04:37:24 +0000 (13:37 +0900)]
core: Layer & View implementation

A compositor has layers stacked from bottom to top. Each layer has its views
which are also stached from bottom to top. Layer can be used for grouping views
and maintaining z-order. For example, a desktop can have several layers like
panel, background and application layers.

View represent visible elements in the compositor space.

<< Written under following criteria. >>

1. View is a rectangle of the same size with its surface.

2. A view can have a parent and multiple childs.

3. View position and transform is relative to its parent.

4. Parent-Child relationship does not affect the z-order.

5. A view can be contained in a single layer at a time.

Change-Id: Ib0ad01575467960c5b04d968389e37879500f21b

9 years agoutil: List implementation
Taekyun Kim [Mon, 11 May 2015 08:43:24 +0000 (17:43 +0900)]
util: List implementation

We need something more than wl_list when an item should be contained in
multiple lists. pepper_list_t can do this while it can be used in the same way
with wl_list. Don't use container_of for a node which is internally allocated.

Change-Id: I59aa1536205a6e8b5cf10136cfef19b8c90b1b4b

9 years agodesktop-shell: Initial implementation
Taekyun Kim [Tue, 28 Apr 2015 10:41:26 +0000 (19:41 +0900)]
desktop-shell: Initial implementation

Written under following criteria.

1. A compositor can have only one shell module loaded at a time.
2. A shell module can expose several shell protocols.
3. Pepper simply passes input events to the shell module.

Change-Id: I2e9f4a40c40cc708d437fa72beb376b6449a8ef0

9 years agotest:
jaehoon01.jeong [Tue, 28 Apr 2015 06:06:29 +0000 (15:06 +0900)]
test:
    - fix makefile.am

Change-Id: I98fe8c33b741da95a1016ab268ca1b9323d103cd

9 years agodata-device:
jaehoon01.jeong [Thu, 23 Apr 2015 06:05:02 +0000 (15:05 +0900)]
data-device:
    - initial data-device-manager implementation

Change-Id: I15b6fb29e8021d84bccd09a20d2004ee404d8a19

9 years agotest: x11-backend
jaehoon01.jeong [Wed, 22 Apr 2015 08:17:13 +0000 (17:17 +0900)]
test: x11-backend

Change-Id: I1e47d804fa85d4376fa3aead8ac19ee817d835bb

9 years agox11: update x11-backend module
jaehoon01.jeong [Wed, 22 Apr 2015 07:45:32 +0000 (16:45 +0900)]
x11: update x11-backend module
    - renderer initialize
    - pixman rendering with xcb-shm
    - handle some x-events

Change-Id: Ib36902f6fe086c9018f89f20c891ee2b9ca3adda

9 years agotest: simple-touch
jh13.son [Fri, 17 Apr 2015 11:22:30 +0000 (20:22 +0900)]
test: simple-touch

    - add pointer & keyboard event handler

Change-Id: I9126567d2e600338ed566f02930b0c92620372f2

9 years agoInput implementation
jh13.son [Thu, 16 Apr 2015 11:22:56 +0000 (20:22 +0900)]
Input implementation

    - input module for drm & fbdev backends
        - initial version
        - using libinput

Change-Id: I963502abac30f5a75910b528d38d176c8ef9443d

9 years agotest: Added weston's simple-shm, simple-touch test programs
Taekyun Kim [Thu, 16 Apr 2015 06:05:33 +0000 (15:05 +0900)]
test: Added weston's simple-shm, simple-touch test programs

Running them without any argument will connect to default server.
If an argument is given, it will connect to the given display name.

./simple-shm equals to ./simple-shm wayland-0

Change-Id: I677fd3809a87d29b5729244c9dadb42f375f6f1d

9 years agowayland: input: Fix some bugs
Taekyun Kim [Thu, 16 Apr 2015 05:30:21 +0000 (14:30 +0900)]
wayland: input: Fix some bugs

Change-Id: I84997592ec6aba955b78987bf524e2f149047801

9 years agowayland: pixman rendering via wl_shm_buffer
Taekyun Kim [Wed, 15 Apr 2015 09:59:52 +0000 (18:59 +0900)]
wayland: pixman rendering via wl_shm_buffer

Change-Id: If95a155db5942f3fa08b49b2c2d53bf8ad40c5bb

9 years agooutput: initial output repaint and frame control implementation
Taekyun Kim [Wed, 15 Apr 2015 07:21:57 +0000 (16:21 +0900)]
output: initial output repaint and frame control implementation

Two boolean frame state flags
    - scheduled : TRUE if repaint task is scheduled
    - pending   : TRUE if repaint is flushed but not posted

Three events affect the frame state flags
    - Frame     : called when any pending repaint is posted
    - Repaint   : Repaint the output
    - Schedule  : Schedule a repaint

<< Transition of "scheduled" state flag >>
-----------------------------------------
|        |  frame  | repaint | schedule |
-----------------------------------------
|  TRUE  |   TRUE  |   FALSE |     TRUE |
-----------------------------------------
| FALSE  |  FALSE  |   error |     TRUE |
-----------------------------------------

<< Transition of "pending" state flag >>
-----------------------------------------
|        |  frame | repaint | schedule |
-----------------------------------------
|  TRUE  |  FALSE |   error |     TRUE |
-----------------------------------------
| FALSE  |  FALSE |    TRUE |    FALSE |
-----------------------------------------

Frame event is invoked by output backend module. wayland backend invokes it
when it receives frame callback done event. DRM backend invokes it in the
vblank period.

When to call repaint is upto pepper core, currently it is called in the frame
event handler function.

Schedule can be called at any time.

We should aim following criteria.

1. Don't make clients render frames which will not be seen on the display
  This is done by sending frame done events to the clients when the compositor
is ready for following surface commits. This can be achieved by sending frame
done event once per frame at most.

2. Maximize FPS.
  We also should maximize the FPS as possible as we can while still meets the
criteria #1. If a client can render its frame within a frame period, it should
be able to render at about display refresh rate.

3. Minimize latency
  Latency means time between surface commit and actual display scanning. Short
latency is always preferable but we might have to do trade-off between FPS and
latency.

Change-Id: I9e3440ea5b79c20ed16229fcade2429afa00c767

9 years agoChange a member name in seat structure
jh13.son [Wed, 15 Apr 2015 04:15:25 +0000 (13:15 +0900)]
Change a member name in seat structure

 - capability_signal ==> capabilities_signal

Change-Id: I2e0c4bd965913b7eac018354f6d62dece1f1bb5f

9 years agobuild: Changed default option for wayland backend egl support to no
Taekyun Kim [Wed, 8 Apr 2015 06:27:43 +0000 (15:27 +0900)]
build: Changed default option for wayland backend egl support to no

We need a working EGL driver which supports wayland-egl for the wayland backend
to be properly compiled. We don't have such driver at the moment, just disable
it by default.

Change-Id: Ib45c0b7a312e3195ee37acb31231351ebc986d8d

9 years agoAdd test program template.
Taekyun Kim [Wed, 8 Apr 2015 06:21:41 +0000 (15:21 +0900)]
Add test program template.

Add test program name to TESTPROGRAMS variable in test/Makefile.am

Change-Id: I888dd46730e2ce0a0fae75028fbe477e08fec8c9

9 years agoAdd missing initialization of signal and list
Taekyun Kim [Wed, 8 Apr 2015 06:20:39 +0000 (15:20 +0900)]
Add missing initialization of signal and list

Change-Id: I5730e8b175f2fcae942dba25a345e1f9346e58ec

9 years agorenderer: initial pixman renderer & wayland backend rendering functions
Taekyun Kim [Wed, 8 Apr 2015 04:50:05 +0000 (13:50 +0900)]
renderer: initial pixman renderer & wayland backend rendering functions

Change-Id: I6b906148d73405da3adc1cda5cedbb3968641507

9 years agoFix warnings
Taekyun Kim [Tue, 7 Apr 2015 10:23:16 +0000 (19:23 +0900)]
Fix warnings

EGLint might be 64 bits, so just cast uint32_t to EGLint and compare.

Change-Id: I6f8d1a03e1034b2c2592fba306bd3e85f66bacd2

9 years agoAdded vim custom config file to .gitignore
Taekyun Kim [Tue, 7 Apr 2015 08:16:17 +0000 (17:16 +0900)]
Added vim custom config file to .gitignore

Change-Id: Id8c4416735eb7c6a460b4d56a1de3f470d245e3a

9 years agoInitial renderer implementation
Taekyun Kim [Tue, 7 Apr 2015 05:58:13 +0000 (14:58 +0900)]
Initial renderer implementation

Renderer base class and initial version of GL renderer implementation.

Change-Id: I452144074a5526c1d2dde4b4bb70de40f184efa3

9 years agoFix warnings & some minor coding style fix
Taekyun Kim [Tue, 7 Apr 2015 08:09:24 +0000 (17:09 +0900)]
Fix warnings & some minor coding style fix

Change-Id: I5768588da0fe2fa60b9af14f47d79a80b305d81e

9 years agox11: disable warnings, fix indent
jaehoon01.jeong [Tue, 7 Apr 2015 07:58:58 +0000 (16:58 +0900)]
x11: disable warnings, fix indent

Change-Id: Ic32ad5e7e84571ef718f62ff16bbeae39d072a67

9 years agoX11 backend implementation
jaehoon01.jeong [Tue, 7 Apr 2015 05:34:57 +0000 (14:34 +0900)]
X11 backend implementation
    - initial version
    - partially implemented

Change-Id: I68a2f0675bfdc3f6ca110d23daf80cc88ce3b068

9 years agoShell implementation
junghoon13.son [Mon, 6 Apr 2015 05:37:25 +0000 (14:37 +0900)]
Shell implementation
    - initial version
    - partially implemented
    - wl_shell and wl_shell_surface protocol APIs are added

Change-Id: If1be160154e9ca40fad315260baf24dbe93af9ce

9 years agoShm initialize
junghoon13.son [Tue, 31 Mar 2015 07:02:41 +0000 (16:02 +0900)]
Shm initialize
    - using wayland implementation

Change-Id: I96f00065a393d25aaa10dea16e9f7f1686495287

9 years agoInput implementation
junghoon13.son [Thu, 2 Apr 2015 06:37:26 +0000 (15:37 +0900)]
Input implementation
    - initial version
    - wayland backend module
    - core module
        - wl_seat

Change-Id: I726e04421cacacf8a25d366656e5f059e810a192

9 years agoFix typo error
Taekyun Kim [Thu, 2 Apr 2015 07:39:59 +0000 (16:39 +0900)]
Fix typo error

Change-Id: I743cf48d87ad0d713170ca105ebbb35b3e555aec

9 years agoOutput: Changed output creation/destruction functions
Taekyun Kim [Wed, 1 Apr 2015 04:42:16 +0000 (13:42 +0900)]
Output: Changed output creation/destruction functions

Change-Id: I4e0d18b5f9454bff4b7b4211b3c870ea6b47d2f4

9 years agoBuild: Build backend modules by default & some bug fix
Taekyun Kim [Wed, 1 Apr 2015 04:30:03 +0000 (13:30 +0900)]
Build: Build backend modules by default & some bug fix

Change-Id: I0768a51d072863b0da4e630ffed1ee891a42d47d

9 years agoRefactor: output, backend APIs and etc
Taekyun Kim [Tue, 31 Mar 2015 06:43:12 +0000 (15:43 +0900)]
Refactor: output, backend APIs and etc

Change-Id: I2fdcd700ea541e347c44a60cdd0f3699cd1aa40d

9 years agoSurface & Buffer initial implementation
Taekyun Kim [Thu, 26 Mar 2015 09:58:43 +0000 (18:58 +0900)]
Surface & Buffer initial implementation

Change-Id: I3b703bc30b3790f8f448769b4373e7c978399074

9 years agowl_region implementation
Taekyun Kim [Thu, 26 Mar 2015 03:37:43 +0000 (12:37 +0900)]
wl_region implementation

Implemented using pixman region.

Change-Id: If83abf5a2da62ae69e3f8b5be141156cc043d619

9 years agoRefactoring
Taekyun Kim [Mon, 23 Mar 2015 05:17:49 +0000 (14:17 +0900)]
Refactoring

1. Use "-" to concatenate file name tokens.
2. Removed features which is not necessary now. Can be added later.
3. Modules are built together as a libpepper.so.
4. Modules can use only the pepper library APIs like normal applications do.
5. Modules can export its own header files.
6. pepper exports wayland display of a compositor so that applications can use wayland-server APIs.
7. Following configure arguments are added
    --enable-wayland-backend=yes or no (default no)
    --enable-drm-backend=yes or no (default no)
    --enable-pepper-server=yes or no (default yes)

Change-Id: I5e6d04a2a1af150a246f34ba32c4ce4d87b1bb30

9 years agoinput: Some minor cleanups
Taekyun Kim [Wed, 11 Mar 2015 05:47:09 +0000 (14:47 +0900)]
input: Some minor cleanups

Change-Id: I4a4c7f5da28bcd9af0d6782c62324ab22a95c609

9 years agoApply TmaxWindow's log style
jaehoon01.jeong [Tue, 10 Mar 2015 13:33:50 +0000 (22:33 +0900)]
Apply TmaxWindow's log style
    - usage
    - must be declare 'DECLARE_DEBUG_CHANNEL(module_name);' at ahead of files
        "Syntax of the DEBUGCH variable:\n"
         "  DEBUGCH=[class]+xxx,[class]-yyy,...\n\n"
         "Example: DEBUGCH=+all,warn-heap\n"
         "    turns on all messages except warning heap messages\n"
         "Available message classes: err, warn, fixme, trace\n";

Change-Id: Iaeb88a81c9884481216a13c929f9b12b7806ae3f

9 years agoSimplified initial APIs and some cleanups
Taekyun Kim [Wed, 11 Mar 2015 04:57:03 +0000 (13:57 +0900)]
Simplified initial APIs and some cleanups

Let's start with minimal APIs. Just create a compositor and run.
APIs for output, client, input and surfaces will be added later.

Moved typedefs into internal header which should not be exposed to the user
at the moment.

Change-Id: I8f08ca00a2305d79b2278bf3a5a9ffaa61cc596d

9 years agoInput implementation
junghoon13.son [Mon, 9 Mar 2015 03:36:42 +0000 (12:36 +0900)]
Input implementation
    - input module interface functions

Change-Id: I84aa7d06cef38858a87b7b0c4ecadda7f4790fbc

9 years agoInput implementation
junghoon13.son [Fri, 6 Mar 2015 05:35:07 +0000 (14:35 +0900)]
Input implementation
    1. add handlers for wl_seat, wl_pointer, wl_keyboard and wl_touch
        - handlers do nothing
    2. add input module using libinput
        - partially implemented

Change-Id: I1729eabbdcf3b41e5dbff2fb0efe9855c82ecb56

9 years agoCode indentation
junghoon13.son [Fri, 6 Mar 2015 04:45:02 +0000 (13:45 +0900)]
Code indentation
    - expand tab to space

Change-Id: I7807df9910a2e1d3bce7b344ee61740aa1c08fd9

9 years agoMore utility macros, memory & string functions, coding style fix
Taekyun Kim [Tue, 3 Mar 2015 10:44:27 +0000 (19:44 +0900)]
More utility macros, memory & string functions, coding style fix

1. Do not use __inline__ directly, use PEPPER_INLINE instead.
2. Always use PEPPER_ASSERT() instead of assert().
3. Use PEPPER_IGNORE() to avoid warning on unsed variables.
4. Always use pepper_malloc/pepper_calloc/pepper_free.
5. Don't use multiple new lines, put some meaningful comments instead.
6. Removed excessive error handling for OOM.

Change-Id: Idab2f85457c9ff093eb47ffc7c97373e338fd6d1

9 years agoadd global object creation and handler codes for basic functionality
jaehoon01.jeong [Tue, 3 Mar 2015 08:26:00 +0000 (17:26 +0900)]
add global object creation and handler codes for basic functionality

 - remove white-space
 - remove 'pepper_' prefix in internal static functions
 - modify function names and fn table names
    - bind_xxx
    - xxx_implementation

Change-Id: I89aa27a312964986e8a3245b8e3667dbfe5a411b

9 years agocommon: Implementation starting point
Taekyun Kim [Mon, 2 Mar 2015 10:51:06 +0000 (19:51 +0900)]
common: Implementation starting point

APIs for pepper library are located in pepper.h
API implementations should go to their object files. (ex. output.c)
Utilities, macros and other stuffs should go to common.h
Internal structures and functions should go to pepper_internal.h

Change-Id: I6cf48d256cc3a2e5c4ac0424558ec3738e35688a

9 years agoAdded .gitignore file
Taekyun Kim [Fri, 27 Feb 2015 04:49:57 +0000 (13:49 +0900)]
Added .gitignore file

Change-Id: I69f2b2bc392c482e6e5a8cea4022332b209952af

9 years agoSource directory hierarchy
Taekyun Kim [Fri, 27 Feb 2015 04:44:37 +0000 (13:44 +0900)]
Source directory hierarchy

Change-Id: I7572a5bebc51740777d5624bae2e26cd9d78e62e

9 years agoModifled pepper.c to apply coding style guide line
Taekyun Kim [Fri, 27 Feb 2015 04:18:58 +0000 (13:18 +0900)]
Modifled pepper.c to apply coding style guide line

Change-Id: Ie9b19eeb5b191f0770875e3fe257dc3f7fd7f6ef

9 years agoAdded coding style guide line
Taekyun Kim [Fri, 27 Feb 2015 04:18:32 +0000 (13:18 +0900)]
Added coding style guide line

Change-Id: I4901a0d4638f4e08efae1d3fcbdf88be9bf4c4c1

9 years agoBuild: Added initial RPM spec file for GBS build
Taekyun Kim [Wed, 25 Feb 2015 09:19:17 +0000 (18:19 +0900)]
Build: Added initial RPM spec file for GBS build

Change-Id: Ie06260e6e565b451e82e09fdfb457d1d8dcaa4fd

9 years agoCompositor: Basic compositor main loop
Taekyun Kim [Wed, 25 Feb 2015 08:08:05 +0000 (17:08 +0900)]
Compositor: Basic compositor main loop

Starting point for implementing pepper server.

Change-Id: I6981231d22351754ceb95cb3c4a9baeda5eee72d