gfx/angle/src/libGLESv2/renderer/SwapChain.h

changeset 0
6474c204b198
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/gfx/angle/src/libGLESv2/renderer/SwapChain.h	Wed Dec 31 06:09:35 2014 +0100
     1.3 @@ -0,0 +1,44 @@
     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 +// SwapChain.h: Defines a back-end specific class that hides the details of the
    1.11 +// implementation-specific swapchain.
    1.12 +
    1.13 +#ifndef LIBGLESV2_RENDERER_SWAPCHAIN_H_
    1.14 +#define LIBGLESV2_RENDERER_SWAPCHAIN_H_
    1.15 +
    1.16 +#include "common/angleutils.h"
    1.17 +
    1.18 +namespace rx
    1.19 +{
    1.20 +
    1.21 +class SwapChain
    1.22 +{
    1.23 +  public:
    1.24 +    SwapChain(HWND window, HANDLE shareHandle, GLenum backBufferFormat, GLenum depthBufferFormat)
    1.25 +        : mWindow(window), mShareHandle(shareHandle), mBackBufferFormat(backBufferFormat), mDepthBufferFormat(depthBufferFormat)
    1.26 +    {
    1.27 +    }
    1.28 +
    1.29 +    virtual ~SwapChain() {};
    1.30 +
    1.31 +    virtual EGLint resize(EGLint backbufferWidth, EGLint backbufferSize) = 0;
    1.32 +    virtual EGLint reset(EGLint backbufferWidth, EGLint backbufferHeight, EGLint swapInterval) = 0;
    1.33 +    virtual EGLint swapRect(EGLint x, EGLint y, EGLint width, EGLint height) = 0;
    1.34 +    virtual void recreate() = 0;
    1.35 +
    1.36 +    virtual HANDLE getShareHandle() {return mShareHandle;};
    1.37 +
    1.38 +  protected:
    1.39 +    const HWND mWindow;            // Window that the surface is created for.
    1.40 +    const GLenum mBackBufferFormat;
    1.41 +    const GLenum mDepthBufferFormat;
    1.42 +
    1.43 +    HANDLE mShareHandle;
    1.44 +};
    1.45 +
    1.46 +}
    1.47 +#endif // LIBGLESV2_RENDERER_SWAPCHAIN_H_

mercurial