⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 gpe93surf.cpp

📁 EP9315 BSP for WinCE 源代码
💻 CPP
字号:
//**********************************************************************
//                                                                      
// Filename: gpe93surf.cpp
//                                                                      
// Description: Contains the class for the gpesurf for memory in the 
//              video buffer. 
//
// THIS CODE AND INFORMATION IS PROVIDED "AS IS" WITHOUT WARRANTY OF
// ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO
// THE IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
// PARTICULAR PURPOSE.
//
// Use of this source code is subject to the terms of the Cirrus end-user
// license agreement (EULA) under which you licensed this SOFTWARE PRODUCT.
// If you did not accept the terms of the EULA, you are not authorized to 
// use this source code. For a copy of the EULA, please see the 
// LICENSE.RTF on your install media.
//
// Copyright(c) Cirrus Logic Corporation 2002, All Rights Reserved                       
//                                                                      
//**********************************************************************
#include    "precomp.h"

GPE93xxSurf::GPE93xxSurf
(                      
			int width,			// ... system-memory surface (i.e. DIB)
			int height,
			SurfaceHeapV* pSurface,
			ULONG  uPhyOffset,
			int size,
			int stride,
			EGPEFormat format
)
{
	m_nOffsetInVideoMemory = NULL;
	pNode = pSurface->Alloc(size);
	if( pNode != NULL )
	{
		void* pBits = (void*)(pNode->Address());
		if(pBits)
		{
			Init( width, height, pBits, stride, format
#ifdef	DD_ENABLE
                , EGPEFormatToEDDGPEPixelFormat[format]
#endif
                );
                
	        m_nOffsetInVideoMemory  = pNode->Address() + uPhyOffset - FRAMEBUF_PHYSICAL_MEMORY;
            m_fInVideoMemory        = TRUE;
		}
	}
#ifdef	DD_ENABLE
    m_fOwnsBuffer = FALSE;

    m_dwColorKeyLowValue = 0L;
    m_dwColorKeyHighValue = 0L;
    m_dwColorKeyMask = 0xFFFFFFFFL;

    lpDDSurface = NULL;
    m_pDriverData = NULL;
#endif
}

GPE93xxSurf::GPE93xxSurf
(                      
    int         width,         
    int         height,
    void        *pBits,
    int         stride,
    EGPEFormat  format,
    ULONG       ulPhysicalMemory
)
{
    pNode = NULL;
    Init( width, height, pBits, stride, format
#ifdef	DD_ENABLE
                , EGPEFormatToEDDGPEPixelFormat[format]
#endif
                );
    m_fInVideoMemory        = TRUE;
    m_nOffsetInVideoMemory  = 0;

#ifdef	DD_ENABLE
    m_fOwnsBuffer = FALSE;

    m_dwColorKeyLowValue = 0L;
    m_dwColorKeyHighValue = 0L;
    m_dwColorKeyMask = 0xFFFFFFFFL;

    lpDDSurface = NULL;
    m_pDriverData = NULL;
#endif
}

GPE93xxSurf::~GPE93xxSurf()
{
    if(pNode)
    {
		while(*GRAPHICS_BLOCKCTRL & BLOCKCTRL_ENABLE);
        pNode->Free();
    }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -