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 #include "precompiled.h"
2 //
3 // Copyright (c) 2010-2013 The ANGLE Project Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style license that can be
5 // found in the LICENSE file.
6 //
8 #include "libGLESv2/Uniform.h"
10 #include "libGLESv2/utilities.h"
12 namespace gl
13 {
15 Uniform::Uniform(GLenum type, GLenum precision, const std::string &name, unsigned int arraySize)
16 : type(type), precision(precision), name(name), arraySize(arraySize)
17 {
18 int bytes = gl::UniformInternalSize(type) * elementCount();
19 data = new unsigned char[bytes];
20 memset(data, 0, bytes);
21 dirty = true;
23 psRegisterIndex = -1;
24 vsRegisterIndex = -1;
25 registerCount = VariableRowCount(type) * elementCount();
26 }
28 Uniform::~Uniform()
29 {
30 delete[] data;
31 }
33 bool Uniform::isArray() const
34 {
35 return arraySize > 0;
36 }
38 unsigned int Uniform::elementCount() const
39 {
40 return arraySize > 0 ? arraySize : 1;
41 }
43 }