NullFramebuffer.h revision 124709ba961b919e5948bae349ecbc38085ceedf
/*
* Copyright (C) 2010 Oracle Corporation
*
* This file is part of VirtualBox Open Source Edition (OSE), as
* available from http://www.virtualbox.org. This file is free software;
* General Public License (GPL) as published by the Free Software
* Foundation, in version 2 as it comes in the "COPYING" file of the
* VirtualBox OSE distribution. VirtualBox OSE is distributed in the
* hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
*/
#ifndef __NULL_FRAMEBUFFER_H
#define __NULL_FRAMEBUFFER_H
{
NullFB()
:
mUsesGuestVRAM(false),
#ifndef VBOX_WITH_XPCOM
, refcnt(0)
#endif
{}
{
if (mBuffer)
}
#ifndef VBOX_WITH_XPCOM
return ::InterlockedIncrement (&refcnt);
}
if (cnt == 0)
return cnt;
}
#endif
// public methods only for internal purposes
{
return S_OK;
}
{
if (!width)
return E_POINTER;
return S_OK;
}
{
if (!height)
return E_POINTER;
return S_OK;
}
{
return S_OK;
}
{
return S_OK;
}
{
if (!address)
return E_POINTER;
return S_OK;
}
{
if (!bitsPerPixel)
return E_POINTER;
return S_OK;
}
{
if (!bytesPerLine)
return E_POINTER;
return S_OK;
}
{
if (!pixelFormat)
return E_POINTER;
return S_OK;
}
{
if (!usesGuestVRAM)
return E_POINTER;
return S_OK;
}
{
if (!heightReduction)
return E_POINTER;
/* no reduction */
*heightReduction = 0;
return S_OK;
}
{
if (!aOverlay)
return E_POINTER;
*aOverlay = 0;
return S_OK;
}
{
if (!winId)
return E_POINTER;
*winId = 0;
return S_OK;
}
{
return S_OK;
}
ULONG w,
ULONG h,
{
if (mBuffer)
{
}
mWidth = w;
mHeight = h;
{
mBitsPerPixel = 32;
mBytesPerLine = w * 4;
mUsesGuestVRAM = false;
}
else
{
mUsesGuestVRAM = true;
}
if (finished)
*finished = true;
return S_OK;
}
{
if (!supported)
return E_POINTER;
*supported = true;
return S_OK;
}
{
if (!rectangles)
return E_POINTER;
*rectangles = 0;
return S_OK;
}
{
if (!rectangles)
return E_POINTER;
return S_OK;
}
{
return E_NOTIMPL;
}
/** Guest framebuffer pixel format */
/** Guest framebuffer color depth */
/** Guest framebuffer line length */
/* VRAM pointer */
/* VRAM buffer */
bool mUsesGuestVRAM;
#ifndef VBOX_WITH_XPCOM
long refcnt;
#endif
};
#endif // __NULL_FRAMEBUFFER_H