swapchain_gdi.c revision 06bfdb01d92810c68168b1304ac7aef2130c86a0
/*
*IDirect3DSwapChain9 implementation
*
*Copyright 2002-2003 Jason Edmeades
*Copyright 2002-2003 Raphael Junqueira
*Copyright 2005 Oliver Stieber
*Copyright 2007-2008 Stefan Dösinger for CodeWeavers
*
*modify it under the terms of the GNU Lesser General Public
*License as published by the Free Software Foundation; either
*version 2.1 of the License, or (at your option) any later version.
*
*This library is distributed in the hope that it will be useful,
*but WITHOUT ANY WARRANTY; without even the implied warranty of
*MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
*Lesser General Public License for more details.
*
*You should have received a copy of the GNU Lesser General Public
*License along with this library; if not, write to the Free Software
*Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
*/
/*
* Sun LGPL Disclaimer: For the avoidance of doubt, except that if any license choice
* other than GPL or LGPL is available it will apply instead, Sun elects to use only
* the Lesser General Public License version 2.1 (LGPLv2) at this time for any software where
* a choice of LGPL license versions is made available with the language indicating
* that LGPLv2 or any later version may be used, or where a choice of which version
* of the LGPL is applied is otherwise unspecified.
*/
#include "config.h"
#include "wined3d_private.h"
{
/* release the ref to the front and back buffer parents */
if(This->frontBuffer) {
{
}
}
if(This->backBuffer) {
UINT i;
{
}
}
}
/* Restore the screen resolution if we rendered in fullscreen
* This will restore the screen resolution to what it was before creating the swapchain. In case of d3d8 and d3d9
* this will be the original desktop resolution. In case of d3d7 this will be a NOP because ddraw sets the resolution
* before starting up Direct3D, thus orig_width and orig_height will be equal to the modes in the presentation params
*/
mode.RefreshRate = 0;
}
#ifndef VBOXWDDM
#endif
}
/*****************************************************************************
* x11_copy_to_screen
*
* Helper function that blts the front buffer contents to the target window
*
* Params:
* This: Surface to copy from
* rc: Rectangle to copy
*
*****************************************************************************/
{
HDC hSurfaceDC = 0;
if(rc) {
TRACE(" copying rect (%d,%d)->(%d,%d), offset (%d,%d)\n",
}
/* Front buffer coordinates are screen coordinates. Map them to the destination
* window if not fullscreened
*/
}
#if 0
/* FIXME: This doesn't work... if users really want to run
* X in 8bpp, then we need to call directly into display.drv
* (or Wine's equivalent), and force a private colormap
* without default entries. */
}
#endif
#if 0
/* TODO: Support clippers */
{
{
}
}
#endif
if (rc) {
}
else {
/* Only use this if the caller did not pass a rectangle, since
* due to double locking this could be the wrong one ...
*/
}
}
SRCCOPY);
}
}
static HRESULT WINAPI IWineGDISwapChainImpl_SetDestWindowOverride(IWineD3DSwapChain *iface, HWND window) {
return WINED3D_OK;
}
static HRESULT WINAPI IWineGDISwapChainImpl_Present(IWineD3DSwapChain *iface, CONST RECT *pSourceRect, CONST RECT *pDestRect, HWND hDestWindowOverride, CONST RGNDATA *pDirtyRegion, DWORD dwFlags) {
if(!This->backBuffer) {
WARN("Swapchain doesn't have a backbuffer, returning WINED3DERR_INVALIDCALL\n");
return WINED3DERR_INVALIDCALL;
}
/* Flip the DC */
{
}
/* Flip the DIBsection */
{
}
/* Flip the surface data */
{
void* tmp;
}
}
}
/* client_memory should not be different, but just in case */
{
}
/* FPS support */
{
frames++;
/* every 1.5 seconds */
frames = 0;
}
}
return WINED3D_OK;
}
#ifdef VBOXWDDM
WARN("GDI Swapchain doesn't implement flush, returning WINED3DERR_INVALIDCALL\n");
return WINED3DERR_INVALIDCALL;
}
#endif
{
/* IUnknown */
/* IWineD3DSwapChain */
#ifdef VBOXWDM
#endif
};