change variable names
authorBoram Park <boram1288.park@samsung.com>
Fri, 4 Dec 2015 10:47:15 +0000 (19:47 +0900)
committerBoram Park <boram1288.park@samsung.com>
Fri, 4 Dec 2015 10:47:18 +0000 (19:47 +0900)
Change-Id: I76b1add55684bcbe2d9ba483e1a9b3d81f1224b6

src/tdm.c
src/tdm_capture.c
src/tdm_display.c
src/tdm_pp.c
src/tdm_private.h

index fdb5834..7d5e16e 100644 (file)
--- a/src/tdm.c
+++ b/src/tdm.c
@@ -42,13 +42,13 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
 #include "tdm_private.h"
 
 static tdm_private_layer*
-_tdm_display_find_private_layer(tdm_private_output *private_output, tdm_layer *layer)
+_tdm_display_find_private_layer(tdm_private_output *private_output, tdm_layer *layer_backend)
 {
     tdm_private_layer *private_layer = NULL;
 
     LIST_FOR_EACH_ENTRY(private_layer, &private_output->layer_list, link)
     {
-        if (private_layer->layer == layer)
+        if (private_layer->layer_backend == layer_backend)
             return private_layer;
     }
 
@@ -56,13 +56,13 @@ _tdm_display_find_private_layer(tdm_private_output *private_output, tdm_layer *l
 }
 
 static tdm_private_output*
-_tdm_display_find_private_output(tdm_private_display *private_display, tdm_output *output)
+_tdm_display_find_private_output(tdm_private_display *private_display, tdm_output *output_backend)
 {
     tdm_private_output *private_output = NULL;
 
     LIST_FOR_EACH_ENTRY(private_output, &private_display->output_list, link)
     {
-        if (private_output->output == output)
+        if (private_output->output_backend == output_backend)
             return private_output;
     }
 
@@ -245,7 +245,8 @@ _tdm_display_update_caps_capture(tdm_private_display *private_display, tdm_caps_
 }
 
 static tdm_error
-_tdm_display_update_caps_layer(tdm_private_display *private_display, tdm_layer *layer, tdm_caps_layer *caps)
+_tdm_display_update_caps_layer(tdm_private_display *private_display,
+                               tdm_layer *layer_backend, tdm_caps_layer *caps)
 {
     tdm_func_display *func_display = &private_display->func_display;
     char buf[1024];
@@ -261,7 +262,7 @@ _tdm_display_update_caps_layer(tdm_private_display *private_display, tdm_layer *
         return TDM_ERROR_BAD_MODULE;
     }
 
-    ret = func_display->layer_get_capability(layer, caps);
+    ret = func_display->layer_get_capability(layer_backend, caps);
     if (ret != TDM_ERROR_NONE)
     {
         TDM_ERR("layer_get_capability() failed");
@@ -281,7 +282,8 @@ _tdm_display_update_caps_layer(tdm_private_display *private_display, tdm_layer *
 }
 
 static tdm_error
-_tdm_display_update_caps_output(tdm_private_display *private_display, tdm_output *output, tdm_caps_output *caps)
+_tdm_display_update_caps_output(tdm_private_display *private_display,
+                                tdm_output *output_backend, tdm_caps_output *caps)
 {
     tdm_func_display *func_display = &private_display->func_display;
     int i;
@@ -293,7 +295,7 @@ _tdm_display_update_caps_output(tdm_private_display *private_display, tdm_output
         return TDM_ERROR_BAD_MODULE;
     }
 
-    ret = func_display->output_get_capability(output, caps);
+    ret = func_display->output_get_capability(output_backend, caps);
     if (ret != TDM_ERROR_NONE)
     {
         TDM_ERR("output_get_capability() failed");
@@ -318,12 +320,12 @@ _tdm_display_update_caps_output(tdm_private_display *private_display, tdm_output
 static tdm_error
 _tdm_display_update_layer(tdm_private_display *private_display,
                           tdm_private_output *private_output,
-                          tdm_layer *layer)
+                          tdm_layer *layer_backend)
 {
     tdm_private_layer *private_layer;
     tdm_error ret;
 
-    private_layer = _tdm_display_find_private_layer(private_output, layer);
+    private_layer = _tdm_display_find_private_layer(private_output, layer_backend);
     if (!private_layer)
     {
         private_layer = calloc(1, sizeof(tdm_private_layer));
@@ -333,7 +335,7 @@ _tdm_display_update_layer(tdm_private_display *private_display,
         private_layer->func_display = &private_display->func_display;
         private_layer->private_display = private_display;
         private_layer->private_output = private_output;
-        private_layer->layer = layer;
+        private_layer->layer_backend = layer_backend;
 
         LIST_INITHEAD(&private_layer->capture_list);
 
@@ -342,7 +344,7 @@ _tdm_display_update_layer(tdm_private_display *private_display,
     else
         _tdm_display_destroy_caps_layer(&private_layer->caps);
 
-    ret = _tdm_display_update_caps_layer(private_display, layer, &private_layer->caps);
+    ret = _tdm_display_update_caps_layer(private_display, layer_backend, &private_layer->caps);
     if (ret != TDM_ERROR_NONE)
         goto failed_update;
 
@@ -353,7 +355,8 @@ failed_update:
 }
 
 static tdm_error
-_tdm_display_update_output(tdm_private_display *private_display, tdm_output *output, int pipe)
+_tdm_display_update_output(tdm_private_display *private_display,
+                           tdm_output *output_backend, int pipe)
 {
     tdm_func_display *func_display = &private_display->func_display;
     tdm_private_output *private_output = NULL;
@@ -361,7 +364,7 @@ _tdm_display_update_output(tdm_private_display *private_display, tdm_output *out
     int layer_count = 0, i;
     tdm_error ret;
 
-    private_output = _tdm_display_find_private_output(private_display, output);
+    private_output = _tdm_display_find_private_output(private_display, output_backend);
     if (!private_output)
     {
         private_output = calloc(1, sizeof(tdm_private_output));
@@ -370,7 +373,7 @@ _tdm_display_update_output(tdm_private_display *private_display, tdm_output *out
         LIST_ADD(&private_output->link, &private_display->output_list);
         private_output->func_display = func_display;
         private_output->private_display = private_display;
-        private_output->output = output;
+        private_output->output_backend = output_backend;
         private_output->pipe = pipe;
 
         LIST_INITHEAD(&private_output->layer_list);
@@ -381,11 +384,11 @@ _tdm_display_update_output(tdm_private_display *private_display, tdm_output *out
     else
         _tdm_display_destroy_caps_output(&private_output->caps);
 
-    ret = _tdm_display_update_caps_output(private_display, output, &private_output->caps);
+    ret = _tdm_display_update_caps_output(private_display, output_backend, &private_output->caps);
     if (ret != TDM_ERROR_NONE)
         return ret;
 
-    layers = func_display->output_get_layers(output, &layer_count, &ret);
+    layers = func_display->output_get_layers(output_backend, &layer_count, &ret);
     if (ret != TDM_ERROR_NONE)
         goto failed_update;
 
index 0859f22..f63d2b8 100644 (file)
@@ -52,7 +52,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
     func_capture = private_capture->func_capture
 
 static void
-_tdm_caputre_cb_done(tdm_capture *capture, tbm_surface_h buffer, void *user_data)
+_tdm_caputre_cb_done(tdm_capture *capture_backend, tbm_surface_h buffer, void *user_data)
 {
     tdm_buffer_unref_backend(tdm_buffer_get(buffer));
 }
@@ -64,7 +64,7 @@ tdm_capture_create_output_internal(tdm_private_output *private_output, tdm_error
     tdm_func_display *func_display;
     tdm_func_capture *func_capture;
     tdm_private_capture *private_capture = NULL;
-    tdm_capture *capture = NULL;
+    tdm_capture *capture_backend = NULL;
     tdm_error ret = TDM_ERROR_NONE;
 
     private_display = private_output->private_display;
@@ -79,7 +79,7 @@ tdm_capture_create_output_internal(tdm_private_output *private_output, tdm_error
         return NULL;
     }
 
-    capture = func_display->output_create_capture(private_output->output, &ret);
+    capture_backend = func_display->output_create_capture(private_output->output_backend, &ret);
     if (ret != TDM_ERROR_NONE)
     {
         if (error)
@@ -91,17 +91,17 @@ tdm_capture_create_output_internal(tdm_private_output *private_output, tdm_error
     if (!private_capture)
     {
         TDM_ERR("failed: alloc memory");
-        func_capture->capture_destroy(capture);
+        func_capture->capture_destroy(capture_backend);
         if (error)
             *error = TDM_ERROR_OUT_OF_MEMORY;
         return NULL;
     }
 
-    ret = func_capture->capture_set_done_handler(capture, _tdm_caputre_cb_done, private_capture);
+    ret = func_capture->capture_set_done_handler(capture_backend, _tdm_caputre_cb_done, private_capture);
     if (ret != TDM_ERROR_NONE)
     {
         TDM_ERR("set capture_done_handler failed");
-        func_capture->capture_destroy(capture);
+        func_capture->capture_destroy(capture_backend);
         if (error)
             *error = ret;
         return NULL;
@@ -113,7 +113,7 @@ tdm_capture_create_output_internal(tdm_private_output *private_output, tdm_error
     private_capture->private_display = private_display;
     private_capture->private_output = private_output;
     private_capture->private_layer = NULL;
-    private_capture->capture = capture;
+    private_capture->capture_backend = capture_backend;
 
     if (error)
         *error = TDM_ERROR_NONE;
@@ -129,7 +129,7 @@ tdm_capture_create_layer_internal(tdm_private_layer *private_layer, tdm_error *e
     tdm_func_display *func_display;
     tdm_func_capture *func_capture;
     tdm_private_capture *private_capture = NULL;
-    tdm_capture *capture = NULL;
+    tdm_capture *capture_backend = NULL;
     tdm_error ret = TDM_ERROR_NONE;
 
     private_output = private_layer->private_output;
@@ -145,7 +145,7 @@ tdm_capture_create_layer_internal(tdm_private_layer *private_layer, tdm_error *e
         return NULL;
     }
 
-    capture = func_display->layer_create_capture(private_layer->layer, &ret);
+    capture_backend = func_display->layer_create_capture(private_layer->layer_backend, &ret);
     if (ret != TDM_ERROR_NONE)
         return NULL;
 
@@ -153,7 +153,7 @@ tdm_capture_create_layer_internal(tdm_private_layer *private_layer, tdm_error *e
     if (!private_capture)
     {
         TDM_ERR("failed: alloc memory");
-        func_capture->capture_destroy(capture);
+        func_capture->capture_destroy(capture_backend);
         if (error)
             *error = TDM_ERROR_OUT_OF_MEMORY;
         return NULL;
@@ -165,7 +165,7 @@ tdm_capture_create_layer_internal(tdm_private_layer *private_layer, tdm_error *e
     private_capture->private_display = private_display;
     private_capture->private_output = private_output;
     private_capture->private_layer = private_layer;
-    private_capture->capture = capture;
+    private_capture->capture_backend = capture_backend;
 
     if (error)
         *error = TDM_ERROR_NONE;
@@ -184,7 +184,7 @@ tdm_capture_destroy_internal(tdm_private_capture *private_capture)
     LIST_DEL(&private_capture->link);
 
     func_capture = private_capture->func_capture;
-    func_capture->capture_destroy(private_capture->capture);
+    func_capture->capture_destroy(private_capture->capture_backend);
 
     free(private_capture);
 }
@@ -192,13 +192,12 @@ tdm_capture_destroy_internal(tdm_private_capture *private_capture)
 EXTERN void
 tdm_capture_destroy(tdm_capture *capture)
 {
+    tdm_private_capture *private_capture = capture;
     tdm_private_display *private_display;
-    tdm_private_capture *private_capture;
 
-    if (!capture)
+    if (!private_capture)
         return;
 
-    private_capture = (tdm_private_capture*)capture;
     private_display = private_capture->private_display;
 
     pthread_mutex_lock(&private_display->lock);
@@ -221,7 +220,7 @@ tdm_capture_set_info(tdm_capture *capture, tdm_info_capture *info)
         return TDM_ERROR_NONE;
     }
 
-    ret = func_capture->capture_set_info(private_capture->capture, info);
+    ret = func_capture->capture_set_info(private_capture->capture_backend, info);
 
     pthread_mutex_unlock(&private_display->lock);
 
@@ -244,7 +243,7 @@ tdm_capture_attach(tdm_capture *capture, tdm_buffer *buffer)
     }
 
     tdm_buffer_ref_backend(buffer);
-    ret = func_capture->capture_attach(private_capture->capture,
+    ret = func_capture->capture_attach(private_capture->capture_backend,
                                        tdm_buffer_get_surface(buffer));
 
     pthread_mutex_unlock(&private_display->lock);
@@ -265,7 +264,7 @@ tdm_capture_commit(tdm_capture *capture)
         return TDM_ERROR_NONE;
     }
 
-    ret = func_capture->capture_commit(private_capture->capture);
+    ret = func_capture->capture_commit(private_capture->capture_backend);
 
     pthread_mutex_unlock(&private_display->lock);
 
index 52ae2e3..61e796a 100644 (file)
@@ -142,7 +142,8 @@ tdm_display_get_pp_available_formats(tdm_display *dpy, const tbm_format **format
 }
 
 EXTERN tdm_error
-tdm_display_get_pp_available_size(tdm_display *dpy, int *min_w, int *min_h, int *max_w, int *max_h, int *preferred_align)
+tdm_display_get_pp_available_size(tdm_display *dpy, int *min_w, int *min_h,
+                                  int *max_w, int *max_h, int *preferred_align)
 {
     DISPLAY_FUNC_ENTRY();
 
@@ -441,7 +442,8 @@ tdm_output_get_available_modes(tdm_output *output, const tdm_output_mode **modes
 }
 
 EXTERN tdm_error
-tdm_output_get_available_size(tdm_output *output, int *min_w, int *min_h, int *max_w, int *max_h, int *preferred_align)
+tdm_output_get_available_size(tdm_output *output, int *min_w, int *min_h,
+                              int *max_w, int *max_h, int *preferred_align)
 {
     OUTPUT_FUNC_ENTRY();
 
@@ -527,7 +529,7 @@ tdm_output_set_property(tdm_output *output, unsigned int id, tdm_value value)
         return TDM_ERROR_NONE;
     }
 
-    ret = func_display->output_set_property(private_output->output, id, value);
+    ret = func_display->output_set_property(private_output->output_backend, id, value);
 
     pthread_mutex_unlock(&private_display->lock);
 
@@ -552,7 +554,7 @@ tdm_output_get_property(tdm_output *output, unsigned int id, tdm_value *value)
         return TDM_ERROR_NONE;
     }
 
-    ret = func_display->output_get_property(private_output->output, id, value);
+    ret = func_display->output_get_property(private_output->output_backend, id, value);
 
     pthread_mutex_unlock(&private_display->lock);
 
@@ -560,7 +562,7 @@ tdm_output_get_property(tdm_output *output, unsigned int id, tdm_value *value)
 }
 
 static void
-_tdm_output_cb_vblank(tdm_output *output, unsigned int sequence,
+_tdm_output_cb_vblank(tdm_output *output_backend, unsigned int sequence,
                       unsigned int tv_sec, unsigned int tv_usec, void *user_data)
 {
     tdm_private_output *private_output;
@@ -575,14 +577,15 @@ _tdm_output_cb_vblank(tdm_output *output, unsigned int sequence,
     private_display = private_output->private_display;
     LIST_FOR_EACH_ENTRY(private_output, &private_display->output_list, link)
     {
-        if (private_output->output == output)
+        if (private_output->output_backend == output_backend)
             private_display_backend = private_output->private_display;
     }
 
     pthread_mutex_unlock(&private_display_backend->lock);
 
     if (vblank_handler->func)
-        vblank_handler->func(vblank_handler->private_output, sequence, tv_sec, tv_usec, vblank_handler->user_data);
+        vblank_handler->func(vblank_handler->private_output, sequence,
+                             tv_sec, tv_usec, vblank_handler->user_data);
 
     pthread_mutex_lock(&private_display_backend->lock);
 
@@ -591,7 +594,7 @@ _tdm_output_cb_vblank(tdm_output *output, unsigned int sequence,
 }
 
 static void
-_tdm_output_cb_commit(tdm_output *output, unsigned int sequence,
+_tdm_output_cb_commit(tdm_output *output_backend, unsigned int sequence,
                       unsigned int tv_sec, unsigned int tv_usec, void *user_data)
 {
     tdm_private_output *private_output;
@@ -606,14 +609,15 @@ _tdm_output_cb_commit(tdm_output *output, unsigned int sequence,
     private_display = private_output->private_display;
     LIST_FOR_EACH_ENTRY(private_output, &private_display->output_list, link)
     {
-        if (private_output->output == output)
+        if (private_output->output_backend == output_backend)
             private_display_backend = private_output->private_display;
     }
 
     pthread_mutex_unlock(&private_display_backend->lock);
 
     if (commit_handler->func)
-        commit_handler->func(commit_handler->private_output, sequence, tv_sec, tv_usec, commit_handler->user_data);
+        commit_handler->func(commit_handler->private_output, sequence,
+                             tv_sec, tv_usec, commit_handler->user_data);
 
     pthread_mutex_lock(&private_display_backend->lock);
 
@@ -622,7 +626,8 @@ _tdm_output_cb_commit(tdm_output *output, unsigned int sequence,
 }
 
 EXTERN tdm_error
-tdm_output_wait_vblank(tdm_output *output, int interval, int sync, tdm_output_vblank_handler func, void *user_data)
+tdm_output_wait_vblank(tdm_output *output, int interval, int sync,
+                       tdm_output_vblank_handler func, void *user_data)
 {
     tdm_func_display *func_display;
     tdm_private_vblank_handler *vblank_handler;
@@ -651,7 +656,8 @@ tdm_output_wait_vblank(tdm_output *output, int interval, int sync, tdm_output_vb
     vblank_handler->func = func;
     vblank_handler->user_data = user_data;
 
-    ret = func_display->output_wait_vblank(private_output->output, interval, sync, vblank_handler);
+    ret = func_display->output_wait_vblank(private_output->output_backend, interval,
+                                           sync, vblank_handler);
     if (ret != TDM_ERROR_NONE)
     {
         pthread_mutex_unlock(&private_display->lock);
@@ -661,7 +667,8 @@ tdm_output_wait_vblank(tdm_output *output, int interval, int sync, tdm_output_vb
     if (!private_output->regist_vblank_cb)
     {
         private_output->regist_vblank_cb = 1;
-        ret = func_display->output_set_vblank_handler(private_output->output, _tdm_output_cb_vblank);
+        ret = func_display->output_set_vblank_handler(private_output->output_backend,
+                                                      _tdm_output_cb_vblank);
     }
 
     pthread_mutex_unlock(&private_display->lock);
@@ -699,7 +706,7 @@ tdm_output_commit(tdm_output *output, int sync, tdm_output_commit_handler func,
     commit_handler->func = func;
     commit_handler->user_data = user_data;
 
-    ret = func_display->output_commit(private_output->output, sync, commit_handler);
+    ret = func_display->output_commit(private_output->output_backend, sync, commit_handler);
     if (ret != TDM_ERROR_NONE)
     {
         pthread_mutex_unlock(&private_display->lock);
@@ -709,7 +716,8 @@ tdm_output_commit(tdm_output *output, int sync, tdm_output_commit_handler func,
     if (!private_output->regist_commit_cb)
     {
         private_output->regist_commit_cb = 1;
-        ret = func_display->output_set_commit_handler(private_output->output, _tdm_output_cb_commit);
+        ret = func_display->output_set_commit_handler(private_output->output_backend,
+                                                      _tdm_output_cb_commit);
     }
 
     pthread_mutex_unlock(&private_display->lock);
@@ -735,7 +743,7 @@ tdm_output_set_mode(tdm_output *output, tdm_output_mode *mode)
         return TDM_ERROR_NONE;
     }
 
-    ret = func_display->output_set_mode(private_output->output, mode);
+    ret = func_display->output_set_mode(private_output->output_backend, mode);
 
     pthread_mutex_unlock(&private_display->lock);
 
@@ -760,7 +768,7 @@ tdm_output_get_mode(tdm_output *output, const tdm_output_mode **mode)
         return TDM_ERROR_NONE;
     }
 
-    ret = func_display->output_get_mode(private_output->output, mode);
+    ret = func_display->output_get_mode(private_output->output_backend, mode);
 
     pthread_mutex_unlock(&private_display->lock);
 
@@ -786,7 +794,7 @@ tdm_output_set_dpms(tdm_output *output, tdm_output_dpms dpms_value)
         return TDM_ERROR_NONE;
     }
 
-    ret = func_display->output_set_dpms(private_output->output, dpms_value);
+    ret = func_display->output_set_dpms(private_output->output_backend, dpms_value);
 
     pthread_mutex_unlock(&private_display->lock);
 
@@ -811,7 +819,7 @@ tdm_output_get_dpms(tdm_output *output, tdm_output_dpms *dpms_value)
         return TDM_ERROR_NONE;
     }
 
-    ret = func_display->output_get_dpms(private_output->output, dpms_value);
+    ret = func_display->output_get_dpms(private_output->output_backend, dpms_value);
 
     pthread_mutex_unlock(&private_display->lock);
 
@@ -918,7 +926,7 @@ tdm_layer_set_property(tdm_layer *layer, unsigned int id, tdm_value value)
         return TDM_ERROR_NONE;
     }
 
-    ret = func_display->layer_set_property(private_layer->layer, id, value);
+    ret = func_display->layer_set_property(private_layer->layer_backend, id, value);
 
     pthread_mutex_unlock(&private_display->lock);
 
@@ -943,7 +951,7 @@ tdm_layer_get_property(tdm_layer *layer, unsigned int id, tdm_value *value)
         return TDM_ERROR_NONE;
     }
 
-    ret = func_display->layer_get_property(private_layer->layer, id, value);
+    ret = func_display->layer_get_property(private_layer->layer_backend, id, value);
 
     pthread_mutex_unlock(&private_display->lock);
 
@@ -970,7 +978,7 @@ tdm_layer_set_info(tdm_layer *layer, tdm_info_layer *info)
         return TDM_ERROR_NONE;
     }
 
-    ret = func_display->layer_set_info(private_layer->layer, info);
+    ret = func_display->layer_set_info(private_layer->layer_backend, info);
 
     pthread_mutex_unlock(&private_display->lock);
 
@@ -995,7 +1003,7 @@ tdm_layer_get_info(tdm_layer *layer, tdm_info_layer *info)
         return TDM_ERROR_NONE;
     }
 
-    ret = func_display->layer_get_info(private_layer->layer, info);
+    ret = func_display->layer_get_info(private_layer->layer_backend, info);
 
     pthread_mutex_unlock(&private_display->lock);
 
@@ -1032,7 +1040,7 @@ tdm_layer_set_buffer(tdm_layer *layer, tdm_buffer *buffer)
     private_layer->current_buffer = tdm_buffer_ref(buffer, NULL);
     tdm_buffer_ref_backend(buffer);
 
-    ret = func_display->layer_set_buffer(private_layer->layer,
+    ret = func_display->layer_set_buffer(private_layer->layer_backend,
                                          tdm_buffer_get_surface(buffer));
 
     pthread_mutex_unlock(&private_display->lock);
@@ -1065,7 +1073,7 @@ tdm_layer_unset_buffer(tdm_layer *layer)
         return TDM_ERROR_NONE;
     }
 
-    ret = func_display->layer_unset_buffer(private_layer->layer);
+    ret = func_display->layer_unset_buffer(private_layer->layer_backend);
 
     pthread_mutex_unlock(&private_display->lock);
 
index 278e6e2..91642af 100644 (file)
@@ -52,7 +52,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
     func_pp = private_pp->func_pp
 
 static void
-_tdm_pp_cb_done(tdm_pp *pp, tbm_surface_h src, tbm_surface_h dst, void *user_data)
+_tdm_pp_cb_done(tdm_pp *pp_backend, tbm_surface_h src, tbm_surface_h dst, void *user_data)
 {
     tdm_buffer_unref_backend(tdm_buffer_get(src));
     tdm_buffer_unref_backend(tdm_buffer_get(dst));
@@ -64,7 +64,7 @@ tdm_pp_create_internal(tdm_private_display *private_display, tdm_error *error)
     tdm_func_display *func_display;
     tdm_func_pp *func_pp;
     tdm_private_pp *private_pp = NULL;
-    tdm_pp *pp = NULL;
+    tdm_pp *pp_backend = NULL;
     tdm_error ret = TDM_ERROR_NONE;
 
     func_display = &private_display->func_display;
@@ -78,7 +78,7 @@ tdm_pp_create_internal(tdm_private_display *private_display, tdm_error *error)
         return NULL;
     }
 
-    pp = func_display->display_create_pp(private_display->bdata, &ret);
+    pp_backend = func_display->display_create_pp(private_display->bdata, &ret);
     if (ret != TDM_ERROR_NONE)
     {
         if (error)
@@ -90,17 +90,17 @@ tdm_pp_create_internal(tdm_private_display *private_display, tdm_error *error)
     if (!private_pp)
     {
         TDM_ERR("failed: alloc memory");
-        func_pp->pp_destroy(pp);
+        func_pp->pp_destroy(pp_backend);
         if (error)
             *error = TDM_ERROR_OUT_OF_MEMORY;
         return NULL;
     }
 
-    ret = func_pp->pp_set_done_handler(pp, _tdm_pp_cb_done, private_pp);
+    ret = func_pp->pp_set_done_handler(pp_backend, _tdm_pp_cb_done, private_pp);
     if (ret != TDM_ERROR_NONE)
     {
         TDM_ERR("set pp_done_handler failed");
-        func_pp->pp_destroy(pp);
+        func_pp->pp_destroy(pp_backend);
         if (error)
             *error = ret;
         return NULL;
@@ -109,7 +109,7 @@ tdm_pp_create_internal(tdm_private_display *private_display, tdm_error *error)
     LIST_ADD(&private_pp->link, &private_display->pp_list);
     private_pp->func_pp = func_pp;
     private_pp->private_display = private_display;
-    private_pp->pp = pp;
+    private_pp->pp_backend = pp_backend;
 
     if (error)
         *error = TDM_ERROR_NONE;
@@ -129,7 +129,7 @@ tdm_pp_destroy_internal(tdm_private_pp *private_pp)
 
     LIST_DEL(&private_pp->link);
 
-    func_pp->pp_destroy(private_pp->pp);
+    func_pp->pp_destroy(private_pp->pp_backend);
 
     free(private_pp);
 }
@@ -137,13 +137,12 @@ tdm_pp_destroy_internal(tdm_private_pp *private_pp)
 EXTERN void
 tdm_pp_destroy(tdm_pp *pp)
 {
+    tdm_private_pp *private_pp = pp;
     tdm_private_display *private_display;
-    tdm_private_pp *private_pp;
 
-    if (!pp)
+    if (!private_pp)
         return;
 
-    private_pp = (tdm_private_pp*)pp;
     private_display = private_pp->private_display;
 
     pthread_mutex_lock(&private_display->lock);
@@ -166,7 +165,7 @@ tdm_pp_set_info(tdm_pp *pp, tdm_info_pp *info)
         return TDM_ERROR_NONE;
     }
 
-    ret = func_pp->pp_set_info(private_pp->pp, info);
+    ret = func_pp->pp_set_info(private_pp->pp_backend, info);
 
     pthread_mutex_unlock(&private_display->lock);
 
@@ -191,7 +190,7 @@ tdm_pp_attach(tdm_pp *pp, tdm_buffer *src, tdm_buffer *dst)
 
     tdm_buffer_ref_backend(src);
     tdm_buffer_ref_backend(dst);
-    ret = func_pp->pp_attach(private_pp->pp,
+    ret = func_pp->pp_attach(private_pp->pp_backend,
                              tdm_buffer_get_surface(src),
                              tdm_buffer_get_surface(dst));
 
@@ -213,7 +212,7 @@ tdm_pp_commit(tdm_pp *pp)
         return TDM_ERROR_NONE;
     }
 
-    ret = func_pp->pp_commit(private_pp->pp);
+    ret = func_pp->pp_commit(private_pp->pp_backend);
 
     pthread_mutex_unlock(&private_display->lock);
 
index 3f0b733..f9a727f 100644 (file)
@@ -180,7 +180,7 @@ struct _tdm_private_output
     tdm_private_display *private_display;
 
     tdm_caps_output caps;
-    tdm_output *output;
+    tdm_output *output_backend;
 
     unsigned int pipe;
 
@@ -204,7 +204,7 @@ struct _tdm_private_layer
     tdm_private_output *private_output;
 
     tdm_caps_layer caps;
-    tdm_layer *layer;
+    tdm_layer *layer_backend;
 
     tdm_buffer *current_buffer;
 
@@ -220,7 +220,7 @@ struct _tdm_private_pp
     tdm_func_pp *func_pp;
     tdm_private_display *private_display;
 
-    tdm_pp *pp;
+    tdm_pp *pp_backend;
 };
 
 struct _tdm_private_capture
@@ -234,7 +234,7 @@ struct _tdm_private_capture
     tdm_private_output *private_output;
     tdm_private_layer *private_layer;
 
-    tdm_capture *capture;
+    tdm_capture *capture_backend;
 };
 
 struct _tdm_private_vblank_handler