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