1164
|
1 |
# HG changeset patch
|
1194
|
2 |
# Parent f809af927a59e945c76f51c25b1044fb42748c24
|
1164
|
3 |
|
1193
|
4 |
diff --git a/gfx/skia/skia/include/codec/SkEncodedOrigin.h b/gfx/skia/skia/include/codec/SkEncodedOrigin.h
|
|
5 |
--- a/gfx/skia/skia/include/codec/SkEncodedOrigin.h
|
|
6 |
+++ b/gfx/skia/skia/include/codec/SkEncodedOrigin.h
|
|
7 |
@@ -36,16 +36,17 @@ static inline SkMatrix SkEncodedOriginTo
|
|
8 |
case kBottomRight_SkEncodedOrigin: return SkMatrix::MakeAll(-1, 0, w, 0, -1, h, 0, 0, 1);
|
|
9 |
case kBottomLeft_SkEncodedOrigin: return SkMatrix::MakeAll( 1, 0, 0, 0, -1, h, 0, 0, 1);
|
|
10 |
case kLeftTop_SkEncodedOrigin: return SkMatrix::MakeAll( 0, 1, 0, 1, 0, 0, 0, 0, 1);
|
|
11 |
case kRightTop_SkEncodedOrigin: return SkMatrix::MakeAll( 0, -1, w, 1, 0, 0, 0, 0, 1);
|
|
12 |
case kRightBottom_SkEncodedOrigin: return SkMatrix::MakeAll( 0, -1, w, -1, 0, h, 0, 0, 1);
|
1190
|
13 |
case kLeftBottom_SkEncodedOrigin: return SkMatrix::MakeAll( 0, 1, 0, -1, 0, h, 0, 0, 1);
|
1162
|
14 |
}
|
|
15 |
SK_ABORT("Unexpected origin");
|
|
16 |
+ SkUNREACHABLE;
|
|
17 |
}
|
|
18 |
|
1190
|
19 |
/**
|
1193
|
20 |
* Return true if the encoded origin includes a 90 degree rotation, in which case the width
|
|
21 |
* and height of the source data are swapped relative to a correctly oriented destination.
|
|
22 |
*/
|
|
23 |
static inline bool SkEncodedOriginSwapsWidthHeight(SkEncodedOrigin origin) {
|
|
24 |
return origin >= kLeftTop_SkEncodedOrigin;
|
|
25 |
diff --git a/gfx/skia/skia/include/private/gpu/ganesh/GrTypesPriv.h b/gfx/skia/skia/include/private/gpu/ganesh/GrTypesPriv.h
|
|
26 |
--- a/gfx/skia/skia/include/private/gpu/ganesh/GrTypesPriv.h
|
|
27 |
+++ b/gfx/skia/skia/include/private/gpu/ganesh/GrTypesPriv.h
|
|
28 |
@@ -320,16 +320,17 @@ static inline bool GrTextureTypeHasRestr
|
|
29 |
return false;
|
|
30 |
case GrTextureType::kRectangle:
|
|
31 |
return true;
|
|
32 |
case GrTextureType::kExternal:
|
|
33 |
return true;
|
1162
|
34 |
default:
|
|
35 |
SK_ABORT("Unexpected texture type");
|
|
36 |
}
|
|
37 |
+ SkUNREACHABLE;
|
|
38 |
}
|
|
39 |
|
1190
|
40 |
//////////////////////////////////////////////////////////////////////////////
|
1193
|
41 |
|
|
42 |
/**
|
|
43 |
* Types used to describe format of vertices in arrays.
|
|
44 |
*/
|
|
45 |
enum GrVertexAttribType {
|
|
46 |
diff --git a/gfx/skia/skia/src/core/SkDescriptor.cpp b/gfx/skia/skia/src/core/SkDescriptor.cpp
|
|
47 |
--- a/gfx/skia/skia/src/core/SkDescriptor.cpp
|
|
48 |
+++ b/gfx/skia/skia/src/core/SkDescriptor.cpp
|
|
49 |
@@ -21,16 +21,17 @@ std::unique_ptr<SkDescriptor> SkDescript
|
|
50 |
SkASSERT(length >= sizeof(SkDescriptor) && SkAlign4(length) == length);
|
|
51 |
void* allocation = ::operator new(length);
|
|
52 |
return std::unique_ptr<SkDescriptor>(new (allocation) SkDescriptor{});
|
|
53 |
}
|
|
54 |
|
1190
|
55 |
void SkDescriptor::operator delete(void* p) { ::operator delete(p); }
|
|
56 |
void* SkDescriptor::operator new(size_t) {
|
|
57 |
SK_ABORT("Descriptors are created with placement new.");
|
1162
|
58 |
+ SkUNREACHABLE;
|
|
59 |
}
|
|
60 |
|
1190
|
61 |
void SkDescriptor::flatten(SkWriteBuffer& buffer) const {
|
1193
|
62 |
buffer.writePad32(static_cast<const void*>(this), this->fLength);
|
|
63 |
}
|
|
64 |
|
|
65 |
void* SkDescriptor::addEntry(uint32_t tag, size_t length, const void* data) {
|
|
66 |
SkASSERT(tag);
|
|
67 |
diff --git a/gfx/skia/skia/src/core/SkGeometry.h b/gfx/skia/skia/src/core/SkGeometry.h
|
|
68 |
--- a/gfx/skia/skia/src/core/SkGeometry.h
|
|
69 |
+++ b/gfx/skia/skia/src/core/SkGeometry.h
|
|
70 |
@@ -276,28 +276,30 @@ static inline bool SkCubicIsDegenerate(S
|
|
71 |
case SkCubicType::kLocalCusp:
|
|
72 |
case SkCubicType::kCuspAtInfinity:
|
|
73 |
return false;
|
|
74 |
case SkCubicType::kQuadratic:
|
|
75 |
case SkCubicType::kLineOrPoint:
|
1162
|
76 |
return true;
|
|
77 |
}
|
|
78 |
SK_ABORT("Invalid SkCubicType");
|
|
79 |
+ SkUNREACHABLE;
|
|
80 |
}
|
|
81 |
|
|
82 |
static inline const char* SkCubicTypeName(SkCubicType type) {
|
1193
|
83 |
switch (type) {
|
|
84 |
case SkCubicType::kSerpentine: return "kSerpentine";
|
|
85 |
case SkCubicType::kLoop: return "kLoop";
|
|
86 |
case SkCubicType::kLocalCusp: return "kLocalCusp";
|
|
87 |
case SkCubicType::kCuspAtInfinity: return "kCuspAtInfinity";
|
|
88 |
case SkCubicType::kQuadratic: return "kQuadratic";
|
1162
|
89 |
case SkCubicType::kLineOrPoint: return "kLineOrPoint";
|
|
90 |
}
|
|
91 |
SK_ABORT("Invalid SkCubicType");
|
|
92 |
+ SkUNREACHABLE;
|
|
93 |
}
|
|
94 |
|
|
95 |
/** Returns the cubic classification.
|
1193
|
96 |
|
|
97 |
t[],s[] are set to the two homogeneous parameter values at which points the lines L & M
|
|
98 |
intersect with K, sorted from smallest to largest and oriented so positive values of the
|
|
99 |
implicit are on the "left" side. For a serpentine curve they are the inflection points. For a
|
|
100 |
loop they are the double point. For a local cusp, they are both equal and denote the cusp point.
|
|
101 |
diff --git a/gfx/skia/skia/src/core/SkTextBlob.cpp b/gfx/skia/skia/src/core/SkTextBlob.cpp
|
|
102 |
--- a/gfx/skia/skia/src/core/SkTextBlob.cpp
|
|
103 |
+++ b/gfx/skia/skia/src/core/SkTextBlob.cpp
|
|
104 |
@@ -199,16 +199,17 @@ unsigned SkTextBlob::ScalarsPerGlyph(Gly
|
|
105 |
}
|
|
106 |
|
|
107 |
void SkTextBlob::operator delete(void* p) {
|
|
108 |
sk_free(p);
|
|
109 |
}
|
1162
|
110 |
|
|
111 |
void* SkTextBlob::operator new(size_t) {
|
|
112 |
SK_ABORT("All blobs are created by placement new.");
|
|
113 |
+ SkUNREACHABLE;
|
|
114 |
}
|
|
115 |
|
|
116 |
void* SkTextBlob::operator new(size_t, void* p) {
|
1193
|
117 |
return p;
|
|
118 |
}
|
|
119 |
|
|
120 |
SkTextBlobRunIterator::SkTextBlobRunIterator(const SkTextBlob* blob)
|
|
121 |
: fCurrentRun(SkTextBlob::RunRecord::First(blob)) {
|
|
122 |
diff --git a/gfx/skia/skia/src/core/SkTypeface_remote.h b/gfx/skia/skia/src/core/SkTypeface_remote.h
|
|
123 |
--- a/gfx/skia/skia/src/core/SkTypeface_remote.h
|
|
124 |
+++ b/gfx/skia/skia/src/core/SkTypeface_remote.h
|
|
125 |
@@ -90,83 +90,97 @@ public:
|
|
126 |
|
|
127 |
SkTypefaceID remoteTypefaceID() const {return fTypefaceID;}
|
|
128 |
|
|
129 |
int glyphCount() const {return fGlyphCount;}
|
|
130 |
|
1162
|
131 |
bool isLogging() const {return fIsLogging;}
|
|
132 |
|
|
133 |
protected:
|
|
134 |
- int onGetUPEM() const override { SK_ABORT("Should never be called."); }
|
|
135 |
+ int onGetUPEM() const override { SK_ABORT("Should never be called."); SkUNREACHABLE; }
|
|
136 |
std::unique_ptr<SkStreamAsset> onOpenStream(int* ttcIndex) const override {
|
|
137 |
SK_ABORT("Should never be called.");
|
1190
|
138 |
+ SkUNREACHABLE;
|
1162
|
139 |
}
|
|
140 |
sk_sp<SkTypeface> onMakeClone(const SkFontArguments& args) const override {
|
|
141 |
SK_ABORT("Should never be called.");
|
1190
|
142 |
+ SkUNREACHABLE;
|
1162
|
143 |
}
|
1190
|
144 |
bool onGlyphMaskNeedsCurrentColor() const override {
|
|
145 |
return fGlyphMaskNeedsCurrentColor;
|
1193
|
146 |
}
|
1162
|
147 |
int onGetVariationDesignPosition(SkFontArguments::VariationPosition::Coordinate coordinates[],
|
|
148 |
int coordinateCount) const override {
|
|
149 |
SK_ABORT("Should never be called.");
|
1190
|
150 |
+ SkUNREACHABLE;
|
1162
|
151 |
}
|
|
152 |
int onGetVariationDesignParameters(SkFontParameters::Variation::Axis parameters[],
|
|
153 |
int parameterCount) const override {
|
|
154 |
SK_ABORT("Should never be called.");
|
1190
|
155 |
+ SkUNREACHABLE;
|
1162
|
156 |
}
|
|
157 |
void onGetFamilyName(SkString* familyName) const override {
|
|
158 |
// Used by SkStrikeCache::DumpMemoryStatistics.
|
1193
|
159 |
*familyName = "";
|
1190
|
160 |
}
|
|
161 |
bool onGetPostScriptName(SkString*) const override {
|
|
162 |
SK_ABORT("Should never be called.");
|
|
163 |
+ SkUNREACHABLE;
|
1162
|
164 |
}
|
|
165 |
SkTypeface::LocalizedStrings* onCreateFamilyNameIterator() const override {
|
|
166 |
SK_ABORT("Should never be called.");
|
1190
|
167 |
+ SkUNREACHABLE;
|
1162
|
168 |
}
|
|
169 |
int onGetTableTags(SkFontTableTag tags[]) const override {
|
|
170 |
SK_ABORT("Should never be called.");
|
1190
|
171 |
+ SkUNREACHABLE;
|
1162
|
172 |
}
|
|
173 |
size_t onGetTableData(SkFontTableTag, size_t offset, size_t length, void* data) const override {
|
|
174 |
SK_ABORT("Should never be called.");
|
1190
|
175 |
+ SkUNREACHABLE;
|
|
176 |
}
|
|
177 |
std::unique_ptr<SkScalerContext> onCreateScalerContext(
|
|
178 |
const SkScalerContextEffects& effects, const SkDescriptor* desc) const override
|
1193
|
179 |
{
|
|
180 |
return std::make_unique<SkScalerContextProxy>(
|
|
181 |
sk_ref_sp(const_cast<SkTypefaceProxy*>(this)), effects, desc, fDiscardableManager);
|
|
182 |
}
|
|
183 |
void onFilterRec(SkScalerContextRec* rec) const override {
|
|
184 |
// The rec filtering is already applied by the server when generating
|
|
185 |
// the glyphs.
|
1162
|
186 |
}
|
1190
|
187 |
void onGetFontDescriptor(SkFontDescriptor*, bool*) const override {
|
|
188 |
SK_ABORT("Should never be called.");
|
|
189 |
+ SkUNREACHABLE;
|
1177
|
190 |
}
|
1190
|
191 |
void getGlyphToUnicodeMap(SkUnichar*) const override {
|
|
192 |
SK_ABORT("Should never be called.");
|
|
193 |
+ SkUNREACHABLE;
|
1177
|
194 |
}
|
|
195 |
|
|
196 |
void getPostScriptGlyphNames(SkString*) const override {
|
|
197 |
SK_ABORT("Should never be called.");
|
1190
|
198 |
+ SkUNREACHABLE;
|
1177
|
199 |
}
|
1162
|
200 |
|
|
201 |
std::unique_ptr<SkAdvancedTypefaceMetrics> onGetAdvancedMetrics() const override {
|
|
202 |
SK_ABORT("Should never be called.");
|
1190
|
203 |
+ SkUNREACHABLE;
|
1162
|
204 |
}
|
|
205 |
void onCharsToGlyphs(const SkUnichar* chars, int count, SkGlyphID glyphs[]) const override {
|
|
206 |
SK_ABORT("Should never be called.");
|
1190
|
207 |
+ SkUNREACHABLE;
|
1177
|
208 |
}
|
|
209 |
int onCountGlyphs() const override {
|
|
210 |
return this->glyphCount();
|
1193
|
211 |
}
|
1162
|
212 |
|
|
213 |
void* onGetCTFontRef() const override {
|
|
214 |
SK_ABORT("Should never be called.");
|
1190
|
215 |
+ SkUNREACHABLE;
|
1162
|
216 |
}
|
|
217 |
|
|
218 |
private:
|
1193
|
219 |
const SkTypefaceID fTypefaceID;
|
|
220 |
const int fGlyphCount;
|
|
221 |
const bool fIsLogging;
|
|
222 |
const bool fGlyphMaskNeedsCurrentColor;
|
|
223 |
sk_sp<SkStrikeClient::DiscardableHandleManager> fDiscardableManager;
|
|
224 |
diff --git a/gfx/skia/skia/src/effects/imagefilters/SkBlurImageFilter.cpp b/gfx/skia/skia/src/effects/imagefilters/SkBlurImageFilter.cpp
|
|
225 |
--- a/gfx/skia/skia/src/effects/imagefilters/SkBlurImageFilter.cpp
|
|
226 |
+++ b/gfx/skia/skia/src/effects/imagefilters/SkBlurImageFilter.cpp
|
|
227 |
@@ -810,16 +810,17 @@ sk_sp<SkSpecialImage> cpu_blur(
|
|
228 |
SkASSERT(0 <= sigma && sigma <= 2183); // should be guaranteed after map_sigma
|
|
229 |
if (PassMaker* maker = GaussPass::MakeMaker(sigma, &alloc)) {
|
|
230 |
return maker;
|
|
231 |
}
|
|
232 |
if (PassMaker* maker = TentPass::MakeMaker(sigma, &alloc)) {
|
1190
|
233 |
return maker;
|
|
234 |
}
|
|
235 |
SK_ABORT("Sigma is out of range.");
|
|
236 |
+ SkUNREACHABLE;
|
|
237 |
};
|
1177
|
238 |
|
1190
|
239 |
PassMaker* makerX = makeMaker(sigma.x());
|
1193
|
240 |
PassMaker* makerY = makeMaker(sigma.y());
|
|
241 |
|
|
242 |
if (makerX->window() <= 1 && makerY->window() <= 1) {
|
|
243 |
return copy_image_with_bounds(ctx, input, srcBounds, dstBounds);
|
|
244 |
}
|
|
245 |
diff --git a/gfx/skia/skia/src/fonts/SkFontMgr_indirect.cpp b/gfx/skia/skia/src/fonts/SkFontMgr_indirect.cpp
|
|
246 |
--- a/gfx/skia/skia/src/fonts/SkFontMgr_indirect.cpp
|
|
247 |
+++ b/gfx/skia/skia/src/fonts/SkFontMgr_indirect.cpp
|
|
248 |
@@ -64,16 +64,17 @@ int SkFontMgr_Indirect::onCountFamilies(
|
|
249 |
}
|
|
250 |
|
|
251 |
void SkFontMgr_Indirect::onGetFamilyName(int index, SkString* familyName) const {
|
|
252 |
SK_ABORT("Not implemented");
|
|
253 |
}
|
1162
|
254 |
|
|
255 |
SkFontStyleSet* SkFontMgr_Indirect::onCreateStyleSet(int index) const {
|
|
256 |
SK_ABORT("Not implemented");
|
|
257 |
+ SkUNREACHABLE;
|
|
258 |
}
|
|
259 |
|
|
260 |
SkFontStyleSet* SkFontMgr_Indirect::onMatchFamily(const char familyName[]) const {
|
1193
|
261 |
return new SkStyleSet_Indirect(this, -1, fProxy->matchName(familyName));
|
|
262 |
}
|
|
263 |
|
|
264 |
SkTypeface* SkFontMgr_Indirect::createTypefaceFromFontId(const SkFontIdentity& id) const {
|
|
265 |
if (id.fDataId == SkFontIdentity::kInvalidDataId) {
|
|
266 |
diff --git a/gfx/skia/skia/src/ports/SkFontMgr_FontConfigInterface.cpp b/gfx/skia/skia/src/ports/SkFontMgr_FontConfigInterface.cpp
|
|
267 |
--- a/gfx/skia/skia/src/ports/SkFontMgr_FontConfigInterface.cpp
|
|
268 |
+++ b/gfx/skia/skia/src/ports/SkFontMgr_FontConfigInterface.cpp
|
|
269 |
@@ -157,28 +157,32 @@ public:
|
|
270 |
SkFontMgr_FCI(sk_sp<SkFontConfigInterface> fci)
|
|
271 |
: fFCI(std::move(fci))
|
|
272 |
, fCache(kMaxSize)
|
|
273 |
{}
|
|
274 |
|
1162
|
275 |
protected:
|
|
276 |
int onCountFamilies() const override {
|
|
277 |
SK_ABORT("Not implemented.");
|
|
278 |
+ SkUNREACHABLE;
|
|
279 |
}
|
|
280 |
|
|
281 |
void onGetFamilyName(int index, SkString* familyName) const override {
|
|
282 |
SK_ABORT("Not implemented.");
|
|
283 |
+ SkUNREACHABLE;
|
|
284 |
}
|
|
285 |
|
|
286 |
SkFontStyleSet* onCreateStyleSet(int index) const override {
|
|
287 |
SK_ABORT("Not implemented.");
|
|
288 |
+ SkUNREACHABLE;
|
|
289 |
}
|
|
290 |
|
|
291 |
SkFontStyleSet* onMatchFamily(const char familyName[]) const override {
|
|
292 |
SK_ABORT("Not implemented.");
|
|
293 |
+ SkUNREACHABLE;
|
|
294 |
}
|
|
295 |
|
|
296 |
SkTypeface* onMatchFamilyStyle(const char requestedFamilyName[],
|
1193
|
297 |
const SkFontStyle& requestedStyle) const override
|
|
298 |
{
|
|
299 |
SkAutoMutexExclusive ama(fMutex);
|
|
300 |
|
|
301 |
SkFontConfigInterface::FontIdentity identity;
|
|
302 |
diff --git a/gfx/skia/skia/src/sksl/SkSLCompiler.cpp b/gfx/skia/skia/src/sksl/SkSLCompiler.cpp
|
|
303 |
--- a/gfx/skia/skia/src/sksl/SkSLCompiler.cpp
|
|
304 |
+++ b/gfx/skia/skia/src/sksl/SkSLCompiler.cpp
|
|
305 |
@@ -272,16 +272,17 @@ std::unique_ptr<Expression> Compiler::co
|
|
306 |
case Symbol::Kind::kType: {
|
|
307 |
// go through DSLType so we report errors on private types
|
|
308 |
dsl::DSLModifiers modifiers;
|
|
309 |
dsl::DSLType dslType(result->name(), &modifiers, pos);
|
|
310 |
return TypeReference::Convert(*fContext, pos, &dslType.skslType());
|
1177
|
311 |
}
|
1190
|
312 |
default:
|
|
313 |
SK_ABORT("unsupported symbol type %d\n", (int) result->kind());
|
|
314 |
+ SkUNREACHABLE;
|
1177
|
315 |
}
|
1190
|
316 |
}
|
1177
|
317 |
|
1193
|
318 |
bool Compiler::optimizeModuleBeforeMinifying(ProgramKind kind, Module& module) {
|
|
319 |
SkASSERT(this->errorCount() == 0);
|
|
320 |
|
|
321 |
auto m = SkSL::ModuleLoader::Get();
|
|
322 |
|
|
323 |
diff --git a/gfx/skia/skia/src/sksl/SkSLOperator.cpp b/gfx/skia/skia/src/sksl/SkSLOperator.cpp
|
|
324 |
--- a/gfx/skia/skia/src/sksl/SkSLOperator.cpp
|
|
325 |
+++ b/gfx/skia/skia/src/sksl/SkSLOperator.cpp
|
|
326 |
@@ -46,17 +46,17 @@ OperatorPrecedence Operator::getBinaryPr
|
|
327 |
case Kind::SLASHEQ: // fall through
|
|
328 |
case Kind::PERCENTEQ: // fall through
|
|
329 |
case Kind::SHLEQ: // fall through
|
|
330 |
case Kind::SHREQ: // fall through
|
|
331 |
case Kind::BITWISEANDEQ: // fall through
|
1190
|
332 |
case Kind::BITWISEXOREQ: // fall through
|
|
333 |
case Kind::BITWISEOREQ: return OperatorPrecedence::kAssignment;
|
|
334 |
case Kind::COMMA: return OperatorPrecedence::kSequence;
|
|
335 |
- default: SK_ABORT("unsupported binary operator");
|
|
336 |
+ default: SkUNREACHABLE;
|
1162
|
337 |
}
|
1190
|
338 |
}
|
1162
|
339 |
|
1193
|
340 |
const char* Operator::operatorName() const {
|
|
341 |
switch (this->kind()) {
|
|
342 |
case Kind::PLUS: return " + ";
|
|
343 |
case Kind::MINUS: return " - ";
|
|
344 |
case Kind::STAR: return " * ";
|
|
345 |
diff --git a/gfx/skia/skia/src/sksl/ir/SkSLType.h b/gfx/skia/skia/src/sksl/ir/SkSLType.h
|
|
346 |
--- a/gfx/skia/skia/src/sksl/ir/SkSLType.h
|
|
347 |
+++ b/gfx/skia/skia/src/sksl/ir/SkSLType.h
|
|
348 |
@@ -417,16 +417,17 @@ public:
|
|
349 |
* Returns the number of scalars needed to hold this type.
|
|
350 |
*/
|
|
351 |
virtual size_t slotCount() const {
|
|
352 |
return 0;
|
|
353 |
}
|
1162
|
354 |
|
1190
|
355 |
virtual const std::vector<Field>& fields() const {
|
|
356 |
SK_ABORT("Internal error: not a struct");
|
|
357 |
+ SkUNREACHABLE;
|
1177
|
358 |
}
|
|
359 |
|
1190
|
360 |
/**
|
1193
|
361 |
* For generic types, returns the types that this generic type can substitute for.
|
|
362 |
*/
|
|
363 |
virtual SkSpan<const Type* const> coercibleTypes() const {
|
|
364 |
SkDEBUGFAIL("Internal error: not a generic type");
|
|
365 |
return {};
|
|
366 |
diff --git a/gfx/skia/skia/src/utils/SkShadowUtils.cpp b/gfx/skia/skia/src/utils/SkShadowUtils.cpp
|
|
367 |
--- a/gfx/skia/skia/src/utils/SkShadowUtils.cpp
|
|
368 |
+++ b/gfx/skia/skia/src/utils/SkShadowUtils.cpp
|
|
369 |
@@ -135,16 +135,17 @@ struct SpotVerticesFactory {
|
|
370 |
}
|
|
371 |
return false;
|
|
372 |
case OccluderType::kDirectional:
|
|
373 |
case OccluderType::kDirectionalTransparent:
|
|
374 |
*translate = that.fOffset - fOffset;
|
1190
|
375 |
return true;
|
1162
|
376 |
}
|
|
377 |
SK_ABORT("Uninitialized occluder type?");
|
1190
|
378 |
+ SkUNREACHABLE;
|
1162
|
379 |
}
|
|
380 |
|
|
381 |
sk_sp<SkVertices> makeVertices(const SkPath& path, const SkMatrix& ctm,
|
1193
|
382 |
SkVector* translate) const {
|
|
383 |
bool transparent = fOccluderType == OccluderType::kPointTransparent ||
|
|
384 |
fOccluderType == OccluderType::kDirectionalTransparent;
|
|
385 |
bool directional = fOccluderType == OccluderType::kDirectional ||
|
|
386 |
fOccluderType == OccluderType::kDirectionalTransparent;
|
|
387 |
diff --git a/intl/icu/source/i18n/number_rounding.cpp b/intl/icu/source/i18n/number_rounding.cpp
|
|
388 |
--- a/intl/icu/source/i18n/number_rounding.cpp
|
|
389 |
+++ b/intl/icu/source/i18n/number_rounding.cpp
|
|
390 |
@@ -278,27 +278,29 @@ Precision IncrementPrecision::withMinFra
|
|
391 |
}
|
|
392 |
|
|
393 |
FractionPrecision Precision::constructFraction(int32_t minFrac, int32_t maxFrac) {
|
|
394 |
FractionSignificantSettings settings;
|
|
395 |
settings.fMinFrac = static_cast<digits_t>(minFrac);
|
1175
|
396 |
settings.fMaxFrac = static_cast<digits_t>(maxFrac);
|
|
397 |
settings.fMinSig = -1;
|
|
398 |
settings.fMaxSig = -1;
|
|
399 |
+ settings.fPriority = UNUM_ROUNDING_PRIORITY_RELAXED;
|
|
400 |
PrecisionUnion union_;
|
|
401 |
union_.fracSig = settings;
|
|
402 |
return {RND_FRACTION, union_};
|
1193
|
403 |
}
|
|
404 |
|
|
405 |
Precision Precision::constructSignificant(int32_t minSig, int32_t maxSig) {
|
|
406 |
FractionSignificantSettings settings;
|
|
407 |
settings.fMinFrac = -1;
|
1175
|
408 |
settings.fMaxFrac = -1;
|
|
409 |
settings.fMinSig = static_cast<digits_t>(minSig);
|
|
410 |
settings.fMaxSig = static_cast<digits_t>(maxSig);
|
|
411 |
+ settings.fPriority = UNUM_ROUNDING_PRIORITY_RELAXED;
|
|
412 |
PrecisionUnion union_;
|
|
413 |
union_.fracSig = settings;
|
|
414 |
return {RND_SIGNIFICANT, union_};
|
1193
|
415 |
}
|
|
416 |
|
|
417 |
Precision
|
|
418 |
Precision::constructFractionSignificant(
|
|
419 |
const FractionPrecision &base,
|
|
420 |
diff --git a/js/src/irregexp/imported/regexp-parser.cc b/js/src/irregexp/imported/regexp-parser.cc
|
|
421 |
--- a/js/src/irregexp/imported/regexp-parser.cc
|
|
422 |
+++ b/js/src/irregexp/imported/regexp-parser.cc
|
|
423 |
@@ -2644,16 +2644,17 @@ bool MayContainStrings(ClassSetOperandTy
|
|
424 |
return false;
|
|
425 |
case ClassSetOperandType::kCharacterClassEscape:
|
|
426 |
case ClassSetOperandType::kClassStringDisjunction:
|
|
427 |
return operand->AsClassSetOperand()->has_strings();
|
|
428 |
case ClassSetOperandType::kNestedClass:
|
1190
|
429 |
if (operand->IsClassRanges()) return false;
|
|
430 |
return operand->AsClassSetExpression()->may_contain_strings();
|
|
431 |
}
|
|
432 |
+ UNREACHABLE();
|
1177
|
433 |
}
|
|
434 |
|
1190
|
435 |
} // namespace
|
1193
|
436 |
|
|
437 |
// TODO(v8:11935): Change permalink once proposal is in stage 4.
|
|
438 |
// https://arai-a.github.io/ecma262-compare/snapshot.html?pr=2418#prod-ClassUnion
|
|
439 |
template <class CharT>
|
|
440 |
RegExpTree* RegExpParserImpl<CharT>::ParseClassUnion(
|
|
441 |
diff --git a/third_party/libwebrtc/api/adaptation/resource.cc b/third_party/libwebrtc/api/adaptation/resource.cc
|
|
442 |
--- a/third_party/libwebrtc/api/adaptation/resource.cc
|
|
443 |
+++ b/third_party/libwebrtc/api/adaptation/resource.cc
|
|
444 |
@@ -17,16 +17,17 @@ namespace webrtc {
|
|
445 |
const char* ResourceUsageStateToString(ResourceUsageState usage_state) {
|
|
446 |
switch (usage_state) {
|
|
447 |
case ResourceUsageState::kOveruse:
|
|
448 |
return "kOveruse";
|
|
449 |
case ResourceUsageState::kUnderuse:
|
1175
|
450 |
return "kUnderuse";
|
|
451 |
}
|
1180
|
452 |
RTC_CHECK_NOTREACHED();
|
|
453 |
+ return nullptr;
|
1175
|
454 |
}
|
|
455 |
|
1177
|
456 |
ResourceListener::~ResourceListener() {}
|
1193
|
457 |
|
|
458 |
Resource::Resource() {}
|
|
459 |
|
|
460 |
Resource::~Resource() {}
|
|
461 |
|
|
462 |
diff --git a/third_party/libwebrtc/api/rtp_parameters.cc b/third_party/libwebrtc/api/rtp_parameters.cc
|
|
463 |
--- a/third_party/libwebrtc/api/rtp_parameters.cc
|
|
464 |
+++ b/third_party/libwebrtc/api/rtp_parameters.cc
|
|
465 |
@@ -27,16 +27,17 @@ const char* DegradationPreferenceToStrin
|
|
466 |
case DegradationPreference::MAINTAIN_FRAMERATE:
|
|
467 |
return "maintain-framerate";
|
|
468 |
case DegradationPreference::MAINTAIN_RESOLUTION:
|
|
469 |
return "maintain-resolution";
|
|
470 |
case DegradationPreference::BALANCED:
|
1175
|
471 |
return "balanced";
|
|
472 |
}
|
1180
|
473 |
RTC_CHECK_NOTREACHED();
|
|
474 |
+ return "";
|
1175
|
475 |
}
|
|
476 |
|
1177
|
477 |
const double kDefaultBitratePriority = 1.0;
|
1193
|
478 |
|
|
479 |
RtcpFeedback::RtcpFeedback() = default;
|
|
480 |
RtcpFeedback::RtcpFeedback(RtcpFeedbackType type) : type(type) {}
|
|
481 |
RtcpFeedback::RtcpFeedback(RtcpFeedbackType type,
|
|
482 |
RtcpFeedbackMessageType message_type)
|
|
483 |
diff --git a/third_party/libwebrtc/api/video/video_frame_buffer.cc b/third_party/libwebrtc/api/video/video_frame_buffer.cc
|
|
484 |
--- a/third_party/libwebrtc/api/video/video_frame_buffer.cc
|
|
485 |
+++ b/third_party/libwebrtc/api/video/video_frame_buffer.cc
|
|
486 |
@@ -101,16 +101,18 @@ const char* VideoFrameBufferTypeToString
|
|
487 |
return "kI210";
|
|
488 |
case VideoFrameBuffer::Type::kI410:
|
|
489 |
return "kI410";
|
|
490 |
case VideoFrameBuffer::Type::kNV12:
|
|
491 |
return "kNV12";
|
1180
|
492 |
default:
|
|
493 |
RTC_DCHECK_NOTREACHED();
|
|
494 |
}
|
|
495 |
+ RTC_DCHECK_NOTREACHED();
|
|
496 |
+ return nullptr;
|
|
497 |
}
|
|
498 |
|
|
499 |
int I420BufferInterface::ChromaWidth() const {
|
1193
|
500 |
return (width() + 1) / 2;
|
|
501 |
}
|
|
502 |
|
|
503 |
int I420BufferInterface::ChromaHeight() const {
|
|
504 |
return (height() + 1) / 2;
|
|
505 |
diff --git a/third_party/libwebrtc/api/video_codecs/video_codec.cc b/third_party/libwebrtc/api/video_codecs/video_codec.cc
|
|
506 |
--- a/third_party/libwebrtc/api/video_codecs/video_codec.cc
|
|
507 |
+++ b/third_party/libwebrtc/api/video_codecs/video_codec.cc
|
|
508 |
@@ -113,16 +113,17 @@ const char* CodecTypeToPayloadString(Vid
|
|
509 |
case kVideoCodecH264:
|
|
510 |
return kPayloadNameH264;
|
|
511 |
case kVideoCodecMultiplex:
|
|
512 |
return kPayloadNameMultiplex;
|
|
513 |
case kVideoCodecGeneric:
|
1175
|
514 |
return kPayloadNameGeneric;
|
|
515 |
}
|
1180
|
516 |
RTC_CHECK_NOTREACHED();
|
|
517 |
+ return "";
|
1175
|
518 |
}
|
|
519 |
|
1177
|
520 |
VideoCodecType PayloadStringToCodecType(const std::string& name) {
|
1193
|
521 |
if (absl::EqualsIgnoreCase(name, kPayloadNameVp8))
|
|
522 |
return kVideoCodecVP8;
|
|
523 |
if (absl::EqualsIgnoreCase(name, kPayloadNameVp9))
|
|
524 |
return kVideoCodecVP9;
|
|
525 |
if (absl::EqualsIgnoreCase(name, kPayloadNameAv1) ||
|
|
526 |
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
|
|
527 |
--- a/third_party/libwebrtc/api/video_codecs/video_encoder_software_fallback_wrapper.cc
|
|
528 |
+++ b/third_party/libwebrtc/api/video_codecs/video_encoder_software_fallback_wrapper.cc
|
|
529 |
@@ -158,16 +158,17 @@ class VideoEncoderSoftwareFallbackWrappe
|
|
530 |
[[fallthrough]];
|
|
531 |
case EncoderState::kMainEncoderUsed:
|
|
532 |
return encoder_.get();
|
|
533 |
case EncoderState::kFallbackDueToFailure:
|
|
534 |
case EncoderState::kForcedFallback:
|
1175
|
535 |
return fallback_encoder_.get();
|
|
536 |
}
|
1180
|
537 |
RTC_CHECK_NOTREACHED();
|
|
538 |
+ return nullptr;
|
1175
|
539 |
}
|
|
540 |
|
1177
|
541 |
// Updates encoder with last observed parameters, such as callbacks, rates,
|
1193
|
542 |
// etc.
|
|
543 |
void PrimeEncoder(VideoEncoder* encoder) const;
|
|
544 |
|
|
545 |
// Settings used in the last InitEncode call and used if a dynamic fallback to
|
|
546 |
// software is required.
|
|
547 |
@@ -338,16 +339,17 @@ int32_t VideoEncoderSoftwareFallbackWrap
|
|
548 |
case EncoderState::kMainEncoderUsed: {
|
|
549 |
return EncodeWithMainEncoder(frame, frame_types);
|
|
550 |
}
|
|
551 |
case EncoderState::kFallbackDueToFailure:
|
|
552 |
case EncoderState::kForcedFallback:
|
1175
|
553 |
return fallback_encoder_->Encode(frame, frame_types);
|
|
554 |
}
|
1180
|
555 |
RTC_CHECK_NOTREACHED();
|
|
556 |
+ return WEBRTC_VIDEO_CODEC_ERROR;
|
1175
|
557 |
}
|
1180
|
558 |
|
1175
|
559 |
int32_t VideoEncoderSoftwareFallbackWrapper::EncodeWithMainEncoder(
|
1193
|
560 |
const VideoFrame& frame,
|
|
561 |
const std::vector<VideoFrameType>* frame_types) {
|
|
562 |
int32_t ret = encoder_->Encode(frame, frame_types);
|
|
563 |
// If requested, try a software fallback.
|
|
564 |
bool fallback_requested = (ret == WEBRTC_VIDEO_CODEC_FALLBACK_SOFTWARE);
|
|
565 |
diff --git a/third_party/libwebrtc/call/adaptation/video_stream_adapter.cc b/third_party/libwebrtc/call/adaptation/video_stream_adapter.cc
|
|
566 |
--- a/third_party/libwebrtc/call/adaptation/video_stream_adapter.cc
|
|
567 |
+++ b/third_party/libwebrtc/call/adaptation/video_stream_adapter.cc
|
|
568 |
@@ -164,16 +164,17 @@ const char* Adaptation::StatusToString(A
|
|
569 |
case Status::kInsufficientInput:
|
|
570 |
return "kInsufficientInput";
|
|
571 |
case Status::kAdaptationDisabled:
|
|
572 |
return "kAdaptationDisabled";
|
|
573 |
case Status::kRejectedByConstraint:
|
1175
|
574 |
return "kRejectedByConstraint";
|
|
575 |
}
|
1180
|
576 |
RTC_CHECK_NOTREACHED();
|
|
577 |
+ return "";
|
1175
|
578 |
}
|
|
579 |
|
1177
|
580 |
Adaptation::Adaptation(int validation_id,
|
1193
|
581 |
VideoSourceRestrictions restrictions,
|
|
582 |
VideoAdaptationCounters counters,
|
|
583 |
VideoStreamInputState input_state)
|
|
584 |
: validation_id_(validation_id),
|
|
585 |
status_(Status::kValid),
|
|
586 |
@@ -386,16 +387,17 @@ VideoStreamAdapter::RestrictionsOrState
|
|
587 |
case DegradationPreference::MAINTAIN_RESOLUTION: {
|
|
588 |
// Scale up framerate.
|
|
589 |
return IncreaseFramerate(input_state, current_restrictions_);
|
|
590 |
}
|
|
591 |
case DegradationPreference::DISABLED:
|
1175
|
592 |
return Adaptation::Status::kAdaptationDisabled;
|
|
593 |
}
|
1180
|
594 |
RTC_CHECK_NOTREACHED();
|
|
595 |
+ return Adaptation::Status::kAdaptationDisabled;
|
1175
|
596 |
}
|
|
597 |
|
1177
|
598 |
Adaptation VideoStreamAdapter::GetAdaptationDown() {
|
1193
|
599 |
RTC_DCHECK_RUN_ON(&sequence_checker_);
|
|
600 |
VideoStreamInputState input_state = input_state_provider_->InputState();
|
|
601 |
++adaptation_validation_id_;
|
|
602 |
RestrictionsOrState restrictions_or_state =
|
|
603 |
GetAdaptationDownStep(input_state, current_restrictions_);
|
|
604 |
@@ -468,16 +470,17 @@ VideoStreamAdapter::GetAdaptationDownSte
|
|
605 |
}
|
|
606 |
case DegradationPreference::MAINTAIN_RESOLUTION: {
|
|
607 |
return DecreaseFramerate(input_state, current_restrictions);
|
|
608 |
}
|
|
609 |
case DegradationPreference::DISABLED:
|
1175
|
610 |
return Adaptation::Status::kAdaptationDisabled;
|
|
611 |
}
|
1180
|
612 |
RTC_CHECK_NOTREACHED();
|
|
613 |
+ return Adaptation::Status::kAdaptationDisabled;
|
1175
|
614 |
}
|
|
615 |
|
1177
|
616 |
VideoStreamAdapter::RestrictionsOrState VideoStreamAdapter::DecreaseResolution(
|
1193
|
617 |
const VideoStreamInputState& input_state,
|
|
618 |
const RestrictionsWithCounters& current_restrictions) {
|
|
619 |
int target_pixels =
|
|
620 |
GetLowerResolutionThan(input_state.frame_size_pixels().value());
|
|
621 |
// Use single active stream if set, this stream could be lower than the input.
|
|
622 |
@@ -621,16 +624,18 @@ Adaptation VideoStreamAdapter::GetAdaptD
|
|
623 |
case DegradationPreference::MAINTAIN_FRAMERATE:
|
|
624 |
return GetAdaptationDown();
|
|
625 |
case DegradationPreference::BALANCED: {
|
|
626 |
return RestrictionsOrStateToAdaptation(
|
|
627 |
GetAdaptDownResolutionStepForBalanced(input_state), input_state);
|
1175
|
628 |
}
|
|
629 |
}
|
1180
|
630 |
RTC_CHECK_NOTREACHED();
|
|
631 |
+ return RestrictionsOrStateToAdaptation(
|
|
632 |
+ Adaptation::Status::kAdaptationDisabled, input_state);
|
1175
|
633 |
}
|
|
634 |
|
1177
|
635 |
VideoStreamAdapter::RestrictionsOrState
|
1193
|
636 |
VideoStreamAdapter::GetAdaptDownResolutionStepForBalanced(
|
|
637 |
const VideoStreamInputState& input_state) const {
|
|
638 |
// Adapt twice if the first adaptation did not decrease resolution.
|
|
639 |
auto first_step = GetAdaptationDownStep(input_state, current_restrictions_);
|
|
640 |
if (!absl::holds_alternative<RestrictionsWithCounters>(first_step)) {
|
|
641 |
diff --git a/third_party/libwebrtc/call/rtp_payload_params.cc b/third_party/libwebrtc/call/rtp_payload_params.cc
|
|
642 |
--- a/third_party/libwebrtc/call/rtp_payload_params.cc
|
|
643 |
+++ b/third_party/libwebrtc/call/rtp_payload_params.cc
|
|
644 |
@@ -400,17 +400,17 @@ absl::optional<FrameDependencyStructure>
|
|
645 |
}
|
|
646 |
return structure;
|
|
647 |
}
|
|
648 |
case VideoCodecType::kVideoCodecAV1:
|
|
649 |
case VideoCodecType::kVideoCodecH264:
|
1190
|
650 |
case VideoCodecType::kVideoCodecMultiplex:
|
|
651 |
return absl::nullopt;
|
|
652 |
}
|
|
653 |
- RTC_DCHECK_NOTREACHED() << "Unsupported codec.";
|
|
654 |
+ RTC_CHECK_NOTREACHED();
|
|
655 |
}
|
|
656 |
|
|
657 |
void RtpPayloadParams::GenericToGeneric(int64_t shared_frame_id,
|
1193
|
658 |
bool is_keyframe,
|
|
659 |
RTPVideoHeader* rtp_video_header) {
|
|
660 |
RTPVideoHeader::GenericDescriptorInfo& generic =
|
|
661 |
rtp_video_header->generic.emplace();
|
|
662 |
|
|
663 |
diff --git a/third_party/libwebrtc/call/video_send_stream.cc b/third_party/libwebrtc/call/video_send_stream.cc
|
|
664 |
--- a/third_party/libwebrtc/call/video_send_stream.cc
|
|
665 |
+++ b/third_party/libwebrtc/call/video_send_stream.cc
|
|
666 |
@@ -25,16 +25,17 @@ const char* StreamTypeToString(VideoSend
|
|
667 |
case VideoSendStream::StreamStats::StreamType::kMedia:
|
|
668 |
return "media";
|
|
669 |
case VideoSendStream::StreamStats::StreamType::kRtx:
|
|
670 |
return "rtx";
|
|
671 |
case VideoSendStream::StreamStats::StreamType::kFlexfec:
|
1175
|
672 |
return "flexfec";
|
|
673 |
}
|
1180
|
674 |
RTC_CHECK_NOTREACHED();
|
|
675 |
+ return "";
|
1175
|
676 |
}
|
|
677 |
|
1177
|
678 |
} // namespace
|
1193
|
679 |
|
|
680 |
VideoSendStream::StreamStats::StreamStats() = default;
|
|
681 |
VideoSendStream::StreamStats::~StreamStats() = default;
|
|
682 |
|
|
683 |
std::string VideoSendStream::StreamStats::ToString() const {
|
|
684 |
diff --git a/third_party/libwebrtc/modules/audio_processing/agc2/clipping_predictor.cc b/third_party/libwebrtc/modules/audio_processing/agc2/clipping_predictor.cc
|
|
685 |
--- a/third_party/libwebrtc/modules/audio_processing/agc2/clipping_predictor.cc
|
|
686 |
+++ b/third_party/libwebrtc/modules/audio_processing/agc2/clipping_predictor.cc
|
|
687 |
@@ -373,12 +373,12 @@ std::unique_ptr<ClippingPredictor> Creat
|
|
688 |
config.reference_window_delay, config.clipping_threshold,
|
|
689 |
/*adaptive_step_estimation=*/true);
|
|
690 |
case ClippingPredictorMode::kFixedStepClippingPeakPrediction:
|
|
691 |
return std::make_unique<ClippingPeakPredictor>(
|
|
692 |
num_channels, config.window_length, config.reference_window_length,
|
1190
|
693 |
config.reference_window_delay, config.clipping_threshold,
|
|
694 |
/*adaptive_step_estimation=*/false);
|
|
695 |
}
|
|
696 |
- RTC_DCHECK_NOTREACHED();
|
|
697 |
+ RTC_CHECK_NOTREACHED();
|
|
698 |
}
|
1177
|
699 |
|
1190
|
700 |
} // namespace webrtc
|
1193
|
701 |
diff --git a/third_party/libwebrtc/modules/audio_processing/agc2/input_volume_stats_reporter.cc b/third_party/libwebrtc/modules/audio_processing/agc2/input_volume_stats_reporter.cc
|
|
702 |
--- a/third_party/libwebrtc/modules/audio_processing/agc2/input_volume_stats_reporter.cc
|
|
703 |
+++ b/third_party/libwebrtc/modules/audio_processing/agc2/input_volume_stats_reporter.cc
|
|
704 |
@@ -43,16 +43,17 @@ int ComputeAverageUpdate(int sum_updates
|
|
705 |
constexpr absl::string_view MetricNamePrefix(
|
|
706 |
InputVolumeType input_volume_type) {
|
|
707 |
switch (input_volume_type) {
|
|
708 |
case InputVolumeType::kApplied:
|
|
709 |
return "WebRTC.Audio.Apm.AppliedInputVolume.";
|
1190
|
710 |
case InputVolumeType::kRecommended:
|
|
711 |
return "WebRTC.Audio.Apm.RecommendedInputVolume.";
|
|
712 |
}
|
|
713 |
+ RTC_CHECK_NOTREACHED();
|
|
714 |
}
|
|
715 |
|
|
716 |
metrics::Histogram* CreateVolumeHistogram(InputVolumeType input_volume_type) {
|
1193
|
717 |
char buffer[64];
|
|
718 |
rtc::SimpleStringBuilder builder(buffer);
|
|
719 |
builder << MetricNamePrefix(input_volume_type) << "OnChange";
|
|
720 |
return metrics::HistogramFactoryGetCountsLinear(/*name=*/builder.str(),
|
|
721 |
/*min=*/1,
|
|
722 |
diff --git a/third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_fc.cc b/third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_fc.cc
|
|
723 |
--- a/third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_fc.cc
|
|
724 |
+++ b/third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_fc.cc
|
1194
|
725 |
@@ -55,16 +55,18 @@ std::vector<float> PreprocessWeights(rtc
|
1193
|
726 |
rtc::FunctionView<float(float)> GetActivationFunction(
|
|
727 |
ActivationFunction activation_function) {
|
|
728 |
switch (activation_function) {
|
|
729 |
case ActivationFunction::kTansigApproximated:
|
|
730 |
return ::rnnoise::TansigApproximated;
|
1180
|
731 |
case ActivationFunction::kSigmoidApproximated:
|
|
732 |
return ::rnnoise::SigmoidApproximated;
|
|
733 |
}
|
|
734 |
+ // supposed to be never reached apparently therefore returning bogus
|
|
735 |
+ return ::rnnoise::TansigApproximated;
|
|
736 |
}
|
1177
|
737 |
|
1180
|
738 |
} // namespace
|
1193
|
739 |
|
|
740 |
FullyConnectedLayer::FullyConnectedLayer(
|
|
741 |
const int input_size,
|
|
742 |
const int output_size,
|
|
743 |
const rtc::ArrayView<const int8_t> bias,
|
|
744 |
diff --git a/third_party/libwebrtc/modules/audio_processing/audio_processing_impl.cc b/third_party/libwebrtc/modules/audio_processing/audio_processing_impl.cc
|
|
745 |
--- a/third_party/libwebrtc/modules/audio_processing/audio_processing_impl.cc
|
|
746 |
+++ b/third_party/libwebrtc/modules/audio_processing/audio_processing_impl.cc
|
|
747 |
@@ -94,16 +94,17 @@ GainControl::Mode Agc1ConfigModeToInterf
|
|
748 |
case Agc1Config::kAdaptiveAnalog:
|
|
749 |
return GainControl::kAdaptiveAnalog;
|
|
750 |
case Agc1Config::kAdaptiveDigital:
|
|
751 |
return GainControl::kAdaptiveDigital;
|
|
752 |
case Agc1Config::kFixedDigital:
|
1175
|
753 |
return GainControl::kFixedDigital;
|
|
754 |
}
|
1180
|
755 |
RTC_CHECK_NOTREACHED();
|
|
756 |
+ return GainControl::kAdaptiveAnalog;
|
|
757 |
}
|
|
758 |
|
|
759 |
bool MinimizeProcessingForUnusedOutput() {
|
1193
|
760 |
return !field_trial::IsEnabled("WebRTC-MutedStateKillSwitch");
|
|
761 |
}
|
|
762 |
|
|
763 |
// Maximum lengths that frame of samples being passed from the render side to
|
|
764 |
// the capture side can have (does not apply to AEC3).
|
|
765 |
@@ -161,17 +162,17 @@ int AudioFormatValidityToErrorCode(Audio
|
|
766 |
case AudioFormatValidity::kValidAndSupported:
|
|
767 |
return AudioProcessing::kNoError;
|
|
768 |
case AudioFormatValidity::kValidButUnsupportedSampleRate: // fall-through
|
|
769 |
case AudioFormatValidity::kInvalidSampleRate:
|
|
770 |
return AudioProcessing::kBadSampleRateError;
|
1190
|
771 |
case AudioFormatValidity::kInvalidChannelCount:
|
|
772 |
return AudioProcessing::kBadNumberChannelsError;
|
|
773 |
}
|
|
774 |
- RTC_DCHECK(false);
|
|
775 |
+ RTC_CHECK_NOTREACHED();
|
1175
|
776 |
}
|
|
777 |
|
1190
|
778 |
// Returns an AudioProcessing::Error together with the best possible option for
|
1193
|
779 |
// output audio content.
|
|
780 |
std::pair<int, FormatErrorOutputOption> ChooseErrorOutputOption(
|
|
781 |
const StreamConfig& input_config,
|
|
782 |
const StreamConfig& output_config) {
|
|
783 |
AudioFormatValidity input_validity = ValidateAudioFormat(input_config);
|
|
784 |
@@ -2416,16 +2417,17 @@ void AudioProcessingImpl::InitializeNois
|
|
785 |
case NoiseSuppresionConfig::kModerate:
|
|
786 |
return NsConfig::SuppressionLevel::k12dB;
|
|
787 |
case NoiseSuppresionConfig::kHigh:
|
|
788 |
return NsConfig::SuppressionLevel::k18dB;
|
|
789 |
case NoiseSuppresionConfig::kVeryHigh:
|
1175
|
790 |
return NsConfig::SuppressionLevel::k21dB;
|
|
791 |
}
|
1180
|
792 |
RTC_CHECK_NOTREACHED();
|
|
793 |
+ return NsConfig::SuppressionLevel::k6dB;
|
1175
|
794 |
};
|
|
795 |
|
1177
|
796 |
NsConfig cfg;
|
1193
|
797 |
cfg.target_level = map_level(config_.noise_suppression.level);
|
|
798 |
submodules_.noise_suppressor = std::make_unique<NoiseSuppressor>(
|
|
799 |
cfg, proc_sample_rate_hz(), num_proc_channels());
|
|
800 |
}
|
|
801 |
}
|
|
802 |
diff --git a/third_party/libwebrtc/modules/audio_processing/include/audio_processing.cc b/third_party/libwebrtc/modules/audio_processing/include/audio_processing.cc
|
|
803 |
--- a/third_party/libwebrtc/modules/audio_processing/include/audio_processing.cc
|
|
804 |
+++ b/third_party/libwebrtc/modules/audio_processing/include/audio_processing.cc
|
|
805 |
@@ -27,28 +27,30 @@ std::string NoiseSuppressionLevelToStrin
|
|
806 |
case AudioProcessing::Config::NoiseSuppression::Level::kModerate:
|
|
807 |
return "Moderate";
|
|
808 |
case AudioProcessing::Config::NoiseSuppression::Level::kHigh:
|
|
809 |
return "High";
|
|
810 |
case AudioProcessing::Config::NoiseSuppression::Level::kVeryHigh:
|
1175
|
811 |
return "VeryHigh";
|
|
812 |
}
|
1180
|
813 |
RTC_CHECK_NOTREACHED();
|
|
814 |
+ return "";
|
1175
|
815 |
}
|
|
816 |
|
1180
|
817 |
std::string GainController1ModeToString(const Agc1Config::Mode& mode) {
|
1193
|
818 |
switch (mode) {
|
|
819 |
case Agc1Config::Mode::kAdaptiveAnalog:
|
|
820 |
return "AdaptiveAnalog";
|
|
821 |
case Agc1Config::Mode::kAdaptiveDigital:
|
|
822 |
return "AdaptiveDigital";
|
|
823 |
case Agc1Config::Mode::kFixedDigital:
|
1180
|
824 |
return "FixedDigital";
|
1175
|
825 |
}
|
1180
|
826 |
RTC_CHECK_NOTREACHED();
|
|
827 |
+ return "";
|
1175
|
828 |
}
|
|
829 |
|
1177
|
830 |
} // namespace
|
1193
|
831 |
|
|
832 |
constexpr int AudioProcessing::kNativeSampleRatesHz[];
|
|
833 |
|
|
834 |
void CustomProcessing::SetRuntimeSetting(
|
|
835 |
AudioProcessing::RuntimeSetting setting) {}
|
|
836 |
diff --git a/third_party/libwebrtc/modules/audio_processing/transient/transient_suppressor_impl.cc b/third_party/libwebrtc/modules/audio_processing/transient/transient_suppressor_impl.cc
|
|
837 |
--- a/third_party/libwebrtc/modules/audio_processing/transient/transient_suppressor_impl.cc
|
|
838 |
+++ b/third_party/libwebrtc/modules/audio_processing/transient/transient_suppressor_impl.cc
|
|
839 |
@@ -48,16 +48,17 @@ std::string GetVadModeLabel(TransientSup
|
|
840 |
switch (vad_mode) {
|
|
841 |
case TransientSuppressor::VadMode::kDefault:
|
|
842 |
return "default";
|
|
843 |
case TransientSuppressor::VadMode::kRnnVad:
|
|
844 |
return "RNN VAD";
|
1190
|
845 |
case TransientSuppressor::VadMode::kNoVad:
|
|
846 |
return "no VAD";
|
|
847 |
}
|
|
848 |
+ RTC_CHECK_NOTREACHED();
|
|
849 |
}
|
1180
|
850 |
|
1190
|
851 |
} // namespace
|
1193
|
852 |
|
|
853 |
TransientSuppressorImpl::TransientSuppressorImpl(VadMode vad_mode,
|
|
854 |
int sample_rate_hz,
|
|
855 |
int detector_rate_hz,
|
|
856 |
int num_channels)
|
|
857 |
diff --git a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_portal.cc b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_portal.cc
|
|
858 |
--- a/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_portal.cc
|
|
859 |
+++ b/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_portal.cc
|
|
860 |
@@ -39,16 +39,17 @@ ScreenCastPortal::CaptureSourceType Scre
|
|
861 |
switch (type) {
|
|
862 |
case CaptureType::kScreen:
|
|
863 |
return ScreenCastPortal::CaptureSourceType::kScreen;
|
|
864 |
case CaptureType::kWindow:
|
|
865 |
return ScreenCastPortal::CaptureSourceType::kWindow;
|
1190
|
866 |
case CaptureType::kAnyScreenContent:
|
|
867 |
return ScreenCastPortal::CaptureSourceType::kAnyScreenContent;
|
|
868 |
}
|
|
869 |
+ RTC_CHECK_NOTREACHED();
|
|
870 |
}
|
|
871 |
|
|
872 |
ScreenCastPortal::ScreenCastPortal(CaptureType type, PortalNotifier* notifier)
|
1193
|
873 |
: ScreenCastPortal(type,
|
|
874 |
notifier,
|
|
875 |
OnProxyRequested,
|
|
876 |
OnSourcesRequestResponseSignal,
|
|
877 |
this) {}
|
|
878 |
diff --git a/third_party/libwebrtc/modules/pacing/bitrate_prober.cc b/third_party/libwebrtc/modules/pacing/bitrate_prober.cc
|
|
879 |
--- a/third_party/libwebrtc/modules/pacing/bitrate_prober.cc
|
|
880 |
+++ b/third_party/libwebrtc/modules/pacing/bitrate_prober.cc
|
|
881 |
@@ -64,16 +64,17 @@ bool BitrateProber::ReadyToSetActiveStat
|
|
882 |
return false;
|
|
883 |
case ProbingState::kInactive:
|
|
884 |
// If config_.min_packet_size > 0, a "large enough" packet must be sent
|
|
885 |
// first, before a probe can be generated and sent. Otherwise, send the
|
|
886 |
// probe asap.
|
|
887 |
return packet_size >=
|
|
888 |
std::min(RecommendedMinProbeSize(), config_.min_packet_size.Get());
|
|
889 |
}
|
|
890 |
+ RTC_CHECK_NOTREACHED();
|
|
891 |
}
|
|
892 |
|
|
893 |
void BitrateProber::OnIncomingPacket(DataSize packet_size) {
|
|
894 |
if (ReadyToSetActiveState(packet_size)) {
|
|
895 |
next_probe_time_ = Timestamp::MinusInfinity();
|
|
896 |
probing_state_ = ProbingState::kActive;
|
|
897 |
}
|
|
898 |
}
|
|
899 |
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
|
|
900 |
--- a/third_party/libwebrtc/modules/rtp_rtcp/source/create_video_rtp_depacketizer.cc
|
|
901 |
+++ b/third_party/libwebrtc/modules/rtp_rtcp/source/create_video_rtp_depacketizer.cc
|
|
902 |
@@ -33,11 +33,12 @@ std::unique_ptr<VideoRtpDepacketizer> Cr
|
|
903 |
return std::make_unique<VideoRtpDepacketizerVp9>();
|
|
904 |
case kVideoCodecAV1:
|
|
905 |
return std::make_unique<VideoRtpDepacketizerAv1>();
|
|
906 |
case kVideoCodecGeneric:
|
|
907 |
case kVideoCodecMultiplex:
|
1175
|
908 |
return std::make_unique<VideoRtpDepacketizerGeneric>();
|
|
909 |
}
|
1180
|
910 |
RTC_CHECK_NOTREACHED();
|
|
911 |
+ return nullptr;
|
1175
|
912 |
}
|
|
913 |
|
1177
|
914 |
} // namespace webrtc
|
1193
|
915 |
diff --git a/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender.cc b/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender.cc
|
|
916 |
--- a/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender.cc
|
|
917 |
+++ b/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender.cc
|
|
918 |
@@ -135,16 +135,17 @@ bool IsNonVolatile(RTPExtensionType type
|
|
919 |
#if defined(WEBRTC_MOZILLA_BUILD)
|
|
920 |
case kRtpExtensionCsrcAudioLevel:
|
|
921 |
// TODO: Mozilla implement for CsrcAudioLevel
|
|
922 |
RTC_CHECK(false);
|
|
923 |
return false;
|
1180
|
924 |
#endif
|
1175
|
925 |
}
|
1180
|
926 |
RTC_CHECK_NOTREACHED();
|
|
927 |
+ return false;
|
1175
|
928 |
}
|
|
929 |
|
1177
|
930 |
bool HasBweExtension(const RtpHeaderExtensionMap& extensions_map) {
|
1193
|
931 |
return extensions_map.IsRegistered(kRtpExtensionTransportSequenceNumber) ||
|
|
932 |
extensions_map.IsRegistered(kRtpExtensionTransportSequenceNumber02) ||
|
|
933 |
extensions_map.IsRegistered(kRtpExtensionAbsoluteSendTime) ||
|
|
934 |
extensions_map.IsRegistered(kRtpExtensionTransmissionTimeOffset);
|
|
935 |
}
|
|
936 |
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
|
|
937 |
--- a/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender_audio.cc
|
|
938 |
+++ b/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender_audio.cc
|
|
939 |
@@ -40,16 +40,17 @@ namespace {
|
|
940 |
case AudioFrameType::kEmptyFrame:
|
|
941 |
return "empty";
|
|
942 |
case AudioFrameType::kAudioFrameSpeech:
|
|
943 |
return "audio_speech";
|
|
944 |
case AudioFrameType::kAudioFrameCN:
|
1175
|
945 |
return "audio_cn";
|
|
946 |
}
|
1180
|
947 |
RTC_CHECK_NOTREACHED();
|
|
948 |
+ return "";
|
1175
|
949 |
}
|
1177
|
950 |
|
1193
|
951 |
} // namespace
|
|
952 |
|
|
953 |
RTPSenderAudio::RTPSenderAudio(Clock* clock, RTPSender* rtp_sender)
|
1194
|
954 |
: clock_(clock),
|
|
955 |
rtp_sender_(rtp_sender),
|
|
956 |
absolute_capture_time_sender_(clock) {
|
1193
|
957 |
diff --git a/third_party/libwebrtc/modules/video_coding/codecs/vp8/default_temporal_layers.cc b/third_party/libwebrtc/modules/video_coding/codecs/vp8/default_temporal_layers.cc
|
|
958 |
--- a/third_party/libwebrtc/modules/video_coding/codecs/vp8/default_temporal_layers.cc
|
|
959 |
+++ b/third_party/libwebrtc/modules/video_coding/codecs/vp8/default_temporal_layers.cc
|
|
960 |
@@ -105,16 +105,17 @@ size_t BufferToIndex(Vp8BufferReference
|
|
961 |
return 0;
|
|
962 |
case Vp8FrameConfig::Vp8BufferReference::kGolden:
|
|
963 |
return 1;
|
|
964 |
case Vp8FrameConfig::Vp8BufferReference::kAltref:
|
|
965 |
return 2;
|
1190
|
966 |
case Vp8FrameConfig::Vp8BufferReference::kNone:
|
|
967 |
RTC_CHECK_NOTREACHED();
|
|
968 |
}
|
|
969 |
+ RTC_CHECK_NOTREACHED();
|
|
970 |
}
|
1177
|
971 |
|
|
972 |
} // namespace
|
1193
|
973 |
|
|
974 |
constexpr size_t DefaultTemporalLayers::kNumReferenceBuffers;
|
|
975 |
|
|
976 |
std::vector<DefaultTemporalLayers::DependencyInfo>
|
|
977 |
DefaultTemporalLayers::GetDependencyInfo(size_t num_layers) {
|
|
978 |
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
|
|
979 |
--- a/third_party/libwebrtc/modules/video_coding/codecs/vp8/temporal_layers_checker.cc
|
|
980 |
+++ b/third_party/libwebrtc/modules/video_coding/codecs/vp8/temporal_layers_checker.cc
|
|
981 |
@@ -25,16 +25,17 @@ TemporalLayersChecker::CreateTemporalLay
|
|
982 |
case Vp8TemporalLayersType::kFixedPattern:
|
|
983 |
return std::make_unique<DefaultTemporalLayersChecker>(
|
|
984 |
num_temporal_layers);
|
|
985 |
case Vp8TemporalLayersType::kBitrateDynamic:
|
|
986 |
// Conference mode temporal layering for screen content in base stream.
|
1175
|
987 |
return std::make_unique<TemporalLayersChecker>(num_temporal_layers);
|
|
988 |
}
|
1180
|
989 |
RTC_CHECK_NOTREACHED();
|
|
990 |
+ return nullptr;
|
1175
|
991 |
}
|
|
992 |
|
1177
|
993 |
TemporalLayersChecker::TemporalLayersChecker(int num_temporal_layers)
|
1193
|
994 |
: num_temporal_layers_(num_temporal_layers),
|
|
995 |
sequence_number_(0),
|
|
996 |
last_sync_sequence_number_(0),
|
|
997 |
last_tl0_sequence_number_(0) {}
|
|
998 |
|
|
999 |
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
|
|
1000 |
--- a/third_party/libwebrtc/video/adaptation/video_stream_encoder_resource_manager.cc
|
|
1001 |
+++ b/third_party/libwebrtc/video/adaptation/video_stream_encoder_resource_manager.cc
|
|
1002 |
@@ -58,16 +58,17 @@ bool IsFramerateScalingEnabled(Degradati
|
|
1003 |
std::string ToString(VideoAdaptationReason reason) {
|
|
1004 |
switch (reason) {
|
|
1005 |
case VideoAdaptationReason::kQuality:
|
|
1006 |
return "quality";
|
|
1007 |
case VideoAdaptationReason::kCpu:
|
1175
|
1008 |
return "cpu";
|
|
1009 |
}
|
1180
|
1010 |
RTC_CHECK_NOTREACHED();
|
|
1011 |
+ return "";
|
1175
|
1012 |
}
|
|
1013 |
|
1180
|
1014 |
std::vector<bool> GetActiveLayersFlags(const VideoCodec& codec) {
|
1193
|
1015 |
std::vector<bool> flags;
|
|
1016 |
if (codec.codecType == VideoCodecType::kVideoCodecVP9) {
|
|
1017 |
flags.resize(codec.VP9().numberOfSpatialLayers);
|
|
1018 |
for (size_t i = 0; i < flags.size(); ++i) {
|
|
1019 |
flags[i] = codec.spatialLayers[i].active;
|