FramebufferImpl.cpp revision 029aba23a633afb775cf12002dd418e709b19978
/** @file
*
* VirtualBox COM class implementation
*/
/*
* Copyright (C) 2006-2007 innotek GmbH
*
* 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 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.
*
* If you received this file as part of a commercial VirtualBox
* distribution, then only the terms of your commercial VirtualBox
* license agreement apply instead of the previous paragraph.
*/
#include "FramebufferImpl.h"
#include <iprt/semaphore.h>
// constructor / destructor
/////////////////////////////////////////////////////////////////////////////
{
}
{
if (mData)
delete mData;
}
// public methods only for internal purposes
/////////////////////////////////////////////////////////////////////////////
{
return S_OK;
}
// IFramebuffer properties
/////////////////////////////////////////////////////////////////////////////
{
if (!address)
return E_POINTER;
return S_OK;
}
{
if (!width)
return E_POINTER;
return S_OK;
}
{
if (!height)
return E_POINTER;
return S_OK;
}
{
if (!colorDepth)
return E_POINTER;
*colorDepth = mDepth;
return S_OK;
}
{
if (!lineSize)
return E_POINTER;
return S_OK;
}
{
if (!pixelFormat)
return E_POINTER;
return S_OK;
}
{
if (!heightReduction)
return E_POINTER;
/* no reduction */
*heightReduction = 0;
return S_OK;
}
{
if (!aOverlay)
return E_POINTER;
/* no overlay */
*aOverlay = 0;
return S_OK;
}
// IFramebuffer methods
/////////////////////////////////////////////////////////////////////////////
{
return S_OK;
}
{
return S_OK;
}
{
if (!finished)
return E_POINTER;
// no need for the caller to wait
*finished = true;
return S_OK;
}
InternalFramebuffer::RequestResize(ULONG iScreenId, FramebufferPixelFormat_T pixelFormat, BYTE *vram,
{
if (!finished)
return E_POINTER;
// no need for the caller to wait
*finished = true;
// allocate a new buffer
delete mData;
mWidth = w;
mHeight = h;
return S_OK;
}
{
if (!supported)
return E_POINTER;
/* no acceleration please, we're a slow fallback implementation! */
*supported = false;
return S_OK;
}
{
if (!supported)
return E_POINTER;
/* whatever you want! */
*supported = true;
return S_OK;
}
{
if (!handled)
return E_POINTER;
/* eek, what do you expect from us?! */
*handled = false;
return S_OK;
}
{
if (!handled)
return E_POINTER;
/* eek, what do you expect from us?! */
*handled = false;
return S_OK;
}
{
if (!rects)
return E_POINTER;
/// @todo
return S_OK;
}
{
if (!rects)
return E_POINTER;
/// @todo
return S_OK;
}