hwc_window: rename get_buffer_queue to acquire_buffer_queue 27/186527/1
authorChangyeon Lee <cyeon.lee@samsung.com>
Fri, 10 Aug 2018 04:57:37 +0000 (13:57 +0900)
committerChangyeon Lee <cyeon.lee@samsung.com>
Fri, 10 Aug 2018 04:57:37 +0000 (13:57 +0900)
Change-Id: Ie5e45480833bee69978192bdd2a98b875456a404

haltests/src/tc_tdm_hwc_window.cpp
include/tdm.h
include/tdm_backend.h
include/tdm_types.h
src/tdm_hwc_window.c

index b330e85..1e704a7 100644 (file)
@@ -81,7 +81,7 @@ TEST_P(TDMHwcWindow, DestroyWindowSuccessful)
        }
 }
 
-/* tbm_surface_queue_h tdm_hwc_window_get_buffer_queue() */
+/* tbm_surface_queue_h tdm_hwc_window_acquire_buffer_queue() */
 TEST_P(TDMHwcWindow, GetBufferQueueFailNull)
 {
        TDM_UT_SKIP_FLAG(has_outputs);
@@ -89,11 +89,11 @@ TEST_P(TDMHwcWindow, GetBufferQueueFailNull)
        tdm_error error = TDM_ERROR_NONE;
        tbm_surface_queue_h queue = NULL;
 
-       queue = tdm_hwc_window_get_buffer_queue(NULL, &error);
+       queue = tdm_hwc_window_acquire_buffer_queue(NULL, &error);
        ASSERT_NE(TDM_ERROR_NONE, error);
        ASSERT_EQ(NULL, queue);
 
-       queue = tdm_hwc_window_get_buffer_queue(NULL, NULL);
+       queue = tdm_hwc_window_acquire_buffer_queue(NULL, NULL);
        ASSERT_EQ(NULL, queue);
 }
 
@@ -126,13 +126,13 @@ TEST_P(TDMHwcWindow, GetBufferQueueSuccessful)
                                error = tdm_hwc_window_set_info(hwc_wins[w], &info);
                                ASSERT_EQ(TDM_ERROR_NONE, error);
 
-                               queue = tdm_hwc_window_get_buffer_queue(hwc_wins[w], &error);
-                               tbm_surface_queue_destroy(queue);
+                               queue = tdm_hwc_window_acquire_buffer_queue(hwc_wins[w], &error);
+                               tdm_hwc_window_release_buffer_queue(hwc_wins[w], queue);
                                ASSERT_EQ(TDM_ERROR_NONE, error);
                                ASSERT_NE(NULL, queue);
 
-                               queue = tdm_hwc_window_get_buffer_queue(hwc_wins[w], NULL);
-                               tbm_surface_queue_destroy(queue);
+                               queue = tdm_hwc_window_acquire_buffer_queue(hwc_wins[w], NULL);
+                               tdm_hwc_window_release_buffer_queue(hwc_wins[w], queue);
                                ASSERT_NE(NULL, queue);
                        }
 
index 7a5893d..0b40cd5 100644 (file)
@@ -992,7 +992,7 @@ void
 tdm_hwc_window_destroy(tdm_hwc_window *hwc_window);
 
 /**
- * @brief Get a buffer queue for the window object
+ * @brief Acquire a buffer queue for the window object
  * @details These buffers are used to composite by hardware a client content in
  * the nocomp mode.
  * @param[in] hwc_window A window object
@@ -1001,7 +1001,7 @@ tdm_hwc_window_destroy(tdm_hwc_window *hwc_window);
  * @since 2.0.0
  */
 tbm_surface_queue_h
-tdm_hwc_window_get_buffer_queue(tdm_hwc_window *hwc_window, tdm_error *error);
+tdm_hwc_window_acquire_buffer_queue(tdm_hwc_window *hwc_window, tdm_error *error);
 
 /**
  * @brief Release a buffer queue for the window object
index 12b088c..f695562 100644 (file)
@@ -868,8 +868,8 @@ typedef struct _tdm_func_hwc_window {
         * @param[out] error #TDM_ERROR_NONE if success. Otherwise, error value.
         * @return A buffer queue
         */
-       tbm_surface_queue_h (*hwc_window_get_buffer_queue)(tdm_hwc_window *hwc_window,
-                                                                                                          tdm_error *error);
+       tbm_surface_queue_h (*hwc_window_acquire_buffer_queue)(tdm_hwc_window *hwc_window,
+                                                                                                                  tdm_error *error);
 
        /**
         * @brief Release a buffer queue for the window object
index c596ac6..225325f 100644 (file)
@@ -210,7 +210,7 @@ typedef enum {
        /** If the client needs to render to a specific buffer for compositing
         *  with TDM_COMPOSITION_DEVICE, Set TDM_PREPARATION_BUFFER_QUEUE type to hwc_window.
         *  The client will render next frame on buffers of queue which got by
-        *  tdm_hwc_window_get_buffer_queue.
+        *  tdm_hwc_window_acquire_buffer_queue.
         */
        TDM_PREPARATION_BUFFER_QUEUE = (1 << 0),
 } tdm_hwc_window_preparation;
index 72b80af..0066ef3 100644 (file)
@@ -185,7 +185,7 @@ tdm_hwc_window_destroy(tdm_hwc_window *hwc_window)
 }
 
 EXTERN tbm_surface_queue_h
-tdm_hwc_window_get_buffer_queue(tdm_hwc_window *hwc_window, tdm_error *error)
+tdm_hwc_window_acquire_buffer_queue(tdm_hwc_window *hwc_window, tdm_error *error)
 {
        tdm_private_module *private_module;
        tdm_func_hwc_window *func_hwc_window = NULL;
@@ -198,7 +198,7 @@ tdm_hwc_window_get_buffer_queue(tdm_hwc_window *hwc_window, tdm_error *error)
        private_module = private_output->private_module;
        func_hwc_window = &private_module->func_hwc_window;
 
-       if (!func_hwc_window->hwc_window_get_buffer_queue) {
+       if (!func_hwc_window->hwc_window_acquire_buffer_queue) {
                /* LCOV_EXCL_START */
                _pthread_mutex_unlock(&private_display->lock);
                TDM_WRN("not implemented!!");
@@ -207,7 +207,7 @@ tdm_hwc_window_get_buffer_queue(tdm_hwc_window *hwc_window, tdm_error *error)
                return NULL;
        }
 
-       queue = func_hwc_window->hwc_window_get_buffer_queue(private_hwc_window->hwc_window_backend, error);
+       queue = func_hwc_window->hwc_window_acquire_buffer_queue(private_hwc_window->hwc_window_backend, error);
 
        _pthread_mutex_unlock(&private_display->lock);