summaryrefslogtreecommitdiff
path: root/src/lib/evas/common
diff options
context:
space:
mode:
authorUlisses Furquim <ulisses.furquim@intel.com>2013-09-02 20:01:37 -0300
committerUlisses Furquim <ulisses.furquim@intel.com>2013-09-02 20:01:37 -0300
commit063f076aed889c4425cea315120750f9bb92f7e6 (patch)
tree74f8715aa5fabfee5e1224da418e520819f71a23 /src/lib/evas/common
parent31b1cc6e3e158e9f47c4395888be9b227e172807 (diff)
evas/async_render: remove block/unblock of render thread.
This reverts commit 42a46214c4f9b35c0e1f5a84c56ea76ba2235eae.
Diffstat (limited to 'src/lib/evas/common')
-rw-r--r--src/lib/evas/common/evas_thread_render.c21
1 files changed, 1 insertions, 20 deletions
diff --git a/src/lib/evas/common/evas_thread_render.c b/src/lib/evas/common/evas_thread_render.c
index 3474469450..f37f43a6f7 100644
--- a/src/lib/evas/common/evas_thread_render.c
+++ b/src/lib/evas/common/evas_thread_render.c
@@ -4,7 +4,6 @@
4 4
5static Eina_Thread evas_thread_worker; 5static Eina_Thread evas_thread_worker;
6static Eina_Condition evas_thread_queue_condition; 6static Eina_Condition evas_thread_queue_condition;
7static Eina_Lock evas_thread_block_lock;
8static Eina_Lock evas_thread_queue_lock; 7static Eina_Lock evas_thread_queue_lock;
9static Eina_Bool evas_thread_queue_ready = EINA_FALSE; 8static Eina_Bool evas_thread_queue_ready = EINA_FALSE;
10static Eina_Inarray evas_thread_queue; 9static Eina_Inarray evas_thread_queue;
@@ -56,19 +55,7 @@ evas_thread_queue_flush(Evas_Thread_Command_Cb cb, void *data)
56 evas_thread_queue_append(cb, data, EINA_TRUE); 55 evas_thread_queue_append(cb, data, EINA_TRUE);
57} 56}
58 57
59EAPI void 58static void*
60evas_thread_queue_block(void)
61{
62 eina_lock_take(&evas_thread_block_lock);
63}
64
65EAPI void
66evas_thread_queue_unblock(void)
67{
68 eina_lock_release(&evas_thread_block_lock);
69}
70
71static void *
72evas_thread_worker_func(void *data EINA_UNUSED, Eina_Thread thread EINA_UNUSED) 59evas_thread_worker_func(void *data EINA_UNUSED, Eina_Thread thread EINA_UNUSED)
73{ 60{
74 while (1) 61 while (1)
@@ -96,8 +83,6 @@ evas_thread_worker_func(void *data EINA_UNUSED, Eina_Thread thread EINA_UNUSED)
96 continue; 83 continue;
97 } 84 }
98 85
99 eina_lock_take(&evas_thread_block_lock);
100
101 cmd = evas_thread_queue.members; 86 cmd = evas_thread_queue.members;
102 evas_thread_queue.members = evas_thread_queue_cache; 87 evas_thread_queue.members = evas_thread_queue_cache;
103 evas_thread_queue_cache = cmd; 88 evas_thread_queue_cache = cmd;
@@ -124,7 +109,6 @@ evas_thread_worker_func(void *data EINA_UNUSED, Eina_Thread thread EINA_UNUSED)
124 cmd++; 109 cmd++;
125 len--; 110 len--;
126 } 111 }
127 eina_lock_release(&evas_thread_block_lock);
128 } 112 }
129 113
130out: 114out:
@@ -144,8 +128,6 @@ evas_thread_init(void)
144 128
145 if (!eina_lock_new(&evas_thread_queue_lock)) 129 if (!eina_lock_new(&evas_thread_queue_lock))
146 CRIT("Could not create draw thread lock"); 130 CRIT("Could not create draw thread lock");
147 if (!eina_lock_new(&evas_thread_block_lock))
148 CRIT("Could not create draw thread block lock");
149 if (!eina_condition_new(&evas_thread_queue_condition, &evas_thread_queue_lock)) 131 if (!eina_condition_new(&evas_thread_queue_condition, &evas_thread_queue_lock))
150 CRIT("Could not create draw thread condition"); 132 CRIT("Could not create draw thread condition");
151 if (!eina_thread_create(&evas_thread_worker, EINA_THREAD_NORMAL, 0, 133 if (!eina_thread_create(&evas_thread_worker, EINA_THREAD_NORMAL, 0,
@@ -172,7 +154,6 @@ evas_thread_shutdown(void)
172 evas_async_events_process(); 154 evas_async_events_process();
173 155
174 eina_thread_join(evas_thread_worker); 156 eina_thread_join(evas_thread_worker);
175 eina_lock_free(&evas_thread_block_lock);
176 eina_lock_free(&evas_thread_queue_lock); 157 eina_lock_free(&evas_thread_queue_lock);
177 eina_condition_free(&evas_thread_queue_condition); 158 eina_condition_free(&evas_thread_queue_condition);
178 159