uifw/ganes/src/HgVgHelper.cpp
branchRCL_3
changeset 59 978afdc0236f
parent 56 d48ab3b357f1
child 64 85902f042028
equal deleted inserted replaced
56:d48ab3b357f1 59:978afdc0236f
    18 // INCLUDE FILES
    18 // INCLUDE FILES
    19 
    19 
    20 #include "HgVgHelper.h"
    20 #include "HgVgHelper.h"
    21 #include "HgVgDrawBuffer.h"
    21 #include "HgVgDrawBuffer.h"
    22 #include "HgVgImageCreator.h"
    22 #include "HgVgImageCreator.h"
       
    23 #include "HgVgEgl.h"
    23 
    24 
    24 #include <e32math.h>
    25 #include <e32math.h>
    25 #include <gulicon.h>
    26 #include <gulicon.h>
    26 #include <fbs.h>
    27 #include <fbs.h>
    27 #include <nvg.h>
    28 #include <nvg.h>
   105 // HgVgHelper::CreateVgImageFromIconL()
   106 // HgVgHelper::CreateVgImageFromIconL()
   106 // ---------------------------------------------------------------------------
   107 // ---------------------------------------------------------------------------
   107 //     
   108 //     
   108 VGImage CreateVgImageFromIconL(const CGulIcon& aIcon)
   109 VGImage CreateVgImageFromIconL(const CGulIcon& aIcon)
   109     {
   110     {
   110         
   111     // If egl has not been initialized we aren't allowed to create vgimages.
       
   112     if (!CHgVgEGL::EglInitialized()) return VG_INVALID_HANDLE;
       
   113     
   111     CFbsBitmap* bitmap = aIcon.Bitmap();
   114     CFbsBitmap* bitmap = aIcon.Bitmap();
   112     User::LeaveIfNull(bitmap);
   115     User::LeaveIfNull(bitmap);
   113     CFbsBitmap* mask = aIcon.Mask();
   116     CFbsBitmap* mask = aIcon.Mask();
   114     
   117     
   115     // if this is NVG image, rasterize it using 
   118     // if this is NVG image, rasterize it using