unixroot.cpp
上传用户:zhongxx05
上传日期:2007-06-06
资源大小:33641k
文件大小:19k
源码类别:

Symbian

开发平台:

C/C++

  1. /* ***** BEGIN LICENSE BLOCK ***** 
  2.  * Version: RCSL 1.0/RPSL 1.0 
  3.  *  
  4.  * Portions Copyright (c) 1995-2002 RealNetworks, Inc. All Rights Reserved. 
  5.  *      
  6.  * The contents of this file, and the files included with this file, are 
  7.  * subject to the current version of the RealNetworks Public Source License 
  8.  * Version 1.0 (the "RPSL") available at 
  9.  * http://www.helixcommunity.org/content/rpsl unless you have licensed 
  10.  * the file under the RealNetworks Community Source License Version 1.0 
  11.  * (the "RCSL") available at http://www.helixcommunity.org/content/rcsl, 
  12.  * in which case the RCSL will apply. You may also obtain the license terms 
  13.  * directly from RealNetworks.  You may not use this file except in 
  14.  * compliance with the RPSL or, if you have a valid RCSL with RealNetworks 
  15.  * applicable to this file, the RCSL.  Please see the applicable RPSL or 
  16.  * RCSL for the rights, obligations and limitations governing use of the 
  17.  * contents of the file.  
  18.  *  
  19.  * This file is part of the Helix DNA Technology. RealNetworks is the 
  20.  * developer of the Original Code and owns the copyrights in the portions 
  21.  * it created. 
  22.  *  
  23.  * This file, and the files included with this file, is distributed and made 
  24.  * available on an 'AS IS' basis, WITHOUT WARRANTY OF ANY KIND, EITHER 
  25.  * EXPRESS OR IMPLIED, AND REALNETWORKS HEREBY DISCLAIMS ALL SUCH WARRANTIES, 
  26.  * INCLUDING WITHOUT LIMITATION, ANY WARRANTIES OF MERCHANTABILITY, FITNESS 
  27.  * FOR A PARTICULAR PURPOSE, QUIET ENJOYMENT OR NON-INFRINGEMENT. 
  28.  * 
  29.  * Technology Compatibility Kit Test Suite(s) Location: 
  30.  *    http://www.helixcommunity.org/content/tck 
  31.  * 
  32.  * Contributor(s): 
  33.  *  
  34.  * ***** END LICENSE BLOCK ***** */ 
  35. // for shared memory
  36. #include <sys/types.h>
  37. #include <sys/ipc.h>
  38. #include <sys/shm.h>
  39. #include <sys/utsname.h>
  40. #include "hxcom.h"
  41. #include "hxwintyp.h"
  42. #include "hxvsurf.h"
  43. #include "hxslist.h"
  44. #include "colormap.h"
  45. #include "hxprefs.h"
  46. #include "hxtick.h"
  47. #include "hxthread.h"
  48. #include "basesite.h"
  49. #include "unixroot.h"
  50. #include "unixsite.h"
  51. #include "unixcmap.h"
  52. #include "shmhelp.h"
  53. //  #ifdef _DEBUG
  54. //  #include <X11/extensions/xf86vmode.h> //for debug video sync rates..
  55. //  #endif
  56. //Work around AIX problem.
  57. #ifdef _AIX
  58. #  define MAX_SHARED_REGIONS ((UINT32)1)
  59. #else
  60. #  define MAX_SHARED_REGIONS ((UINT32)9999)
  61. #endif
  62. CUnixRootSurf::CUnixRootSurf(IUnknown* pContext, CHXBaseSite* pSite )
  63.    : CBaseRootSurface(pContext, pSite)
  64.    , m_bUseShm(FALSE)
  65.    , m_nShmId(0)
  66.    , m_pDisplay(NULL)
  67.    , m_GC(0)
  68.    , m_nScreenNumber(0)
  69.    , m_pXImage(NULL)
  70.    , m_pVisual(NULL)
  71.    , m_unDepth(0)
  72.    , m_pScreen(NULL)
  73.    , m_pYUVScratchBits(NULL)
  74.    , m_nYUVScratchPitch(0)
  75.    , m_pScratchBits(NULL)
  76.    , m_nScratchPitch(0)
  77.    , m_nBitsPerPixel(0)
  78.    , m_nCompositionSize(0)
  79. {
  80. }
  81. HX_RESULT CUnixRootSurf::Init()
  82. {
  83.    //get window and display from main Site.
  84.    HXxWindow* pWindow = m_pSite->GetWindow();
  85.    HX_ASSERT(pWindow);
  86.    m_pDisplay = (Display*)pWindow->display;
  87.    m_window   = (Window)pWindow->window;
  88.     
  89.    HX_ASSERT( m_pDisplay );
  90.    HX_ASSERT( m_window );
  91.    //
  92.    // Now see if our X11 server supports the Shared Memory extension.
  93.    //
  94.    ShmHelp::Init(m_pDisplay);
  95.    m_bUseShm = ShmHelp::ShmAvailable();
  96.    
  97.    //Create the graphics context 
  98.    XGCValues values;
  99.    m_GC = XCreateGC(m_pDisplay, m_window, 0, &values);
  100.     //Get X window attributes & visual
  101.    XWindowAttributes attr;
  102.    XGetWindowAttributes(m_pDisplay, m_window, &attr);
  103.    m_pVisual = attr.visual;
  104.    // get visual info & depth 
  105.    int nv=0;
  106.    XVisualInfo visInfo;
  107.    memset(&visInfo, 0, sizeof(XVisualInfo));
  108.    visInfo.visualid = XVisualIDFromVisual(m_pVisual);
  109.    XVisualInfo* pVisualInfo = XGetVisualInfo (m_pDisplay, VisualIDMask, &visInfo, &nv);
  110.    m_unDepth       = pVisualInfo->depth;
  111.    m_nScreenNumber = DefaultScreen(m_pDisplay);
  112.    m_pScreen       = XScreenOfDisplay(m_pDisplay, m_nScreenNumber);
  113.    m_colormap      = HXGetXColormap(m_pDisplay, m_window);
  114.    // get pixmap (blt) information for the best depth we can display
  115.    int i=0;
  116.    int nNum=0;
  117.    XPixmapFormatValues *pixmap_formats = XListPixmapFormats(m_pDisplay, &nNum);
  118.    if(pixmap_formats) 
  119.    {
  120.       for (i=0 ; i<nNum; i++)
  121.       {
  122.          if (pixmap_formats[i].depth == m_unDepth)
  123.          {
  124.             m_nBitsPerPixel = pixmap_formats[i].bits_per_pixel;
  125.          }
  126.       }
  127.       XFree(pixmap_formats);
  128.       pixmap_formats = NULL;
  129.    }
  130.    memset(&m_bmiSave, 0, sizeof(HXBitmapInfo));
  131.    m_bmiSave.bmiHeader.biBitCount    = m_nBitsPerPixel;
  132.    m_bmiSave.bmiHeader.biCompression = (m_unDepth==8 ? BI_RGB : BI_BITFIELDS);
  133.    m_bmiSave.un.dwBitMask[0]         = pVisualInfo->red_mask;
  134.    m_bmiSave.un.dwBitMask[1]         = pVisualInfo->green_mask;
  135.    m_bmiSave.un.dwBitMask[2]         = pVisualInfo->blue_mask;
  136.    //Set primary surface CID.
  137.    m_nCompositionSurfaceCID = GetBitmapColor(&m_bmiSave);
  138.    XFree( pVisualInfo );
  139. //  #ifdef _DEBUG
  140. //     //Lets find out what Hsync and Vsync rates we have for this display.
  141. //     //Ripped from xvidtune.c
  142. //     XF86VidModeModeLine mode_line;
  143. //     int    scrn=0; 
  144. //     int    dot_clock;
  145. //     double vsync_hz, HSyncRate,HTotal, VTotal, PixelClock;
  146. //     if(XF86VidModeGetModeLine(m_pDisplay, scrn, &dot_clock, &mode_line))
  147. //     {
  148. //        PixelClock=dot_clock;
  149. //        HTotal = mode_line.htotal;
  150. //        VTotal = mode_line.vtotal;
  151. //        HSyncRate = PixelClock*1000.0/HTotal;
  152. //        vsync_hz = HSyncRate/VTotal;
  153. //        fprintf( stderr, "This Display's Hsync rate is: %f and Vsync: %fn",
  154. //                 HSyncRate, vsync_hz );
  155. //     }
  156.    
  157. //  #endif
  158.    
  159.    return HXR_OK;
  160. }
  161. CUnixRootSurf::~CUnixRootSurf()
  162. {
  163.    _DestroyCompositionSurface();
  164.    if( m_GC )
  165.    {
  166.       XFreeGC( m_pDisplay, m_GC );
  167.       m_GC=0;
  168.    }
  169.    if (m_pVisual)
  170.    {
  171.       /* PJG: don't have to free visuals */
  172.       m_pVisual = NULL;
  173.    }
  174.    
  175.    if(m_bUseShm)
  176.    {
  177.       if( m_pCompositionSurface != NULL )
  178.          ShmHelp::DetachSharedRegion(&m_pCompositionSurface, &m_shmInfo);
  179.    }
  180.    else
  181.    {
  182.       HX_DELETE(m_pCompositionSurface);
  183.       m_nCompositionSize=0;
  184.       m_bCompositionSurfaceCreated=FALSE;
  185.    }
  186.    
  187.    //XXXgfw any more clean up for these two?
  188.    HX_VECTOR_DELETE( m_pScratchBits );
  189.    HX_VECTOR_DELETE( m_pYUVScratchBits );
  190. }
  191. HX_RESULT CUnixRootSurf::_ResizeVideoBuffer( INT32 nSize)
  192. {
  193.    HX_RESULT retVal=HXR_OK;
  194.    if(nSize <= m_nCompositionSize)
  195.       return retVal;
  196.    if(m_bUseShm) 
  197.    {
  198.       if( m_pCompositionSurface != NULL )
  199.          retVal = ShmHelp::DetachSharedRegion(&m_pCompositionSurface, &m_shmInfo);
  200.       if( retVal==HXR_OK )
  201.       {
  202.          retVal = ShmHelp::CreateSharedRegion( nSize,
  203.                                                &m_pCompositionSurface,
  204.                                                &m_nShmId,
  205.                                                &m_shmInfo
  206.                                                );
  207.          
  208.       }
  209.       if( retVal != HXR_OK )
  210.       {
  211.          m_bCompositionSurfaceCreated = FALSE;
  212.          m_nCompositionSize           = 0;
  213.          m_bUseShm = FALSE;
  214.       }
  215.       else
  216.       {
  217.          //It all worked
  218.          m_nCompositionSize           = nSize;
  219.          m_bCompositionSurfaceCreated = TRUE;
  220.          return retVal;
  221.       }
  222.       
  223.    }
  224.    //We need to fall through here so that if the shared memory stuff
  225.    //above fails we can create it the old fashioned way.
  226.    if(m_pCompositionSurface == NULL)
  227.    {
  228.       m_pCompositionSurface = (UCHAR*) malloc(nSize);
  229.    }
  230.    else
  231.    {
  232.       m_pCompositionSurface = (UCHAR*) realloc(m_pCompositionSurface, nSize);
  233.    }
  234.    if( m_pCompositionSurface )
  235.    {
  236.       m_nCompositionSize = nSize;
  237.    }
  238.    else
  239.    {
  240.       HX_ASSERT("We can't alloc the composition surface." == NULL );
  241.       m_nCompositionSize = 0;
  242.    }
  243.    return retVal;
  244. }
  245. HX_RESULT CUnixRootSurf::_DebugBlt( UCHAR* pImageData, HXBitmapInfoHeader* pBitmapInfo,
  246.                      HXxRect& rDestRect, HXxRect& rSrcRect)
  247. {
  248.    HX_ASSERT( m_window );
  249.    HX_ASSERT( m_pDisplay );
  250.    HX_ASSERT( m_GC );
  251.    
  252.    XSetForeground( m_pDisplay, m_GC, WhitePixel(m_pDisplay, 0 ));
  253.    XSetBackground( m_pDisplay, m_GC, BlackPixel(m_pDisplay, 0 ));
  254.    XSetLineAttributes(m_pDisplay, m_GC, 5, LineSolid, CapRound, JoinRound );
  255.    
  256.    XSetForeground( m_pDisplay, m_GC, WhitePixel(m_pDisplay, 0) );
  257.    XFillRectangle( m_pDisplay, m_window, m_GC,
  258.                    rDestRect.left, rDestRect.top,
  259.                    rDestRect.right-rDestRect.left,
  260.                    rDestRect.bottom-rDestRect.top
  261.                    );
  262.    XDrawRectangle( m_pDisplay, m_window, m_GC,
  263.                    rDestRect.left, rDestRect.top,
  264.                    rDestRect.right-rDestRect.left,
  265.                    rDestRect.bottom-rDestRect.top
  266.                    );
  267.    return HXR_OK;
  268. }
  269. void CUnixRootSurf::_GetYUVScratchWidthHeight(UINT32* pWidth, UINT32* pHeight)
  270. {
  271.    *pWidth     = m_bmiYUVScratch.bmiHeader.biWidth;
  272.    *pHeight    = m_bmiYUVScratch.bmiHeader.biHeight;
  273. }
  274. XImage* CUnixRootSurf::_GetCompositionSurfaceDrawable()
  275. {
  276.    return m_pXImage;
  277. }
  278. //Not used except for XING.....
  279. void CUnixRootSurf::_CreateYUVScratchSurface(UINT32 width, UINT32 height)
  280. {
  281.    //Remove old bits....
  282.    HX_DELETE(m_pYUVScratchBits);
  283.    //Clear BitmapInfo struct....
  284.    memset(&m_bmiYUVScratch, 0, sizeof(HXBitmapInfo));
  285.    int nResult = MakeBitmap( &m_bmiYUVScratch,
  286.                              sizeof(m_bmiYUVScratch),
  287.                              CID_YUY2,
  288.                              width,
  289.                              height,
  290.                              NULL,
  291.                              0);
  292.    if( nResult )
  293.    {
  294.       m_pYUVScratchBits  = new UCHAR[m_bmiYUVScratch.bmiHeader.biSizeImage];
  295.       m_nYUVScratchPitch = GetBitmapPitch(&m_bmiYUVScratch);
  296.    }
  297. }
  298. void CUnixRootSurf::_GetYUVScratchSurfacePointer(UCHAR** pYUVBits, INT32* YUVPitch)
  299. {
  300.    *pYUVBits = m_pYUVScratchBits;
  301.    *YUVPitch = m_nYUVScratchPitch;
  302. }
  303. HX_RESULT CUnixRootSurf::CreateScratchSurface( int nCompositionSurfaceCID, HXxSize* pSize)
  304. {
  305.    //Remove old bits....
  306.    HX_DELETE(m_pScratchBits);
  307.    
  308.    //Clear BitmapInfo struct....
  309.    memset(&m_bmiScratch, 0, sizeof(HXBitmapInfo));
  310.    int nResult = MakeBitmap( &m_bmiScratch,
  311.                              sizeof(m_bmiScratch),
  312.                              nCompositionSurfaceCID,
  313.                              pSize->cx,
  314.                              pSize->cy,
  315.                              NULL,
  316.                              0);
  317.    if( nResult )
  318.    {
  319.       m_pScratchBits  = new UCHAR[m_bmiScratch.bmiHeader.biSizeImage];
  320.       m_nScratchPitch = GetBitmapPitch(&m_bmiScratch);
  321.    }
  322.    return nResult? HXR_OK : HXR_FAIL;
  323. }
  324. HX_RESULT CUnixRootSurf::ScratchLock(UCHAR** pBits, INT32* pPitch)
  325. {
  326.    *pBits  = m_pScratchBits;
  327.    *pPitch = m_nScratchPitch;
  328.    return HXR_OK;
  329. }
  330. HX_RESULT CUnixRootSurf::ScratchUnlock(UCHAR* pBits)
  331. {
  332.    return HXR_OK;
  333. }
  334. HX_RESULT CUnixRootSurf::_MinimalUnlock(HXxWindow* pWindow)
  335. {
  336. //     Window win = m_window;
  337. //     HX_ASSERT(win);
  338. //     HXxSize hxxSize;
  339. //     m_pSite->GetSize(hxxSize);
  340.    
  341. //     if (m_bUseShm)
  342. //     {
  343. //        XShmPutImage(m_pDisplay,
  344. //                     win,
  345. //                     m_GC,
  346. //                     m_pXImage,
  347. //                     0, 
  348. //                     0,
  349. //                     0,
  350. //                     0,
  351. //                     hxxSize.cx,      
  352. //                     hxxSize.cy,
  353. //                     False
  354. //                     );
  355. //     }
  356. //     else
  357. //     {
  358. //        XPutImage(m_pDisplay,
  359. //                  win,
  360. //                  m_GC,
  361. //                  m_pXImage,
  362. //                  0, 
  363. //                  0,
  364. //                  0,
  365. //                  0,
  366. //                  hxxSize.cx,
  367. //                  hxxSize.cy
  368. //                  );
  369. //     }
  370.      return HXR_OK;
  371. }
  372. HX_RESULT CUnixRootSurf::_LockComposition(UCHAR** pBits, INT32* pPitch)
  373. {
  374.    HX_RESULT retVal = HXR_OK;
  375.    if( !m_bCompositionSurfaceCreated || m_pCompositionSurface==NULL )
  376.    {
  377.       retVal = _CreateCompositionSurface();
  378.    }
  379.    HX_ASSERT( m_pCompositionSurface );
  380.    *pBits  = m_pCompositionSurface;
  381.    *pPitch = m_nCompositionPitch;
  382.    return HXR_OK;
  383. }
  384. void CUnixRootSurf::_BltFromScratchToComposition( HXxRect& rDestRect, HXxRect& rSrcRect)
  385. {
  386.    HX_ASSERT( "Not implemented on unix yet...."==NULL );
  387. }
  388. HX_RESULT CUnixRootSurf::_CreateCompositionSurface()
  389. {
  390.    HX_RESULT retVal = HXR_FAIL;
  391.    if(m_bCompositionSurfaceCreated)
  392.    {
  393.       return HXR_OK;
  394.    }
  395.    HX_ASSERT( !m_bCompositionSurfaceCreated );
  396.    HX_ASSERT( m_pSite );
  397.    //Create a BMI to describe the composition surface
  398.    HXxSize hxxSize;
  399.    m_pSite->GetSize(hxxSize);
  400.    memcpy(&m_compositionSize, &hxxSize, sizeof(HXxSize)); /* Flawfinder: ignore */
  401.    // find out how big we want to allocate.
  402.    if (m_pSite->IsFullScreen())
  403.    {
  404.       UINT16 unDummy=0;
  405.       UINT16 unHorzRes=0;
  406.       UINT16 unVertRes=0;
  407.       m_pSite->_GetDeviceCaps(NULL, unDummy, unHorzRes, unVertRes );
  408.       m_allocatedCompositionSize.cx = unHorzRes;
  409.       m_allocatedCompositionSize.cy = unVertRes;
  410.    }
  411.    else
  412.    {
  413.       m_allocatedCompositionSize.cx = m_compositionSize.cx;
  414.       m_allocatedCompositionSize.cy = m_compositionSize.cy;
  415.    }
  416.    //XXXgfw uhhhh, OK.
  417.    if( m_compositionSize.cx > m_allocatedCompositionSize.cx ||
  418.        m_compositionSize.cy > m_allocatedCompositionSize.cy )
  419.    {
  420.       m_allocatedCompositionSize.cx = m_compositionSize.cx;
  421.       m_allocatedCompositionSize.cy = m_compositionSize.cy;
  422.    }
  423.    //Make the bitmap header struct.
  424.    m_bmiComposition.bmiHeader.biBitCount    = m_bmiSave.bmiHeader.biBitCount;
  425.    m_bmiComposition.bmiHeader.biCompression = m_bmiSave.bmiHeader.biCompression;
  426.    m_bmiComposition.un.dwBitMask[0]         = m_bmiSave.un.dwBitMask[0];
  427.    m_bmiComposition.un.dwBitMask[1]         = m_bmiSave.un.dwBitMask[1];
  428.    m_bmiComposition.un.dwBitMask[2]         = m_bmiSave.un.dwBitMask[2];
  429.    int nResult = MakeBitmap( &m_bmiComposition,
  430.                              sizeof(m_bmiComposition),
  431.                              m_nCompositionSurfaceCID,
  432.                              m_allocatedCompositionSize.cx,
  433.                              m_allocatedCompositionSize.cy,
  434.                              NULL,
  435.                              0
  436.                              );
  437.    m_bmiComposition.bmiHeader.biBitCount    = m_bmiSave.bmiHeader.biBitCount;
  438.    m_bmiComposition.bmiHeader.biCompression = m_bmiSave.bmiHeader.biCompression;
  439.    m_bmiComposition.un.dwBitMask[0]         = m_bmiSave.un.dwBitMask[0];
  440.    m_bmiComposition.un.dwBitMask[1]         = m_bmiSave.un.dwBitMask[1];
  441.    m_bmiComposition.un.dwBitMask[2]         = m_bmiSave.un.dwBitMask[2];
  442.    //Now create the bits....
  443.    _ResizeVideoBuffer( m_bmiComposition.bmiHeader.biSizeImage );
  444.    m_nCompositionPitch = GetBitmapPitch( &m_bmiComposition );
  445.    if( m_pXImage )
  446.    {
  447.       XFree( m_pXImage );
  448.    }
  449.    if( m_bUseShm )
  450.    {
  451.       m_pXImage  = XShmCreateImage( m_pDisplay,
  452.                                     m_pVisual,
  453.                                     m_unDepth,
  454.                                     ZPixmap,
  455.                                     (char*)m_pCompositionSurface,
  456.                                     &m_shmInfo,
  457.                                     m_allocatedCompositionSize.cx,
  458.                                     m_allocatedCompositionSize.cy
  459.                                     );
  460.    }
  461.    else
  462.    {
  463.       m_pXImage  = XCreateImage( m_pDisplay,
  464.                                  m_pVisual,
  465.                                  m_unDepth,
  466.                                  ZPixmap,
  467.                                  0,
  468.                                  (char*)m_pCompositionSurface,
  469.                                  m_allocatedCompositionSize.cx,
  470.                                  m_allocatedCompositionSize.cy,
  471.                                  32,
  472.                                  0);
  473.    }
  474.    
  475.    if( m_pXImage )
  476.    {
  477.       m_bCompositionSurfaceCreated = TRUE;
  478. #ifdef _BIG_ENDIAN
  479.       m_pXImage->byte_order = MSBFirst;
  480. #else
  481.       m_pXImage->byte_order = LSBFirst;
  482. #endif      
  483.       retVal = HXR_OK;
  484.    }
  485.    return retVal;
  486. }
  487. void CUnixRootSurf::_MinimalBlt(HXxRect& srcRect, HXxRect& destRect)
  488. {
  489.    Window win = m_window;
  490.    HX_ASSERT(win);
  491.    if (m_bUseShm)
  492.    {
  493.       XShmPutImage(m_pDisplay,
  494.                    win,
  495.                    m_GC,
  496.                    m_pXImage,
  497.                    destRect.left, 
  498.                    destRect.top,
  499.                    destRect.left,
  500.                    destRect.top,
  501.                    destRect.right - destRect.left,      
  502.                    destRect.bottom - destRect.top,
  503.                    False
  504.                    );
  505.    }
  506.    else
  507.    {
  508.       XPutImage(m_pDisplay,
  509.                 win,
  510.                 m_GC,
  511.                 m_pXImage,
  512.                 srcRect.left, 
  513.                 srcRect.top,
  514.                 destRect.left,
  515.                 destRect.top,
  516.                 destRect.right - destRect.left,      
  517.                 destRect.bottom - destRect.top);
  518.    }
  519. }
  520. HX_RESULT CUnixRootSurf::_DestroyCompositionSurface()
  521. {
  522.    HX_RESULT retVal = HXR_OK;
  523.    if( m_bCompositionSurfaceCreated )
  524.    {
  525.       if( m_pXImage )
  526.       {
  527.          XFree(m_pXImage);
  528.          m_pXImage = NULL;
  529.       }
  530.       m_bCompositionSurfaceCreated = FALSE;
  531.    }
  532.    
  533.    return retVal;
  534. }
  535. HX_RESULT CUnixRootSurf::BeginOptimizedBlt(HXBitmapInfoHeader* pBitmapInfo)
  536. {
  537. #ifdef _DEBUG
  538.    fprintf(stderr, "CUnixRootSurf::BeginOptimizedBlt Needs to be writtenn" );
  539. #endif
  540.    return HXR_NOTIMPL;
  541. }
  542. HX_RESULT CUnixRootSurf::OptimizedBlt( UCHAR*   pImageBits,
  543.                                        HXxRect& rDestRect,
  544.                                        HXxRect& rSrcRect)
  545. {
  546. #ifdef _DEBUG
  547.    fprintf(stderr, "CUnixRootSurf::OptimizedBlt Needs to be writtenn" );
  548. #endif
  549.    return HXR_NOTIMPL;
  550. }
  551. HX_RESULT CUnixRootSurf::EndOptimizedBlt(void)
  552. {
  553. #ifdef _DEBUG
  554.    fprintf(stderr, "CUnixRootSurf::EndOptimizedBlt Needs to be writtenn" );
  555. #endif
  556.    return HXR_NOTIMPL;
  557. }
  558. HX_RESULT CUnixRootSurf::GetOptimizedFormat(HX_COMPRESSION_TYPE& ulType)
  559. {
  560. #ifdef _DEBUG
  561.    fprintf(stderr, "CUnixRootSurf::GetOptimizedFormat Needs to be writtenn" );
  562. #endif
  563.    return HXR_NOTIMPL;
  564. }
  565. HX_RESULT CUnixRootSurf::GetPreferredFormat(HX_COMPRESSION_TYPE& ulType)
  566. {
  567. #ifdef _DEBUG
  568.    fprintf(stderr, "CUnixRootSurf::GetPreferredFormat Needs to be writtenn" );
  569. #endif
  570.    return HXR_NOTIMPL;
  571. }
  572. GC CUnixRootSurf::GetGC()
  573. {
  574.    return m_GC;
  575. }