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