1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/gfx/angle/src/libGLESv2/renderer/SwapChain9.h Wed Dec 31 06:09:35 2014 +0100 1.3 @@ -0,0 +1,55 @@ 1.4 +// 1.5 +// Copyright (c) 2012 The ANGLE Project Authors. All rights reserved. 1.6 +// Use of this source code is governed by a BSD-style license that can be 1.7 +// found in the LICENSE file. 1.8 +// 1.9 + 1.10 +// SwapChain9.h: Defines a back-end specific class for the D3D9 swap chain. 1.11 + 1.12 +#ifndef LIBGLESV2_RENDERER_SWAPCHAIN9_H_ 1.13 +#define LIBGLESV2_RENDERER_SWAPCHAIN9_H_ 1.14 + 1.15 +#include "common/angleutils.h" 1.16 +#include "libGLESv2/renderer/SwapChain.h" 1.17 + 1.18 +namespace rx 1.19 +{ 1.20 +class Renderer9; 1.21 + 1.22 +class SwapChain9 : public SwapChain 1.23 +{ 1.24 + public: 1.25 + SwapChain9(Renderer9 *renderer, HWND window, HANDLE shareHandle, 1.26 + GLenum backBufferFormat, GLenum depthBufferFormat); 1.27 + virtual ~SwapChain9(); 1.28 + 1.29 + EGLint resize(EGLint backbufferWidth, EGLint backbufferHeight); 1.30 + virtual EGLint reset(EGLint backbufferWidth, EGLint backbufferHeight, EGLint swapInterval); 1.31 + virtual EGLint swapRect(EGLint x, EGLint y, EGLint width, EGLint height); 1.32 + virtual void recreate(); 1.33 + 1.34 + virtual IDirect3DSurface9 *getRenderTarget(); 1.35 + virtual IDirect3DSurface9 *getDepthStencil(); 1.36 + virtual IDirect3DTexture9 *getOffscreenTexture(); 1.37 + 1.38 + static SwapChain9 *makeSwapChain9(SwapChain *swapChain); 1.39 + 1.40 + private: 1.41 + DISALLOW_COPY_AND_ASSIGN(SwapChain9); 1.42 + 1.43 + void release(); 1.44 + 1.45 + Renderer9 *mRenderer; 1.46 + EGLint mHeight; 1.47 + EGLint mWidth; 1.48 + EGLint mSwapInterval; 1.49 + 1.50 + IDirect3DSwapChain9 *mSwapChain; 1.51 + IDirect3DSurface9 *mBackBuffer; 1.52 + IDirect3DSurface9 *mRenderTarget; 1.53 + IDirect3DSurface9 *mDepthStencil; 1.54 + IDirect3DTexture9* mOffscreenTexture; 1.55 +}; 1.56 + 1.57 +} 1.58 +#endif // LIBGLESV2_RENDERER_SWAPCHAIN9_H_