symbian-qemu-0.9.1-12/model-libraries/syborg-graphicswrapper/syborg-graphicswrapper.cpp
branchgraphics-phase-3
changeset 110 52ce3e8fba90
parent 77 b3dcdc7f8f12
child 111 345f1c88c950
equal deleted inserted replaced
109:ae83407e7b6a 110:52ce3e8fba90
     1 // This is the main DLL file.
     1 // This is the main DLL file.
     2 
     2 
     3 #include "platformtypes.h"
     3 #include "platformtypes.h"
     4 #include <KhronosAPIWrapper.h>
     4 #include <KhronosAPIWrapper.h>
     5 #include <VirtualVideoInterfaceConstants.h>  //Registers and enums 
     5 #include <guestvideodriverinterfaceconstants.h>  //Registers and enums 
     6 #include <platformthreading.h>  //mutex
     6 #include <platformthreading.h>  //mutex
     7 #include <protocol_MGraphicsVHWCallback.h>
     7 #include <graphicsvhwcallback.h>
     8 #include "syborg-graphicswrapper.h"
     8 #include "syborggraphicswrapper.h"
     9 
     9 
    10 SyborgGraphicsWrapper::SyborgGraphicsWrapper()
    10 SyborgGraphicsWrapper::SyborgGraphicsWrapper()
    11     {
    11     {															
    12     }
    12     }
    13 
    13 
    14 SyborgGraphicsWrapper::~SyborgGraphicsWrapper()
    14 SyborgGraphicsWrapper::~SyborgGraphicsWrapper()
    15     {
    15     {
    16     delete m_wrapper;
    16     delete m_wrapper;
    30 
    30 
    31     uint8_t *cmd_buffer = (uint8_t *)aCommandMemBase;
    31     uint8_t *cmd_buffer = (uint8_t *)aCommandMemBase;
    32     uint8_t *frame_buffer = (uint8_t *)aGraphicsMemBase;
    32     uint8_t *frame_buffer = (uint8_t *)aGraphicsMemBase;
    33     if( (cmd_buffer != NULL) && (frame_buffer != NULL) )
    33     if( (cmd_buffer != NULL) && (frame_buffer != NULL) )
    34         {
    34         {
    35         m_wrapper = new KhronosAPIWrapper( (protocol_MGraphicsVHWCallback*)this,
    35         m_wrapper = new KhronosAPIWrapper( (MGraphicsVHWCallback*)this,
    36             frame_buffer, &cmd_buffer[VVHW_INPUT_BASE], &cmd_buffer[VVHW_OUTPUT_BASE] );
    36             frame_buffer, &cmd_buffer[VVHW_INPUT_BASE], &cmd_buffer[VVHW_OUTPUT_BASE] );
    37         //Reset synchronisation mechanisms
    37         //Reset synchronisation mechanisms
    38         Psu::platform_release_semaphore(m_outputBufferSemaphore);
    38         Psu::platform_release_semaphore(m_outputBufferSemaphore);
    39         Psu::platform_create_semaphore(m_outputBufferSemaphore, 1, 1);
    39         Psu::platform_create_semaphore(m_outputBufferSemaphore, 1, 1);
    40         ret = 0;
    40         ret = 0;
    53     #endif
    53     #endif
    54     }
    54     }
    55 
    55 
    56 void SyborgGraphicsWrapper::ReleaseOutputBuffer(){}
    56 void SyborgGraphicsWrapper::ReleaseOutputBuffer(){}
    57 
    57 
    58 void SyborgGraphicsWrapper::ProsessingDone(int i)
    58 void SyborgGraphicsWrapper::ProcessingDone(int i)
    59     {
    59     {
    60     m_pythonCallBack( i );
    60     m_pythonCallBack( i );
    61     }
    61     }
    62 
    62 
    63 extern "C"
    63 extern "C"