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

Sat, 03 Jan 2015 20:18:00 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Sat, 03 Jan 2015 20:18:00 +0100
branch
TOR_BUG_3246
changeset 7
129ffea94266
permissions
-rw-r--r--

Conditionally enable double key logic according to:
private browsing mode or privacy.thirdparty.isolate preference and
implement in GetCookieStringCommon and FindCookie where it counts...
With some reservations of how to convince FindCookie users to test
condition and pass a nullptr when disabling double key logic.

michael@0 1 //
michael@0 2 // Copyright (c) 2012 The ANGLE Project Authors. All rights reserved.
michael@0 3 // Use of this source code is governed by a BSD-style license that can be
michael@0 4 // found in the LICENSE file.
michael@0 5 //
michael@0 6
michael@0 7 // SwapChain11.h: Defines a back-end specific class for the D3D11 swap chain.
michael@0 8
michael@0 9 #ifndef LIBGLESV2_RENDERER_SWAPCHAIN11_H_
michael@0 10 #define LIBGLESV2_RENDERER_SWAPCHAIN11_H_
michael@0 11
michael@0 12 #include "common/angleutils.h"
michael@0 13 #include "libGLESv2/renderer/SwapChain.h"
michael@0 14
michael@0 15 namespace rx
michael@0 16 {
michael@0 17 class Renderer11;
michael@0 18
michael@0 19 class SwapChain11 : public SwapChain
michael@0 20 {
michael@0 21 public:
michael@0 22 SwapChain11(Renderer11 *renderer, HWND window, HANDLE shareHandle,
michael@0 23 GLenum backBufferFormat, GLenum depthBufferFormat);
michael@0 24 virtual ~SwapChain11();
michael@0 25
michael@0 26 EGLint resize(EGLint backbufferWidth, EGLint backbufferHeight);
michael@0 27 virtual EGLint reset(EGLint backbufferWidth, EGLint backbufferHeight, EGLint swapInterval);
michael@0 28 virtual EGLint swapRect(EGLint x, EGLint y, EGLint width, EGLint height);
michael@0 29 virtual void recreate();
michael@0 30
michael@0 31 virtual ID3D11Texture2D *getOffscreenTexture();
michael@0 32 virtual ID3D11RenderTargetView *getRenderTarget();
michael@0 33 virtual ID3D11ShaderResourceView *getRenderTargetShaderResource();
michael@0 34
michael@0 35 virtual ID3D11Texture2D *getDepthStencilTexture();
michael@0 36 virtual ID3D11DepthStencilView *getDepthStencil();
michael@0 37
michael@0 38 EGLint getWidth() const { return mWidth; }
michael@0 39 EGLint getHeight() const { return mHeight; }
michael@0 40
michael@0 41 static SwapChain11 *makeSwapChain11(SwapChain *swapChain);
michael@0 42
michael@0 43 private:
michael@0 44 DISALLOW_COPY_AND_ASSIGN(SwapChain11);
michael@0 45
michael@0 46 void release();
michael@0 47 void initPassThroughResources();
michael@0 48 void releaseOffscreenTexture();
michael@0 49 EGLint resetOffscreenTexture(int backbufferWidth, int backbufferHeight);
michael@0 50
michael@0 51 Renderer11 *mRenderer;
michael@0 52 EGLint mHeight;
michael@0 53 EGLint mWidth;
michael@0 54 bool mAppCreatedShareHandle;
michael@0 55 unsigned int mSwapInterval;
michael@0 56 bool mPassThroughResourcesInit;
michael@0 57
michael@0 58 IDXGISwapChain *mSwapChain;
michael@0 59
michael@0 60 ID3D11Texture2D *mBackBufferTexture;
michael@0 61 ID3D11RenderTargetView *mBackBufferRTView;
michael@0 62
michael@0 63 ID3D11Texture2D *mOffscreenTexture;
michael@0 64 ID3D11RenderTargetView *mOffscreenRTView;
michael@0 65 ID3D11ShaderResourceView *mOffscreenSRView;
michael@0 66
michael@0 67 ID3D11Texture2D *mDepthStencilTexture;
michael@0 68 ID3D11DepthStencilView *mDepthStencilDSView;
michael@0 69
michael@0 70 ID3D11Buffer *mQuadVB;
michael@0 71 ID3D11SamplerState *mPassThroughSampler;
michael@0 72 ID3D11InputLayout *mPassThroughIL;
michael@0 73 ID3D11VertexShader *mPassThroughVS;
michael@0 74 ID3D11PixelShader *mPassThroughPS;
michael@0 75 };
michael@0 76
michael@0 77 }
michael@0 78 #endif // LIBGLESV2_RENDERER_SWAPCHAIN11_H_

mercurial