1 # HG changeset patch |
1 # HG changeset patch |
2 # Parent 72e5683524907256ec499f82bac513c29760b332 |
2 # Parent df69adcb42a137798460d007b5acae9ec85b95fd |
3 |
3 |
4 Index: firefox-102.0/Cargo.lock |
4 diff --git a/Cargo.lock b/Cargo.lock |
5 =================================================================== |
5 --- a/Cargo.lock |
6 --- firefox-102.0.orig/Cargo.lock |
6 +++ b/Cargo.lock |
7 +++ firefox-102.0/Cargo.lock |
7 @@ -2347,18 +2347,16 @@ name = "glsl-to-cxx" |
8 @@ -2218,8 +2218,6 @@ dependencies = [ |
8 version = "0.1.0" |
|
9 dependencies = [ |
|
10 "glsl", |
|
11 ] |
|
12 |
9 [[package]] |
13 [[package]] |
10 name = "glslopt" |
14 name = "glslopt" |
11 version = "0.1.9" |
15 version = "0.1.9" |
12 -source = "registry+https://github.com/rust-lang/crates.io-index" |
16 -source = "registry+https://github.com/rust-lang/crates.io-index" |
13 -checksum = "74a3f5c04450dfdadb4b08f6e5ee6f5110f674de1acbd6199bfec68392a8cbaf" |
17 -checksum = "74a3f5c04450dfdadb4b08f6e5ee6f5110f674de1acbd6199bfec68392a8cbaf" |
14 dependencies = [ |
18 dependencies = [ |
15 "cc", |
19 "cc", |
16 ] |
20 ] |
17 Index: firefox-102.0/Cargo.toml |
21 |
18 =================================================================== |
22 [[package]] |
19 --- firefox-102.0.orig/Cargo.toml |
23 name = "gluesmith" |
20 +++ firefox-102.0/Cargo.toml |
24 version = "0.1.0" |
21 @@ -116,6 +116,7 @@ libudev-sys = { path = "dom/webauthn/lib |
25 dependencies = [ |
|
26 diff --git a/Cargo.toml b/Cargo.toml |
|
27 --- a/Cargo.toml |
|
28 +++ b/Cargo.toml |
|
29 @@ -150,16 +150,17 @@ async-task = { git = "https://github.com |
|
30 chardetng = { git = "https://github.com/hsivonen/chardetng", rev="3484d3e3ebdc8931493aa5df4d7ee9360a90e76b" } |
|
31 chardetng_c = { git = "https://github.com/hsivonen/chardetng_c", rev="ed8a4c6f900a90d4dbc1d64b856e61490a1c3570" } |
|
32 coremidi = { git = "https://github.com/chris-zen/coremidi.git", rev="fc68464b5445caf111e41f643a2e69ccce0b4f83" } |
|
33 fog = { path = "toolkit/components/glean/api" } |
|
34 libudev-sys = { path = "dom/webauthn/libudev-sys" } |
22 packed_simd = { package = "packed_simd_2", git = "https://github.com/hsivonen/packed_simd", rev="c149d0a519bf878567c7630096737669ec2ff15f" } |
35 packed_simd = { package = "packed_simd_2", git = "https://github.com/hsivonen/packed_simd", rev="c149d0a519bf878567c7630096737669ec2ff15f" } |
23 midir = { git = "https://github.com/mozilla/midir.git", rev = "4c11f0ffb5d6a10de4aff40a7b81218b33b94e6f" } |
36 midir = { git = "https://github.com/mozilla/midir.git", rev = "4c11f0ffb5d6a10de4aff40a7b81218b33b94e6f" } |
24 minidump_writer_linux = { git = "https://github.com/rust-minidump/minidump-writer.git", rev = "75ada456c92a429704691a85e1cb42fef8cafc0d" } |
37 minidump_writer_linux = { git = "https://github.com/rust-minidump/minidump-writer.git", rev = "75ada456c92a429704691a85e1cb42fef8cafc0d" } |
25 +glslopt = { path = "third_party/rust/glslopt/" } |
38 +glslopt = { path = "third_party/rust/glslopt/" } |
26 |
39 |
27 # Patch mio 0.6 to use winapi 0.3 and miow 0.3, getting rid of winapi 0.2. |
40 # application-services overrides to make updating them all simpler. |
28 # There is not going to be new version of mio 0.6, mio now being >= 0.7.11. |
41 interrupt-support = { git = "https://github.com/mozilla/application-services", rev = "2689788cecf24c385e6b7440e3aa1a89c511f14a" } |
29 Index: firefox-102.0/gfx/skia/skia/include/codec/SkEncodedOrigin.h |
42 sql-support = { git = "https://github.com/mozilla/application-services", rev = "2689788cecf24c385e6b7440e3aa1a89c511f14a" } |
30 =================================================================== |
43 sync15-traits = { git = "https://github.com/mozilla/application-services", rev = "2689788cecf24c385e6b7440e3aa1a89c511f14a" } |
31 --- firefox-102.0.orig/gfx/skia/skia/include/codec/SkEncodedOrigin.h |
44 viaduct = { git = "https://github.com/mozilla/application-services", rev = "2689788cecf24c385e6b7440e3aa1a89c511f14a" } |
32 +++ firefox-102.0/gfx/skia/skia/include/codec/SkEncodedOrigin.h |
45 webext-storage = { git = "https://github.com/mozilla/application-services", rev = "2689788cecf24c385e6b7440e3aa1a89c511f14a" } |
33 @@ -41,6 +41,7 @@ static inline SkMatrix SkEncodedOriginTo |
46 |
|
47 diff --git a/gfx/skia/skia/include/codec/SkEncodedOrigin.h b/gfx/skia/skia/include/codec/SkEncodedOrigin.h |
|
48 --- a/gfx/skia/skia/include/codec/SkEncodedOrigin.h |
|
49 +++ b/gfx/skia/skia/include/codec/SkEncodedOrigin.h |
|
50 @@ -36,12 +36,13 @@ static inline SkMatrix SkEncodedOriginTo |
|
51 case kBottomRight_SkEncodedOrigin: return SkMatrix::MakeAll(-1, 0, w, 0, -1, h, 0, 0, 1); |
|
52 case kBottomLeft_SkEncodedOrigin: return SkMatrix::MakeAll( 1, 0, 0, 0, -1, h, 0, 0, 1); |
|
53 case kLeftTop_SkEncodedOrigin: return SkMatrix::MakeAll( 0, 1, 0, 1, 0, 0, 0, 0, 1); |
|
54 case kRightTop_SkEncodedOrigin: return SkMatrix::MakeAll( 0, -1, h, 1, 0, 0, 0, 0, 1); |
|
55 case kRightBottom_SkEncodedOrigin: return SkMatrix::MakeAll( 0, -1, h, -1, 0, w, 0, 0, 1); |
34 case kLeftBottom_SkEncodedOrigin: return SkMatrix::MakeAll( 0, 1, 0, -1, 0, w, 0, 0, 1); |
56 case kLeftBottom_SkEncodedOrigin: return SkMatrix::MakeAll( 0, 1, 0, -1, 0, w, 0, 0, 1); |
35 } |
57 } |
36 SK_ABORT("Unexpected origin"); |
58 SK_ABORT("Unexpected origin"); |
37 + SkUNREACHABLE; |
59 + SkUNREACHABLE; |
38 } |
60 } |
39 |
61 |
40 |
62 |
41 Index: firefox-102.0/gfx/skia/skia/include/private/GrTypesPriv.h |
63 #endif // SkEncodedOrigin_DEFINED |
42 =================================================================== |
64 diff --git a/gfx/skia/skia/include/private/GrTypesPriv.h b/gfx/skia/skia/include/private/GrTypesPriv.h |
43 --- firefox-102.0.orig/gfx/skia/skia/include/private/GrTypesPriv.h |
65 --- a/gfx/skia/skia/include/private/GrTypesPriv.h |
44 +++ firefox-102.0/gfx/skia/skia/include/private/GrTypesPriv.h |
66 +++ b/gfx/skia/skia/include/private/GrTypesPriv.h |
45 @@ -540,6 +540,7 @@ static inline GrSLType GrSLCombinedSampl |
67 @@ -535,32 +535,34 @@ static inline GrSLType GrSLCombinedSampl |
|
68 return kTexture2DSampler_GrSLType; |
|
69 case GrTextureType::kRectangle: |
|
70 return kTexture2DRectSampler_GrSLType; |
|
71 case GrTextureType::kExternal: |
|
72 return kTextureExternalSampler_GrSLType; |
46 default: |
73 default: |
47 SK_ABORT("Unexpected texture type"); |
74 SK_ABORT("Unexpected texture type"); |
48 } |
75 } |
49 + SkUNREACHABLE; |
76 + SkUNREACHABLE; |
50 } |
77 } |
51 |
78 |
52 /** Rectangle and external textures only support the clamp wrap mode and do not support |
79 /** Rectangle and external textures only support the clamp wrap mode and do not support |
53 @@ -556,6 +557,7 @@ static inline bool GrTextureTypeHasRestr |
80 * MIP maps. |
|
81 */ |
|
82 static inline bool GrTextureTypeHasRestrictedSampling(GrTextureType type) { |
|
83 switch (type) { |
|
84 case GrTextureType::k2D: |
|
85 return false; |
|
86 case GrTextureType::kRectangle: |
|
87 return true; |
|
88 case GrTextureType::kExternal: |
|
89 return true; |
54 default: |
90 default: |
55 SK_ABORT("Unexpected texture type"); |
91 SK_ABORT("Unexpected texture type"); |
56 } |
92 } |
57 + SkUNREACHABLE; |
93 + SkUNREACHABLE; |
58 } |
94 } |
59 |
95 |
60 static constexpr bool GrSLTypeIsCombinedSamplerType(GrSLType type) { |
96 static constexpr bool GrSLTypeIsCombinedSamplerType(GrSLType type) { |
61 @@ -858,6 +860,7 @@ static inline size_t GrCompressedFormatD |
97 switch (type) { |
|
98 case kTexture2DSampler_GrSLType: |
|
99 case kTextureExternalSampler_GrSLType: |
|
100 case kTexture2DRectSampler_GrSLType: |
|
101 return true; |
|
102 @@ -853,16 +855,17 @@ static inline size_t GrCompressedFormatD |
|
103 switch (compressionType) { |
|
104 case SkImage::kETC1_CompressionType: |
|
105 SkASSERT((width & 3) == 0); |
|
106 SkASSERT((height & 3) == 0); |
|
107 return (width >> 2) * (height >> 2) * 8; |
62 } |
108 } |
63 |
109 |
64 SK_ABORT("Invalid pixel config"); |
110 SK_ABORT("Invalid pixel config"); |
65 + SkUNREACHABLE; |
111 + SkUNREACHABLE; |
66 } |
112 } |
67 |
113 |
68 /** |
114 /** |
69 Index: firefox-102.0/gfx/skia/skia/src/core/SkGeometry.h |
115 * Like SkColorType this describes a layout of pixel data in CPU memory. It specifies the channels, |
70 =================================================================== |
116 * their type, and width. This exists so that the GPU backend can have private types that have no |
71 --- firefox-102.0.orig/gfx/skia/skia/src/core/SkGeometry.h |
117 * analog in the public facing SkColorType enum and omit types not implemented in the GPU backend. |
72 +++ firefox-102.0/gfx/skia/skia/src/core/SkGeometry.h |
118 * It does not refer to a texture format and the mapping to texture formats may be many-to-many. |
73 @@ -182,6 +182,7 @@ static inline bool SkCubicIsDegenerate(S |
119 * It does not specify the sRGB encoding of the stored values. The components are listed in order of |
|
120 diff --git a/gfx/skia/skia/src/core/SkGeometry.h b/gfx/skia/skia/src/core/SkGeometry.h |
|
121 --- a/gfx/skia/skia/src/core/SkGeometry.h |
|
122 +++ b/gfx/skia/skia/src/core/SkGeometry.h |
|
123 @@ -177,28 +177,30 @@ static inline bool SkCubicIsDegenerate(S |
|
124 case SkCubicType::kLocalCusp: |
|
125 case SkCubicType::kCuspAtInfinity: |
|
126 return false; |
|
127 case SkCubicType::kQuadratic: |
|
128 case SkCubicType::kLineOrPoint: |
74 return true; |
129 return true; |
75 } |
130 } |
76 SK_ABORT("Invalid SkCubicType"); |
131 SK_ABORT("Invalid SkCubicType"); |
77 + SkUNREACHABLE; |
132 + SkUNREACHABLE; |
78 } |
133 } |
79 |
134 |
80 static inline const char* SkCubicTypeName(SkCubicType type) { |
135 static inline const char* SkCubicTypeName(SkCubicType type) { |
81 @@ -194,6 +195,7 @@ static inline const char* SkCubicTypeNam |
136 switch (type) { |
|
137 case SkCubicType::kSerpentine: return "kSerpentine"; |
|
138 case SkCubicType::kLoop: return "kLoop"; |
|
139 case SkCubicType::kLocalCusp: return "kLocalCusp"; |
|
140 case SkCubicType::kCuspAtInfinity: return "kCuspAtInfinity"; |
|
141 case SkCubicType::kQuadratic: return "kQuadratic"; |
82 case SkCubicType::kLineOrPoint: return "kLineOrPoint"; |
142 case SkCubicType::kLineOrPoint: return "kLineOrPoint"; |
83 } |
143 } |
84 SK_ABORT("Invalid SkCubicType"); |
144 SK_ABORT("Invalid SkCubicType"); |
85 + SkUNREACHABLE; |
145 + SkUNREACHABLE; |
86 } |
146 } |
87 |
147 |
88 /** Returns the cubic classification. |
148 /** Returns the cubic classification. |
89 Index: firefox-102.0/gfx/skia/skia/src/core/SkTextBlob.cpp |
149 |
90 =================================================================== |
150 t[],s[] are set to the two homogeneous parameter values at which points the lines L & M |
91 --- firefox-102.0.orig/gfx/skia/skia/src/core/SkTextBlob.cpp |
151 intersect with K, sorted from smallest to largest and oriented so positive values of the |
92 +++ firefox-102.0/gfx/skia/skia/src/core/SkTextBlob.cpp |
152 implicit are on the "left" side. For a serpentine curve they are the inflection points. For a |
93 @@ -201,6 +201,7 @@ void SkTextBlob::operator delete(void* p |
153 loop they are the double point. For a local cusp, they are both equal and denote the cusp point. |
|
154 diff --git a/gfx/skia/skia/src/core/SkTextBlob.cpp b/gfx/skia/skia/src/core/SkTextBlob.cpp |
|
155 --- a/gfx/skia/skia/src/core/SkTextBlob.cpp |
|
156 +++ b/gfx/skia/skia/src/core/SkTextBlob.cpp |
|
157 @@ -196,16 +196,17 @@ unsigned SkTextBlob::ScalarsPerGlyph(Gly |
|
158 } |
|
159 |
|
160 void SkTextBlob::operator delete(void* p) { |
|
161 sk_free(p); |
|
162 } |
94 |
163 |
95 void* SkTextBlob::operator new(size_t) { |
164 void* SkTextBlob::operator new(size_t) { |
96 SK_ABORT("All blobs are created by placement new."); |
165 SK_ABORT("All blobs are created by placement new."); |
97 + SkUNREACHABLE; |
166 + SkUNREACHABLE; |
98 } |
167 } |
99 |
168 |
100 void* SkTextBlob::operator new(size_t, void* p) { |
169 void* SkTextBlob::operator new(size_t, void* p) { |
101 Index: firefox-102.0/gfx/skia/skia/src/core/SkTypeface_remote.cpp |
170 return p; |
102 =================================================================== |
171 } |
103 --- firefox-102.0.orig/gfx/skia/skia/src/core/SkTypeface_remote.cpp |
172 |
104 +++ firefox-102.0/gfx/skia/skia/src/core/SkTypeface_remote.cpp |
173 SkTextBlobRunIterator::SkTextBlobRunIterator(const SkTextBlob* blob) |
105 @@ -29,6 +29,7 @@ void SkScalerContextProxy::initCache(SkS |
174 : fCurrentRun(SkTextBlob::RunRecord::First(blob)) { |
|
175 diff --git a/gfx/skia/skia/src/core/SkTypeface_remote.cpp b/gfx/skia/skia/src/core/SkTypeface_remote.cpp |
|
176 --- a/gfx/skia/skia/src/core/SkTypeface_remote.cpp |
|
177 +++ b/gfx/skia/skia/src/core/SkTypeface_remote.cpp |
|
178 @@ -24,16 +24,17 @@ void SkScalerContextProxy::initCache(SkS |
|
179 SkASSERT(cache != nullptr); |
|
180 |
|
181 fCache = cache; |
|
182 fStrikeCache = strikeCache; |
|
183 } |
106 |
184 |
107 unsigned SkScalerContextProxy::generateGlyphCount() { |
185 unsigned SkScalerContextProxy::generateGlyphCount() { |
108 SK_ABORT("Should never be called."); |
186 SK_ABORT("Should never be called."); |
109 + SkUNREACHABLE; |
187 + SkUNREACHABLE; |
110 } |
188 } |
111 |
189 |
112 bool SkScalerContextProxy::generateAdvance(SkGlyph* glyph) { |
190 bool SkScalerContextProxy::generateAdvance(SkGlyph* glyph) { |
113 Index: firefox-102.0/gfx/skia/skia/src/core/SkTypeface_remote.h |
191 return false; |
114 =================================================================== |
192 } |
115 --- firefox-102.0.orig/gfx/skia/skia/src/core/SkTypeface_remote.h |
193 |
116 +++ firefox-102.0/gfx/skia/skia/src/core/SkTypeface_remote.h |
194 void SkScalerContextProxy::generateMetrics(SkGlyph* glyph) { |
117 @@ -63,23 +63,28 @@ public: |
195 TRACE_EVENT1("skia", "generateMetrics", "rec", TRACE_STR_COPY(this->getRec().dump().c_str())); |
|
196 diff --git a/gfx/skia/skia/src/core/SkTypeface_remote.h b/gfx/skia/skia/src/core/SkTypeface_remote.h |
|
197 --- a/gfx/skia/skia/src/core/SkTypeface_remote.h |
|
198 +++ b/gfx/skia/skia/src/core/SkTypeface_remote.h |
|
199 @@ -58,46 +58,54 @@ public: |
|
200 , fGlyphCount{glyphCount} |
|
201 , fIsLogging{isLogging} |
|
202 , fDiscardableManager{std::move(manager)} {} |
|
203 SkFontID remoteTypefaceID() const {return fFontId;} |
|
204 int glyphCount() const {return fGlyphCount;} |
118 bool isLogging() const {return fIsLogging;} |
205 bool isLogging() const {return fIsLogging;} |
119 |
206 |
120 protected: |
207 protected: |
121 - int onGetUPEM() const override { SK_ABORT("Should never be called."); } |
208 - int onGetUPEM() const override { SK_ABORT("Should never be called."); } |
122 + int onGetUPEM() const override { SK_ABORT("Should never be called."); SkUNREACHABLE; } |
209 + int onGetUPEM() const override { SK_ABORT("Should never be called."); SkUNREACHABLE; } |
158 SK_ABORT("Should never be called."); |
245 SK_ABORT("Should never be called."); |
159 + SkUNREACHABLE; |
246 + SkUNREACHABLE; |
160 } |
247 } |
161 SkScalerContext* onCreateScalerContext(const SkScalerContextEffects& effects, |
248 SkScalerContext* onCreateScalerContext(const SkScalerContextEffects& effects, |
162 const SkDescriptor* desc) const override { |
249 const SkDescriptor* desc) const override { |
163 @@ -116,6 +124,7 @@ protected: |
250 return new SkScalerContextProxy(sk_ref_sp(const_cast<SkTypefaceProxy*>(this)), effects, |
|
251 desc, fDiscardableManager); |
|
252 } |
|
253 void onFilterRec(SkScalerContextRec* rec) const override { |
|
254 // The rec filtering is already applied by the server when generating |
|
255 @@ -111,26 +119,28 @@ protected: |
|
256 } |
|
257 |
|
258 void getPostScriptGlyphNames(SkString*) const override { |
|
259 SK_ABORT("Should never be called."); |
|
260 } |
164 |
261 |
165 std::unique_ptr<SkAdvancedTypefaceMetrics> onGetAdvancedMetrics() const override { |
262 std::unique_ptr<SkAdvancedTypefaceMetrics> onGetAdvancedMetrics() const override { |
166 SK_ABORT("Should never be called."); |
263 SK_ABORT("Should never be called."); |
167 + SkUNREACHABLE; |
264 + SkUNREACHABLE; |
168 } |
265 } |
169 void onCharsToGlyphs(const SkUnichar* chars, int count, SkGlyphID glyphs[]) const override { |
266 void onCharsToGlyphs(const SkUnichar* chars, int count, SkGlyphID glyphs[]) const override { |
170 SK_ABORT("Should never be called."); |
267 SK_ABORT("Should never be called."); |
171 @@ -126,6 +135,7 @@ protected: |
268 } |
|
269 int onCountGlyphs() const override { |
|
270 return this->glyphCount(); |
|
271 } |
172 |
272 |
173 void* onGetCTFontRef() const override { |
273 void* onGetCTFontRef() const override { |
174 SK_ABORT("Should never be called."); |
274 SK_ABORT("Should never be called."); |
175 + SkUNREACHABLE; |
275 + SkUNREACHABLE; |
176 } |
276 } |
177 |
277 |
178 private: |
278 private: |
179 Index: firefox-102.0/gfx/skia/skia/src/effects/imagefilters/SkBlurImageFilter.cpp |
279 const SkFontID fFontId; |
180 =================================================================== |
280 const int fGlyphCount; |
181 --- firefox-102.0.orig/gfx/skia/skia/src/effects/imagefilters/SkBlurImageFilter.cpp |
281 const bool fIsLogging; |
182 +++ firefox-102.0/gfx/skia/skia/src/effects/imagefilters/SkBlurImageFilter.cpp |
282 sk_sp<SkStrikeClient::DiscardableHandleManager> fDiscardableManager; |
183 @@ -144,6 +144,7 @@ static GrTextureDomain::Mode to_texture_ |
283 |
|
284 diff --git a/gfx/skia/skia/src/effects/imagefilters/SkBlurImageFilter.cpp b/gfx/skia/skia/src/effects/imagefilters/SkBlurImageFilter.cpp |
|
285 --- a/gfx/skia/skia/src/effects/imagefilters/SkBlurImageFilter.cpp |
|
286 +++ b/gfx/skia/skia/src/effects/imagefilters/SkBlurImageFilter.cpp |
|
287 @@ -139,16 +139,17 @@ static GrTextureDomain::Mode to_texture_ |
|
288 case SkTileMode::kDecal: |
|
289 return GrTextureDomain::kDecal_Mode; |
|
290 case SkTileMode::kMirror: |
|
291 // TODO (michaelludwig) - Support mirror mode, treat as repeat for now |
|
292 case SkTileMode::kRepeat: |
184 return GrTextureDomain::kRepeat_Mode; |
293 return GrTextureDomain::kRepeat_Mode; |
185 default: |
294 default: |
186 SK_ABORT("Unsupported tile mode."); |
295 SK_ABORT("Unsupported tile mode."); |
187 + SkUNREACHABLE; |
296 + SkUNREACHABLE; |
188 } |
297 } |
189 } |
298 } |
190 #endif |
299 #endif |
191 Index: firefox-102.0/gfx/skia/skia/src/effects/imagefilters/SkLightingImageFilter.cpp |
300 |
192 =================================================================== |
301 // This is defined by the SVG spec: |
193 --- firefox-102.0.orig/gfx/skia/skia/src/effects/imagefilters/SkLightingImageFilter.cpp |
302 // https://drafts.fxtf.org/filter-effects/#feGaussianBlurElement |
194 +++ firefox-102.0/gfx/skia/skia/src/effects/imagefilters/SkLightingImageFilter.cpp |
303 static int calculate_window(double sigma) { |
195 @@ -1701,6 +1701,7 @@ static SkImageFilterLight* create_random |
304 // NB 136 is the largest sigma that will not cause a buffer full of 255 mask values to overflow |
|
305 diff --git a/gfx/skia/skia/src/effects/imagefilters/SkLightingImageFilter.cpp b/gfx/skia/skia/src/effects/imagefilters/SkLightingImageFilter.cpp |
|
306 --- a/gfx/skia/skia/src/effects/imagefilters/SkLightingImageFilter.cpp |
|
307 +++ b/gfx/skia/skia/src/effects/imagefilters/SkLightingImageFilter.cpp |
|
308 @@ -1696,16 +1696,17 @@ static SkImageFilterLight* create_random |
|
309 return new SkPointLight(random_point3(random), random->nextU()); |
|
310 } |
|
311 case 2: { |
|
312 return new SkSpotLight(random_point3(random), random_point3(random), |
|
313 random->nextUScalar1(), random->nextUScalar1(), random->nextU()); |
196 } |
314 } |
197 default: |
315 default: |
198 SK_ABORT("Unexpected value."); |
316 SK_ABORT("Unexpected value."); |
199 + SkUNREACHABLE; |
317 + SkUNREACHABLE; |
200 } |
318 } |
201 } |
319 } |
202 |
320 |
203 Index: firefox-102.0/gfx/skia/skia/src/fonts/SkFontMgr_indirect.cpp |
321 std::unique_ptr<GrFragmentProcessor> GrDiffuseLightingEffect::TestCreate(GrProcessorTestData* d) { |
204 =================================================================== |
322 int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx |
205 --- firefox-102.0.orig/gfx/skia/skia/src/fonts/SkFontMgr_indirect.cpp |
323 : GrProcessorUnitTest::kAlphaTextureIdx; |
206 +++ firefox-102.0/gfx/skia/skia/src/fonts/SkFontMgr_indirect.cpp |
324 sk_sp<GrTextureProxy> proxy = d->textureProxy(texIdx); |
207 @@ -69,6 +69,7 @@ void SkFontMgr_Indirect::onGetFamilyName |
325 SkScalar surfaceScale = d->fRandom->nextSScalar1(); |
|
326 diff --git a/gfx/skia/skia/src/fonts/SkFontMgr_indirect.cpp b/gfx/skia/skia/src/fonts/SkFontMgr_indirect.cpp |
|
327 --- a/gfx/skia/skia/src/fonts/SkFontMgr_indirect.cpp |
|
328 +++ b/gfx/skia/skia/src/fonts/SkFontMgr_indirect.cpp |
|
329 @@ -64,16 +64,17 @@ int SkFontMgr_Indirect::onCountFamilies( |
|
330 } |
|
331 |
|
332 void SkFontMgr_Indirect::onGetFamilyName(int index, SkString* familyName) const { |
|
333 SK_ABORT("Not implemented"); |
|
334 } |
208 |
335 |
209 SkFontStyleSet* SkFontMgr_Indirect::onCreateStyleSet(int index) const { |
336 SkFontStyleSet* SkFontMgr_Indirect::onCreateStyleSet(int index) const { |
210 SK_ABORT("Not implemented"); |
337 SK_ABORT("Not implemented"); |
211 + SkUNREACHABLE; |
338 + SkUNREACHABLE; |
212 } |
339 } |
213 |
340 |
214 SkFontStyleSet* SkFontMgr_Indirect::onMatchFamily(const char familyName[]) const { |
341 SkFontStyleSet* SkFontMgr_Indirect::onMatchFamily(const char familyName[]) const { |
215 Index: firefox-102.0/gfx/skia/skia/src/gpu/GrDataUtils.cpp |
342 return new SkStyleSet_Indirect(this, -1, fProxy->matchName(familyName)); |
216 =================================================================== |
343 } |
217 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/GrDataUtils.cpp |
344 |
218 +++ firefox-102.0/gfx/skia/skia/src/gpu/GrDataUtils.cpp |
345 SkTypeface* SkFontMgr_Indirect::createTypefaceFromFontId(const SkFontIdentity& id) const { |
219 @@ -128,6 +128,7 @@ size_t GrCompressedDataSize(SkImage::Com |
346 if (id.fDataId == SkFontIdentity::kInvalidDataId) { |
|
347 diff --git a/gfx/skia/skia/src/gpu/GrDataUtils.cpp b/gfx/skia/skia/src/gpu/GrDataUtils.cpp |
|
348 --- a/gfx/skia/skia/src/gpu/GrDataUtils.cpp |
|
349 +++ b/gfx/skia/skia/src/gpu/GrDataUtils.cpp |
|
350 @@ -123,25 +123,27 @@ static int num_ETC1_blocks(int w, int h) |
|
351 |
|
352 size_t GrCompressedDataSize(SkImage::CompressionType type, int width, int height) { |
|
353 switch (type) { |
|
354 case SkImage::kETC1_CompressionType: |
|
355 int numBlocks = num_ETC1_blocks(width, height); |
220 return numBlocks * sizeof(ETC1Block); |
356 return numBlocks * sizeof(ETC1Block); |
221 } |
357 } |
222 SK_ABORT("Unexpected compression type"); |
358 SK_ABORT("Unexpected compression type"); |
223 + SkUNREACHABLE; |
359 + SkUNREACHABLE; |
224 } |
360 } |
225 |
361 |
226 size_t GrCompressedRowBytes(SkImage::CompressionType type, int width) { |
362 size_t GrCompressedRowBytes(SkImage::CompressionType type, int width) { |
227 @@ -137,6 +138,7 @@ size_t GrCompressedRowBytes(SkImage::Com |
363 switch (type) { |
|
364 case SkImage::kETC1_CompressionType: |
|
365 int numBlocksWidth = num_ETC1_blocks_w(width); |
228 return numBlocksWidth * sizeof(ETC1Block); |
366 return numBlocksWidth * sizeof(ETC1Block); |
229 } |
367 } |
230 SK_ABORT("Unexpected compression type"); |
368 SK_ABORT("Unexpected compression type"); |
231 + SkUNREACHABLE; |
369 + SkUNREACHABLE; |
232 } |
370 } |
233 |
371 |
234 // Fill in 'dest' with ETC1 blocks derived from 'colorf' |
372 // Fill in 'dest' with ETC1 blocks derived from 'colorf' |
235 Index: firefox-102.0/gfx/skia/skia/src/gpu/GrFragmentProcessor.h |
373 static void fillin_ETC1_with_color(int width, int height, const SkColor4f& colorf, void* dest) { |
236 =================================================================== |
374 SkColor color = colorf.toSkColor(); |
237 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/GrFragmentProcessor.h |
375 |
238 +++ firefox-102.0/gfx/skia/skia/src/gpu/GrFragmentProcessor.h |
376 ETC1Block block; |
239 @@ -375,6 +375,7 @@ protected: |
377 create_etc1_block(color, &block); |
|
378 diff --git a/gfx/skia/skia/src/gpu/GrFragmentProcessor.h b/gfx/skia/skia/src/gpu/GrFragmentProcessor.h |
|
379 --- a/gfx/skia/skia/src/gpu/GrFragmentProcessor.h |
|
380 +++ b/gfx/skia/skia/src/gpu/GrFragmentProcessor.h |
|
381 @@ -370,16 +370,17 @@ protected: |
|
382 const Args&... samps) { |
|
383 return (0 == i) ? samp0 : IthTextureSampler(i - 1, samps...); |
|
384 } |
|
385 inline static const TextureSampler& IthTextureSampler(int i); |
|
386 |
240 private: |
387 private: |
241 virtual SkPMColor4f constantOutputForConstantInput(const SkPMColor4f& /* inputColor */) const { |
388 virtual SkPMColor4f constantOutputForConstantInput(const SkPMColor4f& /* inputColor */) const { |
242 SK_ABORT("Subclass must override this if advertising this optimization."); |
389 SK_ABORT("Subclass must override this if advertising this optimization."); |
243 + SkUNREACHABLE; |
390 + SkUNREACHABLE; |
244 } |
391 } |
245 |
392 |
246 /** Returns a new instance of the appropriate *GL* implementation class |
393 /** Returns a new instance of the appropriate *GL* implementation class |
247 Index: firefox-102.0/gfx/skia/skia/src/gpu/GrPathRendering.cpp |
394 for the given GrFragmentProcessor; caller is responsible for deleting |
248 =================================================================== |
395 the object. */ |
249 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/GrPathRendering.cpp |
396 virtual GrGLSLFragmentProcessor* onCreateGLSLInstance() const = 0; |
250 +++ firefox-102.0/gfx/skia/skia/src/gpu/GrPathRendering.cpp |
397 |
251 @@ -19,6 +19,7 @@ const GrUserStencilSettings& GrPathRende |
398 /** Implemented using GLFragmentProcessor::GenKey as described in this class's comment. */ |
|
399 diff --git a/gfx/skia/skia/src/gpu/GrPathRendering.cpp b/gfx/skia/skia/src/gpu/GrPathRendering.cpp |
|
400 --- a/gfx/skia/skia/src/gpu/GrPathRendering.cpp |
|
401 +++ b/gfx/skia/skia/src/gpu/GrPathRendering.cpp |
|
402 @@ -14,16 +14,17 @@ |
|
403 #include "src/gpu/GrPathRendering.h" |
|
404 #include "src/gpu/GrProgramInfo.h" |
|
405 #include "src/gpu/GrRenderTarget.h" |
|
406 |
|
407 const GrUserStencilSettings& GrPathRendering::GetStencilPassSettings(FillType fill) { |
252 switch (fill) { |
408 switch (fill) { |
253 default: |
409 default: |
254 SK_ABORT("Unexpected path fill."); |
410 SK_ABORT("Unexpected path fill."); |
255 + SkUNREACHABLE; |
411 + SkUNREACHABLE; |
256 case GrPathRendering::kWinding_FillType: { |
412 case GrPathRendering::kWinding_FillType: { |
257 constexpr static GrUserStencilSettings kWindingStencilPass( |
413 constexpr static GrUserStencilSettings kWindingStencilPass( |
258 GrUserStencilSettings::StaticInit< |
414 GrUserStencilSettings::StaticInit< |
259 Index: firefox-102.0/gfx/skia/skia/src/gpu/GrPathRendering.h |
415 0xffff, |
260 =================================================================== |
416 GrUserStencilTest::kAlwaysIfInClip, |
261 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/GrPathRendering.h |
417 0xffff, |
262 +++ firefox-102.0/gfx/skia/skia/src/gpu/GrPathRendering.h |
418 GrUserStencilOp::kIncWrap, |
263 @@ -63,6 +63,7 @@ public: |
419 GrUserStencilOp::kIncWrap, |
|
420 diff --git a/gfx/skia/skia/src/gpu/GrPathRendering.h b/gfx/skia/skia/src/gpu/GrPathRendering.h |
|
421 --- a/gfx/skia/skia/src/gpu/GrPathRendering.h |
|
422 +++ b/gfx/skia/skia/src/gpu/GrPathRendering.h |
|
423 @@ -58,16 +58,17 @@ public: |
|
424 return 1; |
|
425 case kTranslate_PathTransformType: |
|
426 return 2; |
|
427 case kAffine_PathTransformType: |
|
428 return 6; |
264 |
429 |
265 default: |
430 default: |
266 SK_ABORT("Unknown path transform type"); |
431 SK_ABORT("Unknown path transform type"); |
267 + SkUNREACHABLE; |
432 + SkUNREACHABLE; |
268 } |
433 } |
269 } |
434 } |
270 |
435 |
271 Index: firefox-102.0/gfx/skia/skia/src/gpu/GrProcessorUnitTest.cpp |
436 // No native support for inverse at this time |
272 =================================================================== |
437 enum FillType { |
273 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/GrProcessorUnitTest.cpp |
438 /** Specifies that "inside" is computed by a non-zero sum of signed |
274 +++ firefox-102.0/gfx/skia/skia/src/gpu/GrProcessorUnitTest.cpp |
439 edge crossings |
275 @@ -20,6 +20,7 @@ std::unique_ptr<GrFragmentProcessor> GrP |
440 */ |
|
441 diff --git a/gfx/skia/skia/src/gpu/GrProcessorUnitTest.cpp b/gfx/skia/skia/src/gpu/GrProcessorUnitTest.cpp |
|
442 --- a/gfx/skia/skia/src/gpu/GrProcessorUnitTest.cpp |
|
443 +++ b/gfx/skia/skia/src/gpu/GrProcessorUnitTest.cpp |
|
444 @@ -15,11 +15,12 @@ std::unique_ptr<GrFragmentProcessor> GrP |
|
445 std::unique_ptr<GrFragmentProcessor> fp; |
|
446 do { |
|
447 fp = GrFragmentProcessorTestFactory::Make(data); |
|
448 SkASSERT(fp); |
|
449 } while (fp->numChildProcessors() != 0); |
276 return fp; |
450 return fp; |
277 #else |
451 #else |
278 SK_ABORT("Should not be called if !SK_ALLOW_STATIC_GLOBAL_INITIALIZERS"); |
452 SK_ABORT("Should not be called if !SK_ALLOW_STATIC_GLOBAL_INITIALIZERS"); |
279 + SkUNREACHABLE; |
453 + SkUNREACHABLE; |
280 #endif |
454 #endif |
281 } |
455 } |
282 #endif |
456 #endif |
283 Index: firefox-102.0/gfx/skia/skia/src/gpu/GrReducedClip.cpp |
457 diff --git a/gfx/skia/skia/src/gpu/GrReducedClip.cpp b/gfx/skia/skia/src/gpu/GrReducedClip.cpp |
284 =================================================================== |
458 --- a/gfx/skia/skia/src/gpu/GrReducedClip.cpp |
285 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/GrReducedClip.cpp |
459 +++ b/gfx/skia/skia/src/gpu/GrReducedClip.cpp |
286 +++ firefox-102.0/gfx/skia/skia/src/gpu/GrReducedClip.cpp |
460 @@ -520,16 +520,17 @@ GrReducedClip::ClipResult GrReducedClip: |
287 @@ -525,6 +525,7 @@ GrReducedClip::ClipResult GrReducedClip: |
461 GrAA(element->isAA())); |
|
462 |
|
463 case Element::DeviceSpaceType::kPath: |
|
464 return this->addAnalyticFP(element->getDeviceSpacePath(), |
|
465 Invert(element->isInverseFilled()), GrAA(element->isAA())); |
288 } |
466 } |
289 |
467 |
290 SK_ABORT("Unexpected DeviceSpaceType"); |
468 SK_ABORT("Unexpected DeviceSpaceType"); |
291 + SkUNREACHABLE; |
469 + SkUNREACHABLE; |
292 } |
470 } |
293 |
471 |
294 GrReducedClip::ClipResult GrReducedClip::clipOutsideElement(const Element* element) { |
472 GrReducedClip::ClipResult GrReducedClip::clipOutsideElement(const Element* element) { |
295 @@ -591,6 +592,7 @@ GrReducedClip::ClipResult GrReducedClip: |
473 switch (element->getDeviceSpaceType()) { |
|
474 case Element::DeviceSpaceType::kEmpty: |
|
475 return ClipResult::kMadeEmpty; |
|
476 |
|
477 case Element::DeviceSpaceType::kRect: |
|
478 @@ -586,16 +587,17 @@ GrReducedClip::ClipResult GrReducedClip: |
|
479 } |
|
480 |
|
481 case Element::DeviceSpaceType::kPath: |
|
482 return this->addAnalyticFP(element->getDeviceSpacePath(), |
|
483 Invert(!element->isInverseFilled()), GrAA(element->isAA())); |
296 } |
484 } |
297 |
485 |
298 SK_ABORT("Unexpected DeviceSpaceType"); |
486 SK_ABORT("Unexpected DeviceSpaceType"); |
299 + SkUNREACHABLE; |
487 + SkUNREACHABLE; |
300 } |
488 } |
301 |
489 |
302 inline void GrReducedClip::addWindowRectangle(const SkRect& elementInteriorRect, bool elementIsAA) { |
490 inline void GrReducedClip::addWindowRectangle(const SkRect& elementInteriorRect, bool elementIsAA) { |
303 Index: firefox-102.0/gfx/skia/skia/src/gpu/GrResourceCache.cpp |
491 SkIRect window; |
304 =================================================================== |
492 if (!elementIsAA) { |
305 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/GrResourceCache.cpp |
493 elementInteriorRect.round(&window); |
306 +++ firefox-102.0/gfx/skia/skia/src/gpu/GrResourceCache.cpp |
494 } else { |
307 @@ -40,6 +40,7 @@ GrScratchKey::ResourceType GrScratchKey: |
495 elementInteriorRect.roundIn(&window); |
|
496 diff --git a/gfx/skia/skia/src/gpu/GrResourceCache.cpp b/gfx/skia/skia/src/gpu/GrResourceCache.cpp |
|
497 --- a/gfx/skia/skia/src/gpu/GrResourceCache.cpp |
|
498 +++ b/gfx/skia/skia/src/gpu/GrResourceCache.cpp |
|
499 @@ -35,27 +35,29 @@ DECLARE_SKMESSAGEBUS_MESSAGE(GrTextureFr |
|
500 ////////////////////////////////////////////////////////////////////////////// |
|
501 |
|
502 GrScratchKey::ResourceType GrScratchKey::GenerateResourceType() { |
|
503 static std::atomic<int32_t> nextType{INHERITED::kInvalidDomain + 1}; |
|
504 |
308 int32_t type = nextType++; |
505 int32_t type = nextType++; |
309 if (type > SkTo<int32_t>(UINT16_MAX)) { |
506 if (type > SkTo<int32_t>(UINT16_MAX)) { |
310 SK_ABORT("Too many Resource Types"); |
507 SK_ABORT("Too many Resource Types"); |
311 + SkUNREACHABLE; |
508 + SkUNREACHABLE; |
312 } |
509 } |
313 |
510 |
314 return static_cast<ResourceType>(type); |
511 return static_cast<ResourceType>(type); |
315 @@ -51,6 +52,7 @@ GrUniqueKey::Domain GrUniqueKey::Generat |
512 } |
|
513 |
|
514 GrUniqueKey::Domain GrUniqueKey::GenerateDomain() { |
|
515 static std::atomic<int32_t> nextDomain{INHERITED::kInvalidDomain + 1}; |
|
516 |
316 int32_t domain = nextDomain++; |
517 int32_t domain = nextDomain++; |
317 if (domain > SkTo<int32_t>(UINT16_MAX)) { |
518 if (domain > SkTo<int32_t>(UINT16_MAX)) { |
318 SK_ABORT("Too many GrUniqueKey Domains"); |
519 SK_ABORT("Too many GrUniqueKey Domains"); |
319 + SkUNREACHABLE; |
520 + SkUNREACHABLE; |
320 } |
521 } |
321 |
522 |
322 return static_cast<Domain>(domain); |
523 return static_cast<Domain>(domain); |
323 Index: firefox-102.0/gfx/skia/skia/src/gpu/GrShaderVar.cpp |
524 } |
324 =================================================================== |
525 |
325 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/GrShaderVar.cpp |
526 uint32_t GrResourceKeyHash(const uint32_t* data, size_t size) { |
326 +++ firefox-102.0/gfx/skia/skia/src/gpu/GrShaderVar.cpp |
527 return SkOpts::hash(data, size); |
327 @@ -18,6 +18,7 @@ static const char* type_modifier_string( |
528 } |
|
529 diff --git a/gfx/skia/skia/src/gpu/GrShaderVar.cpp b/gfx/skia/skia/src/gpu/GrShaderVar.cpp |
|
530 --- a/gfx/skia/skia/src/gpu/GrShaderVar.cpp |
|
531 +++ b/gfx/skia/skia/src/gpu/GrShaderVar.cpp |
|
532 @@ -13,30 +13,32 @@ static const char* type_modifier_string( |
|
533 switch (t) { |
|
534 case GrShaderVar::kNone_TypeModifier: return ""; |
|
535 case GrShaderVar::kIn_TypeModifier: return "in"; |
|
536 case GrShaderVar::kInOut_TypeModifier: return "inout"; |
|
537 case GrShaderVar::kOut_TypeModifier: return "out"; |
328 case GrShaderVar::kUniform_TypeModifier: return "uniform"; |
538 case GrShaderVar::kUniform_TypeModifier: return "uniform"; |
329 } |
539 } |
330 SK_ABORT("Unknown shader variable type modifier."); |
540 SK_ABORT("Unknown shader variable type modifier."); |
331 + SkUNREACHABLE; |
541 + SkUNREACHABLE; |
332 } |
542 } |
333 |
543 |
334 void GrShaderVar::setIOType(GrIOType ioType) { |
544 void GrShaderVar::setIOType(GrIOType ioType) { |
335 @@ -32,6 +33,7 @@ void GrShaderVar::setIOType(GrIOType ioT |
545 switch (ioType) { |
|
546 case kRW_GrIOType: |
336 return; |
547 return; |
|
548 case kRead_GrIOType: |
|
549 this->addModifier("readonly"); |
|
550 return; |
|
551 case kWrite_GrIOType: |
|
552 this->addModifier("writeonly"); |
|
553 return; |
337 } |
554 } |
338 SK_ABORT("Unknown io type."); |
555 SK_ABORT("Unknown io type."); |
339 + SkUNREACHABLE; |
556 + SkUNREACHABLE; |
340 } |
557 } |
341 |
558 |
342 void GrShaderVar::appendDecl(const GrShaderCaps* shaderCaps, SkString* out) const { |
559 void GrShaderVar::appendDecl(const GrShaderCaps* shaderCaps, SkString* out) const { |
343 Index: firefox-102.0/gfx/skia/skia/src/gpu/SkGpuDevice.cpp |
560 SkString layout = fLayoutQualifier; |
344 =================================================================== |
561 if (!fLayoutQualifier.isEmpty()) { |
345 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/SkGpuDevice.cpp |
562 out->appendf("layout(%s) ", fLayoutQualifier.c_str()); |
346 +++ firefox-102.0/gfx/skia/skia/src/gpu/SkGpuDevice.cpp |
563 } |
347 @@ -283,6 +283,7 @@ static inline GrPrimitiveType point_mode |
564 out->append(fExtraModifiers); |
|
565 diff --git a/gfx/skia/skia/src/gpu/SkGpuDevice.cpp b/gfx/skia/skia/src/gpu/SkGpuDevice.cpp |
|
566 --- a/gfx/skia/skia/src/gpu/SkGpuDevice.cpp |
|
567 +++ b/gfx/skia/skia/src/gpu/SkGpuDevice.cpp |
|
568 @@ -278,16 +278,17 @@ static inline GrPrimitiveType point_mode |
|
569 case SkCanvas::kPoints_PointMode: |
|
570 return GrPrimitiveType::kPoints; |
|
571 case SkCanvas::kLines_PointMode: |
|
572 return GrPrimitiveType::kLines; |
|
573 case SkCanvas::kPolygon_PointMode: |
348 return GrPrimitiveType::kLineStrip; |
574 return GrPrimitiveType::kLineStrip; |
349 } |
575 } |
350 SK_ABORT("Unexpected mode"); |
576 SK_ABORT("Unexpected mode"); |
351 + SkUNREACHABLE; |
577 + SkUNREACHABLE; |
352 } |
578 } |
353 |
579 |
354 void SkGpuDevice::drawPoints(SkCanvas::PointMode mode, |
580 void SkGpuDevice::drawPoints(SkCanvas::PointMode mode, |
355 Index: firefox-102.0/gfx/skia/skia/src/gpu/SkGr.h |
581 size_t count, const SkPoint pts[], const SkPaint& paint) { |
356 =================================================================== |
582 ASSERT_SINGLE_OWNER |
357 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/SkGr.h |
583 GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawPoints", fContext.get()); |
358 +++ firefox-102.0/gfx/skia/skia/src/gpu/SkGr.h |
584 SkScalar width = paint.getStrokeWidth(); |
359 @@ -159,6 +159,7 @@ static inline GrPrimitiveType SkVertexMo |
585 if (width < 0) { |
|
586 diff --git a/gfx/skia/skia/src/gpu/SkGr.h b/gfx/skia/skia/src/gpu/SkGr.h |
|
587 --- a/gfx/skia/skia/src/gpu/SkGr.h |
|
588 +++ b/gfx/skia/skia/src/gpu/SkGr.h |
|
589 @@ -154,16 +154,17 @@ static inline GrPrimitiveType SkVertexMo |
|
590 case SkVertices::kTriangles_VertexMode: |
|
591 return GrPrimitiveType::kTriangles; |
|
592 case SkVertices::kTriangleStrip_VertexMode: |
|
593 return GrPrimitiveType::kTriangleStrip; |
|
594 case SkVertices::kTriangleFan_VertexMode: |
360 break; |
595 break; |
361 } |
596 } |
362 SK_ABORT("Invalid mode"); |
597 SK_ABORT("Invalid mode"); |
363 + SkUNREACHABLE; |
598 + SkUNREACHABLE; |
364 } |
599 } |
365 |
600 |
366 ////////////////////////////////////////////////////////////////////////////// |
601 ////////////////////////////////////////////////////////////////////////////// |
367 Index: firefox-102.0/gfx/skia/skia/src/gpu/ccpr/GrCCCoverageProcessor.h |
602 |
368 =================================================================== |
603 GR_STATIC_ASSERT((int)kZero_GrBlendCoeff == (int)SkBlendModeCoeff::kZero); |
369 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/ccpr/GrCCCoverageProcessor.h |
604 GR_STATIC_ASSERT((int)kOne_GrBlendCoeff == (int)SkBlendModeCoeff::kOne); |
370 +++ firefox-102.0/gfx/skia/skia/src/gpu/ccpr/GrCCCoverageProcessor.h |
605 GR_STATIC_ASSERT((int)kSC_GrBlendCoeff == (int)SkBlendModeCoeff::kSC); |
371 @@ -240,6 +240,7 @@ inline const char* GrCCCoverageProcessor |
606 GR_STATIC_ASSERT((int)kISC_GrBlendCoeff == (int)SkBlendModeCoeff::kISC); |
|
607 diff --git a/gfx/skia/skia/src/gpu/ccpr/GrCCCoverageProcessor.h b/gfx/skia/skia/src/gpu/ccpr/GrCCCoverageProcessor.h |
|
608 --- a/gfx/skia/skia/src/gpu/ccpr/GrCCCoverageProcessor.h |
|
609 +++ b/gfx/skia/skia/src/gpu/ccpr/GrCCCoverageProcessor.h |
|
610 @@ -235,16 +235,17 @@ inline const char* GrCCCoverageProcessor |
|
611 switch (type) { |
|
612 case PrimitiveType::kTriangles: return "kTriangles"; |
|
613 case PrimitiveType::kWeightedTriangles: return "kWeightedTriangles"; |
|
614 case PrimitiveType::kQuadratics: return "kQuadratics"; |
|
615 case PrimitiveType::kCubics: return "kCubics"; |
372 case PrimitiveType::kConics: return "kConics"; |
616 case PrimitiveType::kConics: return "kConics"; |
373 } |
617 } |
374 SK_ABORT("Invalid PrimitiveType"); |
618 SK_ABORT("Invalid PrimitiveType"); |
375 + SkUNREACHABLE; |
619 + SkUNREACHABLE; |
376 } |
620 } |
377 |
621 |
378 inline void GrCCCoverageProcessor::TriPointInstance::set( |
622 inline void GrCCCoverageProcessor::TriPointInstance::set( |
379 Index: firefox-102.0/gfx/skia/skia/src/gpu/ccpr/GrCCStrokeGeometry.cpp |
623 const SkPoint p[3], const Sk2f& translate, Ordering ordering) { |
380 =================================================================== |
624 this->set(p[0], p[1], p[2], translate, ordering); |
381 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/ccpr/GrCCStrokeGeometry.cpp |
625 } |
382 +++ firefox-102.0/gfx/skia/skia/src/gpu/ccpr/GrCCStrokeGeometry.cpp |
626 |
383 @@ -60,6 +60,7 @@ static GrCCStrokeGeometry::Verb join_ver |
627 inline void GrCCCoverageProcessor::TriPointInstance::set( |
|
628 diff --git a/gfx/skia/skia/src/gpu/ccpr/GrCCStrokeGeometry.cpp b/gfx/skia/skia/src/gpu/ccpr/GrCCStrokeGeometry.cpp |
|
629 --- a/gfx/skia/skia/src/gpu/ccpr/GrCCStrokeGeometry.cpp |
|
630 +++ b/gfx/skia/skia/src/gpu/ccpr/GrCCStrokeGeometry.cpp |
|
631 @@ -55,16 +55,17 @@ static GrCCStrokeGeometry::Verb join_ver |
|
632 case SkPaint::kBevel_Join: |
|
633 return Verb::kBevelJoin; |
|
634 case SkPaint::kMiter_Join: |
|
635 return Verb::kMiterJoin; |
|
636 case SkPaint::kRound_Join: |
384 return Verb::kRoundJoin; |
637 return Verb::kRoundJoin; |
385 } |
638 } |
386 SK_ABORT("Invalid SkPaint::Join."); |
639 SK_ABORT("Invalid SkPaint::Join."); |
387 + SkUNREACHABLE; |
640 + SkUNREACHABLE; |
388 } |
641 } |
389 |
642 |
390 void GrCCStrokeGeometry::beginPath(const SkStrokeRec& stroke, float strokeDevWidth, |
643 void GrCCStrokeGeometry::beginPath(const SkStrokeRec& stroke, float strokeDevWidth, |
391 Index: firefox-102.0/gfx/skia/skia/src/gpu/ccpr/GrCCStrokeGeometry.h |
644 InstanceTallies* tallies) { |
392 =================================================================== |
645 SkASSERT(!fInsideContour); |
393 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/ccpr/GrCCStrokeGeometry.h |
646 // Client should have already converted the stroke to device space (i.e. width=1 for hairline). |
394 +++ firefox-102.0/gfx/skia/skia/src/gpu/ccpr/GrCCStrokeGeometry.h |
647 SkASSERT(strokeDevWidth > 0); |
395 @@ -175,5 +175,6 @@ inline bool GrCCStrokeGeometry::IsIntern |
648 |
|
649 diff --git a/gfx/skia/skia/src/gpu/ccpr/GrCCStrokeGeometry.h b/gfx/skia/skia/src/gpu/ccpr/GrCCStrokeGeometry.h |
|
650 --- a/gfx/skia/skia/src/gpu/ccpr/GrCCStrokeGeometry.h |
|
651 +++ b/gfx/skia/skia/src/gpu/ccpr/GrCCStrokeGeometry.h |
|
652 @@ -170,10 +170,11 @@ inline bool GrCCStrokeGeometry::IsIntern |
|
653 case Verb::kMiterJoin: |
|
654 case Verb::kRoundJoin: |
|
655 case Verb::kSquareCap: |
|
656 case Verb::kRoundCap: |
|
657 case Verb::kEndContour: |
396 return false; |
658 return false; |
397 } |
659 } |
398 SK_ABORT("Invalid GrCCStrokeGeometry::Verb."); |
660 SK_ABORT("Invalid GrCCStrokeGeometry::Verb."); |
399 + SkUNREACHABLE; |
661 + SkUNREACHABLE; |
400 } |
662 } |
401 #endif |
663 #endif |
402 Index: firefox-102.0/gfx/skia/skia/src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp |
664 diff --git a/gfx/skia/skia/src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp b/gfx/skia/skia/src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp |
403 =================================================================== |
665 --- a/gfx/skia/skia/src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp |
404 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp |
666 +++ b/gfx/skia/skia/src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp |
405 +++ firefox-102.0/gfx/skia/skia/src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp |
667 @@ -159,16 +159,17 @@ GrPathRenderer::CanDrawPath GrCoverageCo |
406 @@ -164,6 +164,7 @@ GrPathRenderer::CanDrawPath GrCoverageCo |
668 return CanDrawPath::kYes; |
|
669 } |
|
670 |
|
671 case SkStrokeRec::kStrokeAndFill_Style: |
|
672 return CanDrawPath::kNo; |
407 } |
673 } |
408 |
674 |
409 SK_ABORT("Invalid stroke style."); |
675 SK_ABORT("Invalid stroke style."); |
410 + SkUNREACHABLE; |
676 + SkUNREACHABLE; |
411 } |
677 } |
412 |
678 |
413 bool GrCoverageCountingPathRenderer::onDrawPath(const DrawPathArgs& args) { |
679 bool GrCoverageCountingPathRenderer::onDrawPath(const DrawPathArgs& args) { |
414 Index: firefox-102.0/gfx/skia/skia/src/gpu/ccpr/GrVSCoverageProcessor.cpp |
680 SkASSERT(!fFlushing); |
415 =================================================================== |
681 |
416 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/ccpr/GrVSCoverageProcessor.cpp |
682 SkIRect clipIBounds; |
417 +++ firefox-102.0/gfx/skia/skia/src/gpu/ccpr/GrVSCoverageProcessor.cpp |
683 GrRenderTargetContext* rtc = args.fRenderTargetContext; |
418 @@ -550,4 +550,5 @@ GrGLSLPrimitiveProcessor* GrVSCoveragePr |
684 args.fClip->getConservativeBounds(rtc->width(), rtc->height(), &clipIBounds, nullptr); |
|
685 diff --git a/gfx/skia/skia/src/gpu/ccpr/GrVSCoverageProcessor.cpp b/gfx/skia/skia/src/gpu/ccpr/GrVSCoverageProcessor.cpp |
|
686 --- a/gfx/skia/skia/src/gpu/ccpr/GrVSCoverageProcessor.cpp |
|
687 +++ b/gfx/skia/skia/src/gpu/ccpr/GrVSCoverageProcessor.cpp |
|
688 @@ -545,9 +545,10 @@ GrGLSLPrimitiveProcessor* GrVSCoveragePr |
|
689 case PrimitiveType::kWeightedTriangles: |
|
690 return new Impl(std::move(shader), 3); |
|
691 case PrimitiveType::kQuadratics: |
|
692 case PrimitiveType::kCubics: |
|
693 case PrimitiveType::kConics: |
419 return new Impl(std::move(shader), 4); |
694 return new Impl(std::move(shader), 4); |
420 } |
695 } |
421 SK_ABORT("Invalid PrimitiveType"); |
696 SK_ABORT("Invalid PrimitiveType"); |
422 + SkUNREACHABLE; |
697 + SkUNREACHABLE; |
423 } |
698 } |
424 Index: firefox-102.0/gfx/skia/skia/src/gpu/dawn/GrDawnOpsRenderPass.cpp |
699 diff --git a/gfx/skia/skia/src/gpu/dawn/GrDawnOpsRenderPass.cpp b/gfx/skia/skia/src/gpu/dawn/GrDawnOpsRenderPass.cpp |
425 =================================================================== |
700 --- a/gfx/skia/skia/src/gpu/dawn/GrDawnOpsRenderPass.cpp |
426 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/dawn/GrDawnOpsRenderPass.cpp |
701 +++ b/gfx/skia/skia/src/gpu/dawn/GrDawnOpsRenderPass.cpp |
427 +++ firefox-102.0/gfx/skia/skia/src/gpu/dawn/GrDawnOpsRenderPass.cpp |
702 @@ -34,17 +34,19 @@ static dawn::LoadOp to_dawn_load_op(GrLo |
428 @@ -39,7 +39,9 @@ static dawn::LoadOp to_dawn_load_op(GrLo |
703 // Load should be equivalent to DontCare for desktop; Clear would |
|
704 // probably be better for tilers. If Dawn does add DontCare |
|
705 // as an extension, use it here. |
|
706 return dawn::LoadOp::Load; |
|
707 case GrLoadOp::kClear: |
429 return dawn::LoadOp::Clear; |
708 return dawn::LoadOp::Clear; |
430 default: |
709 default: |
431 SK_ABORT("Invalid LoadOp"); |
710 SK_ABORT("Invalid LoadOp"); |
432 + SkUNREACHABLE; |
711 + SkUNREACHABLE; |
433 } |
712 } |
434 + SkUNREACHABLE; |
713 + SkUNREACHABLE; |
435 } |
714 } |
436 |
715 |
437 GrDawnOpsRenderPass::GrDawnOpsRenderPass(GrDawnGpu* gpu, GrRenderTarget* rt, GrSurfaceOrigin origin, |
716 GrDawnOpsRenderPass::GrDawnOpsRenderPass(GrDawnGpu* gpu, GrRenderTarget* rt, GrSurfaceOrigin origin, |
438 Index: firefox-102.0/gfx/skia/skia/src/gpu/dawn/GrDawnUniformHandler.cpp |
717 const LoadAndStoreInfo& colorInfo, |
439 =================================================================== |
718 const StencilLoadAndStoreInfo& stencilInfo) |
440 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/dawn/GrDawnUniformHandler.cpp |
719 : INHERITED(rt, origin) |
441 +++ firefox-102.0/gfx/skia/skia/src/gpu/dawn/GrDawnUniformHandler.cpp |
720 , fGpu(gpu) |
442 @@ -95,6 +95,7 @@ uint32_t grsltype_to_alignment_mask(GrSL |
721 , fColorInfo(colorInfo) { |
|
722 diff --git a/gfx/skia/skia/src/gpu/dawn/GrDawnUniformHandler.cpp b/gfx/skia/skia/src/gpu/dawn/GrDawnUniformHandler.cpp |
|
723 --- a/gfx/skia/skia/src/gpu/dawn/GrDawnUniformHandler.cpp |
|
724 +++ b/gfx/skia/skia/src/gpu/dawn/GrDawnUniformHandler.cpp |
|
725 @@ -90,16 +90,17 @@ uint32_t grsltype_to_alignment_mask(GrSL |
|
726 case kTexture2DSampler_GrSLType: |
|
727 case kTextureExternalSampler_GrSLType: |
|
728 case kTexture2DRectSampler_GrSLType: |
|
729 case kTexture2D_GrSLType: |
|
730 case kSampler_GrSLType: |
443 break; |
731 break; |
444 } |
732 } |
445 SK_ABORT("Unexpected type"); |
733 SK_ABORT("Unexpected type"); |
446 + SkUNREACHABLE; |
734 + SkUNREACHABLE; |
447 } |
735 } |
448 |
736 |
449 static inline uint32_t grsltype_to_size(GrSLType type) { |
737 static inline uint32_t grsltype_to_size(GrSLType type) { |
450 @@ -173,6 +174,7 @@ static inline uint32_t grsltype_to_size( |
738 switch(type) { |
|
739 case kByte_GrSLType: |
|
740 case kUByte_GrSLType: |
|
741 return 1; |
|
742 case kByte2_GrSLType: |
|
743 @@ -168,16 +169,17 @@ static inline uint32_t grsltype_to_size( |
|
744 case kTexture2DSampler_GrSLType: |
|
745 case kTextureExternalSampler_GrSLType: |
|
746 case kTexture2DRectSampler_GrSLType: |
|
747 case kTexture2D_GrSLType: |
|
748 case kSampler_GrSLType: |
451 break; |
749 break; |
452 } |
750 } |
453 SK_ABORT("Unexpected type"); |
751 SK_ABORT("Unexpected type"); |
454 + SkUNREACHABLE; |
752 + SkUNREACHABLE; |
455 } |
753 } |
456 |
754 |
457 uint32_t get_ubo_offset(uint32_t* currentOffset, |
755 uint32_t get_ubo_offset(uint32_t* currentOffset, |
458 Index: firefox-102.0/gfx/skia/skia/src/gpu/dawn/GrDawnVaryingHandler.cpp |
756 GrSLType type, |
459 =================================================================== |
757 int arrayCount) { |
460 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/dawn/GrDawnVaryingHandler.cpp |
758 uint32_t alignmentMask = grsltype_to_alignment_mask(type); |
461 +++ firefox-102.0/gfx/skia/skia/src/gpu/dawn/GrDawnVaryingHandler.cpp |
759 // We want to use the std140 layout here, so we must make arrays align to 16 bytes. |
462 @@ -76,6 +76,7 @@ static inline int grsltype_to_location_s |
760 if (arrayCount || type == kFloat2x2_GrSLType) { |
|
761 diff --git a/gfx/skia/skia/src/gpu/dawn/GrDawnVaryingHandler.cpp b/gfx/skia/skia/src/gpu/dawn/GrDawnVaryingHandler.cpp |
|
762 --- a/gfx/skia/skia/src/gpu/dawn/GrDawnVaryingHandler.cpp |
|
763 +++ b/gfx/skia/skia/src/gpu/dawn/GrDawnVaryingHandler.cpp |
|
764 @@ -71,16 +71,17 @@ static inline int grsltype_to_location_s |
|
765 case kUByte_GrSLType: |
|
766 return 1; |
|
767 case kTexture2D_GrSLType: |
463 return 0; |
768 return 0; |
|
769 case kSampler_GrSLType: |
|
770 return 0; |
464 } |
771 } |
465 SK_ABORT("Unexpected type"); |
772 SK_ABORT("Unexpected type"); |
466 + SkUNREACHABLE; |
773 + SkUNREACHABLE; |
467 } |
774 } |
468 |
775 |
469 static void finalize_helper(GrDawnVaryingHandler::VarArray& vars) { |
776 static void finalize_helper(GrDawnVaryingHandler::VarArray& vars) { |
470 Index: firefox-102.0/gfx/skia/skia/src/gpu/effects/GrConstColorProcessor.fp |
777 int locationIndex = 0; |
471 =================================================================== |
778 for (int i = 0; i < vars.count(); ++i) { |
472 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/effects/GrConstColorProcessor.fp |
779 GrShaderVar& var = vars[i]; |
473 +++ firefox-102.0/gfx/skia/skia/src/gpu/effects/GrConstColorProcessor.fp |
780 SkString location; |
474 @@ -58,6 +58,7 @@ void main() { |
781 location.appendf("location = %d", locationIndex); |
|
782 diff --git a/gfx/skia/skia/src/gpu/effects/GrConstColorProcessor.fp b/gfx/skia/skia/src/gpu/effects/GrConstColorProcessor.fp |
|
783 --- a/gfx/skia/skia/src/gpu/effects/GrConstColorProcessor.fp |
|
784 +++ b/gfx/skia/skia/src/gpu/effects/GrConstColorProcessor.fp |
|
785 @@ -53,16 +53,17 @@ void main() { |
|
786 case InputMode::kIgnore: |
|
787 return color; |
|
788 case InputMode::kModulateA: |
|
789 return color * input.fA; |
|
790 case InputMode::kModulateRGBA: |
475 return color * input; |
791 return color * input; |
476 } |
792 } |
477 SK_ABORT("Unexpected mode"); |
793 SK_ABORT("Unexpected mode"); |
478 + SkUNREACHABLE; |
794 + SkUNREACHABLE; |
479 } |
795 } |
480 } |
796 } |
481 |
797 |
482 Index: firefox-102.0/gfx/skia/skia/src/gpu/effects/GrCoverageSetOpXP.cpp |
798 @test(d) { |
483 =================================================================== |
799 SkPMColor4f color; |
484 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/effects/GrCoverageSetOpXP.cpp |
800 int colorPicker = d->fRandom->nextULessThan(3); |
485 +++ firefox-102.0/gfx/skia/skia/src/gpu/effects/GrCoverageSetOpXP.cpp |
801 switch (colorPicker) { |
486 @@ -204,6 +204,7 @@ const GrXPFactory* GrCoverageSetOpXPFact |
802 case 0: { |
|
803 diff --git a/gfx/skia/skia/src/gpu/effects/GrCoverageSetOpXP.cpp b/gfx/skia/skia/src/gpu/effects/GrCoverageSetOpXP.cpp |
|
804 --- a/gfx/skia/skia/src/gpu/effects/GrCoverageSetOpXP.cpp |
|
805 +++ b/gfx/skia/skia/src/gpu/effects/GrCoverageSetOpXP.cpp |
|
806 @@ -199,16 +199,17 @@ const GrXPFactory* GrCoverageSetOpXPFact |
|
807 static _CONSTEXPR_ const GrCoverageSetOpXPFactory gRevDiffCDXPF( |
|
808 SkRegion::kReverseDifference_Op, false); |
|
809 return &gRevDiffCDXPF; |
|
810 } |
|
811 } |
487 } |
812 } |
488 #undef _CONSTEXPR_ |
813 #undef _CONSTEXPR_ |
489 SK_ABORT("Unknown region op."); |
814 SK_ABORT("Unknown region op."); |
490 + SkUNREACHABLE; |
815 + SkUNREACHABLE; |
491 } |
816 } |
492 |
817 |
493 sk_sp<const GrXferProcessor> GrCoverageSetOpXPFactory::makeXferProcessor( |
818 sk_sp<const GrXferProcessor> GrCoverageSetOpXPFactory::makeXferProcessor( |
494 Index: firefox-102.0/gfx/skia/skia/src/gpu/effects/GrPorterDuffXferProcessor.cpp |
819 const GrProcessorAnalysisColor&, |
495 =================================================================== |
820 GrProcessorAnalysisCoverage, |
496 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/effects/GrPorterDuffXferProcessor.cpp |
821 bool hasMixedSamples, |
497 +++ firefox-102.0/gfx/skia/skia/src/gpu/effects/GrPorterDuffXferProcessor.cpp |
822 const GrCaps& caps, |
498 @@ -753,6 +753,7 @@ const GrXPFactory* GrPorterDuffXPFactory |
823 GrClampType) const { |
|
824 diff --git a/gfx/skia/skia/src/gpu/effects/GrPorterDuffXferProcessor.cpp b/gfx/skia/skia/src/gpu/effects/GrPorterDuffXferProcessor.cpp |
|
825 --- a/gfx/skia/skia/src/gpu/effects/GrPorterDuffXferProcessor.cpp |
|
826 +++ b/gfx/skia/skia/src/gpu/effects/GrPorterDuffXferProcessor.cpp |
|
827 @@ -748,16 +748,17 @@ const GrXPFactory* GrPorterDuffXPFactory |
|
828 case SkBlendMode::kPlus: |
|
829 return &gPlusPDXPF; |
|
830 case SkBlendMode::kModulate: |
|
831 return &gModulatePDXPF; |
|
832 case SkBlendMode::kScreen: |
499 return &gScreenPDXPF; |
833 return &gScreenPDXPF; |
500 default: |
834 default: |
501 SK_ABORT("Unexpected blend mode."); |
835 SK_ABORT("Unexpected blend mode."); |
502 + SkUNREACHABLE; |
836 + SkUNREACHABLE; |
503 } |
837 } |
504 } |
838 } |
505 |
839 |
506 Index: firefox-102.0/gfx/skia/skia/src/gpu/effects/GrSkSLFP.cpp |
840 sk_sp<const GrXferProcessor> GrPorterDuffXPFactory::makeXferProcessor( |
507 =================================================================== |
841 const GrProcessorAnalysisColor& color, GrProcessorAnalysisCoverage coverage, |
508 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/effects/GrSkSLFP.cpp |
842 bool hasMixedSamples, const GrCaps& caps, GrClampType clampType) const { |
509 +++ firefox-102.0/gfx/skia/skia/src/gpu/effects/GrSkSLFP.cpp |
843 BlendFormula blendFormula; |
510 @@ -154,6 +154,7 @@ public: |
844 bool isLCD = coverage == GrProcessorAnalysisCoverage::kLCD; |
|
845 diff --git a/gfx/skia/skia/src/gpu/effects/GrSkSLFP.cpp b/gfx/skia/skia/src/gpu/effects/GrSkSLFP.cpp |
|
846 --- a/gfx/skia/skia/src/gpu/effects/GrSkSLFP.cpp |
|
847 +++ b/gfx/skia/skia/src/gpu/effects/GrSkSLFP.cpp |
|
848 @@ -149,16 +149,17 @@ public: |
|
849 return kHalf4x4_GrSLType; |
|
850 } else if (type == *fContext.fBool_Type) { |
|
851 return kBool_GrSLType; |
|
852 } else if (type == *fContext.fInt_Type) { |
|
853 return kInt_GrSLType; |
511 } |
854 } |
512 printf("%s\n", SkSL::String(type.fName).c_str()); |
855 printf("%s\n", SkSL::String(type.fName).c_str()); |
513 SK_ABORT("unsupported uniform type"); |
856 SK_ABORT("unsupported uniform type"); |
514 + SkUNREACHABLE; |
857 + SkUNREACHABLE; |
515 } |
858 } |
516 |
859 |
517 void emitCode(EmitArgs& args) override { |
860 void emitCode(EmitArgs& args) override { |
518 @@ -568,6 +569,7 @@ std::unique_ptr<GrFragmentProcessor> GrS |
861 for (const auto& v : fInAndUniformVars) { |
|
862 if (v->fModifiers.fFlags & SkSL::Modifiers::kUniform_Flag && v->fType != |
|
863 *fContext.fFragmentProcessor_Type) { |
|
864 fUniformHandles.push_back(args.fUniformHandler->addUniform( |
|
865 kFragment_GrShaderFlag, |
|
866 @@ -563,11 +564,12 @@ std::unique_ptr<GrFragmentProcessor> GrS |
|
867 } |
|
868 std::unique_ptr<GrSkSLFP> result = GrSkSLFP::Make(d->context(), overdrawIndex, |
|
869 "Overdraw", SKSL_OVERDRAW_SRC, |
|
870 &inputs, sizeof(inputs)); |
|
871 return std::unique_ptr<GrFragmentProcessor>(result.release()); |
519 } |
872 } |
520 } |
873 } |
521 SK_ABORT("unreachable"); |
874 SK_ABORT("unreachable"); |
522 + SkUNREACHABLE; |
875 + SkUNREACHABLE; |
523 } |
876 } |
524 |
877 |
525 #endif |
878 #endif |
526 Index: firefox-102.0/gfx/skia/skia/src/gpu/effects/generated/GrConstColorProcessor.h |
879 diff --git a/gfx/skia/skia/src/gpu/effects/generated/GrConstColorProcessor.h b/gfx/skia/skia/src/gpu/effects/generated/GrConstColorProcessor.h |
527 =================================================================== |
880 --- a/gfx/skia/skia/src/gpu/effects/generated/GrConstColorProcessor.h |
528 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/effects/generated/GrConstColorProcessor.h |
881 +++ b/gfx/skia/skia/src/gpu/effects/generated/GrConstColorProcessor.h |
529 +++ firefox-102.0/gfx/skia/skia/src/gpu/effects/generated/GrConstColorProcessor.h |
882 @@ -36,16 +36,17 @@ public: |
530 @@ -41,6 +41,7 @@ public: |
883 case InputMode::kIgnore: |
|
884 return color; |
|
885 case InputMode::kModulateA: |
|
886 return color * input.fA; |
|
887 case InputMode::kModulateRGBA: |
531 return color * input; |
888 return color * input; |
532 } |
889 } |
533 SK_ABORT("Unexpected mode"); |
890 SK_ABORT("Unexpected mode"); |
534 + SkUNREACHABLE; |
891 + SkUNREACHABLE; |
535 } |
892 } |
536 static std::unique_ptr<GrFragmentProcessor> Make(SkPMColor4f color, InputMode mode) { |
893 static std::unique_ptr<GrFragmentProcessor> Make(SkPMColor4f color, InputMode mode) { |
537 return std::unique_ptr<GrFragmentProcessor>(new GrConstColorProcessor(color, mode)); |
894 return std::unique_ptr<GrFragmentProcessor>(new GrConstColorProcessor(color, mode)); |
538 Index: firefox-102.0/gfx/skia/skia/src/gpu/geometry/GrShape.cpp |
895 } |
539 =================================================================== |
896 GrConstColorProcessor(const GrConstColorProcessor& src); |
540 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/geometry/GrShape.cpp |
897 std::unique_ptr<GrFragmentProcessor> clone() const override; |
541 +++ firefox-102.0/gfx/skia/skia/src/gpu/geometry/GrShape.cpp |
898 const char* name() const override { return "ConstColorProcessor"; } |
542 @@ -164,6 +164,7 @@ SkRect GrShape::bounds() const { |
899 SkPMColor4f color; |
|
900 diff --git a/gfx/skia/skia/src/gpu/geometry/GrShape.cpp b/gfx/skia/skia/src/gpu/geometry/GrShape.cpp |
|
901 --- a/gfx/skia/skia/src/gpu/geometry/GrShape.cpp |
|
902 +++ b/gfx/skia/skia/src/gpu/geometry/GrShape.cpp |
|
903 @@ -159,16 +159,17 @@ SkRect GrShape::bounds() const { |
|
904 return fRRectData.fRRect.getBounds(); |
|
905 case Type::kArc: |
|
906 // Could make this less conservative by looking at angles. |
|
907 return fArcData.fOval; |
|
908 case Type::kPath: |
543 return this->path().getBounds(); |
909 return this->path().getBounds(); |
544 } |
910 } |
545 SK_ABORT("Unknown shape type"); |
911 SK_ABORT("Unknown shape type"); |
546 + SkUNREACHABLE; |
912 + SkUNREACHABLE; |
547 } |
913 } |
548 |
914 |
549 SkRect GrShape::styledBounds() const { |
915 SkRect GrShape::styledBounds() const { |
550 @@ -254,6 +255,7 @@ int GrShape::unstyledKeySize() const { |
916 if (this->isEmpty() && !fStyle.hasNonDashPathEffect()) { |
|
917 return SkRect::MakeEmpty(); |
|
918 } |
|
919 |
|
920 SkRect bounds; |
|
921 @@ -249,16 +250,17 @@ int GrShape::unstyledKeySize() const { |
|
922 if (dataKeySize >= 0) { |
|
923 return dataKeySize; |
|
924 } |
|
925 // The key is the path ID and fill type. |
|
926 return 2; |
551 } |
927 } |
552 } |
928 } |
553 SK_ABORT("Should never get here."); |
929 SK_ABORT("Should never get here."); |
554 + SkUNREACHABLE; |
930 + SkUNREACHABLE; |
555 } |
931 } |
556 |
932 |
557 void GrShape::writeUnstyledKey(uint32_t* key) const { |
933 void GrShape::writeUnstyledKey(uint32_t* key) const { |
558 Index: firefox-102.0/gfx/skia/skia/src/gpu/gl/GrGLCaps.cpp |
934 SkASSERT(this->unstyledKeySize()); |
559 =================================================================== |
935 SkDEBUGCODE(uint32_t* origKey = key;) |
560 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/gl/GrGLCaps.cpp |
936 if (fInheritedKey.count()) { |
561 +++ firefox-102.0/gfx/skia/skia/src/gpu/gl/GrGLCaps.cpp |
937 memcpy(key, fInheritedKey.get(), sizeof(uint32_t) * fInheritedKey.count()); |
562 @@ -4159,6 +4159,7 @@ GrBackendFormat GrGLCaps::getBackendForm |
938 SkDEBUGCODE(key += fInheritedKey.count();) |
|
939 diff --git a/gfx/skia/skia/src/gpu/gl/GrGLCaps.cpp b/gfx/skia/skia/src/gpu/gl/GrGLCaps.cpp |
|
940 --- a/gfx/skia/skia/src/gpu/gl/GrGLCaps.cpp |
|
941 +++ b/gfx/skia/skia/src/gpu/gl/GrGLCaps.cpp |
|
942 @@ -4154,16 +4154,17 @@ GrBackendFormat GrGLCaps::getBackendForm |
|
943 case SkImage::kETC1_CompressionType: |
|
944 // if ETC2 is available default to that format |
|
945 if (this->isFormatTexturable(GrGLFormat::kCOMPRESSED_RGB8_ETC2)) { |
|
946 return GrBackendFormat::MakeGL(GR_GL_COMPRESSED_RGB8_ETC2, GR_GL_TEXTURE_2D); |
|
947 } |
563 return GrBackendFormat::MakeGL(GR_GL_COMPRESSED_ETC1_RGB8, GR_GL_TEXTURE_2D); |
948 return GrBackendFormat::MakeGL(GR_GL_COMPRESSED_ETC1_RGB8, GR_GL_TEXTURE_2D); |
564 } |
949 } |
565 SK_ABORT("Invalid compression type"); |
950 SK_ABORT("Invalid compression type"); |
566 + SkUNREACHABLE; |
951 + SkUNREACHABLE; |
567 } |
952 } |
568 |
953 |
569 GrSwizzle GrGLCaps::getTextureSwizzle(const GrBackendFormat& format, GrColorType colorType) const { |
954 GrSwizzle GrGLCaps::getTextureSwizzle(const GrBackendFormat& format, GrColorType colorType) const { |
570 Index: firefox-102.0/gfx/skia/skia/src/gpu/gl/GrGLGLSL.cpp |
955 const auto& info = this->getFormatInfo(format.asGLFormat()); |
571 =================================================================== |
956 for (int i = 0; i < info.fColorTypeInfoCount; ++i) { |
572 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/gl/GrGLGLSL.cpp |
957 const auto& ctInfo = info.fColorTypeInfos[i]; |
573 +++ firefox-102.0/gfx/skia/skia/src/gpu/gl/GrGLGLSL.cpp |
958 if (ctInfo.fColorType == colorType) { |
574 @@ -68,4 +68,5 @@ bool GrGLGetGLSLGeneration(const GrGLInt |
959 return ctInfo.fTextureSwizzle; |
|
960 diff --git a/gfx/skia/skia/src/gpu/gl/GrGLGLSL.cpp b/gfx/skia/skia/src/gpu/gl/GrGLGLSL.cpp |
|
961 --- a/gfx/skia/skia/src/gpu/gl/GrGLGLSL.cpp |
|
962 +++ b/gfx/skia/skia/src/gpu/gl/GrGLGLSL.cpp |
|
963 @@ -63,9 +63,10 @@ bool GrGLGetGLSLGeneration(const GrGLInt |
|
964 if (ver >= GR_GLSL_VER(2,0)) { |
|
965 *generation = k330_GrGLSLGeneration; // ES 3.0 |
|
966 } else { |
|
967 *generation = k110_GrGLSLGeneration; |
|
968 } |
575 return true; |
969 return true; |
576 } |
970 } |
577 SK_ABORT("Unknown GL Standard"); |
971 SK_ABORT("Unknown GL Standard"); |
578 + SkUNREACHABLE; |
972 + SkUNREACHABLE; |
579 } |
973 } |
580 Index: firefox-102.0/gfx/skia/skia/src/gpu/gl/GrGLGpu.cpp |
974 diff --git a/gfx/skia/skia/src/gpu/gl/GrGLGpu.cpp b/gfx/skia/skia/src/gpu/gl/GrGLGpu.cpp |
581 =================================================================== |
975 --- a/gfx/skia/skia/src/gpu/gl/GrGLGpu.cpp |
582 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/gl/GrGLGpu.cpp |
976 +++ b/gfx/skia/skia/src/gpu/gl/GrGLGpu.cpp |
583 +++ firefox-102.0/gfx/skia/skia/src/gpu/gl/GrGLGpu.cpp |
977 @@ -191,16 +191,17 @@ static int gl_target_to_binding_index(Gr |
584 @@ -196,6 +196,7 @@ static int gl_target_to_binding_index(Gr |
978 case GR_GL_TEXTURE_2D: |
|
979 return 0; |
|
980 case GR_GL_TEXTURE_RECTANGLE: |
|
981 return 1; |
|
982 case GR_GL_TEXTURE_EXTERNAL: |
585 return 2; |
983 return 2; |
586 } |
984 } |
587 SK_ABORT("Unexpected GL texture target."); |
985 SK_ABORT("Unexpected GL texture target."); |
588 + SkUNREACHABLE; |
986 + SkUNREACHABLE; |
589 } |
987 } |
590 |
988 |
591 GrGpuResource::UniqueID GrGLGpu::TextureUnitBindings::boundID(GrGLenum target) const { |
989 GrGpuResource::UniqueID GrGLGpu::TextureUnitBindings::boundID(GrGLenum target) const { |
592 @@ -234,6 +235,7 @@ static GrGLenum filter_to_gl_mag_filter( |
990 return fTargetBindings[gl_target_to_binding_index(target)].fBoundResourceID; |
|
991 } |
|
992 |
|
993 bool GrGLGpu::TextureUnitBindings::hasBeenModified(GrGLenum target) const { |
|
994 return fTargetBindings[gl_target_to_binding_index(target)].fHasBeenModified; |
|
995 @@ -229,39 +230,42 @@ void GrGLGpu::TextureUnitBindings::inval |
|
996 |
|
997 static GrGLenum filter_to_gl_mag_filter(GrSamplerState::Filter filter) { |
|
998 switch (filter) { |
|
999 case GrSamplerState::Filter::kNearest: return GR_GL_NEAREST; |
|
1000 case GrSamplerState::Filter::kBilerp: return GR_GL_LINEAR; |
593 case GrSamplerState::Filter::kMipMap: return GR_GL_LINEAR; |
1001 case GrSamplerState::Filter::kMipMap: return GR_GL_LINEAR; |
594 } |
1002 } |
595 SK_ABORT("Unknown filter"); |
1003 SK_ABORT("Unknown filter"); |
596 + SkUNREACHABLE; |
1004 + SkUNREACHABLE; |
597 } |
1005 } |
598 |
1006 |
599 static GrGLenum filter_to_gl_min_filter(GrSamplerState::Filter filter) { |
1007 static GrGLenum filter_to_gl_min_filter(GrSamplerState::Filter filter) { |
600 @@ -243,6 +245,7 @@ static GrGLenum filter_to_gl_min_filter( |
1008 switch (filter) { |
|
1009 case GrSamplerState::Filter::kNearest: return GR_GL_NEAREST; |
|
1010 case GrSamplerState::Filter::kBilerp: return GR_GL_LINEAR; |
601 case GrSamplerState::Filter::kMipMap: return GR_GL_LINEAR_MIPMAP_LINEAR; |
1011 case GrSamplerState::Filter::kMipMap: return GR_GL_LINEAR_MIPMAP_LINEAR; |
602 } |
1012 } |
603 SK_ABORT("Unknown filter"); |
1013 SK_ABORT("Unknown filter"); |
604 + SkUNREACHABLE; |
1014 + SkUNREACHABLE; |
605 } |
1015 } |
606 |
1016 |
607 static inline GrGLenum wrap_mode_to_gl_wrap(GrSamplerState::WrapMode wrapMode, |
1017 static inline GrGLenum wrap_mode_to_gl_wrap(GrSamplerState::WrapMode wrapMode, |
608 @@ -257,6 +260,7 @@ static inline GrGLenum wrap_mode_to_gl_w |
1018 const GrCaps& caps) { |
|
1019 switch (wrapMode) { |
|
1020 case GrSamplerState::WrapMode::kClamp: return GR_GL_CLAMP_TO_EDGE; |
|
1021 case GrSamplerState::WrapMode::kRepeat: return GR_GL_REPEAT; |
|
1022 case GrSamplerState::WrapMode::kMirrorRepeat: return GR_GL_MIRRORED_REPEAT; |
|
1023 case GrSamplerState::WrapMode::kClampToBorder: |
|
1024 // May not be supported but should have been caught earlier |
|
1025 SkASSERT(caps.clampToBorderSupport()); |
609 return GR_GL_CLAMP_TO_BORDER; |
1026 return GR_GL_CLAMP_TO_BORDER; |
610 } |
1027 } |
611 SK_ABORT("Unknown wrap mode"); |
1028 SK_ABORT("Unknown wrap mode"); |
612 + SkUNREACHABLE; |
1029 + SkUNREACHABLE; |
613 } |
1030 } |
614 |
1031 |
615 /////////////////////////////////////////////////////////////////////////////// |
1032 /////////////////////////////////////////////////////////////////////////////// |
616 @@ -1107,7 +1111,7 @@ static bool renderbuffer_storage_msaa(co |
1033 |
|
1034 class GrGLGpu::SamplerObjectCache { |
|
1035 public: |
|
1036 SamplerObjectCache(GrGLGpu* gpu) : fGpu(gpu) { |
|
1037 fNumTextureUnits = fGpu->glCaps().shaderCaps()->maxFragmentSamplers(); |
|
1038 @@ -1102,17 +1106,17 @@ static bool renderbuffer_storage_msaa(co |
|
1039 GL_ALLOC_CALL(ctx.interface(), |
|
1040 RenderbufferStorageMultisampleES2EXT(GR_GL_RENDERBUFFER, |
|
1041 sampleCount, |
|
1042 format, |
|
1043 width, height)); |
617 break; |
1044 break; |
618 case GrGLCaps::kNone_MSFBOType: |
1045 case GrGLCaps::kNone_MSFBOType: |
619 SK_ABORT("Shouldn't be here if we don't support multisampled renderbuffers."); |
1046 SK_ABORT("Shouldn't be here if we don't support multisampled renderbuffers."); |
620 - break; |
1047 - break; |
621 + SkUNREACHABLE; |
1048 + SkUNREACHABLE; |
622 } |
1049 } |
623 return (GR_GL_NO_ERROR == CHECK_ALLOC_ERROR(ctx.interface())); |
1050 return (GR_GL_NO_ERROR == CHECK_ALLOC_ERROR(ctx.interface())); |
624 } |
1051 } |
625 @@ -2275,9 +2279,10 @@ static GrGLenum gr_primitive_type_to_gl_ |
1052 |
|
1053 bool GrGLGpu::createRenderTargetObjects(const GrGLTexture::Desc& desc, |
|
1054 int sampleCount, |
|
1055 GrGLRenderTarget::IDs* rtIDs) { |
|
1056 rtIDs->fMSColorRenderbufferID = 0; |
|
1057 @@ -2270,19 +2274,20 @@ static GrGLenum gr_primitive_type_to_gl_ |
|
1058 case GrPrimitiveType::kPoints: |
|
1059 return GR_GL_POINTS; |
|
1060 case GrPrimitiveType::kLines: |
|
1061 return GR_GL_LINES; |
|
1062 case GrPrimitiveType::kLineStrip: |
626 return GR_GL_LINE_STRIP; |
1063 return GR_GL_LINE_STRIP; |
627 case GrPrimitiveType::kPath: |
1064 case GrPrimitiveType::kPath: |
628 SK_ABORT("non-mesh-based GrPrimitiveType"); |
1065 SK_ABORT("non-mesh-based GrPrimitiveType"); |
629 - return 0; |
1066 - return 0; |
630 + SkUNREACHABLE; |
1067 + SkUNREACHABLE; |
632 SK_ABORT("invalid GrPrimitiveType"); |
1069 SK_ABORT("invalid GrPrimitiveType"); |
633 + SkUNREACHABLE; |
1070 + SkUNREACHABLE; |
634 } |
1071 } |
635 |
1072 |
636 void GrGLGpu::sendMeshToGpu(GrPrimitiveType primitiveType, const GrBuffer* vertexBuffer, |
1073 void GrGLGpu::sendMeshToGpu(GrPrimitiveType primitiveType, const GrBuffer* vertexBuffer, |
637 @@ -4006,7 +4011,8 @@ int GrGLGpu::TextureToCopyProgramIdx(GrT |
1074 int vertexCount, int baseVertex) { |
|
1075 const GrGLenum glPrimType = gr_primitive_type_to_gl_mode(primitiveType); |
|
1076 if (this->glCaps().drawArraysBaseVertexIsBroken()) { |
|
1077 this->setupGeometry(nullptr, vertexBuffer, baseVertex, nullptr, 0, GrPrimitiveRestart::kNo); |
|
1078 GL_CALL(DrawArrays(glPrimType, 0, vertexCount)); |
|
1079 @@ -4001,17 +4006,18 @@ int GrGLGpu::TextureToCopyProgramIdx(GrT |
|
1080 switch (GrSLCombinedSamplerTypeForTextureType(texture->texturePriv().textureType())) { |
|
1081 case kTexture2DSampler_GrSLType: |
|
1082 return 0; |
|
1083 case kTexture2DRectSampler_GrSLType: |
|
1084 return 1; |
638 case kTextureExternalSampler_GrSLType: |
1085 case kTextureExternalSampler_GrSLType: |
639 return 2; |
1086 return 2; |
640 default: |
1087 default: |
641 - SK_ABORT("Unexpected samper type"); |
1088 - SK_ABORT("Unexpected samper type"); |
642 + SK_ABORT("Unexpected sampler type"); |
1089 + SK_ABORT("Unexpected sampler type"); |
643 + SkUNREACHABLE; |
1090 + SkUNREACHABLE; |
644 } |
1091 } |
645 } |
1092 } |
646 |
1093 |
647 Index: firefox-102.0/gfx/skia/skia/src/gpu/gl/GrGLPath.cpp |
1094 #ifdef SK_ENABLE_DUMP_GPU |
648 =================================================================== |
1095 #include "src/utils/SkJSONWriter.h" |
649 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/gl/GrGLPath.cpp |
1096 void GrGLGpu::onDumpJSON(SkJSONWriter* writer) const { |
650 +++ firefox-102.0/gfx/skia/skia/src/gpu/gl/GrGLPath.cpp |
1097 // We are called by the base class, which has already called beginObject(). We choose to nest |
651 @@ -197,6 +197,7 @@ static GrPathRendering::FillType convert |
1098 // all of our caps information in a named sub-object. |
|
1099 diff --git a/gfx/skia/skia/src/gpu/gl/GrGLPath.cpp b/gfx/skia/skia/src/gpu/gl/GrGLPath.cpp |
|
1100 --- a/gfx/skia/skia/src/gpu/gl/GrGLPath.cpp |
|
1101 +++ b/gfx/skia/skia/src/gpu/gl/GrGLPath.cpp |
|
1102 @@ -192,16 +192,17 @@ inline bool init_path_object_for_general |
|
1103 |
|
1104 /* |
|
1105 * For now paths only natively support winding and even odd fill types |
|
1106 */ |
|
1107 static GrPathRendering::FillType convert_skpath_filltype(SkPath::FillType fill) { |
652 switch (fill) { |
1108 switch (fill) { |
653 default: |
1109 default: |
654 SK_ABORT("Incomplete Switch\n"); |
1110 SK_ABORT("Incomplete Switch\n"); |
655 + SkUNREACHABLE; |
1111 + SkUNREACHABLE; |
656 case SkPath::kWinding_FillType: |
1112 case SkPath::kWinding_FillType: |
657 case SkPath::kInverseWinding_FillType: |
1113 case SkPath::kInverseWinding_FillType: |
658 return GrPathRendering::kWinding_FillType; |
1114 return GrPathRendering::kWinding_FillType; |
659 Index: firefox-102.0/gfx/skia/skia/src/gpu/gl/GrGLTexture.cpp |
1115 case SkPath::kEvenOdd_FillType: |
660 =================================================================== |
1116 case SkPath::kInverseEvenOdd_FillType: |
661 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/gl/GrGLTexture.cpp |
1117 return GrPathRendering::kEvenOdd_FillType; |
662 +++ firefox-102.0/gfx/skia/skia/src/gpu/gl/GrGLTexture.cpp |
1118 } |
663 @@ -25,6 +25,7 @@ GrTextureType GrGLTexture::TextureTypeFr |
1119 } |
|
1120 diff --git a/gfx/skia/skia/src/gpu/gl/GrGLTexture.cpp b/gfx/skia/skia/src/gpu/gl/GrGLTexture.cpp |
|
1121 --- a/gfx/skia/skia/src/gpu/gl/GrGLTexture.cpp |
|
1122 +++ b/gfx/skia/skia/src/gpu/gl/GrGLTexture.cpp |
|
1123 @@ -20,30 +20,33 @@ GrTextureType GrGLTexture::TextureTypeFr |
|
1124 case GR_GL_TEXTURE_2D: |
|
1125 return GrTextureType::k2D; |
|
1126 case GR_GL_TEXTURE_RECTANGLE: |
|
1127 return GrTextureType::kRectangle; |
|
1128 case GR_GL_TEXTURE_EXTERNAL: |
664 return GrTextureType::kExternal; |
1129 return GrTextureType::kExternal; |
665 } |
1130 } |
666 SK_ABORT("Unexpected texture target"); |
1131 SK_ABORT("Unexpected texture target"); |
667 + SkUNREACHABLE; |
1132 + SkUNREACHABLE; |
668 } |
1133 } |
669 |
1134 |
670 static inline GrGLenum target_from_texture_type(GrTextureType type) { |
1135 static inline GrGLenum target_from_texture_type(GrTextureType type) { |
671 @@ -37,8 +38,10 @@ static inline GrGLenum target_from_textu |
1136 switch (type) { |
|
1137 case GrTextureType::k2D: |
|
1138 return GR_GL_TEXTURE_2D; |
|
1139 case GrTextureType::kRectangle: |
|
1140 return GR_GL_TEXTURE_RECTANGLE; |
|
1141 case GrTextureType::kExternal: |
672 return GR_GL_TEXTURE_EXTERNAL; |
1142 return GR_GL_TEXTURE_EXTERNAL; |
673 default: |
1143 default: |
674 SK_ABORT("Unexpected texture target"); |
1144 SK_ABORT("Unexpected texture target"); |
675 + SkUNREACHABLE; |
1145 + SkUNREACHABLE; |
676 } |
1146 } |
677 SK_ABORT("Unexpected texture type"); |
1147 SK_ABORT("Unexpected texture type"); |
678 + SkUNREACHABLE; |
1148 + SkUNREACHABLE; |
679 } |
1149 } |
680 |
1150 |
681 // Because this class is virtually derived from GrSurface we must explicitly call its constructor. |
1151 // Because this class is virtually derived from GrSurface we must explicitly call its constructor. |
682 Index: firefox-102.0/gfx/skia/skia/src/gpu/gl/GrGLVertexArray.cpp |
1152 GrGLTexture::GrGLTexture(GrGLGpu* gpu, SkBudgeted budgeted, const Desc& desc, |
683 =================================================================== |
1153 GrMipMapsStatus mipMapsStatus) |
684 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/gl/GrGLVertexArray.cpp |
1154 : GrSurface(gpu, desc.fSize, desc.fConfig, GrProtected::kNo) |
685 +++ firefox-102.0/gfx/skia/skia/src/gpu/gl/GrGLVertexArray.cpp |
1155 , INHERITED(gpu, desc.fSize, desc.fConfig, GrProtected::kNo, |
686 @@ -80,6 +80,7 @@ static AttribLayout attrib_layout(GrVert |
1156 TextureTypeFromTarget(desc.fTarget), mipMapsStatus) |
|
1157 diff --git a/gfx/skia/skia/src/gpu/gl/GrGLVertexArray.cpp b/gfx/skia/skia/src/gpu/gl/GrGLVertexArray.cpp |
|
1158 --- a/gfx/skia/skia/src/gpu/gl/GrGLVertexArray.cpp |
|
1159 +++ b/gfx/skia/skia/src/gpu/gl/GrGLVertexArray.cpp |
|
1160 @@ -75,16 +75,17 @@ static AttribLayout attrib_layout(GrVert |
|
1161 case kUint_GrVertexAttribType: |
|
1162 return {false, 1, GR_GL_UNSIGNED_INT}; |
|
1163 case kUShort_norm_GrVertexAttribType: |
|
1164 return {true, 1, GR_GL_UNSIGNED_SHORT}; |
|
1165 case kUShort4_norm_GrVertexAttribType: |
687 return {true, 4, GR_GL_UNSIGNED_SHORT}; |
1166 return {true, 4, GR_GL_UNSIGNED_SHORT}; |
688 } |
1167 } |
689 SK_ABORT("Unknown vertex attrib type"); |
1168 SK_ABORT("Unknown vertex attrib type"); |
690 + SkUNREACHABLE; |
1169 + SkUNREACHABLE; |
691 }; |
1170 }; |
692 |
1171 |
693 void GrGLAttribArrayState::set(GrGLGpu* gpu, |
1172 void GrGLAttribArrayState::set(GrGLGpu* gpu, |
694 Index: firefox-102.0/gfx/skia/skia/src/gpu/glsl/GrGLSL.cpp |
1173 int index, |
695 =================================================================== |
1174 const GrBuffer* vertexBuffer, |
696 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/glsl/GrGLSL.cpp |
1175 GrVertexAttribType cpuType, |
697 +++ firefox-102.0/gfx/skia/skia/src/gpu/glsl/GrGLSL.cpp |
1176 GrSLType gpuType, |
698 @@ -98,4 +98,5 @@ const char* GrGLSLTypeString(GrSLType t) |
1177 GrGLsizei stride, |
|
1178 diff --git a/gfx/skia/skia/src/gpu/glsl/GrGLSL.cpp b/gfx/skia/skia/src/gpu/glsl/GrGLSL.cpp |
|
1179 --- a/gfx/skia/skia/src/gpu/glsl/GrGLSL.cpp |
|
1180 +++ b/gfx/skia/skia/src/gpu/glsl/GrGLSL.cpp |
|
1181 @@ -93,9 +93,10 @@ const char* GrGLSLTypeString(GrSLType t) |
|
1182 case kUByte4_GrSLType: |
|
1183 return "ubyte4"; |
|
1184 case kTexture2D_GrSLType: |
|
1185 return "texture2D"; |
|
1186 case kSampler_GrSLType: |
699 return "sampler"; |
1187 return "sampler"; |
700 } |
1188 } |
701 SK_ABORT("Unknown shader var type."); |
1189 SK_ABORT("Unknown shader var type."); |
702 + SkUNREACHABLE; |
1190 + SkUNREACHABLE; |
703 } |
1191 } |
704 Index: firefox-102.0/gfx/skia/skia/src/gpu/glsl/GrGLSLVarying.cpp |
1192 diff --git a/gfx/skia/skia/src/gpu/glsl/GrGLSLVarying.cpp b/gfx/skia/skia/src/gpu/glsl/GrGLSLVarying.cpp |
705 =================================================================== |
1193 --- a/gfx/skia/skia/src/gpu/glsl/GrGLSLVarying.cpp |
706 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/glsl/GrGLSLVarying.cpp |
1194 +++ b/gfx/skia/skia/src/gpu/glsl/GrGLSLVarying.cpp |
707 +++ firefox-102.0/gfx/skia/skia/src/gpu/glsl/GrGLSLVarying.cpp |
1195 @@ -30,16 +30,17 @@ static bool use_flat_interpolation(GrGLS |
708 @@ -35,6 +35,7 @@ static bool use_flat_interpolation(GrGLS |
1196 SkASSERT(!shaderCaps.preferFlatInterpolation() || |
|
1197 shaderCaps.flatInterpolationSupport()); |
|
1198 return shaderCaps.preferFlatInterpolation(); |
|
1199 case Interpolation::kMustBeFlat: |
|
1200 SkASSERT(shaderCaps.flatInterpolationSupport()); |
709 return true; |
1201 return true; |
710 } |
1202 } |
711 SK_ABORT("Invalid interpolation"); |
1203 SK_ABORT("Invalid interpolation"); |
712 + SkUNREACHABLE; |
1204 + SkUNREACHABLE; |
713 } |
1205 } |
714 |
1206 |
715 void GrGLSLVaryingHandler::addVarying(const char* name, GrGLSLVarying* varying, |
1207 void GrGLSLVaryingHandler::addVarying(const char* name, GrGLSLVarying* varying, |
716 Index: firefox-102.0/gfx/skia/skia/src/gpu/glsl/GrGLSLVertexGeoBuilder.cpp |
1208 Interpolation interpolation) { |
717 =================================================================== |
1209 SkASSERT(GrSLTypeIsFloatType(varying->type()) || Interpolation::kMustBeFlat == interpolation); |
718 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/glsl/GrGLSLVertexGeoBuilder.cpp |
1210 bool willUseGeoShader = fProgramBuilder->primitiveProcessor().willUseGeoShader(); |
719 +++ firefox-102.0/gfx/skia/skia/src/gpu/glsl/GrGLSLVertexGeoBuilder.cpp |
1211 VaryingInfo& v = fVaryings.push_back(); |
720 @@ -51,6 +51,7 @@ static const char* input_type_name(GrGLS |
1212 |
|
1213 diff --git a/gfx/skia/skia/src/gpu/glsl/GrGLSLVertexGeoBuilder.cpp b/gfx/skia/skia/src/gpu/glsl/GrGLSLVertexGeoBuilder.cpp |
|
1214 --- a/gfx/skia/skia/src/gpu/glsl/GrGLSLVertexGeoBuilder.cpp |
|
1215 +++ b/gfx/skia/skia/src/gpu/glsl/GrGLSLVertexGeoBuilder.cpp |
|
1216 @@ -46,26 +46,28 @@ void GrGLSLVertexBuilder::onFinalize() { |
|
1217 static const char* input_type_name(GrGLSLGeometryBuilder::InputType in) { |
|
1218 using InputType = GrGLSLGeometryBuilder::InputType; |
|
1219 switch (in) { |
|
1220 case InputType::kPoints: return "points"; |
|
1221 case InputType::kLines: return "lines"; |
721 case InputType::kTriangles: return "triangles"; |
1222 case InputType::kTriangles: return "triangles"; |
722 } |
1223 } |
723 SK_ABORT("invalid input type"); |
1224 SK_ABORT("invalid input type"); |
724 + SkUNREACHABLE; |
1225 + SkUNREACHABLE; |
725 } |
1226 } |
726 |
1227 |
727 static const char* output_type_name(GrGLSLGeometryBuilder::OutputType out) { |
1228 static const char* output_type_name(GrGLSLGeometryBuilder::OutputType out) { |
728 @@ -61,6 +62,7 @@ static const char* output_type_name(GrGL |
1229 using OutputType = GrGLSLGeometryBuilder::OutputType; |
|
1230 switch (out) { |
|
1231 case OutputType::kPoints: return "points"; |
|
1232 case OutputType::kLineStrip: return "line_strip"; |
729 case OutputType::kTriangleStrip: return "triangle_strip"; |
1233 case OutputType::kTriangleStrip: return "triangle_strip"; |
730 } |
1234 } |
731 SK_ABORT("invalid output type"); |
1235 SK_ABORT("invalid output type"); |
732 + SkUNREACHABLE; |
1236 + SkUNREACHABLE; |
733 } |
1237 } |
734 |
1238 |
735 void GrGLSLGeometryBuilder::configure(InputType inputType, OutputType outputType, int maxVertices, |
1239 void GrGLSLGeometryBuilder::configure(InputType inputType, OutputType outputType, int maxVertices, |
736 Index: firefox-102.0/gfx/skia/skia/src/gpu/mtl/GrMtlCaps.mm |
1240 int numInvocations) { |
737 =================================================================== |
1241 SkASSERT(!this->isConfigured()); |
738 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/mtl/GrMtlCaps.mm |
1242 fNumInvocations = numInvocations; |
739 +++ firefox-102.0/gfx/skia/skia/src/gpu/mtl/GrMtlCaps.mm |
1243 this->addLayoutQualifier(input_type_name(inputType), kIn_InterfaceQualifier); |
740 @@ -506,6 +506,7 @@ size_t GrMtlCaps::GetFormatIndex(MTLPixe |
1244 this->addLayoutQualifier(SkStringPrintf("invocations = %i", numInvocations).c_str(), |
|
1245 diff --git a/gfx/skia/skia/src/gpu/mtl/GrMtlCaps.mm b/gfx/skia/skia/src/gpu/mtl/GrMtlCaps.mm |
|
1246 --- a/gfx/skia/skia/src/gpu/mtl/GrMtlCaps.mm |
|
1247 +++ b/gfx/skia/skia/src/gpu/mtl/GrMtlCaps.mm |
|
1248 @@ -501,16 +501,17 @@ size_t GrMtlCaps::GetFormatIndex(MTLPixe |
|
1249 static_assert(SK_ARRAY_COUNT(kMtlFormats) == GrMtlCaps::kNumMtlFormats, |
|
1250 "Size of kMtlFormats array must match static value in header"); |
|
1251 for (size_t i = 0; i < GrMtlCaps::kNumMtlFormats; ++i) { |
|
1252 if (kMtlFormats[i] == pixelFormat) { |
|
1253 return i; |
741 } |
1254 } |
742 } |
1255 } |
743 SK_ABORT("Invalid MTLPixelFormat"); |
1256 SK_ABORT("Invalid MTLPixelFormat"); |
744 + SkUNREACHABLE; |
1257 + SkUNREACHABLE; |
745 } |
1258 } |
746 |
1259 |
747 void GrMtlCaps::initFormatTable() { |
1260 void GrMtlCaps::initFormatTable() { |
748 @@ -1011,6 +1012,7 @@ GrBackendFormat GrMtlCaps::getBackendFor |
1261 FormatInfo* info; |
|
1262 |
|
1263 // Format: R8Unorm |
|
1264 { |
|
1265 info = &fFormatTable[GetFormatIndex(MTLPixelFormatR8Unorm)]; |
|
1266 @@ -1006,16 +1007,17 @@ GrBackendFormat GrMtlCaps::getBackendFor |
|
1267 case SkImage::kETC1_CompressionType: |
|
1268 #ifdef SK_BUILD_FOR_MAC |
|
1269 return {}; |
|
1270 #else |
|
1271 return GrBackendFormat::MakeMtl(MTLPixelFormatETC2_RGB8); |
749 #endif |
1272 #endif |
750 } |
1273 } |
751 SK_ABORT("Invalid compression type"); |
1274 SK_ABORT("Invalid compression type"); |
752 + SkUNREACHABLE; |
1275 + SkUNREACHABLE; |
753 } |
1276 } |
754 |
1277 |
755 GrSwizzle GrMtlCaps::getTextureSwizzle(const GrBackendFormat& format, GrColorType colorType) const { |
1278 GrSwizzle GrMtlCaps::getTextureSwizzle(const GrBackendFormat& format, GrColorType colorType) const { |
756 Index: firefox-102.0/gfx/skia/skia/src/gpu/mtl/GrMtlPipelineStateBuilder.mm |
1279 MTLPixelFormat mtlFormat = GrBackendFormatAsMTLPixelFormat(format); |
757 =================================================================== |
1280 SkASSERT(mtlFormat != MTLPixelFormatInvalid); |
758 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/mtl/GrMtlPipelineStateBuilder.mm |
1281 const auto& info = this->getFormatInfo(mtlFormat); |
759 +++ firefox-102.0/gfx/skia/skia/src/gpu/mtl/GrMtlPipelineStateBuilder.mm |
1282 for (int i = 0; i < info.fColorTypeInfoCount; ++i) { |
760 @@ -155,6 +155,7 @@ static inline MTLVertexFormat attribute_ |
1283 const auto& ctInfo = info.fColorTypeInfos[i]; |
|
1284 diff --git a/gfx/skia/skia/src/gpu/mtl/GrMtlPipelineStateBuilder.mm b/gfx/skia/skia/src/gpu/mtl/GrMtlPipelineStateBuilder.mm |
|
1285 --- a/gfx/skia/skia/src/gpu/mtl/GrMtlPipelineStateBuilder.mm |
|
1286 +++ b/gfx/skia/skia/src/gpu/mtl/GrMtlPipelineStateBuilder.mm |
|
1287 @@ -150,16 +150,17 @@ static inline MTLVertexFormat attribute_ |
|
1288 return MTLVertexFormatUShortNormalized; |
|
1289 } else { |
|
1290 return MTLVertexFormatInvalid; |
|
1291 } |
|
1292 case kUShort4_norm_GrVertexAttribType: |
761 return MTLVertexFormatUShort4Normalized; |
1293 return MTLVertexFormatUShort4Normalized; |
762 } |
1294 } |
763 SK_ABORT("Unknown vertex attribute type"); |
1295 SK_ABORT("Unknown vertex attribute type"); |
764 + SkUNREACHABLE; |
1296 + SkUNREACHABLE; |
765 } |
1297 } |
766 |
1298 |
767 static MTLVertexDescriptor* create_vertex_descriptor(const GrPrimitiveProcessor& primProc) { |
1299 static MTLVertexDescriptor* create_vertex_descriptor(const GrPrimitiveProcessor& primProc) { |
768 @@ -276,6 +277,7 @@ static MTLBlendFactor blend_coeff_to_mtl |
1300 uint32_t vertexBinding = 0, instanceBinding = 0; |
|
1301 |
|
1302 int nextBinding = GrMtlUniformHandler::kLastUniformBinding + 1; |
|
1303 if (primProc.hasVertexAttributes()) { |
|
1304 vertexBinding = nextBinding++; |
|
1305 @@ -271,16 +272,17 @@ static MTLBlendFactor blend_coeff_to_mtl |
|
1306 } else { |
|
1307 return MTLBlendFactorZero; |
|
1308 } |
|
1309 case kIllegal_GrBlendCoeff: |
|
1310 return MTLBlendFactorZero; |
769 } |
1311 } |
770 |
1312 |
771 SK_ABORT("Unknown blend coefficient"); |
1313 SK_ABORT("Unknown blend coefficient"); |
772 + SkUNREACHABLE; |
1314 + SkUNREACHABLE; |
773 } |
1315 } |
774 |
1316 |
775 static MTLBlendOperation blend_equation_to_mtl_blend_op(GrBlendEquation equation) { |
1317 static MTLBlendOperation blend_equation_to_mtl_blend_op(GrBlendEquation equation) { |
776 Index: firefox-102.0/gfx/skia/skia/src/gpu/mtl/GrMtlSampler.mm |
1318 static const MTLBlendOperation gTable[] = { |
777 =================================================================== |
1319 MTLBlendOperationAdd, // kAdd_GrBlendEquation |
778 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/mtl/GrMtlSampler.mm |
1320 MTLBlendOperationSubtract, // kSubtract_GrBlendEquation |
779 +++ firefox-102.0/gfx/skia/skia/src/gpu/mtl/GrMtlSampler.mm |
1321 MTLBlendOperationReverseSubtract, // kReverseSubtract_GrBlendEquation |
780 @@ -38,6 +38,7 @@ static inline MTLSamplerAddressMode wrap |
1322 }; |
|
1323 diff --git a/gfx/skia/skia/src/gpu/mtl/GrMtlSampler.mm b/gfx/skia/skia/src/gpu/mtl/GrMtlSampler.mm |
|
1324 --- a/gfx/skia/skia/src/gpu/mtl/GrMtlSampler.mm |
|
1325 +++ b/gfx/skia/skia/src/gpu/mtl/GrMtlSampler.mm |
|
1326 @@ -33,16 +33,17 @@ static inline MTLSamplerAddressMode wrap |
|
1327 } else |
|
1328 #endif |
|
1329 { |
|
1330 SkASSERT(false); |
|
1331 return MTLSamplerAddressModeClampToEdge; |
781 } |
1332 } |
782 } |
1333 } |
783 SK_ABORT("Unknown wrap mode."); |
1334 SK_ABORT("Unknown wrap mode."); |
784 + SkUNREACHABLE; |
1335 + SkUNREACHABLE; |
785 } |
1336 } |
786 |
1337 |
787 GrMtlSampler* GrMtlSampler::Create(const GrMtlGpu* gpu, const GrSamplerState& samplerState) { |
1338 GrMtlSampler* GrMtlSampler::Create(const GrMtlGpu* gpu, const GrSamplerState& samplerState) { |
788 Index: firefox-102.0/gfx/skia/skia/src/gpu/mtl/GrMtlUniformHandler.mm |
1339 static MTLSamplerMinMagFilter mtlMinMagFilterModes[] = { |
789 =================================================================== |
1340 MTLSamplerMinMagFilterNearest, |
790 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/mtl/GrMtlUniformHandler.mm |
1341 MTLSamplerMinMagFilterLinear, |
791 +++ firefox-102.0/gfx/skia/skia/src/gpu/mtl/GrMtlUniformHandler.mm |
1342 MTLSamplerMinMagFilterLinear |
792 @@ -90,6 +90,7 @@ static uint32_t grsltype_to_alignment_ma |
1343 }; |
|
1344 diff --git a/gfx/skia/skia/src/gpu/mtl/GrMtlUniformHandler.mm b/gfx/skia/skia/src/gpu/mtl/GrMtlUniformHandler.mm |
|
1345 --- a/gfx/skia/skia/src/gpu/mtl/GrMtlUniformHandler.mm |
|
1346 +++ b/gfx/skia/skia/src/gpu/mtl/GrMtlUniformHandler.mm |
|
1347 @@ -85,16 +85,17 @@ static uint32_t grsltype_to_alignment_ma |
|
1348 case kTexture2DSampler_GrSLType: |
|
1349 case kTextureExternalSampler_GrSLType: |
|
1350 case kTexture2DRectSampler_GrSLType: |
|
1351 case kSampler_GrSLType: |
|
1352 case kTexture2D_GrSLType: |
793 break; |
1353 break; |
794 } |
1354 } |
795 SK_ABORT("Unexpected type"); |
1355 SK_ABORT("Unexpected type"); |
796 + SkUNREACHABLE; |
1356 + SkUNREACHABLE; |
797 } |
1357 } |
798 |
1358 |
799 /** Returns the size in bytes taken up in Metal buffers for GrSLTypes. */ |
1359 /** Returns the size in bytes taken up in Metal buffers for GrSLTypes. */ |
800 @@ -172,6 +173,7 @@ static inline uint32_t grsltype_to_mtl_s |
1360 static inline uint32_t grsltype_to_mtl_size(GrSLType type) { |
|
1361 switch(type) { |
|
1362 case kByte_GrSLType: |
|
1363 return sizeof(int8_t); |
|
1364 case kByte2_GrSLType: |
|
1365 @@ -167,16 +168,17 @@ static inline uint32_t grsltype_to_mtl_s |
|
1366 case kTexture2DSampler_GrSLType: |
|
1367 case kTextureExternalSampler_GrSLType: |
|
1368 case kTexture2DRectSampler_GrSLType: |
|
1369 case kSampler_GrSLType: |
|
1370 case kTexture2D_GrSLType: |
801 break; |
1371 break; |
802 } |
1372 } |
803 SK_ABORT("Unexpected type"); |
1373 SK_ABORT("Unexpected type"); |
804 + SkUNREACHABLE; |
1374 + SkUNREACHABLE; |
805 } |
1375 } |
806 |
1376 |
807 // Given the current offset into the ubo, calculate the offset for the uniform we're trying to add |
1377 // Given the current offset into the ubo, calculate the offset for the uniform we're trying to add |
808 Index: firefox-102.0/gfx/skia/skia/src/gpu/mtl/GrMtlUtil.mm |
1378 // taking into consideration all alignment requirements. The uniformOffset is set to the offset for |
809 =================================================================== |
1379 // the new uniform, and currentOffset is updated to be the offset to the end of the new uniform. |
810 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/mtl/GrMtlUtil.mm |
1380 static void get_ubo_aligned_offset(uint32_t* uniformOffset, |
811 +++ firefox-102.0/gfx/skia/skia/src/gpu/mtl/GrMtlUtil.mm |
1381 uint32_t* currentOffset, |
812 @@ -112,6 +112,7 @@ bool GrPixelConfigToMTLFormat(GrPixelCon |
1382 uint32_t* maxAlignment, |
|
1383 diff --git a/gfx/skia/skia/src/gpu/mtl/GrMtlUtil.mm b/gfx/skia/skia/src/gpu/mtl/GrMtlUtil.mm |
|
1384 --- a/gfx/skia/skia/src/gpu/mtl/GrMtlUtil.mm |
|
1385 +++ b/gfx/skia/skia/src/gpu/mtl/GrMtlUtil.mm |
|
1386 @@ -107,16 +107,17 @@ bool GrPixelConfigToMTLFormat(GrPixelCon |
|
1387 case kRGBA_16161616_GrPixelConfig: |
|
1388 *format = MTLPixelFormatRGBA16Unorm; |
813 return true; |
1389 return true; |
|
1390 case kRG_half_GrPixelConfig: |
|
1391 *format = MTLPixelFormatRG16Float; |
|
1392 return true; |
814 } |
1393 } |
815 SK_ABORT("Unexpected config"); |
1394 SK_ABORT("Unexpected config"); |
816 + SkUNREACHABLE; |
1395 + SkUNREACHABLE; |
817 } |
1396 } |
818 |
1397 |
819 MTLTextureDescriptor* GrGetMTLTextureDescriptor(id<MTLTexture> mtlTexture) { |
1398 MTLTextureDescriptor* GrGetMTLTextureDescriptor(id<MTLTexture> mtlTexture) { |
820 Index: firefox-102.0/gfx/skia/skia/src/gpu/ops/GrDrawVerticesOp.cpp |
1399 MTLTextureDescriptor* texDesc = [[MTLTextureDescriptor alloc] init]; |
821 =================================================================== |
1400 texDesc.textureType = mtlTexture.textureType; |
822 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/ops/GrDrawVerticesOp.cpp |
1401 texDesc.pixelFormat = mtlTexture.pixelFormat; |
823 +++ firefox-102.0/gfx/skia/skia/src/gpu/ops/GrDrawVerticesOp.cpp |
1402 texDesc.width = mtlTexture.width; |
824 @@ -610,6 +610,7 @@ static uint32_t seed_vertices(GrPrimitiv |
1403 texDesc.height = mtlTexture.height; |
|
1404 diff --git a/gfx/skia/skia/src/gpu/ops/GrDrawVerticesOp.cpp b/gfx/skia/skia/src/gpu/ops/GrDrawVerticesOp.cpp |
|
1405 --- a/gfx/skia/skia/src/gpu/ops/GrDrawVerticesOp.cpp |
|
1406 +++ b/gfx/skia/skia/src/gpu/ops/GrDrawVerticesOp.cpp |
|
1407 @@ -605,16 +605,17 @@ static uint32_t seed_vertices(GrPrimitiv |
|
1408 case GrPrimitiveType::kLines: |
|
1409 case GrPrimitiveType::kLineStrip: |
|
1410 return 2; |
|
1411 case GrPrimitiveType::kPath: |
|
1412 SkASSERT(0); |
825 return 0; |
1413 return 0; |
826 } |
1414 } |
827 SK_ABORT("Incomplete switch\n"); |
1415 SK_ABORT("Incomplete switch\n"); |
828 + SkUNREACHABLE; |
1416 + SkUNREACHABLE; |
829 } |
1417 } |
830 |
1418 |
831 static uint32_t primitive_vertices(GrPrimitiveType type) { |
1419 static uint32_t primitive_vertices(GrPrimitiveType type) { |
832 @@ -627,6 +628,7 @@ static uint32_t primitive_vertices(GrPri |
1420 switch (type) { |
|
1421 case GrPrimitiveType::kTriangles: |
|
1422 return 3; |
|
1423 case GrPrimitiveType::kLines: |
|
1424 return 2; |
|
1425 @@ -622,16 +623,17 @@ static uint32_t primitive_vertices(GrPri |
|
1426 case GrPrimitiveType::kPoints: |
|
1427 case GrPrimitiveType::kLineStrip: |
|
1428 return 1; |
|
1429 case GrPrimitiveType::kPath: |
|
1430 SkASSERT(0); |
833 return 0; |
1431 return 0; |
834 } |
1432 } |
835 SK_ABORT("Incomplete switch\n"); |
1433 SK_ABORT("Incomplete switch\n"); |
836 + SkUNREACHABLE; |
1434 + SkUNREACHABLE; |
837 } |
1435 } |
838 |
1436 |
839 static SkPoint random_point(SkRandom* random, SkScalar min, SkScalar max) { |
1437 static SkPoint random_point(SkRandom* random, SkScalar min, SkScalar max) { |
840 Index: firefox-102.0/gfx/skia/skia/src/gpu/ops/GrFillRRectOp.cpp |
1438 SkPoint p; |
841 =================================================================== |
1439 p.fX = random->nextRangeScalar(min, max); |
842 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/ops/GrFillRRectOp.cpp |
1440 p.fY = random->nextRangeScalar(min, max); |
843 +++ firefox-102.0/gfx/skia/skia/src/gpu/ops/GrFillRRectOp.cpp |
1441 return p; |
844 @@ -823,4 +823,5 @@ static bool can_use_hw_derivatives_with_ |
1442 } |
|
1443 diff --git a/gfx/skia/skia/src/gpu/ops/GrFillRRectOp.cpp b/gfx/skia/skia/src/gpu/ops/GrFillRRectOp.cpp |
|
1444 --- a/gfx/skia/skia/src/gpu/ops/GrFillRRectOp.cpp |
|
1445 +++ b/gfx/skia/skia/src/gpu/ops/GrFillRRectOp.cpp |
|
1446 @@ -818,9 +818,10 @@ static bool can_use_hw_derivatives_with_ |
|
1447 if (!can_use_hw_derivatives_with_coverage(devScale, rrect.radii(corner))) { |
|
1448 return false; |
|
1449 } |
|
1450 } |
|
1451 return true; |
845 } |
1452 } |
846 } |
1453 } |
847 SK_ABORT("Invalid round rect type."); |
1454 SK_ABORT("Invalid round rect type."); |
848 + SkUNREACHABLE; |
1455 + SkUNREACHABLE; |
849 } |
1456 } |
850 Index: firefox-102.0/gfx/skia/skia/src/gpu/ops/GrOvalOpFactory.cpp |
1457 diff --git a/gfx/skia/skia/src/gpu/ops/GrOvalOpFactory.cpp b/gfx/skia/skia/src/gpu/ops/GrOvalOpFactory.cpp |
851 =================================================================== |
1458 --- a/gfx/skia/skia/src/gpu/ops/GrOvalOpFactory.cpp |
852 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/ops/GrOvalOpFactory.cpp |
1459 +++ b/gfx/skia/skia/src/gpu/ops/GrOvalOpFactory.cpp |
853 +++ firefox-102.0/gfx/skia/skia/src/gpu/ops/GrOvalOpFactory.cpp |
1460 @@ -2278,39 +2278,42 @@ static int rrect_type_to_vert_count(RRec |
854 @@ -2283,6 +2283,7 @@ static int rrect_type_to_vert_count(RRec |
1461 switch (type) { |
|
1462 case kFill_RRectType: |
|
1463 case kStroke_RRectType: |
|
1464 return kVertsPerStandardRRect; |
|
1465 case kOverstroke_RRectType: |
855 return kVertsPerOverstrokeRRect; |
1466 return kVertsPerOverstrokeRRect; |
856 } |
1467 } |
857 SK_ABORT("Invalid type"); |
1468 SK_ABORT("Invalid type"); |
858 + SkUNREACHABLE; |
1469 + SkUNREACHABLE; |
859 } |
1470 } |
860 |
1471 |
861 static int rrect_type_to_index_count(RRectType type) { |
1472 static int rrect_type_to_index_count(RRectType type) { |
862 @@ -2295,6 +2296,7 @@ static int rrect_type_to_index_count(RRe |
1473 switch (type) { |
|
1474 case kFill_RRectType: |
|
1475 return kIndicesPerFillRRect; |
|
1476 case kStroke_RRectType: |
|
1477 return kIndicesPerStrokeRRect; |
|
1478 case kOverstroke_RRectType: |
863 return kIndicesPerOverstrokeRRect; |
1479 return kIndicesPerOverstrokeRRect; |
864 } |
1480 } |
865 SK_ABORT("Invalid type"); |
1481 SK_ABORT("Invalid type"); |
866 + SkUNREACHABLE; |
1482 + SkUNREACHABLE; |
867 } |
1483 } |
868 |
1484 |
869 static const uint16_t* rrect_type_to_indices(RRectType type) { |
1485 static const uint16_t* rrect_type_to_indices(RRectType type) { |
870 @@ -2306,6 +2308,7 @@ static const uint16_t* rrect_type_to_ind |
1486 switch (type) { |
|
1487 case kFill_RRectType: |
|
1488 case kStroke_RRectType: |
|
1489 return gStandardRRectIndices; |
|
1490 case kOverstroke_RRectType: |
871 return gOverstrokeRRectIndices; |
1491 return gOverstrokeRRectIndices; |
872 } |
1492 } |
873 SK_ABORT("Invalid type"); |
1493 SK_ABORT("Invalid type"); |
874 + SkUNREACHABLE; |
1494 + SkUNREACHABLE; |
875 } |
1495 } |
876 |
1496 |
877 /////////////////////////////////////////////////////////////////////////////////////////////////// |
1497 /////////////////////////////////////////////////////////////////////////////////////////////////// |
878 Index: firefox-102.0/gfx/skia/skia/src/gpu/ops/GrShadowRRectOp.cpp |
1498 |
879 =================================================================== |
1499 // For distance computations in the interior of filled rrects we: |
880 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/ops/GrShadowRRectOp.cpp |
1500 // |
881 +++ firefox-102.0/gfx/skia/skia/src/gpu/ops/GrShadowRRectOp.cpp |
1501 // add a interior degenerate (point or line) rect |
882 @@ -155,6 +155,7 @@ static int rrect_type_to_vert_count(RRec |
1502 // each vertex of that rect gets -outerRad as its radius |
|
1503 diff --git a/gfx/skia/skia/src/gpu/ops/GrShadowRRectOp.cpp b/gfx/skia/skia/src/gpu/ops/GrShadowRRectOp.cpp |
|
1504 --- a/gfx/skia/skia/src/gpu/ops/GrShadowRRectOp.cpp |
|
1505 +++ b/gfx/skia/skia/src/gpu/ops/GrShadowRRectOp.cpp |
|
1506 @@ -150,39 +150,42 @@ static int rrect_type_to_vert_count(RRec |
|
1507 case kFill_RRectType: |
|
1508 return kVertsPerFillRRect; |
|
1509 case kStroke_RRectType: |
|
1510 return kVertsPerStrokeRRect; |
|
1511 case kOverstroke_RRectType: |
883 return kVertsPerOverstrokeRRect; |
1512 return kVertsPerOverstrokeRRect; |
884 } |
1513 } |
885 SK_ABORT("Invalid type"); |
1514 SK_ABORT("Invalid type"); |
886 + SkUNREACHABLE; |
1515 + SkUNREACHABLE; |
887 } |
1516 } |
888 |
1517 |
889 static int rrect_type_to_index_count(RRectType type) { |
1518 static int rrect_type_to_index_count(RRectType type) { |
890 @@ -167,6 +168,7 @@ static int rrect_type_to_index_count(RRe |
1519 switch (type) { |
|
1520 case kFill_RRectType: |
|
1521 return kIndicesPerFillRRect; |
|
1522 case kStroke_RRectType: |
|
1523 return kIndicesPerStrokeRRect; |
|
1524 case kOverstroke_RRectType: |
891 return kIndicesPerOverstrokeRRect; |
1525 return kIndicesPerOverstrokeRRect; |
892 } |
1526 } |
893 SK_ABORT("Invalid type"); |
1527 SK_ABORT("Invalid type"); |
894 + SkUNREACHABLE; |
1528 + SkUNREACHABLE; |
895 } |
1529 } |
896 |
1530 |
897 static const uint16_t* rrect_type_to_indices(RRectType type) { |
1531 static const uint16_t* rrect_type_to_indices(RRectType type) { |
898 @@ -178,6 +180,7 @@ static const uint16_t* rrect_type_to_ind |
1532 switch (type) { |
|
1533 case kFill_RRectType: |
|
1534 case kStroke_RRectType: |
|
1535 return gRRectIndices + 6*4; |
|
1536 case kOverstroke_RRectType: |
899 return gRRectIndices; |
1537 return gRRectIndices; |
900 } |
1538 } |
901 SK_ABORT("Invalid type"); |
1539 SK_ABORT("Invalid type"); |
902 + SkUNREACHABLE; |
1540 + SkUNREACHABLE; |
903 } |
1541 } |
904 |
1542 |
905 /////////////////////////////////////////////////////////////////////////////// |
1543 /////////////////////////////////////////////////////////////////////////////// |
906 Index: firefox-102.0/gfx/skia/skia/src/gpu/text/GrTextBlob.h |
1544 namespace { |
907 =================================================================== |
1545 |
908 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/text/GrTextBlob.h |
1546 class ShadowCircularRRectOp final : public GrMeshDrawOp { |
909 +++ firefox-102.0/gfx/skia/skia/src/gpu/text/GrTextBlob.h |
1547 public: |
910 @@ -125,6 +125,7 @@ public: |
1548 DEFINE_OP_CLASS_ID |
|
1549 diff --git a/gfx/skia/skia/src/gpu/text/GrTextBlob.h b/gfx/skia/skia/src/gpu/text/GrTextBlob.h |
|
1550 --- a/gfx/skia/skia/src/gpu/text/GrTextBlob.h |
|
1551 +++ b/gfx/skia/skia/src/gpu/text/GrTextBlob.h |
|
1552 @@ -120,16 +120,17 @@ public: |
|
1553 } |
|
1554 |
|
1555 void operator delete(void* p) { |
|
1556 ::operator delete(p); |
|
1557 } |
911 |
1558 |
912 void* operator new(size_t) { |
1559 void* operator new(size_t) { |
913 SK_ABORT("All blobs are created by placement new."); |
1560 SK_ABORT("All blobs are created by placement new."); |
914 + SkUNREACHABLE; |
1561 + SkUNREACHABLE; |
915 } |
1562 } |
916 |
1563 |
917 void* operator new(size_t, void* p) { return p; } |
1564 void* operator new(size_t, void* p) { return p; } |
918 Index: firefox-102.0/gfx/skia/skia/src/gpu/text/GrTextBlobVertexRegenerator.cpp |
1565 |
919 =================================================================== |
1566 bool hasDistanceField() const { return SkToBool(fTextType & kHasDistanceField_TextType); } |
920 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/text/GrTextBlobVertexRegenerator.cpp |
1567 bool hasBitmap() const { return SkToBool(fTextType & kHasBitmap_TextType); } |
921 +++ firefox-102.0/gfx/skia/skia/src/gpu/text/GrTextBlobVertexRegenerator.cpp |
1568 void setHasDistanceField() { fTextType |= kHasDistanceField_TextType; } |
922 @@ -284,4 +284,5 @@ bool GrTextBlob::VertexRegenerator::rege |
1569 void setHasBitmap() { fTextType |= kHasBitmap_TextType; } |
|
1570 diff --git a/gfx/skia/skia/src/gpu/text/GrTextBlobVertexRegenerator.cpp b/gfx/skia/skia/src/gpu/text/GrTextBlobVertexRegenerator.cpp |
|
1571 --- a/gfx/skia/skia/src/gpu/text/GrTextBlobVertexRegenerator.cpp |
|
1572 +++ b/gfx/skia/skia/src/gpu/text/GrTextBlobVertexRegenerator.cpp |
|
1573 @@ -279,9 +279,10 @@ bool GrTextBlob::VertexRegenerator::rege |
|
1574 // set use tokens for all of the glyphs in our subrun. This is only valid if we |
|
1575 // have a valid atlas generation |
|
1576 fFullAtlasManager->setUseTokenBulk(*fSubRun->bulkUseToken(), |
|
1577 fUploadTarget->tokenTracker()->nextDrawToken(), |
|
1578 fSubRun->maskFormat()); |
923 return true; |
1579 return true; |
924 } |
1580 } |
925 SK_ABORT("Should not get here"); |
1581 SK_ABORT("Should not get here"); |
926 + SkUNREACHABLE; |
1582 + SkUNREACHABLE; |
927 } |
1583 } |
928 Index: firefox-102.0/gfx/skia/skia/src/gpu/vk/GrVkCaps.cpp |
1584 diff --git a/gfx/skia/skia/src/gpu/vk/GrVkCaps.cpp b/gfx/skia/skia/src/gpu/vk/GrVkCaps.cpp |
929 =================================================================== |
1585 --- a/gfx/skia/skia/src/gpu/vk/GrVkCaps.cpp |
930 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/vk/GrVkCaps.cpp |
1586 +++ b/gfx/skia/skia/src/gpu/vk/GrVkCaps.cpp |
931 +++ firefox-102.0/gfx/skia/skia/src/gpu/vk/GrVkCaps.cpp |
1587 @@ -103,16 +103,17 @@ static FormatCompatibilityClass format_c |
932 @@ -108,6 +108,7 @@ static FormatCompatibilityClass format_c |
1588 case VK_FORMAT_R8G8B8_UNORM: |
|
1589 return FormatCompatibilityClass::k24_3_1; |
|
1590 |
|
1591 case VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK: |
|
1592 return FormatCompatibilityClass::kETC2_RGB_8_16; |
933 |
1593 |
934 default: |
1594 default: |
935 SK_ABORT("Unsupported VkFormat"); |
1595 SK_ABORT("Unsupported VkFormat"); |
936 + SkUNREACHABLE; |
1596 + SkUNREACHABLE; |
937 } |
1597 } |
938 } |
1598 } |
939 |
1599 |
940 @@ -1656,6 +1657,7 @@ GrBackendFormat GrVkCaps::getBackendForm |
1600 bool GrVkCaps::canCopyImage(VkFormat dstFormat, int dstSampleCnt, bool dstHasYcbcr, |
|
1601 VkFormat srcFormat, int srcSampleCnt, bool srcHasYcbcr) const { |
|
1602 if ((dstSampleCnt > 1 || srcSampleCnt > 1) && dstSampleCnt != srcSampleCnt) { |
|
1603 return false; |
|
1604 } |
|
1605 @@ -1651,16 +1652,17 @@ GrBackendFormat GrVkCaps::onGetDefaultBa |
|
1606 |
|
1607 GrBackendFormat GrVkCaps::getBackendFormatFromCompressionType( |
|
1608 SkImage::CompressionType compressionType) const { |
|
1609 switch (compressionType) { |
|
1610 case SkImage::kETC1_CompressionType: |
941 return GrBackendFormat::MakeVk(VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK); |
1611 return GrBackendFormat::MakeVk(VK_FORMAT_ETC2_R8G8B8_UNORM_BLOCK); |
942 } |
1612 } |
943 SK_ABORT("Invalid compression type"); |
1613 SK_ABORT("Invalid compression type"); |
944 + SkUNREACHABLE; |
1614 + SkUNREACHABLE; |
945 } |
1615 } |
946 |
1616 |
947 GrSwizzle GrVkCaps::getTextureSwizzle(const GrBackendFormat& format, GrColorType colorType) const { |
1617 GrSwizzle GrVkCaps::getTextureSwizzle(const GrBackendFormat& format, GrColorType colorType) const { |
948 Index: firefox-102.0/gfx/skia/skia/src/gpu/vk/GrVkMemory.cpp |
1618 VkFormat vkFormat; |
949 =================================================================== |
1619 SkAssertResult(format.asVkFormat(&vkFormat)); |
950 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/vk/GrVkMemory.cpp |
1620 const auto& info = this->getFormatInfo(vkFormat); |
951 +++ firefox-102.0/gfx/skia/skia/src/gpu/vk/GrVkMemory.cpp |
1621 for (int i = 0; i < info.fColorTypeInfoCount; ++i) { |
952 @@ -28,6 +28,7 @@ static BufferUsage get_buffer_usage(GrVk |
1622 const auto& ctInfo = info.fColorTypeInfos[i]; |
|
1623 diff --git a/gfx/skia/skia/src/gpu/vk/GrVkMemory.cpp b/gfx/skia/skia/src/gpu/vk/GrVkMemory.cpp |
|
1624 --- a/gfx/skia/skia/src/gpu/vk/GrVkMemory.cpp |
|
1625 +++ b/gfx/skia/skia/src/gpu/vk/GrVkMemory.cpp |
|
1626 @@ -23,16 +23,17 @@ static BufferUsage get_buffer_usage(GrVk |
|
1627 case GrVkBuffer::kUniform_Type: |
|
1628 SkASSERT(dynamic); |
|
1629 return BufferUsage::kCpuWritesGpuReads; |
|
1630 case GrVkBuffer::kCopyRead_Type: // fall through |
|
1631 case GrVkBuffer::kCopyWrite_Type: |
953 return BufferUsage::kCpuOnly; |
1632 return BufferUsage::kCpuOnly; |
954 } |
1633 } |
955 SK_ABORT("Invalid GrVkBuffer::Type"); |
1634 SK_ABORT("Invalid GrVkBuffer::Type"); |
956 + SkUNREACHABLE; |
1635 + SkUNREACHABLE; |
957 } |
1636 } |
958 |
1637 |
959 bool GrVkMemory::AllocAndBindBufferMemory(const GrVkGpu* gpu, |
1638 bool GrVkMemory::AllocAndBindBufferMemory(const GrVkGpu* gpu, |
960 Index: firefox-102.0/gfx/skia/skia/src/gpu/vk/GrVkPipeline.cpp |
1639 VkBuffer buffer, |
961 =================================================================== |
1640 GrVkBuffer::Type type, |
962 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/vk/GrVkPipeline.cpp |
1641 bool dynamic, |
963 +++ firefox-102.0/gfx/skia/skia/src/gpu/vk/GrVkPipeline.cpp |
1642 GrVkAlloc* alloc) { |
964 @@ -80,6 +80,7 @@ static inline VkFormat attrib_type_to_vk |
1643 GrVkMemoryAllocator* allocator = gpu->memoryAllocator(); |
|
1644 diff --git a/gfx/skia/skia/src/gpu/vk/GrVkPipeline.cpp b/gfx/skia/skia/src/gpu/vk/GrVkPipeline.cpp |
|
1645 --- a/gfx/skia/skia/src/gpu/vk/GrVkPipeline.cpp |
|
1646 +++ b/gfx/skia/skia/src/gpu/vk/GrVkPipeline.cpp |
|
1647 @@ -75,16 +75,17 @@ static inline VkFormat attrib_type_to_vk |
|
1648 case kUint_GrVertexAttribType: |
|
1649 return VK_FORMAT_R32_UINT; |
|
1650 case kUShort_norm_GrVertexAttribType: |
|
1651 return VK_FORMAT_R16_UNORM; |
|
1652 case kUShort4_norm_GrVertexAttribType: |
965 return VK_FORMAT_R16G16B16A16_UNORM; |
1653 return VK_FORMAT_R16G16B16A16_UNORM; |
966 } |
1654 } |
967 SK_ABORT("Unknown vertex attrib type"); |
1655 SK_ABORT("Unknown vertex attrib type"); |
968 + SkUNREACHABLE; |
1656 + SkUNREACHABLE; |
969 } |
1657 } |
970 |
1658 |
971 static void setup_vertex_input_state(const GrPrimitiveProcessor& primProc, |
1659 static void setup_vertex_input_state(const GrPrimitiveProcessor& primProc, |
972 @@ -162,8 +163,10 @@ static VkPrimitiveTopology gr_primitive_ |
1660 VkPipelineVertexInputStateCreateInfo* vertexInputInfo, |
|
1661 SkSTArray<2, VkVertexInputBindingDescription, true>* bindingDescs, |
|
1662 VkVertexInputAttributeDescription* attributeDesc) { |
|
1663 uint32_t vertexBinding = 0, instanceBinding = 0; |
|
1664 |
|
1665 @@ -157,18 +158,20 @@ static VkPrimitiveTopology gr_primitive_ |
|
1666 case GrPrimitiveType::kPoints: |
|
1667 return VK_PRIMITIVE_TOPOLOGY_POINT_LIST; |
|
1668 case GrPrimitiveType::kLines: |
|
1669 return VK_PRIMITIVE_TOPOLOGY_LINE_LIST; |
|
1670 case GrPrimitiveType::kLineStrip: |
973 return VK_PRIMITIVE_TOPOLOGY_LINE_STRIP; |
1671 return VK_PRIMITIVE_TOPOLOGY_LINE_STRIP; |
974 case GrPrimitiveType::kPath: |
1672 case GrPrimitiveType::kPath: |
975 SK_ABORT("Unsupported primitive type"); |
1673 SK_ABORT("Unsupported primitive type"); |
976 + SkUNREACHABLE; |
1674 + SkUNREACHABLE; |
977 } |
1675 } |
978 SK_ABORT("invalid GrPrimitiveType"); |
1676 SK_ABORT("invalid GrPrimitiveType"); |
979 + SkUNREACHABLE; |
1677 + SkUNREACHABLE; |
980 } |
1678 } |
981 |
1679 |
982 static void setup_input_assembly_state(GrPrimitiveType primitiveType, |
1680 static void setup_input_assembly_state(GrPrimitiveType primitiveType, |
983 Index: firefox-102.0/gfx/skia/skia/src/gpu/vk/GrVkSampler.cpp |
1681 VkPipelineInputAssemblyStateCreateInfo* inputAssemblyInfo) { |
984 =================================================================== |
1682 memset(inputAssemblyInfo, 0, sizeof(VkPipelineInputAssemblyStateCreateInfo)); |
985 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/vk/GrVkSampler.cpp |
1683 inputAssemblyInfo->sType = VK_STRUCTURE_TYPE_PIPELINE_INPUT_ASSEMBLY_STATE_CREATE_INFO; |
986 +++ firefox-102.0/gfx/skia/skia/src/gpu/vk/GrVkSampler.cpp |
1684 inputAssemblyInfo->pNext = nullptr; |
987 @@ -23,6 +23,7 @@ static inline VkSamplerAddressMode wrap_ |
1685 inputAssemblyInfo->flags = 0; |
|
1686 diff --git a/gfx/skia/skia/src/gpu/vk/GrVkSampler.cpp b/gfx/skia/skia/src/gpu/vk/GrVkSampler.cpp |
|
1687 --- a/gfx/skia/skia/src/gpu/vk/GrVkSampler.cpp |
|
1688 +++ b/gfx/skia/skia/src/gpu/vk/GrVkSampler.cpp |
|
1689 @@ -18,16 +18,17 @@ static inline VkSamplerAddressMode wrap_ |
|
1690 case GrSamplerState::WrapMode::kRepeat: |
|
1691 return VK_SAMPLER_ADDRESS_MODE_REPEAT; |
|
1692 case GrSamplerState::WrapMode::kMirrorRepeat: |
|
1693 return VK_SAMPLER_ADDRESS_MODE_MIRRORED_REPEAT; |
|
1694 case GrSamplerState::WrapMode::kClampToBorder: |
988 return VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER; |
1695 return VK_SAMPLER_ADDRESS_MODE_CLAMP_TO_BORDER; |
989 } |
1696 } |
990 SK_ABORT("Unknown wrap mode."); |
1697 SK_ABORT("Unknown wrap mode."); |
991 + SkUNREACHABLE; |
1698 + SkUNREACHABLE; |
992 } |
1699 } |
993 |
1700 |
994 GrVkSampler* GrVkSampler::Create(GrVkGpu* gpu, const GrSamplerState& samplerState, |
1701 GrVkSampler* GrVkSampler::Create(GrVkGpu* gpu, const GrSamplerState& samplerState, |
995 Index: firefox-102.0/gfx/skia/skia/src/gpu/vk/GrVkTransferBuffer.h |
1702 const GrVkYcbcrConversionInfo& ycbcrInfo) { |
996 =================================================================== |
1703 static VkFilter vkMinFilterModes[] = { |
997 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/vk/GrVkTransferBuffer.h |
1704 VK_FILTER_NEAREST, |
998 +++ firefox-102.0/gfx/skia/skia/src/gpu/vk/GrVkTransferBuffer.h |
1705 VK_FILTER_LINEAR, |
999 @@ -34,6 +34,7 @@ private: |
1706 VK_FILTER_LINEAR |
|
1707 diff --git a/gfx/skia/skia/src/gpu/vk/GrVkTransferBuffer.h b/gfx/skia/skia/src/gpu/vk/GrVkTransferBuffer.h |
|
1708 --- a/gfx/skia/skia/src/gpu/vk/GrVkTransferBuffer.h |
|
1709 +++ b/gfx/skia/skia/src/gpu/vk/GrVkTransferBuffer.h |
|
1710 @@ -29,16 +29,17 @@ private: |
|
1711 const SkString& dumpName) const override; |
|
1712 |
|
1713 void onMap() override { this->GrGpuBuffer::fMapPtr = this->vkMap(this->getVkGpu()); } |
|
1714 |
|
1715 void onUnmap() override { this->vkUnmap(this->getVkGpu()); } |
1000 |
1716 |
1001 bool onUpdateData(const void* src, size_t srcSizeInBytes) override { |
1717 bool onUpdateData(const void* src, size_t srcSizeInBytes) override { |
1002 SK_ABORT("Not implemented for transfer buffers."); |
1718 SK_ABORT("Not implemented for transfer buffers."); |
1003 + SkUNREACHABLE; |
1719 + SkUNREACHABLE; |
1004 } |
1720 } |
1005 |
1721 |
1006 GrVkGpu* getVkGpu() const { |
1722 GrVkGpu* getVkGpu() const { |
1007 Index: firefox-102.0/gfx/skia/skia/src/gpu/vk/GrVkUniformHandler.cpp |
1723 SkASSERT(!this->wasDestroyed()); |
1008 =================================================================== |
1724 return reinterpret_cast<GrVkGpu*>(this->getGpu()); |
1009 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/vk/GrVkUniformHandler.cpp |
1725 } |
1010 +++ firefox-102.0/gfx/skia/skia/src/gpu/vk/GrVkUniformHandler.cpp |
1726 |
1011 @@ -89,6 +89,7 @@ static uint32_t grsltype_to_alignment_ma |
1727 typedef GrGpuBuffer INHERITED; |
|
1728 diff --git a/gfx/skia/skia/src/gpu/vk/GrVkUniformHandler.cpp b/gfx/skia/skia/src/gpu/vk/GrVkUniformHandler.cpp |
|
1729 --- a/gfx/skia/skia/src/gpu/vk/GrVkUniformHandler.cpp |
|
1730 +++ b/gfx/skia/skia/src/gpu/vk/GrVkUniformHandler.cpp |
|
1731 @@ -84,16 +84,17 @@ static uint32_t grsltype_to_alignment_ma |
|
1732 case kTexture2DSampler_GrSLType: |
|
1733 case kTextureExternalSampler_GrSLType: |
|
1734 case kTexture2DRectSampler_GrSLType: |
|
1735 case kSampler_GrSLType: |
|
1736 case kTexture2D_GrSLType: |
1012 break; |
1737 break; |
1013 } |
1738 } |
1014 SK_ABORT("Unexpected type"); |
1739 SK_ABORT("Unexpected type"); |
1015 + SkUNREACHABLE; |
1740 + SkUNREACHABLE; |
1016 } |
1741 } |
1017 |
1742 |
1018 /** Returns the size in bytes taken up in vulkanbuffers for GrSLTypes. */ |
1743 /** Returns the size in bytes taken up in vulkanbuffers for GrSLTypes. */ |
1019 @@ -172,6 +173,7 @@ static inline uint32_t grsltype_to_vk_si |
1744 static inline uint32_t grsltype_to_vk_size(GrSLType type) { |
|
1745 switch(type) { |
|
1746 case kByte_GrSLType: |
|
1747 return sizeof(int8_t); |
|
1748 case kByte2_GrSLType: |
|
1749 @@ -167,16 +168,17 @@ static inline uint32_t grsltype_to_vk_si |
|
1750 case kTexture2DSampler_GrSLType: |
|
1751 case kTextureExternalSampler_GrSLType: |
|
1752 case kTexture2DRectSampler_GrSLType: |
|
1753 case kSampler_GrSLType: |
|
1754 case kTexture2D_GrSLType: |
1020 break; |
1755 break; |
1021 } |
1756 } |
1022 SK_ABORT("Unexpected type"); |
1757 SK_ABORT("Unexpected type"); |
1023 + SkUNREACHABLE; |
1758 + SkUNREACHABLE; |
1024 } |
1759 } |
1025 |
1760 |
1026 |
1761 |
1027 Index: firefox-102.0/gfx/skia/skia/src/gpu/vk/GrVkVaryingHandler.cpp |
1762 // Given the current offset into the ubo, calculate the offset for the uniform we're trying to add |
1028 =================================================================== |
1763 // taking into consideration all alignment requirements. The uniformOffset is set to the offset for |
1029 --- firefox-102.0.orig/gfx/skia/skia/src/gpu/vk/GrVkVaryingHandler.cpp |
1764 // the new uniform, and currentOffset is updated to be the offset to the end of the new uniform. |
1030 +++ firefox-102.0/gfx/skia/skia/src/gpu/vk/GrVkVaryingHandler.cpp |
1765 static void get_ubo_aligned_offset(uint32_t* uniformOffset, |
1031 @@ -74,6 +74,7 @@ static inline int grsltype_to_location_s |
1766 uint32_t* currentOffset, |
|
1767 diff --git a/gfx/skia/skia/src/gpu/vk/GrVkVaryingHandler.cpp b/gfx/skia/skia/src/gpu/vk/GrVkVaryingHandler.cpp |
|
1768 --- a/gfx/skia/skia/src/gpu/vk/GrVkVaryingHandler.cpp |
|
1769 +++ b/gfx/skia/skia/src/gpu/vk/GrVkVaryingHandler.cpp |
|
1770 @@ -69,16 +69,17 @@ static inline int grsltype_to_location_s |
|
1771 case kByte_GrSLType: |
1032 return 1; |
1772 return 1; |
|
1773 case kUint_GrSLType: // fall through |
|
1774 case kUShort_GrSLType: |
|
1775 case kUByte_GrSLType: |
|
1776 return 1; |
1033 } |
1777 } |
1034 SK_ABORT("Unexpected type"); |
1778 SK_ABORT("Unexpected type"); |
1035 + SkUNREACHABLE; |
1779 + SkUNREACHABLE; |
1036 } |
1780 } |
1037 |
1781 |
1038 static void finalize_helper(GrVkVaryingHandler::VarArray& vars) { |
1782 static void finalize_helper(GrVkVaryingHandler::VarArray& vars) { |
1039 Index: firefox-102.0/gfx/skia/skia/src/pdf/SkPDFTag.cpp |
1783 int locationIndex = 0; |
1040 =================================================================== |
1784 for (int i = 0; i < vars.count(); ++i) { |
1041 --- firefox-102.0.orig/gfx/skia/skia/src/pdf/SkPDFTag.cpp |
1785 GrShaderVar& var = vars[i]; |
1042 +++ firefox-102.0/gfx/skia/skia/src/pdf/SkPDFTag.cpp |
1786 SkString location; |
1043 @@ -64,6 +64,7 @@ static const char* tag_name_from_type(Sk |
1787 location.appendf("location = %d", locationIndex); |
|
1788 diff --git a/gfx/skia/skia/src/pdf/SkPDFTag.cpp b/gfx/skia/skia/src/pdf/SkPDFTag.cpp |
|
1789 --- a/gfx/skia/skia/src/pdf/SkPDFTag.cpp |
|
1790 +++ b/gfx/skia/skia/src/pdf/SkPDFTag.cpp |
|
1791 @@ -59,16 +59,17 @@ static const char* tag_name_from_type(Sk |
|
1792 M(WT); |
|
1793 M(WP); |
|
1794 M(Figure); |
|
1795 M(Formula); |
|
1796 M(Form); |
1044 #undef M |
1797 #undef M |
1045 } |
1798 } |
1046 SK_ABORT("bad tag"); |
1799 SK_ABORT("bad tag"); |
1047 + SkUNREACHABLE; |
1800 + SkUNREACHABLE; |
1048 } |
1801 } |
1049 |
1802 |
1050 struct SkPDFTagNode { |
1803 struct SkPDFTagNode { |
1051 Index: firefox-102.0/gfx/skia/skia/src/ports/SkFontMgr_FontConfigInterface.cpp |
1804 SkPDFTagNode* fChildren = nullptr; |
1052 =================================================================== |
1805 size_t fChildCount = 0; |
1053 --- firefox-102.0.orig/gfx/skia/skia/src/ports/SkFontMgr_FontConfigInterface.cpp |
1806 struct MarkedContentInfo { |
1054 +++ firefox-102.0/gfx/skia/skia/src/ports/SkFontMgr_FontConfigInterface.cpp |
1807 unsigned fPageIndex; |
1055 @@ -173,18 +173,22 @@ public: |
1808 int fMarkId; |
|
1809 diff --git a/gfx/skia/skia/src/ports/SkFontMgr_FontConfigInterface.cpp b/gfx/skia/skia/src/ports/SkFontMgr_FontConfigInterface.cpp |
|
1810 --- a/gfx/skia/skia/src/ports/SkFontMgr_FontConfigInterface.cpp |
|
1811 +++ b/gfx/skia/skia/src/ports/SkFontMgr_FontConfigInterface.cpp |
|
1812 @@ -168,28 +168,32 @@ public: |
|
1813 SkFontMgr_FCI(sk_sp<SkFontConfigInterface> fci) |
|
1814 : fFCI(std::move(fci)) |
|
1815 , fCache(kMaxSize) |
|
1816 {} |
|
1817 |
1056 protected: |
1818 protected: |
1057 int onCountFamilies() const override { |
1819 int onCountFamilies() const override { |
1058 SK_ABORT("Not implemented."); |
1820 SK_ABORT("Not implemented."); |
1059 + SkUNREACHABLE; |
1821 + SkUNREACHABLE; |
1060 } |
1822 } |
1086 SK_ABORT("Not implemented."); |
1858 SK_ABORT("Not implemented."); |
1087 + SkUNREACHABLE; |
1859 + SkUNREACHABLE; |
1088 } |
1860 } |
1089 |
1861 |
1090 sk_sp<SkTypeface> onMakeFromData(sk_sp<SkData> data, int ttcIndex) const override { |
1862 sk_sp<SkTypeface> onMakeFromData(sk_sp<SkData> data, int ttcIndex) const override { |
1091 Index: firefox-102.0/gfx/skia/skia/src/shaders/SkImageShader.cpp |
1863 return this->onMakeFromStreamIndex(SkMemoryStream::Make(std::move(data)), ttcIndex); |
1092 =================================================================== |
1864 } |
1093 --- firefox-102.0.orig/gfx/skia/skia/src/shaders/SkImageShader.cpp |
1865 |
1094 +++ firefox-102.0/gfx/skia/skia/src/shaders/SkImageShader.cpp |
1866 sk_sp<SkTypeface> onMakeFromStreamIndex(std::unique_ptr<SkStreamAsset> stream, |
1095 @@ -183,6 +183,7 @@ static GrSamplerState::WrapMode tile_mod |
1867 int ttcIndex) const override { |
|
1868 diff --git a/gfx/skia/skia/src/shaders/SkImageShader.cpp b/gfx/skia/skia/src/shaders/SkImageShader.cpp |
|
1869 --- a/gfx/skia/skia/src/shaders/SkImageShader.cpp |
|
1870 +++ b/gfx/skia/skia/src/shaders/SkImageShader.cpp |
|
1871 @@ -178,16 +178,17 @@ static GrSamplerState::WrapMode tile_mod |
|
1872 case SkTileMode::kRepeat: |
|
1873 return GrSamplerState::WrapMode::kRepeat; |
|
1874 case SkTileMode::kMirror: |
|
1875 return GrSamplerState::WrapMode::kMirrorRepeat; |
|
1876 case SkTileMode::kDecal: |
1096 return GrSamplerState::WrapMode::kClampToBorder; |
1877 return GrSamplerState::WrapMode::kClampToBorder; |
1097 } |
1878 } |
1098 SK_ABORT("Unknown tile mode."); |
1879 SK_ABORT("Unknown tile mode."); |
1099 + SkUNREACHABLE; |
1880 + SkUNREACHABLE; |
1100 } |
1881 } |
1101 |
1882 |
1102 std::unique_ptr<GrFragmentProcessor> SkImageShader::asFragmentProcessor( |
1883 std::unique_ptr<GrFragmentProcessor> SkImageShader::asFragmentProcessor( |
1103 Index: firefox-102.0/gfx/skia/skia/src/utils/SkShadowUtils.cpp |
1884 const GrFPArgs& args) const { |
1104 =================================================================== |
1885 const auto lm = this->totalLocalMatrix(args.fPreLocalMatrix, args.fPostLocalMatrix); |
1105 --- firefox-102.0.orig/gfx/skia/skia/src/utils/SkShadowUtils.cpp |
1886 SkMatrix lmInverse; |
1106 +++ firefox-102.0/gfx/skia/skia/src/utils/SkShadowUtils.cpp |
1887 if (!lm->invert(&lmInverse)) { |
1107 @@ -149,6 +149,7 @@ struct SpotVerticesFactory { |
1888 return nullptr; |
|
1889 diff --git a/gfx/skia/skia/src/utils/SkShadowUtils.cpp b/gfx/skia/skia/src/utils/SkShadowUtils.cpp |
|
1890 --- a/gfx/skia/skia/src/utils/SkShadowUtils.cpp |
|
1891 +++ b/gfx/skia/skia/src/utils/SkShadowUtils.cpp |
|
1892 @@ -144,16 +144,17 @@ struct SpotVerticesFactory { |
|
1893 // if the offsets don't match. |
|
1894 if (fOffset == that.fOffset) { |
|
1895 translate->set(0, 0); |
|
1896 return true; |
|
1897 } |
1108 return false; |
1898 return false; |
1109 } |
1899 } |
1110 SK_ABORT("Uninitialized occluder type?"); |
1900 SK_ABORT("Uninitialized occluder type?"); |
1111 + SkUNREACHABLE; |
1901 + SkUNREACHABLE; |
1112 } |
1902 } |
1113 |
1903 |
1114 sk_sp<SkVertices> makeVertices(const SkPath& path, const SkMatrix& ctm, |
1904 sk_sp<SkVertices> makeVertices(const SkPath& path, const SkMatrix& ctm, |
1115 Index: firefox-102.0/intl/icu/source/i18n/number_rounding.cpp |
1905 SkVector* translate) const { |
1116 =================================================================== |
1906 bool transparent = OccluderType::kTransparent == fOccluderType; |
1117 --- firefox-102.0.orig/intl/icu/source/i18n/number_rounding.cpp |
1907 SkPoint3 zParams = SkPoint3::Make(0, 0, fOccluderHeight); |
1118 +++ firefox-102.0/intl/icu/source/i18n/number_rounding.cpp |
1908 if (ctm.hasPerspective() || OccluderType::kOpaquePartialUmbra == fOccluderType) { |
1119 @@ -283,6 +283,7 @@ FractionPrecision Precision::constructFr |
1909 translate->set(0, 0); |
|
1910 diff --git a/intl/icu/source/i18n/number_rounding.cpp b/intl/icu/source/i18n/number_rounding.cpp |
|
1911 --- a/intl/icu/source/i18n/number_rounding.cpp |
|
1912 +++ b/intl/icu/source/i18n/number_rounding.cpp |
|
1913 @@ -278,27 +278,29 @@ Precision IncrementPrecision::withMinFra |
|
1914 } |
|
1915 |
|
1916 FractionPrecision Precision::constructFraction(int32_t minFrac, int32_t maxFrac) { |
|
1917 FractionSignificantSettings settings; |
|
1918 settings.fMinFrac = static_cast<digits_t>(minFrac); |
1120 settings.fMaxFrac = static_cast<digits_t>(maxFrac); |
1919 settings.fMaxFrac = static_cast<digits_t>(maxFrac); |
1121 settings.fMinSig = -1; |
1920 settings.fMinSig = -1; |
1122 settings.fMaxSig = -1; |
1921 settings.fMaxSig = -1; |
1123 + settings.fPriority = UNUM_ROUNDING_PRIORITY_RELAXED; |
1922 + settings.fPriority = UNUM_ROUNDING_PRIORITY_RELAXED; |
1124 PrecisionUnion union_; |
1923 PrecisionUnion union_; |
1125 union_.fracSig = settings; |
1924 union_.fracSig = settings; |
1126 return {RND_FRACTION, union_}; |
1925 return {RND_FRACTION, union_}; |
1127 @@ -294,6 +295,7 @@ Precision Precision::constructSignifican |
1926 } |
|
1927 |
|
1928 Precision Precision::constructSignificant(int32_t minSig, int32_t maxSig) { |
|
1929 FractionSignificantSettings settings; |
|
1930 settings.fMinFrac = -1; |
1128 settings.fMaxFrac = -1; |
1931 settings.fMaxFrac = -1; |
1129 settings.fMinSig = static_cast<digits_t>(minSig); |
1932 settings.fMinSig = static_cast<digits_t>(minSig); |
1130 settings.fMaxSig = static_cast<digits_t>(maxSig); |
1933 settings.fMaxSig = static_cast<digits_t>(maxSig); |
1131 + settings.fPriority = UNUM_ROUNDING_PRIORITY_RELAXED; |
1934 + settings.fPriority = UNUM_ROUNDING_PRIORITY_RELAXED; |
1132 PrecisionUnion union_; |
1935 PrecisionUnion union_; |
1133 union_.fracSig = settings; |
1936 union_.fracSig = settings; |
1134 return {RND_SIGNIFICANT, union_}; |
1937 return {RND_SIGNIFICANT, union_}; |
1135 Index: firefox-102.0/third_party/libwebrtc/api/adaptation/resource.cc |
1938 } |
1136 =================================================================== |
1939 |
1137 --- firefox-102.0.orig/third_party/libwebrtc/api/adaptation/resource.cc |
1940 Precision |
1138 +++ firefox-102.0/third_party/libwebrtc/api/adaptation/resource.cc |
1941 Precision::constructFractionSignificant( |
1139 @@ -9,6 +9,7 @@ |
1942 const FractionPrecision &base, |
|
1943 diff --git a/third_party/libwebrtc/api/adaptation/resource.cc b/third_party/libwebrtc/api/adaptation/resource.cc |
|
1944 --- a/third_party/libwebrtc/api/adaptation/resource.cc |
|
1945 +++ b/third_party/libwebrtc/api/adaptation/resource.cc |
|
1946 @@ -4,25 +4,29 @@ |
|
1947 * Use of this source code is governed by a BSD-style license |
|
1948 * that can be found in the LICENSE file in the root of the source |
|
1949 * tree. An additional intellectual property rights grant can be found |
|
1950 * in the file PATENTS. All contributing project authors may |
|
1951 * be found in the AUTHORS file in the root of the source tree. |
1140 */ |
1952 */ |
1141 |
1953 |
1142 #include "api/adaptation/resource.h" |
1954 #include "api/adaptation/resource.h" |
1143 +#include "rtc_base/checks.h" |
1955 +#include "rtc_base/checks.h" |
1144 |
1956 |
1145 namespace webrtc { |
1957 namespace webrtc { |
1146 |
1958 |
1147 @@ -18,6 +19,9 @@ const char* ResourceUsageStateToString(R |
1959 const char* ResourceUsageStateToString(ResourceUsageState usage_state) { |
|
1960 switch (usage_state) { |
|
1961 case ResourceUsageState::kOveruse: |
1148 return "kOveruse"; |
1962 return "kOveruse"; |
1149 case ResourceUsageState::kUnderuse: |
1963 case ResourceUsageState::kUnderuse: |
1150 return "kUnderuse"; |
1964 return "kUnderuse"; |
1151 + default: |
1965 + default: |
1152 + RTC_NOTREACHED(); |
1966 + RTC_NOTREACHED(); |
1153 + return ""; |
1967 + return ""; |
1154 } |
1968 } |
1155 } |
1969 } |
1156 |
1970 |
1157 Index: firefox-102.0/third_party/libwebrtc/api/rtp_parameters.cc |
1971 ResourceListener::~ResourceListener() {} |
1158 =================================================================== |
1972 |
1159 --- firefox-102.0.orig/third_party/libwebrtc/api/rtp_parameters.cc |
1973 Resource::Resource() {} |
1160 +++ firefox-102.0/third_party/libwebrtc/api/rtp_parameters.cc |
1974 |
1161 @@ -29,6 +29,9 @@ const char* DegradationPreferenceToStrin |
1975 Resource::~Resource() {} |
|
1976 diff --git a/third_party/libwebrtc/api/rtp_parameters.cc b/third_party/libwebrtc/api/rtp_parameters.cc |
|
1977 --- a/third_party/libwebrtc/api/rtp_parameters.cc |
|
1978 +++ b/third_party/libwebrtc/api/rtp_parameters.cc |
|
1979 @@ -24,16 +24,19 @@ const char* DegradationPreferenceToStrin |
|
1980 case DegradationPreference::DISABLED: |
|
1981 return "disabled"; |
|
1982 case DegradationPreference::MAINTAIN_FRAMERATE: |
|
1983 return "maintain-framerate"; |
|
1984 case DegradationPreference::MAINTAIN_RESOLUTION: |
1162 return "maintain-resolution"; |
1985 return "maintain-resolution"; |
1163 case DegradationPreference::BALANCED: |
1986 case DegradationPreference::BALANCED: |
1164 return "balanced"; |
1987 return "balanced"; |
1165 + default: |
1988 + default: |
1166 + RTC_NOTREACHED(); |
1989 + RTC_NOTREACHED(); |
1167 + return ""; |
1990 + return ""; |
1168 } |
1991 } |
1169 } |
1992 } |
1170 |
1993 |
1171 Index: firefox-102.0/third_party/libwebrtc/api/video_codecs/video_codec.cc |
1994 const double kDefaultBitratePriority = 1.0; |
1172 =================================================================== |
1995 |
1173 --- firefox-102.0.orig/third_party/libwebrtc/api/video_codecs/video_codec.cc |
1996 RtcpFeedback::RtcpFeedback() = default; |
1174 +++ firefox-102.0/third_party/libwebrtc/api/video_codecs/video_codec.cc |
1997 RtcpFeedback::RtcpFeedback(RtcpFeedbackType type) : type(type) {} |
1175 @@ -119,6 +119,9 @@ const char* CodecTypeToPayloadString(Vid |
1998 RtcpFeedback::RtcpFeedback(RtcpFeedbackType type, |
|
1999 diff --git a/third_party/libwebrtc/api/video_codecs/video_codec.cc b/third_party/libwebrtc/api/video_codecs/video_codec.cc |
|
2000 --- a/third_party/libwebrtc/api/video_codecs/video_codec.cc |
|
2001 +++ b/third_party/libwebrtc/api/video_codecs/video_codec.cc |
|
2002 @@ -114,16 +114,19 @@ const char* CodecTypeToPayloadString(Vid |
|
2003 case kVideoCodecAV1: |
|
2004 return kPayloadNameAv1; |
|
2005 case kVideoCodecH264: |
|
2006 return kPayloadNameH264; |
|
2007 case kVideoCodecMultiplex: |
1176 return kPayloadNameMultiplex; |
2008 return kPayloadNameMultiplex; |
1177 case kVideoCodecGeneric: |
2009 case kVideoCodecGeneric: |
1178 return kPayloadNameGeneric; |
2010 return kPayloadNameGeneric; |
1179 + default: |
2011 + default: |
1180 + RTC_NOTREACHED(); |
2012 + RTC_NOTREACHED(); |
1181 + return ""; |
2013 + return ""; |
1182 } |
2014 } |
1183 } |
2015 } |
1184 |
2016 |
1185 Index: firefox-102.0/third_party/libwebrtc/api/video_codecs/video_encoder_software_fallback_wrapper.cc |
2017 VideoCodecType PayloadStringToCodecType(const std::string& name) { |
1186 =================================================================== |
2018 if (absl::EqualsIgnoreCase(name, kPayloadNameVp8)) |
1187 --- firefox-102.0.orig/third_party/libwebrtc/api/video_codecs/video_encoder_software_fallback_wrapper.cc |
2019 return kVideoCodecVP8; |
1188 +++ firefox-102.0/third_party/libwebrtc/api/video_codecs/video_encoder_software_fallback_wrapper.cc |
2020 if (absl::EqualsIgnoreCase(name, kPayloadNameVp9)) |
1189 @@ -161,6 +161,9 @@ class VideoEncoderSoftwareFallbackWrappe |
2021 return kVideoCodecVP9; |
|
2022 diff --git a/third_party/libwebrtc/api/video_codecs/video_encoder_software_fallback_wrapper.cc b/third_party/libwebrtc/api/video_codecs/video_encoder_software_fallback_wrapper.cc |
|
2023 --- a/third_party/libwebrtc/api/video_codecs/video_encoder_software_fallback_wrapper.cc |
|
2024 +++ b/third_party/libwebrtc/api/video_codecs/video_encoder_software_fallback_wrapper.cc |
|
2025 @@ -156,16 +156,19 @@ class VideoEncoderSoftwareFallbackWrappe |
|
2026 << "Trying to access encoder in uninitialized fallback wrapper."; |
|
2027 // Return main encoder to preserve previous behavior. |
|
2028 ABSL_FALLTHROUGH_INTENDED; |
|
2029 case EncoderState::kMainEncoderUsed: |
|
2030 return encoder_.get(); |
1190 case EncoderState::kFallbackDueToFailure: |
2031 case EncoderState::kFallbackDueToFailure: |
1191 case EncoderState::kForcedFallback: |
2032 case EncoderState::kForcedFallback: |
1192 return fallback_encoder_.get(); |
2033 return fallback_encoder_.get(); |
1193 + default: |
2034 + default: |
1194 + RTC_NOTREACHED(); |
2035 + RTC_NOTREACHED(); |
1195 + return nullptr; |
2036 + return nullptr; |
1196 } |
2037 } |
1197 } |
2038 } |
1198 |
2039 |
1199 @@ -339,6 +342,9 @@ int32_t VideoEncoderSoftwareFallbackWrap |
2040 // Updates encoder with last observed parameters, such as callbacks, rates, |
|
2041 // etc. |
|
2042 void PrimeEncoder(VideoEncoder* encoder) const; |
|
2043 |
|
2044 // Settings used in the last InitEncode call and used if a dynamic fallback to |
|
2045 @@ -334,16 +337,19 @@ int32_t VideoEncoderSoftwareFallbackWrap |
|
2046 case EncoderState::kUninitialized: |
|
2047 return WEBRTC_VIDEO_CODEC_ERROR; |
|
2048 case EncoderState::kMainEncoderUsed: { |
|
2049 return EncodeWithMainEncoder(frame, frame_types); |
|
2050 } |
1200 case EncoderState::kFallbackDueToFailure: |
2051 case EncoderState::kFallbackDueToFailure: |
1201 case EncoderState::kForcedFallback: |
2052 case EncoderState::kForcedFallback: |
1202 return fallback_encoder_->Encode(frame, frame_types); |
2053 return fallback_encoder_->Encode(frame, frame_types); |
1203 + default: |
2054 + default: |
1204 + RTC_NOTREACHED(); |
2055 + RTC_NOTREACHED(); |
1205 + return WEBRTC_VIDEO_CODEC_ERROR; |
2056 + return WEBRTC_VIDEO_CODEC_ERROR; |
1206 } |
2057 } |
1207 } |
2058 } |
1208 int32_t VideoEncoderSoftwareFallbackWrapper::EncodeWithMainEncoder( |
2059 int32_t VideoEncoderSoftwareFallbackWrapper::EncodeWithMainEncoder( |
1209 Index: firefox-102.0/third_party/libwebrtc/call/adaptation/video_stream_adapter.cc |
2060 const VideoFrame& frame, |
1210 =================================================================== |
2061 const std::vector<VideoFrameType>* frame_types) { |
1211 --- firefox-102.0.orig/third_party/libwebrtc/call/adaptation/video_stream_adapter.cc |
2062 int32_t ret = encoder_->Encode(frame, frame_types); |
1212 +++ firefox-102.0/third_party/libwebrtc/call/adaptation/video_stream_adapter.cc |
2063 // If requested, try a software fallback. |
1213 @@ -161,6 +161,9 @@ const char* Adaptation::StatusToString(A |
2064 bool fallback_requested = (ret == WEBRTC_VIDEO_CODEC_FALLBACK_SOFTWARE); |
|
2065 diff --git a/third_party/libwebrtc/call/adaptation/video_stream_adapter.cc b/third_party/libwebrtc/call/adaptation/video_stream_adapter.cc |
|
2066 --- a/third_party/libwebrtc/call/adaptation/video_stream_adapter.cc |
|
2067 +++ b/third_party/libwebrtc/call/adaptation/video_stream_adapter.cc |
|
2068 @@ -156,16 +156,19 @@ const char* Adaptation::StatusToString(A |
|
2069 case Adaptation::Status::kAwaitingPreviousAdaptation: |
|
2070 return "kAwaitingPreviousAdaptation"; |
|
2071 case Status::kInsufficientInput: |
|
2072 return "kInsufficientInput"; |
|
2073 case Status::kAdaptationDisabled: |
1214 return "kAdaptationDisabled"; |
2074 return "kAdaptationDisabled"; |
1215 case Status::kRejectedByConstraint: |
2075 case Status::kRejectedByConstraint: |
1216 return "kRejectedByConstraint"; |
2076 return "kRejectedByConstraint"; |
1217 + default: |
2077 + default: |
1218 + RTC_NOTREACHED(); |
2078 + RTC_NOTREACHED(); |
1219 + return ""; |
2079 + return ""; |
1220 } |
2080 } |
1221 } |
2081 } |
1222 |
2082 |
1223 @@ -380,6 +383,9 @@ VideoStreamAdapter::RestrictionsOrState |
2083 Adaptation::Adaptation(int validation_id, |
|
2084 VideoSourceRestrictions restrictions, |
|
2085 VideoAdaptationCounters counters, |
|
2086 VideoStreamInputState input_state) |
|
2087 : validation_id_(validation_id), |
|
2088 @@ -375,16 +378,19 @@ VideoStreamAdapter::RestrictionsOrState |
|
2089 return IncreaseResolution(input_state, current_restrictions_); |
|
2090 } |
|
2091 case DegradationPreference::MAINTAIN_RESOLUTION: { |
|
2092 // Scale up framerate. |
|
2093 return IncreaseFramerate(input_state, current_restrictions_); |
1224 } |
2094 } |
1225 case DegradationPreference::DISABLED: |
2095 case DegradationPreference::DISABLED: |
1226 return Adaptation::Status::kAdaptationDisabled; |
2096 return Adaptation::Status::kAdaptationDisabled; |
1227 + default: |
2097 + default: |
1228 + RTC_NOTREACHED(); |
2098 + RTC_NOTREACHED(); |
1229 + return Adaptation::Status::kAdaptationDisabled; |
2099 + return Adaptation::Status::kAdaptationDisabled; |
1230 } |
2100 } |
1231 } |
2101 } |
1232 |
2102 |
1233 @@ -459,6 +465,9 @@ VideoStreamAdapter::GetAdaptationDownSte |
2103 Adaptation VideoStreamAdapter::GetAdaptationDown() { |
|
2104 RTC_DCHECK_RUN_ON(&sequence_checker_); |
|
2105 VideoStreamInputState input_state = input_state_provider_->InputState(); |
|
2106 ++adaptation_validation_id_; |
|
2107 RestrictionsOrState restrictions_or_state = |
|
2108 @@ -454,16 +460,19 @@ VideoStreamAdapter::GetAdaptationDownSte |
|
2109 case DegradationPreference::MAINTAIN_FRAMERATE: { |
|
2110 return DecreaseResolution(input_state, current_restrictions); |
|
2111 } |
|
2112 case DegradationPreference::MAINTAIN_RESOLUTION: { |
|
2113 return DecreaseFramerate(input_state, current_restrictions); |
1234 } |
2114 } |
1235 case DegradationPreference::DISABLED: |
2115 case DegradationPreference::DISABLED: |
1236 return Adaptation::Status::kAdaptationDisabled; |
2116 return Adaptation::Status::kAdaptationDisabled; |
1237 + default: |
2117 + default: |
1238 + RTC_NOTREACHED(); |
2118 + RTC_NOTREACHED(); |
1239 + return Adaptation::Status::kAdaptationDisabled; |
2119 + return Adaptation::Status::kAdaptationDisabled; |
1240 } |
2120 } |
1241 } |
2121 } |
1242 |
2122 |
1243 @@ -599,6 +608,8 @@ Adaptation VideoStreamAdapter::GetAdaptD |
2123 VideoStreamAdapter::RestrictionsOrState VideoStreamAdapter::DecreaseResolution( |
|
2124 const VideoStreamInputState& input_state, |
|
2125 const RestrictionsWithCounters& current_restrictions) { |
|
2126 int target_pixels = |
|
2127 GetLowerResolutionThan(input_state.frame_size_pixels().value()); |
|
2128 @@ -594,16 +603,18 @@ Adaptation VideoStreamAdapter::GetAdaptD |
|
2129 case DegradationPreference::MAINTAIN_FRAMERATE: |
|
2130 return GetAdaptationDown(); |
|
2131 case DegradationPreference::BALANCED: { |
|
2132 return RestrictionsOrStateToAdaptation( |
|
2133 GetAdaptDownResolutionStepForBalanced(input_state), input_state); |
1244 } |
2134 } |
1245 default: |
2135 default: |
1246 RTC_NOTREACHED(); |
2136 RTC_NOTREACHED(); |
1247 + return RestrictionsOrStateToAdaptation( |
2137 + return RestrictionsOrStateToAdaptation( |
1248 + Adaptation::Status::kAdaptationDisabled, input_state); |
2138 + Adaptation::Status::kAdaptationDisabled, input_state); |
1249 } |
2139 } |
1250 } |
2140 } |
1251 |
2141 |
1252 Index: firefox-102.0/third_party/libwebrtc/call/simulated_network.cc |
2142 VideoStreamAdapter::RestrictionsOrState |
1253 =================================================================== |
2143 VideoStreamAdapter::GetAdaptDownResolutionStepForBalanced( |
1254 --- firefox-102.0.orig/third_party/libwebrtc/call/simulated_network.cc |
2144 const VideoStreamInputState& input_state) const { |
1255 +++ firefox-102.0/third_party/libwebrtc/call/simulated_network.cc |
2145 // Adapt twice if the first adaptation did not decrease resolution. |
1256 @@ -77,6 +77,8 @@ bool CoDelSimulation::DropDequeuedPacket |
2146 auto first_step = GetAdaptationDownStep(input_state, current_restrictions_); |
|
2147 diff --git a/third_party/libwebrtc/call/simulated_network.cc b/third_party/libwebrtc/call/simulated_network.cc |
|
2148 --- a/third_party/libwebrtc/call/simulated_network.cc |
|
2149 +++ b/third_party/libwebrtc/call/simulated_network.cc |
|
2150 @@ -72,16 +72,18 @@ bool CoDelSimulation::DropDequeuedPacket |
|
2151 if (queue_size - packet_size < kMaxPacketSize) |
|
2152 state_ = kPending; |
|
2153 last_drop_at_ = next_drop_at; |
|
2154 ++drop_count_; |
|
2155 return true; |
1257 } |
2156 } |
1258 return false; |
2157 return false; |
1259 } |
2158 } |
1260 + RTC_NOTREACHED(); |
2159 + RTC_NOTREACHED(); |
1261 + return false; |
2160 + return false; |
1262 } |
2161 } |
1263 |
2162 |
1264 SimulatedNetwork::SimulatedNetwork(Config config, uint64_t random_seed) |
2163 SimulatedNetwork::SimulatedNetwork(Config config, uint64_t random_seed) |
1265 Index: firefox-102.0/third_party/libwebrtc/call/video_send_stream.cc |
2164 : random_(random_seed), bursting_(false) { |
1266 =================================================================== |
2165 SetConfig(config); |
1267 --- firefox-102.0.orig/third_party/libwebrtc/call/video_send_stream.cc |
2166 } |
1268 +++ firefox-102.0/third_party/libwebrtc/call/video_send_stream.cc |
2167 |
1269 @@ -27,6 +27,9 @@ const char* StreamTypeToString(VideoSend |
2168 SimulatedNetwork::~SimulatedNetwork() = default; |
|
2169 diff --git a/third_party/libwebrtc/call/video_send_stream.cc b/third_party/libwebrtc/call/video_send_stream.cc |
|
2170 --- a/third_party/libwebrtc/call/video_send_stream.cc |
|
2171 +++ b/third_party/libwebrtc/call/video_send_stream.cc |
|
2172 @@ -22,16 +22,19 @@ namespace { |
|
2173 const char* StreamTypeToString(VideoSendStream::StreamStats::StreamType type) { |
|
2174 switch (type) { |
|
2175 case VideoSendStream::StreamStats::StreamType::kMedia: |
|
2176 return "media"; |
|
2177 case VideoSendStream::StreamStats::StreamType::kRtx: |
1270 return "rtx"; |
2178 return "rtx"; |
1271 case VideoSendStream::StreamStats::StreamType::kFlexfec: |
2179 case VideoSendStream::StreamStats::StreamType::kFlexfec: |
1272 return "flexfec"; |
2180 return "flexfec"; |
1273 + default: |
2181 + default: |
1274 + RTC_NOTREACHED(); |
2182 + RTC_NOTREACHED(); |
1275 + return ""; |
2183 + return ""; |
1276 } |
2184 } |
1277 } |
2185 } |
1278 |
2186 |
1279 Index: firefox-102.0/third_party/libwebrtc/modules/audio_coding/neteq/decision_logic.cc |
2187 } // namespace |
1280 =================================================================== |
2188 |
1281 --- firefox-102.0.orig/third_party/libwebrtc/modules/audio_coding/neteq/decision_logic.cc |
2189 VideoSendStream::StreamStats::StreamStats() = default; |
1282 +++ firefox-102.0/third_party/libwebrtc/modules/audio_coding/neteq/decision_logic.cc |
2190 VideoSendStream::StreamStats::~StreamStats() = default; |
1283 @@ -352,7 +352,7 @@ NetEq::Operation DecisionLogic::FuturePa |
2191 |
|
2192 diff --git a/third_party/libwebrtc/modules/audio_coding/neteq/decision_logic.cc b/third_party/libwebrtc/modules/audio_coding/neteq/decision_logic.cc |
|
2193 --- a/third_party/libwebrtc/modules/audio_coding/neteq/decision_logic.cc |
|
2194 +++ b/third_party/libwebrtc/modules/audio_coding/neteq/decision_logic.cc |
|
2195 @@ -347,17 +347,17 @@ NetEq::Operation DecisionLogic::FuturePa |
|
2196 return NetEq::Operation::kNormal; |
|
2197 } |
|
2198 |
|
2199 // If previous was comfort noise, then no merge is needed. |
|
2200 if (prev_mode == NetEq::Mode::kRfc3389Cng || |
1284 prev_mode == NetEq::Mode::kCodecInternalCng) { |
2201 prev_mode == NetEq::Mode::kCodecInternalCng) { |
1285 size_t cur_size_samples = |
2202 size_t cur_size_samples = |
1286 estimate_dtx_delay_ |
2203 estimate_dtx_delay_ |
1287 - ? cur_size_samples = span_samples_in_packet_buffer |
2204 - ? cur_size_samples = span_samples_in_packet_buffer |
1288 + ? span_samples_in_packet_buffer |
2205 + ? span_samples_in_packet_buffer |
1289 : num_packets_in_packet_buffer * decoder_frame_length; |
2206 : num_packets_in_packet_buffer * decoder_frame_length; |
1290 // Target level is in number of packets in Q8. |
2207 // Target level is in number of packets in Q8. |
1291 const size_t target_level_samples = |
2208 const size_t target_level_samples = |
1292 Index: firefox-102.0/third_party/libwebrtc/modules/audio_processing/audio_processing_impl.cc |
2209 (delay_manager_->TargetLevel() * packet_length_samples_) >> 8; |
1293 =================================================================== |
2210 const bool generated_enough_noise = |
1294 --- firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/audio_processing_impl.cc |
2211 static_cast<uint32_t>(generated_noise_samples + target_timestamp) >= |
1295 +++ firefox-102.0/third_party/libwebrtc/modules/audio_processing/audio_processing_impl.cc |
2212 available_timestamp; |
1296 @@ -113,6 +113,9 @@ GainControl::Mode Agc1ConfigModeToInterf |
2213 |
|
2214 diff --git a/third_party/libwebrtc/modules/audio_processing/audio_processing_impl.cc b/third_party/libwebrtc/modules/audio_processing/audio_processing_impl.cc |
|
2215 --- a/third_party/libwebrtc/modules/audio_processing/audio_processing_impl.cc |
|
2216 +++ b/third_party/libwebrtc/modules/audio_processing/audio_processing_impl.cc |
|
2217 @@ -108,16 +108,19 @@ GainControl::Mode Agc1ConfigModeToInterf |
|
2218 using Agc1Config = AudioProcessing::Config::GainController1; |
|
2219 switch (mode) { |
|
2220 case Agc1Config::kAdaptiveAnalog: |
|
2221 return GainControl::kAdaptiveAnalog; |
|
2222 case Agc1Config::kAdaptiveDigital: |
1297 return GainControl::kAdaptiveDigital; |
2223 return GainControl::kAdaptiveDigital; |
1298 case Agc1Config::kFixedDigital: |
2224 case Agc1Config::kFixedDigital: |
1299 return GainControl::kFixedDigital; |
2225 return GainControl::kFixedDigital; |
1300 + default: |
2226 + default: |
1301 + RTC_NOTREACHED(); |
2227 + RTC_NOTREACHED(); |
1302 + return GainControl::kAdaptiveAnalog; |
2228 + return GainControl::kAdaptiveAnalog; |
1303 } |
2229 } |
1304 } |
2230 } |
1305 |
2231 |
1306 @@ -1852,6 +1855,7 @@ void AudioProcessingImpl::InitializeNois |
2232 // Maximum lengths that frame of samples being passed from the render side to |
|
2233 // the capture side can have (does not apply to AEC3). |
|
2234 static const size_t kMaxAllowedValuesOfSamplesPerBand = 160; |
|
2235 static const size_t kMaxAllowedValuesOfSamplesPerFrame = 480; |
|
2236 |
|
2237 @@ -1847,16 +1850,17 @@ void AudioProcessingImpl::InitializeNois |
|
2238 case NoiseSuppresionConfig::kModerate: |
|
2239 return NsConfig::SuppressionLevel::k12dB; |
|
2240 case NoiseSuppresionConfig::kHigh: |
|
2241 return NsConfig::SuppressionLevel::k18dB; |
|
2242 case NoiseSuppresionConfig::kVeryHigh: |
1307 return NsConfig::SuppressionLevel::k21dB; |
2243 return NsConfig::SuppressionLevel::k21dB; |
1308 default: |
2244 default: |
1309 RTC_NOTREACHED(); |
2245 RTC_NOTREACHED(); |
1310 + return NsConfig::SuppressionLevel::k6dB; |
2246 + return NsConfig::SuppressionLevel::k6dB; |
1311 } |
2247 } |
1312 }; |
2248 }; |
1313 |
2249 |
1314 Index: firefox-102.0/third_party/libwebrtc/modules/audio_processing/include/audio_processing.cc |
2250 NsConfig cfg; |
1315 =================================================================== |
2251 cfg.target_level = map_level(config_.noise_suppression.level); |
1316 --- firefox-102.0.orig/third_party/libwebrtc/modules/audio_processing/include/audio_processing.cc |
2252 submodules_.noise_suppressor = std::make_unique<NoiseSuppressor>( |
1317 +++ firefox-102.0/third_party/libwebrtc/modules/audio_processing/include/audio_processing.cc |
2253 cfg, proc_sample_rate_hz(), num_proc_channels()); |
1318 @@ -27,6 +27,9 @@ std::string NoiseSuppressionLevelToStrin |
2254 } |
|
2255 diff --git a/third_party/libwebrtc/modules/audio_processing/include/audio_processing.cc b/third_party/libwebrtc/modules/audio_processing/include/audio_processing.cc |
|
2256 --- a/third_party/libwebrtc/modules/audio_processing/include/audio_processing.cc |
|
2257 +++ b/third_party/libwebrtc/modules/audio_processing/include/audio_processing.cc |
|
2258 @@ -22,38 +22,47 @@ std::string NoiseSuppressionLevelToStrin |
|
2259 case AudioProcessing::Config::NoiseSuppression::Level::kLow: |
|
2260 return "Low"; |
|
2261 case AudioProcessing::Config::NoiseSuppression::Level::kModerate: |
|
2262 return "Moderate"; |
|
2263 case AudioProcessing::Config::NoiseSuppression::Level::kHigh: |
1319 return "High"; |
2264 return "High"; |
1320 case AudioProcessing::Config::NoiseSuppression::Level::kVeryHigh: |
2265 case AudioProcessing::Config::NoiseSuppression::Level::kVeryHigh: |
1321 return "VeryHigh"; |
2266 return "VeryHigh"; |
1322 + default: |
2267 + default: |
1323 + RTC_NOTREACHED(); |
2268 + RTC_NOTREACHED(); |
1324 + return ""; |
2269 + return ""; |
1325 } |
2270 } |
1326 } |
2271 } |
1327 |
2272 |
1328 @@ -39,6 +42,9 @@ std::string GainController1ModeToString( |
2273 std::string GainController1ModeToString( |
|
2274 const AudioProcessing::Config::GainController1::Mode& mode) { |
|
2275 switch (mode) { |
|
2276 case AudioProcessing::Config::GainController1::Mode::kAdaptiveAnalog: |
|
2277 return "AdaptiveAnalog"; |
|
2278 case AudioProcessing::Config::GainController1::Mode::kAdaptiveDigital: |
1329 return "AdaptiveDigital"; |
2279 return "AdaptiveDigital"; |
1330 case AudioProcessing::Config::GainController1::Mode::kFixedDigital: |
2280 case AudioProcessing::Config::GainController1::Mode::kFixedDigital: |
1331 return "FixedDigital"; |
2281 return "FixedDigital"; |
1332 + default: |
2282 + default: |
1333 + RTC_NOTREACHED(); |
2283 + RTC_NOTREACHED(); |
1334 + return ""; |
2284 + return ""; |
1335 } |
2285 } |
1336 } |
2286 } |
1337 |
2287 |
1338 @@ -49,6 +55,9 @@ std::string GainController2LevelEstimato |
2288 std::string GainController2LevelEstimatorToString( |
|
2289 const AudioProcessing::Config::GainController2::LevelEstimator& level) { |
|
2290 switch (level) { |
|
2291 case AudioProcessing::Config::GainController2::LevelEstimator::kRms: |
1339 return "Rms"; |
2292 return "Rms"; |
1340 case AudioProcessing::Config::GainController2::LevelEstimator::kPeak: |
2293 case AudioProcessing::Config::GainController2::LevelEstimator::kPeak: |
1341 return "Peak"; |
2294 return "Peak"; |
1342 + default: |
2295 + default: |
1343 + RTC_NOTREACHED(); |
2296 + RTC_NOTREACHED(); |
1344 + return ""; |
2297 + return ""; |
1345 } |
2298 } |
1346 } |
2299 } |
1347 |
2300 |
1348 Index: firefox-102.0/third_party/libwebrtc/modules/pacing/pacing_controller.cc |
2301 int GetDefaultMaxInternalRate() { |
1349 =================================================================== |
2302 #ifdef WEBRTC_ARCH_ARM_FAMILY |
1350 --- firefox-102.0.orig/third_party/libwebrtc/modules/pacing/pacing_controller.cc |
2303 return 32000; |
1351 +++ firefox-102.0/third_party/libwebrtc/modules/pacing/pacing_controller.cc |
2304 #else |
1352 @@ -83,6 +83,9 @@ int GetPriorityForType(RtpPacketMediaTyp |
2305 return 48000; |
|
2306 diff --git a/third_party/libwebrtc/modules/pacing/pacing_controller.cc b/third_party/libwebrtc/modules/pacing/pacing_controller.cc |
|
2307 --- a/third_party/libwebrtc/modules/pacing/pacing_controller.cc |
|
2308 +++ b/third_party/libwebrtc/modules/pacing/pacing_controller.cc |
|
2309 @@ -78,16 +78,19 @@ int GetPriorityForType(RtpPacketMediaTyp |
|
2310 // Video has "normal" priority, in the old speak. |
|
2311 // Send redundancy concurrently to video. If it is delayed it might have a |
|
2312 // lower chance of being useful. |
|
2313 return kFirstPriority + 3; |
|
2314 case RtpPacketMediaType::kPadding: |
1353 // Packets that are in themselves likely useless, only sent to keep the |
2315 // Packets that are in themselves likely useless, only sent to keep the |
1354 // BWE high. |
2316 // BWE high. |
1355 return kFirstPriority + 4; |
2317 return kFirstPriority + 4; |
1356 + default: |
2318 + default: |
1357 + RTC_NOTREACHED(); |
2319 + RTC_NOTREACHED(); |
1358 + return -1; |
2320 + return -1; |
1359 } |
2321 } |
1360 } |
2322 } |
1361 |
2323 |
1362 Index: firefox-102.0/third_party/libwebrtc/modules/rtp_rtcp/source/create_video_rtp_depacketizer.cc |
2324 } // namespace |
1363 =================================================================== |
2325 |
1364 --- firefox-102.0.orig/third_party/libwebrtc/modules/rtp_rtcp/source/create_video_rtp_depacketizer.cc |
2326 const TimeDelta PacingController::kMaxExpectedQueueLength = |
1365 +++ firefox-102.0/third_party/libwebrtc/modules/rtp_rtcp/source/create_video_rtp_depacketizer.cc |
2327 TimeDelta::Millis(2000); |
1366 @@ -36,6 +36,9 @@ std::unique_ptr<VideoRtpDepacketizer> Cr |
2328 const float PacingController::kDefaultPaceMultiplier = 2.5f; |
|
2329 diff --git a/third_party/libwebrtc/modules/rtp_rtcp/source/create_video_rtp_depacketizer.cc b/third_party/libwebrtc/modules/rtp_rtcp/source/create_video_rtp_depacketizer.cc |
|
2330 --- a/third_party/libwebrtc/modules/rtp_rtcp/source/create_video_rtp_depacketizer.cc |
|
2331 +++ b/third_party/libwebrtc/modules/rtp_rtcp/source/create_video_rtp_depacketizer.cc |
|
2332 @@ -31,12 +31,15 @@ std::unique_ptr<VideoRtpDepacketizer> Cr |
|
2333 return std::make_unique<VideoRtpDepacketizerVp8>(); |
|
2334 case kVideoCodecVP9: |
|
2335 return std::make_unique<VideoRtpDepacketizerVp9>(); |
|
2336 case kVideoCodecAV1: |
|
2337 return std::make_unique<VideoRtpDepacketizerAv1>(); |
1367 case kVideoCodecGeneric: |
2338 case kVideoCodecGeneric: |
1368 case kVideoCodecMultiplex: |
2339 case kVideoCodecMultiplex: |
1369 return std::make_unique<VideoRtpDepacketizerGeneric>(); |
2340 return std::make_unique<VideoRtpDepacketizerGeneric>(); |
1370 + default: |
2341 + default: |
1371 + RTC_NOTREACHED(); |
2342 + RTC_NOTREACHED(); |
1372 + return nullptr; |
2343 + return nullptr; |
1373 } |
2344 } |
1374 } |
2345 } |
1375 |
2346 |
1376 Index: firefox-102.0/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender.cc |
2347 } // namespace webrtc |
1377 =================================================================== |
2348 diff --git a/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender.cc b/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender.cc |
1378 --- firefox-102.0.orig/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender.cc |
2349 --- a/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender.cc |
1379 +++ firefox-102.0/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender.cc |
2350 +++ b/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender.cc |
1380 @@ -130,6 +130,9 @@ bool IsNonVolatile(RTPExtensionType type |
2351 @@ -125,16 +125,19 @@ bool IsNonVolatile(RTPExtensionType type |
|
2352 case kRtpExtensionNone: |
|
2353 case kRtpExtensionNumberOfExtensions: |
|
2354 RTC_NOTREACHED(); |
|
2355 return false; |
|
2356 case kRtpExtensionCsrcAudioLevel: |
1381 // TODO: Mozilla implement for CsrcAudioLevel |
2357 // TODO: Mozilla implement for CsrcAudioLevel |
1382 RTC_CHECK(false); |
2358 RTC_CHECK(false); |
1383 return false; |
2359 return false; |
1384 + default: |
2360 + default: |
1385 + RTC_NOTREACHED(); |
2361 + RTC_NOTREACHED(); |
1386 + return false; |
2362 + return false; |
1387 } |
2363 } |
1388 } |
2364 } |
1389 |
2365 |
1390 Index: firefox-102.0/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender_audio.cc |
2366 bool HasBweExtension(const RtpHeaderExtensionMap& extensions_map) { |
1391 =================================================================== |
2367 return extensions_map.IsRegistered(kRtpExtensionTransportSequenceNumber) || |
1392 --- firefox-102.0.orig/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender_audio.cc |
2368 extensions_map.IsRegistered(kRtpExtensionTransportSequenceNumber02) || |
1393 +++ firefox-102.0/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender_audio.cc |
2369 extensions_map.IsRegistered(kRtpExtensionAbsoluteSendTime) || |
1394 @@ -45,6 +45,9 @@ const char* FrameTypeToString(AudioFrame |
2370 extensions_map.IsRegistered(kRtpExtensionTransmissionTimeOffset); |
|
2371 diff --git a/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender_audio.cc b/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender_audio.cc |
|
2372 --- a/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender_audio.cc |
|
2373 +++ b/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender_audio.cc |
|
2374 @@ -40,16 +40,19 @@ namespace { |
|
2375 const char* FrameTypeToString(AudioFrameType frame_type) { |
|
2376 switch (frame_type) { |
|
2377 case AudioFrameType::kEmptyFrame: |
|
2378 return "empty"; |
|
2379 case AudioFrameType::kAudioFrameSpeech: |
1395 return "audio_speech"; |
2380 return "audio_speech"; |
1396 case AudioFrameType::kAudioFrameCN: |
2381 case AudioFrameType::kAudioFrameCN: |
1397 return "audio_cn"; |
2382 return "audio_cn"; |
1398 + default: |
2383 + default: |
1399 + RTC_NOTREACHED(); |
2384 + RTC_NOTREACHED(); |
1400 + return ""; |
2385 + return ""; |
1401 } |
2386 } |
1402 } |
2387 } |
1403 #endif |
2388 #endif |
1404 Index: firefox-102.0/third_party/libwebrtc/modules/video_coding/codecs/vp8/temporal_layers_checker.cc |
2389 |
1405 =================================================================== |
2390 constexpr char kIncludeCaptureClockOffset[] = |
1406 --- firefox-102.0.orig/third_party/libwebrtc/modules/video_coding/codecs/vp8/temporal_layers_checker.cc |
2391 "WebRTC-IncludeCaptureClockOffset"; |
1407 +++ firefox-102.0/third_party/libwebrtc/modules/video_coding/codecs/vp8/temporal_layers_checker.cc |
2392 |
1408 @@ -28,6 +28,9 @@ TemporalLayersChecker::CreateTemporalLay |
2393 } // namespace |
|
2394 diff --git a/third_party/libwebrtc/modules/video_coding/codecs/vp8/temporal_layers_checker.cc b/third_party/libwebrtc/modules/video_coding/codecs/vp8/temporal_layers_checker.cc |
|
2395 --- a/third_party/libwebrtc/modules/video_coding/codecs/vp8/temporal_layers_checker.cc |
|
2396 +++ b/third_party/libwebrtc/modules/video_coding/codecs/vp8/temporal_layers_checker.cc |
|
2397 @@ -23,16 +23,19 @@ TemporalLayersChecker::CreateTemporalLay |
|
2398 int num_temporal_layers) { |
|
2399 switch (type) { |
|
2400 case Vp8TemporalLayersType::kFixedPattern: |
|
2401 return std::make_unique<DefaultTemporalLayersChecker>( |
|
2402 num_temporal_layers); |
1409 case Vp8TemporalLayersType::kBitrateDynamic: |
2403 case Vp8TemporalLayersType::kBitrateDynamic: |
1410 // Conference mode temporal layering for screen content in base stream. |
2404 // Conference mode temporal layering for screen content in base stream. |
1411 return std::make_unique<TemporalLayersChecker>(num_temporal_layers); |
2405 return std::make_unique<TemporalLayersChecker>(num_temporal_layers); |
1412 + default: |
2406 + default: |
1413 + RTC_NOTREACHED(); |
2407 + RTC_NOTREACHED(); |
1414 + return nullptr; |
2408 + return nullptr; |
1415 } |
2409 } |
1416 } |
2410 } |
1417 |
2411 |
1418 Index: firefox-102.0/third_party/libwebrtc/video/adaptation/video_stream_encoder_resource_manager.cc |
2412 TemporalLayersChecker::TemporalLayersChecker(int num_temporal_layers) |
1419 =================================================================== |
2413 : num_temporal_layers_(num_temporal_layers), |
1420 --- firefox-102.0.orig/third_party/libwebrtc/video/adaptation/video_stream_encoder_resource_manager.cc |
2414 sequence_number_(0), |
1421 +++ firefox-102.0/third_party/libwebrtc/video/adaptation/video_stream_encoder_resource_manager.cc |
2415 last_sync_sequence_number_(0), |
1422 @@ -54,6 +54,9 @@ std::string ToString(VideoAdaptationReas |
2416 last_tl0_sequence_number_(0) {} |
|
2417 diff --git a/third_party/libwebrtc/video/adaptation/video_stream_encoder_resource_manager.cc b/third_party/libwebrtc/video/adaptation/video_stream_encoder_resource_manager.cc |
|
2418 --- a/third_party/libwebrtc/video/adaptation/video_stream_encoder_resource_manager.cc |
|
2419 +++ b/third_party/libwebrtc/video/adaptation/video_stream_encoder_resource_manager.cc |
|
2420 @@ -49,16 +49,19 @@ bool IsFramerateScalingEnabled(Degradati |
|
2421 } |
|
2422 |
|
2423 std::string ToString(VideoAdaptationReason reason) { |
|
2424 switch (reason) { |
|
2425 case VideoAdaptationReason::kQuality: |
1423 return "quality"; |
2426 return "quality"; |
1424 case VideoAdaptationReason::kCpu: |
2427 case VideoAdaptationReason::kCpu: |
1425 return "cpu"; |
2428 return "cpu"; |
1426 + default: |
2429 + default: |
1427 + RTC_NOTREACHED(); |
2430 + RTC_NOTREACHED(); |
1428 + return ""; |
2431 + return ""; |
1429 } |
2432 } |
1430 } |
2433 } |
1431 |
2434 |
1432 Index: firefox-102.0/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ast_to_hir.cpp |
2435 } // namespace |
1433 =================================================================== |
2436 |
1434 --- firefox-102.0.orig/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ast_to_hir.cpp |
2437 class VideoStreamEncoderResourceManager::InitialFrameDropper { |
1435 +++ firefox-102.0/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ast_to_hir.cpp |
2438 public: |
1436 @@ -2651,6 +2651,7 @@ get_type_name_for_precision_qualifier(co |
2439 explicit InitialFrameDropper( |
|
2440 diff --git a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ast_to_hir.cpp b/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ast_to_hir.cpp |
|
2441 --- a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ast_to_hir.cpp |
|
2442 +++ b/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ast_to_hir.cpp |
|
2443 @@ -2646,16 +2646,17 @@ get_type_name_for_precision_qualifier(co |
|
2444 unreachable("Unsupported sampler/image type"); |
|
2445 } /* sampler/image type */ |
|
2446 break; |
|
2447 } /* GLSL_TYPE_SAMPLER/GLSL_TYPE_IMAGE */ |
|
2448 break; |
1437 default: |
2449 default: |
1438 unreachable("Unsupported type"); |
2450 unreachable("Unsupported type"); |
1439 } /* base type */ |
2451 } /* base type */ |
1440 + return ""; |
2452 + return ""; |
1441 } |
2453 } |
1442 |
2454 |
1443 static unsigned |
2455 static unsigned |
1444 Index: firefox-102.0/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ir.cpp |
2456 select_gles_precision(unsigned qual_precision, |
1445 =================================================================== |
2457 const glsl_type *type, |
1446 --- firefox-102.0.orig/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ir.cpp |
2458 struct _mesa_glsl_parse_state *state, YYLTYPE *loc) |
1447 +++ firefox-102.0/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ir.cpp |
2459 { |
1448 @@ -624,6 +624,7 @@ ir_expression::get_num_operands(ir_expre |
2460 /* Precision qualifiers do not have any meaning in Desktop GLSL. |
|
2461 diff --git a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ir.cpp b/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ir.cpp |
|
2462 --- a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ir.cpp |
|
2463 +++ b/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ir.cpp |
|
2464 @@ -619,16 +619,17 @@ ir_expression::get_num_operands(ir_expre |
|
2465 |
|
2466 if (op <= ir_last_triop) |
|
2467 return 3; |
|
2468 |
|
2469 if (op <= ir_last_quadop) |
1449 return 4; |
2470 return 4; |
1450 |
2471 |
1451 unreachable("Could not calculate number of operands"); |
2472 unreachable("Could not calculate number of operands"); |
1452 + return -1; |
2473 + return -1; |
1453 } |
2474 } |
1454 |
2475 |
1455 #include "ir_expression_operation_strings.h" |
2476 #include "ir_expression_operation_strings.h" |
1456 Index: firefox-102.0/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/loop_analysis.cpp |
2477 |
1457 =================================================================== |
2478 const char* |
1458 --- firefox-102.0.orig/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/loop_analysis.cpp |
2479 depth_layout_string(ir_depth_layout layout) |
1459 +++ firefox-102.0/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/loop_analysis.cpp |
2480 { |
1460 @@ -239,6 +239,7 @@ incremented_before_terminator(ir_loop *l |
2481 switch(layout) { |
|
2482 diff --git a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/loop_analysis.cpp b/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/loop_analysis.cpp |
|
2483 --- a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/loop_analysis.cpp |
|
2484 +++ b/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/loop_analysis.cpp |
|
2485 @@ -234,16 +234,17 @@ incremented_before_terminator(ir_loop *l |
|
2486 } |
|
2487 |
|
2488 default: |
|
2489 break; |
|
2490 } |
1461 } |
2491 } |
1462 |
2492 |
1463 unreachable("Unable to find induction variable"); |
2493 unreachable("Unable to find induction variable"); |
1464 + return false; |
2494 + return false; |
1465 } |
2495 } |
1466 |
2496 |
1467 /** |
2497 /** |
1468 Index: firefox-102.0/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/opt_vectorize.cpp |
2498 * Record the fact that the given loop variable was referenced inside the loop. |
1469 =================================================================== |
2499 * |
1470 --- firefox-102.0.orig/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/opt_vectorize.cpp |
2500 * \arg in_assignee is true if the reference was on the LHS of an assignment. |
1471 +++ firefox-102.0/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/opt_vectorize.cpp |
2501 * |
1472 @@ -229,6 +229,7 @@ write_mask_to_swizzle(unsigned write_mas |
2502 * \arg in_conditional_code_or_nested_loop is true if the reference occurred |
|
2503 diff --git a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/opt_vectorize.cpp b/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/opt_vectorize.cpp |
|
2504 --- a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/opt_vectorize.cpp |
|
2505 +++ b/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/opt_vectorize.cpp |
|
2506 @@ -224,16 +224,17 @@ write_mask_to_swizzle(unsigned write_mas |
|
2507 { |
|
2508 switch (write_mask) { |
|
2509 case WRITEMASK_X: return SWIZZLE_X; |
|
2510 case WRITEMASK_Y: return SWIZZLE_Y; |
|
2511 case WRITEMASK_Z: return SWIZZLE_Z; |
1473 case WRITEMASK_W: return SWIZZLE_W; |
2512 case WRITEMASK_W: return SWIZZLE_W; |
1474 } |
2513 } |
1475 unreachable("not reached"); |
2514 unreachable("not reached"); |
1476 + return 0; |
2515 + return 0; |
1477 } |
2516 } |
1478 |
2517 |
1479 /** |
2518 /** |
1480 Index: firefox-102.0/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl_types.cpp |
2519 * Returns whether a single-channeled write mask matches a swizzle. |
1481 =================================================================== |
2520 */ |
1482 --- firefox-102.0.orig/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl_types.cpp |
2521 static bool |
1483 +++ firefox-102.0/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl_types.cpp |
2522 write_mask_matches_swizzle(unsigned write_mask, |
1484 @@ -460,6 +460,7 @@ const glsl_type *glsl_type::get_bare_typ |
2523 const ir_swizzle *swz) |
|
2524 diff --git a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl_types.cpp b/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl_types.cpp |
|
2525 --- a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl_types.cpp |
|
2526 +++ b/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl_types.cpp |
|
2527 @@ -455,16 +455,17 @@ const glsl_type *glsl_type::get_bare_typ |
|
2528 case GLSL_TYPE_VOID: |
|
2529 case GLSL_TYPE_SUBROUTINE: |
|
2530 case GLSL_TYPE_FUNCTION: |
|
2531 case GLSL_TYPE_ERROR: |
|
2532 return this; |
1485 } |
2533 } |
1486 |
2534 |
1487 unreachable("Invalid base type"); |
2535 unreachable("Invalid base type"); |
1488 + return nullptr; |
2536 + return nullptr; |
1489 } |
2537 } |
1490 |
2538 |
1491 const glsl_type *glsl_type::get_float16_type() const |
2539 const glsl_type *glsl_type::get_float16_type() const |
1492 @@ -2016,6 +2017,7 @@ glsl_type::get_explicit_std140_type(bool |
2540 { |
|
2541 assert(this->base_type == GLSL_TYPE_FLOAT); |
|
2542 |
|
2543 return get_instance(GLSL_TYPE_FLOAT16, |
|
2544 this->vector_elements, |
|
2545 @@ -2011,16 +2012,17 @@ glsl_type::get_explicit_std140_type(bool |
|
2546 (enum glsl_interface_packing)this->interface_packing, |
|
2547 this->interface_row_major, |
|
2548 this->name); |
|
2549 |
|
2550 delete[] fields; |
1493 return type; |
2551 return type; |
1494 } else { |
2552 } else { |
1495 unreachable("Invalid type for UBO or SSBO"); |
2553 unreachable("Invalid type for UBO or SSBO"); |
1496 + return nullptr; |
2554 + return nullptr; |
1497 } |
2555 } |
1498 } |
2556 } |
1499 |
2557 |
1500 @@ -2374,6 +2376,7 @@ glsl_type::get_explicit_std430_type(bool |
2558 unsigned |
|
2559 glsl_type::std430_base_alignment(bool row_major) const |
|
2560 { |
|
2561 |
|
2562 unsigned N = is_64bit() ? 8 : 4; |
|
2563 @@ -2369,16 +2371,17 @@ glsl_type::get_explicit_std430_type(bool |
|
2564 (enum glsl_interface_packing)this->interface_packing, |
|
2565 this->interface_row_major, |
|
2566 this->name); |
|
2567 |
|
2568 delete[] fields; |
1501 return type; |
2569 return type; |
1502 } else { |
2570 } else { |
1503 unreachable("Invalid type for SSBO"); |
2571 unreachable("Invalid type for SSBO"); |
1504 + return nullptr; |
2572 + return nullptr; |
1505 } |
2573 } |
1506 } |
2574 } |
1507 |
2575 |
1508 @@ -2448,6 +2451,7 @@ glsl_type::get_explicit_type_for_size_al |
2576 const glsl_type * |
|
2577 glsl_type::get_explicit_interface_type(bool supports_std430) const |
|
2578 { |
|
2579 enum glsl_interface_packing packing = |
|
2580 this->get_internal_ifc_packing(supports_std430); |
|
2581 @@ -2443,16 +2446,17 @@ glsl_type::get_explicit_type_for_size_al |
|
2582 unsigned stride = align(col_size, col_align); |
|
2583 |
|
2584 *size = this->matrix_columns * stride; |
|
2585 *alignment = col_align; |
|
2586 return glsl_type::get_instance(this->base_type, this->vector_elements, |
1509 this->matrix_columns, stride, false); |
2587 this->matrix_columns, stride, false); |
1510 } else { |
2588 } else { |
1511 unreachable("Unhandled type."); |
2589 unreachable("Unhandled type."); |
1512 + return nullptr; |
2590 + return nullptr; |
1513 } |
2591 } |
1514 } |
2592 } |
1515 |
2593 |
1516 @@ -2948,6 +2952,7 @@ glsl_get_sampler_dim_coordinate_componen |
2594 unsigned |
|
2595 glsl_type::count_vec4_slots(bool is_gl_vertex_input, bool is_bindless) const |
|
2596 { |
|
2597 /* From page 31 (page 37 of the PDF) of the GLSL 1.50 spec: |
|
2598 * |
|
2599 @@ -2943,12 +2947,13 @@ glsl_get_sampler_dim_coordinate_componen |
|
2600 case GLSL_SAMPLER_DIM_SUBPASS: |
|
2601 case GLSL_SAMPLER_DIM_SUBPASS_MS: |
|
2602 return 2; |
|
2603 case GLSL_SAMPLER_DIM_3D: |
|
2604 case GLSL_SAMPLER_DIM_CUBE: |
1517 return 3; |
2605 return 3; |
1518 default: |
2606 default: |
1519 unreachable("Unknown sampler dim"); |
2607 unreachable("Unknown sampler dim"); |
1520 + return -1; |
2608 + return -1; |
1521 } |
2609 } |
1522 } |
2610 } |
1523 |
2611 |
1524 Index: firefox-102.0/third_party/rust/glslopt/glsl-optimizer/src/mesa/main/shaderobj.h |
2612 } |
1525 =================================================================== |
2613 diff --git a/third_party/rust/glslopt/glsl-optimizer/src/mesa/main/shaderobj.h b/third_party/rust/glslopt/glsl-optimizer/src/mesa/main/shaderobj.h |
1526 --- firefox-102.0.orig/third_party/rust/glslopt/glsl-optimizer/src/mesa/main/shaderobj.h |
2614 --- a/third_party/rust/glslopt/glsl-optimizer/src/mesa/main/shaderobj.h |
1527 +++ firefox-102.0/third_party/rust/glslopt/glsl-optimizer/src/mesa/main/shaderobj.h |
2615 +++ b/third_party/rust/glslopt/glsl-optimizer/src/mesa/main/shaderobj.h |
1528 @@ -185,6 +185,7 @@ _mesa_shader_stage_from_subroutine_unifo |
2616 @@ -180,16 +180,17 @@ static inline gl_shader_stage |
|
2617 case GL_COMPUTE_SUBROUTINE_UNIFORM: |
|
2618 return MESA_SHADER_COMPUTE; |
|
2619 case GL_TESS_CONTROL_SUBROUTINE_UNIFORM: |
|
2620 return MESA_SHADER_TESS_CTRL; |
|
2621 case GL_TESS_EVALUATION_SUBROUTINE_UNIFORM: |
1529 return MESA_SHADER_TESS_EVAL; |
2622 return MESA_SHADER_TESS_EVAL; |
1530 } |
2623 } |
1531 unreachable("not reached"); |
2624 unreachable("not reached"); |
1532 + return MESA_SHADER_NONE; |
2625 + return MESA_SHADER_NONE; |
1533 } |
2626 } |
1534 |
2627 |
1535 static inline gl_shader_stage |
2628 static inline gl_shader_stage |
1536 @@ -205,6 +206,7 @@ _mesa_shader_stage_from_subroutine(GLenu |
2629 _mesa_shader_stage_from_subroutine(GLenum subroutine) |
|
2630 { |
|
2631 switch (subroutine) { |
|
2632 case GL_VERTEX_SUBROUTINE: |
|
2633 return MESA_SHADER_VERTEX; |
|
2634 @@ -200,16 +201,17 @@ static inline gl_shader_stage |
|
2635 case GL_COMPUTE_SUBROUTINE: |
|
2636 return MESA_SHADER_COMPUTE; |
|
2637 case GL_TESS_CONTROL_SUBROUTINE: |
|
2638 return MESA_SHADER_TESS_CTRL; |
|
2639 case GL_TESS_EVALUATION_SUBROUTINE: |
1537 return MESA_SHADER_TESS_EVAL; |
2640 return MESA_SHADER_TESS_EVAL; |
1538 } |
2641 } |
1539 unreachable("not reached"); |
2642 unreachable("not reached"); |
1540 + return MESA_SHADER_NONE; |
2643 + return MESA_SHADER_NONE; |
1541 } |
2644 } |
1542 |
2645 |
1543 static inline GLenum |
2646 static inline GLenum |
1544 @@ -230,6 +232,7 @@ _mesa_shader_stage_to_subroutine(gl_shad |
2647 _mesa_shader_stage_to_subroutine(gl_shader_stage stage) |
|
2648 { |
|
2649 switch (stage) { |
|
2650 case MESA_SHADER_VERTEX: |
|
2651 return GL_VERTEX_SUBROUTINE; |
|
2652 @@ -225,16 +227,17 @@ static inline GLenum |
|
2653 return GL_TESS_EVALUATION_SUBROUTINE; |
|
2654 case MESA_SHADER_NONE: |
|
2655 break; |
|
2656 case MESA_SHADER_KERNEL: |
|
2657 unreachable("not reached"); |
1545 break; |
2658 break; |
1546 } |
2659 } |
1547 unreachable("not reached"); |
2660 unreachable("not reached"); |
1548 + return GL_VERTEX_PROGRAM_ARB; |
2661 + return GL_VERTEX_PROGRAM_ARB; |
1549 } |
2662 } |
1550 |
2663 |
1551 static inline GLenum |
2664 static inline GLenum |
1552 @@ -253,6 +256,7 @@ _mesa_shader_stage_to_subroutine_uniform |
2665 _mesa_shader_stage_to_subroutine_uniform(gl_shader_stage stage) |
|
2666 { |
|
2667 switch (stage) { |
|
2668 case MESA_SHADER_VERTEX: |
|
2669 return GL_VERTEX_SUBROUTINE_UNIFORM; |
|
2670 @@ -248,16 +251,17 @@ static inline GLenum |
|
2671 return GL_TESS_CONTROL_SUBROUTINE_UNIFORM; |
|
2672 case MESA_SHADER_TESS_EVAL: |
|
2673 return GL_TESS_EVALUATION_SUBROUTINE_UNIFORM; |
|
2674 case MESA_SHADER_NONE: |
|
2675 case MESA_SHADER_KERNEL: |
1553 break; |
2676 break; |
1554 } |
2677 } |
1555 unreachable("not reached"); |
2678 unreachable("not reached"); |
1556 + return GL_VERTEX_PROGRAM_ARB; |
2679 + return GL_VERTEX_PROGRAM_ARB; |
1557 } |
2680 } |
1558 |
2681 |
1559 extern bool |
2682 extern bool |
|
2683 _mesa_validate_pipeline_io(struct gl_pipeline_object *); |
|
2684 |
|
2685 #ifdef __cplusplus |
|
2686 } |
|
2687 #endif |