|
1 // Copyright (c) 2009 Nokia Corporation and/or its subsidiary(-ies). |
|
2 // All rights reserved. |
|
3 // This component and the accompanying materials are made available |
|
4 // under the terms of "Eclipse Public License v1.0" |
|
5 // which accompanies this distribution, and is available |
|
6 // at the URL "http://www.eclipse.org/legal/epl-v10.html". |
|
7 // |
|
8 // Initial Contributors: |
|
9 // Nokia Corporation - initial contribution. |
|
10 // |
|
11 // Contributors: |
|
12 // |
|
13 // Description: |
|
14 // Reference EGL implementation to support EGL sync objects and OpenWF extensions |
|
15 |
|
16 // XEglPls inline functions |
|
17 // |
|
18 inline void XEglPls::Lock() |
|
19 { |
|
20 iLock.Wait(); |
|
21 } |
|
22 |
|
23 inline void XEglPls::Unlock() |
|
24 { |
|
25 iLock.Signal(); |
|
26 } |
|
27 |
|
28 // CEglDriver inline functions |
|
29 // |
|
30 inline void CEglDriver::Lock() |
|
31 { |
|
32 iLock.Wait(); |
|
33 } |
|
34 |
|
35 inline void CEglDriver::Unlock() |
|
36 { |
|
37 iLock.Signal(); |
|
38 } |
|
39 |
|
40 inline TBool CEglDriver::IsDisplayValid(EGLDisplay aDisplay) const |
|
41 { |
|
42 return (iDisplay && iDisplay->Handle() == aDisplay); |
|
43 } |
|
44 |
|
45 inline CEglDisplay* CEglDriver::FindDisplay(EGLDisplay aDisplay) const |
|
46 { |
|
47 return IsDisplayValid(aDisplay) ? iDisplay : NULL; |
|
48 } |
|
49 |
|
50 #ifdef _DEBUG |
|
51 inline RHeap& CEglDriver::Heap() const |
|
52 { |
|
53 return iHeap; |
|
54 } |
|
55 #endif |
|
56 |
|
57 // CEglDisplay inline functions |
|
58 // |
|
59 inline TBool CEglDisplay::IsInitialized() const |
|
60 { |
|
61 return iIsInitialized; |
|
62 } |
|
63 |
|
64 inline RHeap& CEglDisplay::Heap() const |
|
65 { |
|
66 return iHeap; |
|
67 } |
|
68 |
|
69 inline EGLDisplay CEglDisplay::Handle() const |
|
70 { |
|
71 return iHandle; |
|
72 } |
|
73 |
|
74 // CEglSync inline functions |
|
75 // |
|
76 inline void CEglSync::Open() |
|
77 { |
|
78 ++iRefCount; |
|
79 } |
|
80 |
|
81 inline TBool CEglSync::IsDestroyed() const |
|
82 { |
|
83 return iIsDestroyed; |
|
84 } |
|
85 |
|
86 inline EGLenum CEglSync::Type() const |
|
87 { |
|
88 return iType; |
|
89 } |
|
90 |
|
91 inline EGLenum CEglSync::Status() const |
|
92 { |
|
93 return iStatus; |
|
94 } |