Tizen 2.1 base
[framework/osp/uifw.git] / src / ui / effects / inc / FUiEffects_RendererLog.h
1 //
2 // Open Service Platform
3 // Copyright (c) 2012-2013 Samsung Electronics Co., Ltd.
4 //
5 // Licensed under the Flora License, Version 1.0 (the License);
6 // you may not use this file except in compliance with the License.
7 // You may obtain a copy of the License at
8 //
9 //     http://floralicense.org/license/
10 //
11 // Unless required by applicable law or agreed to in writing, software
12 // distributed under the License is distributed on an AS IS BASIS,
13 // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
14 // See the License for the specific language governing permissions and
15 // limitations under the License.
16 //
17
18 /**
19  * @file        FUiEffects_RendererLog.h
20  * @brief               This is the header file for renderer logging definitions
21  */
22
23 #ifndef _FUI_EFFECTS_INTERNAL_RENDERER_LOG_H_
24 #define _FUI_EFFECTS_INTERNAL_RENDERER_LOG_H_
25
26 namespace Tizen { namespace Ui { namespace Effects { namespace _Renderer
27 {
28
29 /**
30  * Checks whether there was EGL operation errors
31  *
32  * @return              true on success othrwise false
33  */
34 bool CheckEglNoErrors(void);
35
36 /**
37  * Checks whether there was GL operation errors
38  *
39  * @return              true on success othrwise false
40  */
41 bool CheckGlNoErrors(void);
42
43 #ifdef _DEBUG
44 #define EGL_ASSERT_NOERRORS \
45         {  \
46                 if (!CheckEglNoErrors()) \
47                 { \
48                         SysAssertf(false, "Execution stopped on CheckEglNoErrors fail"); \
49                 } \
50         }
51
52 #define GL_ASSERT_NOERRORS \
53         {  \
54                 if (!CheckGlNoErrors()) \
55                 { \
56                         SysLog(NID_UI_EFFECT, "%s::%d", __PRETTY_FUNCTION__, __LINE__);\
57                         SysAssertf(false, "Execution stopped on CheckGlNoErrors fail"); \
58                 } \
59         }
60 #else // #ifdef _DEBUG
61 #define EGL_ASSERT_NOERRORS
62 #define GL_ASSERT_NOERRORS
63 #endif
64
65 } } } } // Tizen::Ui::Effects::_EffectRenderer
66
67 #endif //_FUI_EFFECTS_INTERNAL_RENDERER_LOG_H_*/