Sat, 03 Jan 2015 20:18:00 +0100
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.
1 /*
2 * Copyright 2011 Google Inc.
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
9 #include "GrGLStencilBuffer.h"
10 #include "GrGpuGL.h"
12 GrGLStencilBuffer::~GrGLStencilBuffer() {
13 this->release();
14 }
16 size_t GrGLStencilBuffer::sizeInBytes() const {
17 uint64_t size = this->width();
18 size *= this->height();
19 size *= fFormat.fTotalBits;
20 size *= GrMax(1,this->numSamples());
21 return static_cast<size_t>(size / 8);
22 }
24 void GrGLStencilBuffer::onRelease() {
25 if (0 != fRenderbufferID && !this->isWrapped()) {
26 GrGpuGL* gpuGL = (GrGpuGL*) this->getGpu();
27 const GrGLInterface* gl = gpuGL->glInterface();
28 GR_GL_CALL(gl, DeleteRenderbuffers(1, &fRenderbufferID));
29 fRenderbufferID = 0;
30 }
32 INHERITED::onRelease();
33 }
35 void GrGLStencilBuffer::onAbandon() {
36 fRenderbufferID = 0;
38 INHERITED::onAbandon();
39 }