gfx/skia/trunk/src/gpu/gl/GrGLStencilBuffer.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 2011 Google Inc.
michael@0 3 *
michael@0 4 * Use of this source code is governed by a BSD-style license that can be
michael@0 5 * found in the LICENSE file.
michael@0 6 */
michael@0 7
michael@0 8
michael@0 9 #ifndef GrGLStencilBuffer_DEFINED
michael@0 10 #define GrGLStencilBuffer_DEFINED
michael@0 11
michael@0 12 #include "gl/GrGLInterface.h"
michael@0 13 #include "GrStencilBuffer.h"
michael@0 14
michael@0 15 class GrGLStencilBuffer : public GrStencilBuffer {
michael@0 16 public:
michael@0 17 static const GrGLenum kUnknownInternalFormat = ~0U;
michael@0 18 static const GrGLuint kUnknownBitCount = ~0U;
michael@0 19 struct Format {
michael@0 20 GrGLenum fInternalFormat;
michael@0 21 GrGLuint fStencilBits;
michael@0 22 GrGLuint fTotalBits;
michael@0 23 bool fPacked;
michael@0 24 };
michael@0 25
michael@0 26 GrGLStencilBuffer(GrGpu* gpu,
michael@0 27 bool isWrapped,
michael@0 28 GrGLint rbid,
michael@0 29 int width, int height,
michael@0 30 int sampleCnt,
michael@0 31 const Format& format)
michael@0 32 : GrStencilBuffer(gpu, isWrapped, width, height, format.fStencilBits, sampleCnt)
michael@0 33 , fFormat(format)
michael@0 34 , fRenderbufferID(rbid) {
michael@0 35 }
michael@0 36
michael@0 37 virtual ~GrGLStencilBuffer();
michael@0 38
michael@0 39 virtual size_t sizeInBytes() const SK_OVERRIDE;
michael@0 40
michael@0 41 GrGLuint renderbufferID() const {
michael@0 42 return fRenderbufferID;
michael@0 43 }
michael@0 44
michael@0 45 const Format& format() const { return fFormat; }
michael@0 46
michael@0 47 protected:
michael@0 48 // overrides of GrResource
michael@0 49 virtual void onRelease() SK_OVERRIDE;
michael@0 50 virtual void onAbandon() SK_OVERRIDE;
michael@0 51
michael@0 52 private:
michael@0 53 Format fFormat;
michael@0 54 // may be zero for external SBs associated with external RTs
michael@0 55 // (we don't require the client to give us the id, just tell
michael@0 56 // us how many bits of stencil there are).
michael@0 57 GrGLuint fRenderbufferID;
michael@0 58
michael@0 59 typedef GrStencilBuffer INHERITED;
michael@0 60 };
michael@0 61
michael@0 62 #endif

mercurial