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 From: Jacek Caban <jacek@codeweavers.com>
2 Bug 945292 - Fixed ANGLE compilation on mingw.
5 diff --git a/gfx/angle/src/common/debug.h b/gfx/angle/src/common/debug.h
6 index 23ee26d..060b727 100644
7 --- a/gfx/angle/src/common/debug.h
8 +++ b/gfx/angle/src/common/debug.h
9 @@ -94,18 +94,20 @@ namespace gl
10 #define UNREACHABLE() do { \
11 ERR("\t! Unreachable reached: %s(%d)\n", __FUNCTION__, __LINE__); \
12 assert(false); \
13 } while(0)
14 #else
15 #define UNREACHABLE() ERR("\t! Unreachable reached: %s(%d)\n", __FUNCTION__, __LINE__)
16 #endif
18 -// A macro that determines whether an object has a given runtime type.
19 -#if !defined(NDEBUG) && (!defined(_MSC_VER) || defined(_CPPRTTI))
20 +// A macro that determines whether an object has a given runtime type. MSVC uses _CPPRTTI.
21 +// GCC uses __GXX_RTTI, but the macro was introduced in version 4.3, so we assume that all older
22 +// versions support RTTI.
23 +#if !defined(NDEBUG) && (!defined(_MSC_VER) || defined(_CPPRTTI)) && (!defined(__GNUC__) || __GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 3) || defined(__GXX_RTTI))
24 #define HAS_DYNAMIC_TYPE(type, obj) (dynamic_cast<type >(obj) != NULL)
25 #else
26 #define HAS_DYNAMIC_TYPE(type, obj) true
27 #endif
29 // A macro functioning as a compile-time assert to validate constant conditions
30 #define META_ASSERT(condition) typedef int COMPILE_TIME_ASSERT_##__LINE__[static_cast<bool>(condition)?1:-1]
32 diff --git a/gfx/angle/src/libGLESv2/Constants.h b/gfx/angle/src/libGLESv2/Constants.h
33 new file mode 100644
34 index 0000000..9f24d66
35 --- /dev/null
36 +++ b/gfx/angle/src/libGLESv2/Constants.h
37 @@ -0,0 +1,34 @@
38 +//
39 +// Copyright (c) 2013 The ANGLE Project Authors. All rights reserved.
40 +// Use of this source code is governed by a BSD-style license that can be
41 +// found in the LICENSE file.
42 +//
43 +
44 +// Contants.h: Defines some implementation specific and gl constants
45 +
46 +#ifndef LIBGLESV2_CONSTANTS_H_
47 +#define LIBGLESV2_CONSTANTS_H_
48 +
49 +namespace gl
50 +{
51 +
52 +enum
53 +{
54 + MAX_VERTEX_ATTRIBS = 16,
55 + MAX_TEXTURE_IMAGE_UNITS = 16,
56 +
57 + // Implementation upper limits, real maximums depend on the hardware
58 + IMPLEMENTATION_MAX_VERTEX_TEXTURE_IMAGE_UNITS = 16,
59 + IMPLEMENTATION_MAX_COMBINED_TEXTURE_IMAGE_UNITS = MAX_TEXTURE_IMAGE_UNITS + IMPLEMENTATION_MAX_VERTEX_TEXTURE_IMAGE_UNITS,
60 +
61 + IMPLEMENTATION_MAX_VARYING_VECTORS = 32,
62 + IMPLEMENTATION_MAX_DRAW_BUFFERS = 8
63 +};
64 +
65 +const float ALIASED_LINE_WIDTH_RANGE_MIN = 1.0f;
66 +const float ALIASED_LINE_WIDTH_RANGE_MAX = 1.0f;
67 +const float ALIASED_POINT_SIZE_RANGE_MIN = 1.0f;
68 +
69 +}
70 +
71 +#endif // LIBGLESV2_CONSTANTS_H_
72 diff --git a/gfx/angle/src/libGLESv2/Framebuffer.h b/gfx/angle/src/libGLESv2/Framebuffer.h
73 index b54e008..50bfd4f 100644
74 --- a/gfx/angle/src/libGLESv2/Framebuffer.h
75 +++ b/gfx/angle/src/libGLESv2/Framebuffer.h
76 @@ -7,17 +7,17 @@
77 // Framebuffer.h: Defines the gl::Framebuffer class. Implements GL framebuffer
78 // objects and related functionality. [OpenGL ES 2.0.24] section 4.4 page 105.
80 #ifndef LIBGLESV2_FRAMEBUFFER_H_
81 #define LIBGLESV2_FRAMEBUFFER_H_
83 #include "common/angleutils.h"
84 #include "common/RefCountObject.h"
85 -#include "constants.h"
86 +#include "Constants.h"
88 namespace rx
89 {
90 class Renderer;
91 }
93 namespace gl
94 {
95 diff --git a/gfx/angle/src/libGLESv2/constants.h b/gfx/angle/src/libGLESv2/constants.h
96 deleted file mode 100644
97 index 9f24d66..0000000
98 --- a/gfx/angle/src/libGLESv2/constants.h
99 +++ /dev/null
100 @@ -1,34 +0,0 @@
101 -//
102 -// Copyright (c) 2013 The ANGLE Project Authors. All rights reserved.
103 -// Use of this source code is governed by a BSD-style license that can be
104 -// found in the LICENSE file.
105 -//
106 -
107 -// Contants.h: Defines some implementation specific and gl constants
108 -
109 -#ifndef LIBGLESV2_CONSTANTS_H_
110 -#define LIBGLESV2_CONSTANTS_H_
111 -
112 -namespace gl
113 -{
114 -
115 -enum
116 -{
117 - MAX_VERTEX_ATTRIBS = 16,
118 - MAX_TEXTURE_IMAGE_UNITS = 16,
119 -
120 - // Implementation upper limits, real maximums depend on the hardware
121 - IMPLEMENTATION_MAX_VERTEX_TEXTURE_IMAGE_UNITS = 16,
122 - IMPLEMENTATION_MAX_COMBINED_TEXTURE_IMAGE_UNITS = MAX_TEXTURE_IMAGE_UNITS + IMPLEMENTATION_MAX_VERTEX_TEXTURE_IMAGE_UNITS,
123 -
124 - IMPLEMENTATION_MAX_VARYING_VECTORS = 32,
125 - IMPLEMENTATION_MAX_DRAW_BUFFERS = 8
126 -};
127 -
128 -const float ALIASED_LINE_WIDTH_RANGE_MIN = 1.0f;
129 -const float ALIASED_LINE_WIDTH_RANGE_MAX = 1.0f;
130 -const float ALIASED_POINT_SIZE_RANGE_MIN = 1.0f;
131 -
132 -}
133 -
134 -#endif // LIBGLESV2_CONSTANTS_H_
135 diff --git a/gfx/angle/src/libGLESv2/precompiled.h b/gfx/angle/src/libGLESv2/precompiled.h
136 index f62e71b..58ad181 100644
137 --- a/gfx/angle/src/libGLESv2/precompiled.h
138 +++ b/gfx/angle/src/libGLESv2/precompiled.h
139 @@ -28,15 +28,15 @@
140 #include <map>
141 #include <set>
142 #include <sstream>
143 #include <string>
144 #include <unordered_map>
145 #include <vector>
147 #include <d3d9.h>
148 -#include <D3D11.h>
149 +#include <d3d11.h>
150 #include <dxgi.h>
151 #include <d3dcompiler.h>
153 #ifdef _MSC_VER
154 #include <hash_map>
155 #endif
156 diff --git a/gfx/angle/src/libGLESv2/renderer/Renderer11.cpp b/gfx/angle/src/libGLESv2/renderer/Renderer11.cpp
157 index 774cd71..1f2b31d 100644
158 --- a/gfx/angle/src/libGLESv2/renderer/Renderer11.cpp
159 +++ b/gfx/angle/src/libGLESv2/renderer/Renderer11.cpp
160 @@ -7,17 +7,17 @@
162 // Renderer11.cpp: Implements a back-end specific class for the D3D11 renderer.
164 #include "libGLESv2/main.h"
165 #include "libGLESv2/utilities.h"
166 #include "libGLESv2/Buffer.h"
167 #include "libGLESv2/ProgramBinary.h"
168 #include "libGLESv2/Framebuffer.h"
169 -#include "libGLESv2/RenderBuffer.h"
170 +#include "libGLESv2/Renderbuffer.h"
171 #include "libGLESv2/renderer/Renderer11.h"
172 #include "libGLESv2/renderer/RenderTarget11.h"
173 #include "libGLESv2/renderer/renderer11_utils.h"
174 #include "libGLESv2/renderer/ShaderExecutable11.h"
175 #include "libGLESv2/renderer/SwapChain11.h"
176 #include "libGLESv2/renderer/Image11.h"
177 #include "libGLESv2/renderer/VertexBuffer11.h"
178 #include "libGLESv2/renderer/IndexBuffer11.h"
179 diff --git a/gfx/angle/src/libGLESv2/renderer/Renderer11.h b/gfx/angle/src/libGLESv2/renderer/Renderer11.h
180 index f024855..90ef04d 100644
181 --- a/gfx/angle/src/libGLESv2/renderer/Renderer11.h
182 +++ b/gfx/angle/src/libGLESv2/renderer/Renderer11.h
183 @@ -230,17 +230,17 @@ class Renderer11 : public Renderer
184 bool mDepthTextureSupport;
186 // Multisample format support
187 struct MultisampleSupportInfo
188 {
189 unsigned int qualityLevels[D3D11_MAX_MULTISAMPLE_SAMPLE_COUNT];
190 };
192 - typedef std::unordered_map<DXGI_FORMAT, MultisampleSupportInfo> MultisampleSupportMap;
193 + typedef std::unordered_map<DXGI_FORMAT, MultisampleSupportInfo, std::hash<int> > MultisampleSupportMap;
194 MultisampleSupportMap mMultisampleSupportMap;
196 unsigned int mMaxSupportedSamples;
198 // current render target states
199 unsigned int mAppliedRenderTargetSerials[gl::IMPLEMENTATION_MAX_DRAW_BUFFERS];
200 unsigned int mAppliedDepthbufferSerial;
201 unsigned int mAppliedStencilbufferSerial;