Commit dac46dcf913585956a0e7a838e6f4b7465f00f57

Authored by Loren Huang
1 parent ba5139e1da

ENGR00300876 [#ccc] Fix flick issue in GAL2D compositor

Move wl_surface_commit to work thread.
Fix memory leak in wl_egl_window_resize.

Date: Jul 10, 2014
Signed-off-by Yong Gan <yong.gan@freescale.com>
Acked-by: Jason Liu
(cherry picked from commit c114ec8a4c74fc2a2d0f64c60031c66d2225ff83)

Showing 1 changed file with 14 additions and 3 deletions Side-by-side Diff

drivers/mxc/gpu-viv/hal/kernel/inc/gc_hal_eglplatform.h
... ... @@ -55,18 +55,21 @@
55 55 #include "wayland-server.h"
56 56 #include <wayland-egl.h>
57 57  
58   -#define WL_EGL_NUM_BACKBUFFERS 2
  58 +#define WL_EGL_NUM_BACKBUFFERS 3
59 59  
60 60 typedef struct _gcsWL_VIV_BUFFER
61 61 {
62   - struct wl_buffer wl_buffer;
  62 + struct wl_resource *wl_buffer;
63 63 gcoSURF surface;
  64 + gctINT32 width, height;
64 65 } gcsWL_VIV_BUFFER;
65 66  
66 67 typedef struct _gcsWL_EGL_DISPLAY
67 68 {
68 69 struct wl_display* wl_display;
69 70 struct wl_viv* wl_viv;
  71 + struct wl_registry *registry;
  72 + struct wl_event_queue *wl_queue;
70 73 } gcsWL_EGL_DISPLAY;
71 74  
72 75 typedef struct _gcsWL_EGL_BUFFER_INFO
... ... @@ -79,6 +82,9 @@
79 82 gcePOOL pool;
80 83 gctUINT bytes;
81 84 gcoSURF surface;
  85 + gcoSURF attached_surface;
  86 + gctINT32 invalidate;
  87 + gctBOOL locked;
82 88 } gcsWL_EGL_BUFFER_INFO;
83 89  
84 90 typedef struct _gcsWL_EGL_BUFFER
85 91  
86 92  
87 93  
... ... @@ -89,19 +95,24 @@
89 95  
90 96 typedef struct _gcsWL_EGL_WINDOW_INFO
91 97 {
  98 + gctINT32 dx;
  99 + gctINT32 dy;
92 100 gctUINT width;
93 101 gctUINT height;
  102 + gctINT32 attached_width;
  103 + gctINT32 attached_height;
94 104 gceSURF_FORMAT format;
95 105 gctUINT bpp;
96 106 } gcsWL_EGL_WINDOW_INFO;
97 107  
98 108 struct wl_egl_window
99 109 {
  110 + gcsWL_EGL_DISPLAY* display;
100 111 gcsWL_EGL_BUFFER backbuffers[WL_EGL_NUM_BACKBUFFERS];
101 112 gcsWL_EGL_WINDOW_INFO info;
102 113 gctUINT current;
103 114 struct wl_surface* surface;
104   - struct wl_callback* pending;
  115 + struct wl_callback* frame_callback;
105 116 };
106 117  
107 118 typedef void* HALNativeDisplayType;