equal
deleted
inserted
replaced
45 // ----------------------------------------------------------------------------- |
45 // ----------------------------------------------------------------------------- |
46 // |
46 // |
47 void CHgVgEGL::ConstructL (RWindow& aWindow) |
47 void CHgVgEGL::ConstructL (RWindow& aWindow) |
48 { |
48 { |
49 InitEGL(aWindow); |
49 InitEGL(aWindow); |
50 // Enable flag that is used to determine whether egl has been initialized. |
|
51 // For example vgImages shouldn't be created before egl has been initialized. |
|
52 // There will be only one instance of this class so there is no need to check |
|
53 // whether there is already something in the DLL tls. |
|
54 TBool* eglInitialized = new TBool(ETrue); |
|
55 Dll::SetTls((TAny*)eglInitialized); |
|
56 } |
50 } |
57 |
51 |
58 // ----------------------------------------------------------------------------- |
52 // ----------------------------------------------------------------------------- |
59 // CHgVgEGL::CHgVgEGL() |
53 // CHgVgEGL::CHgVgEGL() |
60 // C++ default constructor can NOT contain any code, that might leave. |
54 // C++ default constructor can NOT contain any code, that might leave. |
70 // ----------------------------------------------------------------------------- |
64 // ----------------------------------------------------------------------------- |
71 // |
65 // |
72 CHgVgEGL::~CHgVgEGL ( ) |
66 CHgVgEGL::~CHgVgEGL ( ) |
73 { |
67 { |
74 DestroyEGL(); |
68 DestroyEGL(); |
75 // Disable flag that is used to determine whether egl has been initialized. |
|
76 // For example vgImages shouldn't be created before egl has been initialized. |
|
77 delete Dll::Tls(); |
|
78 Dll::FreeTls(); |
|
79 } |
69 } |
80 |
70 |
81 // --------------------------------------------------------------------------- |
71 // --------------------------------------------------------------------------- |
82 // CHgVgEGL::InitWindowSurfaceL() |
72 // CHgVgEGL::InitWindowSurfaceL() |
83 // --------------------------------------------------------------------------- |
73 // --------------------------------------------------------------------------- |
365 } |
355 } |
366 |
356 |
367 return bitmap; |
357 return bitmap; |
368 } |
358 } |
369 |
359 |
370 // --------------------------------------------------------------------------- |
|
371 // CHgVgEGL::EglInitialized() |
|
372 // --------------------------------------------------------------------------- |
|
373 // |
|
374 TBool CHgVgEGL::EglInitialized() |
|
375 { |
|
376 TBool* eglInitialized = (TBool*)Dll::Tls(); |
|
377 return eglInitialized ? *eglInitialized : EFalse; |
|
378 } |
|
379 |
|
380 // End of File |
360 // End of File |