gfx/angle/src/libGLESv2/Framebuffer.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) 2002-2013 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 // Framebuffer.h: Defines the gl::Framebuffer class. Implements GL framebuffer
michael@0 8 // objects and related functionality. [OpenGL ES 2.0.24] section 4.4 page 105.
michael@0 9
michael@0 10 #ifndef LIBGLESV2_FRAMEBUFFER_H_
michael@0 11 #define LIBGLESV2_FRAMEBUFFER_H_
michael@0 12
michael@0 13 #include "common/angleutils.h"
michael@0 14 #include "common/RefCountObject.h"
michael@0 15 #include "Constants.h"
michael@0 16
michael@0 17 namespace rx
michael@0 18 {
michael@0 19 class Renderer;
michael@0 20 }
michael@0 21
michael@0 22 namespace gl
michael@0 23 {
michael@0 24 class Renderbuffer;
michael@0 25 class Colorbuffer;
michael@0 26 class Depthbuffer;
michael@0 27 class Stencilbuffer;
michael@0 28 class DepthStencilbuffer;
michael@0 29
michael@0 30 class Framebuffer
michael@0 31 {
michael@0 32 public:
michael@0 33 explicit Framebuffer(rx::Renderer *renderer);
michael@0 34
michael@0 35 virtual ~Framebuffer();
michael@0 36
michael@0 37 void setColorbuffer(unsigned int colorAttachment, GLenum type, GLuint colorbuffer);
michael@0 38 void setDepthbuffer(GLenum type, GLuint depthbuffer);
michael@0 39 void setStencilbuffer(GLenum type, GLuint stencilbuffer);
michael@0 40
michael@0 41 void detachTexture(GLuint texture);
michael@0 42 void detachRenderbuffer(GLuint renderbuffer);
michael@0 43
michael@0 44 unsigned int getRenderTargetSerial(unsigned int colorAttachment) const;
michael@0 45 unsigned int getDepthbufferSerial() const;
michael@0 46 unsigned int getStencilbufferSerial() const;
michael@0 47
michael@0 48 Renderbuffer *getColorbuffer(unsigned int colorAttachment) const;
michael@0 49 Renderbuffer *getDepthbuffer() const;
michael@0 50 Renderbuffer *getStencilbuffer() const;
michael@0 51 Renderbuffer *getDepthOrStencilbuffer() const;
michael@0 52 Renderbuffer *getReadColorbuffer() const;
michael@0 53 GLenum getReadColorbufferType() const;
michael@0 54 Renderbuffer *getFirstColorbuffer() const;
michael@0 55
michael@0 56 GLenum getColorbufferType(unsigned int colorAttachment) const;
michael@0 57 GLenum getDepthbufferType() const;
michael@0 58 GLenum getStencilbufferType() const;
michael@0 59
michael@0 60 GLuint getColorbufferHandle(unsigned int colorAttachment) const;
michael@0 61 GLuint getDepthbufferHandle() const;
michael@0 62 GLuint getStencilbufferHandle() const;
michael@0 63
michael@0 64 GLenum getDrawBufferState(unsigned int colorAttachment) const;
michael@0 65 void setDrawBufferState(unsigned int colorAttachment, GLenum drawBuffer);
michael@0 66
michael@0 67 bool isEnabledColorAttachment(unsigned int colorAttachment) const;
michael@0 68 bool hasEnabledColorAttachment() const;
michael@0 69 bool hasStencil() const;
michael@0 70 int getSamples() const;
michael@0 71 bool usingExtendedDrawBuffers() const;
michael@0 72
michael@0 73 virtual GLenum completeness() const;
michael@0 74
michael@0 75 protected:
michael@0 76 GLenum mColorbufferTypes[IMPLEMENTATION_MAX_DRAW_BUFFERS];
michael@0 77 BindingPointer<Renderbuffer> mColorbufferPointers[IMPLEMENTATION_MAX_DRAW_BUFFERS];
michael@0 78 GLenum mDrawBufferStates[IMPLEMENTATION_MAX_DRAW_BUFFERS];
michael@0 79 GLenum mReadBufferState;
michael@0 80
michael@0 81 GLenum mDepthbufferType;
michael@0 82 BindingPointer<Renderbuffer> mDepthbufferPointer;
michael@0 83
michael@0 84 GLenum mStencilbufferType;
michael@0 85 BindingPointer<Renderbuffer> mStencilbufferPointer;
michael@0 86
michael@0 87 rx::Renderer *mRenderer;
michael@0 88
michael@0 89 private:
michael@0 90 DISALLOW_COPY_AND_ASSIGN(Framebuffer);
michael@0 91
michael@0 92 Renderbuffer *lookupRenderbuffer(GLenum type, GLuint handle) const;
michael@0 93 };
michael@0 94
michael@0 95 class DefaultFramebuffer : public Framebuffer
michael@0 96 {
michael@0 97 public:
michael@0 98 DefaultFramebuffer(rx::Renderer *Renderer, Colorbuffer *colorbuffer, DepthStencilbuffer *depthStencil);
michael@0 99
michael@0 100 virtual GLenum completeness() const;
michael@0 101
michael@0 102 private:
michael@0 103 DISALLOW_COPY_AND_ASSIGN(DefaultFramebuffer);
michael@0 104 };
michael@0 105
michael@0 106 }
michael@0 107
michael@0 108 #endif // LIBGLESV2_FRAMEBUFFER_H_

mercurial