mozilla-silence-no-return-type.patch
branchfirefox115
changeset 1190 2a24a948b5cf
parent 1189 ba0c97b018a6
child 1193 16de98d33e97
equal deleted inserted replaced
1189:ba0c97b018a6 1190:2a24a948b5cf
     1 # HG changeset patch
     1 # HG changeset patch
     2 # Parent  2f49ea20acb4b0e890ae49f4833ac9d69b7e800c
     2 # Parent  5df550d4b5fc674268055e504f60392389eb9ea7
     3 
     3 
     4 diff --git a/Cargo.lock b/Cargo.lock
     4 Index: firefox-115.0/gfx/skia/skia/include/codec/SkEncodedOrigin.h
     5 --- a/Cargo.lock
     5 ===================================================================
     6 +++ b/Cargo.lock
     6 --- firefox-115.0.orig/gfx/skia/skia/include/codec/SkEncodedOrigin.h
     7 @@ -2254,18 +2254,16 @@ name = "glsl-to-cxx"
     7 +++ firefox-115.0/gfx/skia/skia/include/codec/SkEncodedOrigin.h
     8  version = "0.1.0"
     8 @@ -41,6 +41,7 @@ static inline SkMatrix SkEncodedOriginTo
     9  dependencies = [
     9          case  kLeftBottom_SkEncodedOrigin: return SkMatrix::MakeAll( 0,  1, 0, -1,  0, h, 0, 0, 1);
    10   "glsl",
       
    11  ]
       
    12  
       
    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  ]
       
    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
       
    29 @@ -157,16 +157,17 @@ chardetng = { git = "https://github.com/
       
    30  chardetng_c = { git = "https://github.com/hsivonen/chardetng_c", rev="ed8a4c6f900a90d4dbc1d64b856e61490a1c3570" }
       
    31  coremidi = { git = "https://github.com/chris-zen/coremidi.git", rev="fc68464b5445caf111e41f643a2e69ccce0b4f83" }
       
    32  firefox-on-glean = { path = "toolkit/components/glean/api" }
       
    33  libudev-sys = { path = "dom/webauthn/libudev-sys" }
       
    34  packed_simd = { package = "packed_simd_2", git = "https://github.com/hsivonen/packed_simd", rev="412f9a0aa556611de021bde89dee8fefe6e0fbbd" }
       
    35  midir = { git = "https://github.com/mozilla/midir.git", rev = "519e651241e867af3391db08f9ae6400bc023e18" }
       
    36  # warp 0.3.3 + https://github.com/seanmonstar/warp/pull/1007
       
    37  warp = { git = "https://github.com/glandium/warp", rev = "4af45fae95bc98b0eba1ef0db17e1dac471bb23d" }
       
    38 +glslopt = { path = "third_party/rust/glslopt/" }
       
    39  
       
    40  cssparser = { git = "https://github.com/servo/rust-cssparser", rev = "45bc47e2bcb846f1efb5aea156be5fe7d18624bf" }
       
    41  
       
    42  # application-services overrides to make updating them all simpler.
       
    43  interrupt-support = { git = "https://github.com/mozilla/application-services", rev = "86c84c217036c12283d19368867323a66bf35883" }
       
    44  sql-support = { git = "https://github.com/mozilla/application-services", rev = "86c84c217036c12283d19368867323a66bf35883" }
       
    45  sync15 = { git = "https://github.com/mozilla/application-services", rev = "86c84c217036c12283d19368867323a66bf35883" }
       
    46  tabs = { git = "https://github.com/mozilla/application-services", rev = "86c84c217036c12283d19368867323a66bf35883" }
       
    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);
       
    56          case  kLeftBottom_SkEncodedOrigin: return SkMatrix::MakeAll( 0,  1, 0, -1,  0, w, 0, 0, 1);
       
    57      }
    10      }
    58      SK_ABORT("Unexpected origin");
    11      SK_ABORT("Unexpected origin");
    59 +    SkUNREACHABLE;
    12 +    SkUNREACHABLE;
    60  }
    13  }
    61  
    14  
    62  
    15  /**
    63  #endif // SkEncodedOrigin_DEFINED
    16 Index: firefox-115.0/gfx/skia/skia/include/private/gpu/ganesh/GrTypesPriv.h
    64 diff --git a/gfx/skia/skia/include/private/GrTypesPriv.h b/gfx/skia/skia/include/private/GrTypesPriv.h
    17 ===================================================================
    65 --- a/gfx/skia/skia/include/private/GrTypesPriv.h
    18 --- firefox-115.0.orig/gfx/skia/skia/include/private/gpu/ganesh/GrTypesPriv.h
    66 +++ b/gfx/skia/skia/include/private/GrTypesPriv.h
    19 +++ firefox-115.0/gfx/skia/skia/include/private/gpu/ganesh/GrTypesPriv.h
    67 @@ -535,32 +535,34 @@ static inline GrSLType GrSLCombinedSampl
    20 @@ -325,6 +325,7 @@ static inline bool GrTextureTypeHasRestr
    68              return kTexture2DSampler_GrSLType;
       
    69          case GrTextureType::kRectangle:
       
    70              return kTexture2DRectSampler_GrSLType;
       
    71          case GrTextureType::kExternal:
       
    72              return kTextureExternalSampler_GrSLType;
       
    73          default:
    21          default:
    74              SK_ABORT("Unexpected texture type");
    22              SK_ABORT("Unexpected texture type");
    75      }
    23      }
    76 +    SkUNREACHABLE;
    24 +    SkUNREACHABLE;
    77  }
    25  }
    78  
    26  
    79  /** Rectangle and external textures only support the clamp wrap mode and do not support
    27  //////////////////////////////////////////////////////////////////////////////
    80   *  MIP maps.
    28 Index: firefox-115.0/gfx/skia/skia/src/core/SkDescriptor.cpp
    81   */
    29 ===================================================================
    82  static inline bool GrTextureTypeHasRestrictedSampling(GrTextureType type) {
    30 --- firefox-115.0.orig/gfx/skia/skia/src/core/SkDescriptor.cpp
    83      switch (type) {
    31 +++ firefox-115.0/gfx/skia/skia/src/core/SkDescriptor.cpp
    84          case GrTextureType::k2D:
    32 @@ -26,6 +26,7 @@ std::unique_ptr<SkDescriptor> SkDescript
    85              return false;
    33  void SkDescriptor::operator delete(void* p) { ::operator delete(p); }
    86          case GrTextureType::kRectangle:
    34  void* SkDescriptor::operator new(size_t) {
    87              return true;
    35      SK_ABORT("Descriptors are created with placement new.");
    88          case GrTextureType::kExternal:
       
    89              return true;
       
    90          default:
       
    91              SK_ABORT("Unexpected texture type");
       
    92      }
       
    93 +    SkUNREACHABLE;
    36 +    SkUNREACHABLE;
    94  }
    37  }
    95  
    38  
    96  static constexpr bool GrSLTypeIsCombinedSamplerType(GrSLType type) {
    39  void SkDescriptor::flatten(SkWriteBuffer& buffer) const {
    97      switch (type) {
    40 Index: firefox-115.0/gfx/skia/skia/src/core/SkGeometry.h
    98          case kTexture2DSampler_GrSLType:
    41 ===================================================================
    99          case kTextureExternalSampler_GrSLType:
    42 --- firefox-115.0.orig/gfx/skia/skia/src/core/SkGeometry.h
   100          case kTexture2DRectSampler_GrSLType:
    43 +++ firefox-115.0/gfx/skia/skia/src/core/SkGeometry.h
   101              return true;
    44 @@ -281,6 +281,7 @@ static inline bool SkCubicIsDegenerate(S
   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;
       
   108      }
       
   109  
       
   110      SK_ABORT("Invalid pixel config");
       
   111 +    SkUNREACHABLE;
       
   112  }
       
   113  
       
   114  /**
       
   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:
       
   129              return true;
    45              return true;
   130      }
    46      }
   131      SK_ABORT("Invalid SkCubicType");
    47      SK_ABORT("Invalid SkCubicType");
   132 +    SkUNREACHABLE;
    48 +    SkUNREACHABLE;
   133  }
    49  }
   134  
    50  
   135  static inline const char* SkCubicTypeName(SkCubicType type) {
    51  static inline const char* SkCubicTypeName(SkCubicType type) {
   136      switch (type) {
    52 @@ -293,6 +294,7 @@ static inline const char* SkCubicTypeNam
   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";
       
   142          case SkCubicType::kLineOrPoint: return "kLineOrPoint";
    53          case SkCubicType::kLineOrPoint: return "kLineOrPoint";
   143      }
    54      }
   144      SK_ABORT("Invalid SkCubicType");
    55      SK_ABORT("Invalid SkCubicType");
   145 +    SkUNREACHABLE;
    56 +    SkUNREACHABLE;
   146  }
    57  }
   147  
    58  
   148  /** Returns the cubic classification.
    59  /** Returns the cubic classification.
   149  
    60 Index: firefox-115.0/gfx/skia/skia/src/core/SkTextBlob.cpp
   150      t[],s[] are set to the two homogeneous parameter values at which points the lines L & M
    61 ===================================================================
   151      intersect with K, sorted from smallest to largest and oriented so positive values of the
    62 --- firefox-115.0.orig/gfx/skia/skia/src/core/SkTextBlob.cpp
   152      implicit are on the "left" side. For a serpentine curve they are the inflection points. For a
    63 +++ firefox-115.0/gfx/skia/skia/src/core/SkTextBlob.cpp
   153      loop they are the double point. For a local cusp, they are both equal and denote the cusp point.
    64 @@ -204,6 +204,7 @@ void SkTextBlob::operator delete(void* p
   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  }
       
   163  
    65  
   164  void* SkTextBlob::operator new(size_t) {
    66  void* SkTextBlob::operator new(size_t) {
   165      SK_ABORT("All blobs are created by placement new.");
    67      SK_ABORT("All blobs are created by placement new.");
   166 +    SkUNREACHABLE;
    68 +    SkUNREACHABLE;
   167  }
    69  }
   168  
    70  
   169  void* SkTextBlob::operator new(size_t, void* p) {
    71  void* SkTextBlob::operator new(size_t, void* p) {
   170      return p;
    72 Index: firefox-115.0/gfx/skia/skia/src/core/SkTypeface_remote.h
   171  }
    73 ===================================================================
   172  
    74 --- firefox-115.0.orig/gfx/skia/skia/src/core/SkTypeface_remote.h
   173  SkTextBlobRunIterator::SkTextBlobRunIterator(const SkTextBlob* blob)
    75 +++ firefox-115.0/gfx/skia/skia/src/core/SkTypeface_remote.h
   174      : fCurrentRun(SkTextBlob::RunRecord::First(blob)) {
    76 @@ -95,12 +95,14 @@ public:
   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  }
       
   184  
       
   185  unsigned SkScalerContextProxy::generateGlyphCount()  {
       
   186      SK_ABORT("Should never be called.");
       
   187 +    SkUNREACHABLE;
       
   188  }
       
   189  
       
   190  bool SkScalerContextProxy::generateAdvance(SkGlyph* glyph) {
       
   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;}
       
   205      bool isLogging() const {return fIsLogging;}
    77      bool isLogging() const {return fIsLogging;}
   206  
    78  
   207  protected:
    79  protected:
   208 -    int onGetUPEM() const override { SK_ABORT("Should never be called."); }
    80 -    int onGetUPEM() const override { SK_ABORT("Should never be called."); }
   209 +    int onGetUPEM() const override { SK_ABORT("Should never be called."); SkUNREACHABLE; }
    81 +    int onGetUPEM() const override { SK_ABORT("Should never be called."); SkUNREACHABLE; }
   210      std::unique_ptr<SkStreamAsset> onOpenStream(int* ttcIndex) const override {
    82      std::unique_ptr<SkStreamAsset> onOpenStream(int* ttcIndex) const override {
   211          SK_ABORT("Should never be called.");
    83          SK_ABORT("Should never be called.");
   212 +	SkUNREACHABLE;
    84 +        SkUNREACHABLE;
   213      }
       
   214      std::unique_ptr<SkFontData> onMakeFontData() const override {
       
   215          SK_ABORT("Should never be called.");
       
   216 +	SkUNREACHABLE;
       
   217      }
    85      }
   218      sk_sp<SkTypeface> onMakeClone(const SkFontArguments& args) const override {
    86      sk_sp<SkTypeface> onMakeClone(const SkFontArguments& args) const override {
   219          SK_ABORT("Should never be called.");
    87          SK_ABORT("Should never be called.");
   220 +	SkUNREACHABLE;
    88 +        SkUNREACHABLE;
   221      }
    89      }
       
    90      bool onGlyphMaskNeedsCurrentColor() const override {
       
    91          return fGlyphMaskNeedsCurrentColor;
       
    92 @@ -108,10 +110,12 @@ protected:
   222      int onGetVariationDesignPosition(SkFontArguments::VariationPosition::Coordinate coordinates[],
    93      int onGetVariationDesignPosition(SkFontArguments::VariationPosition::Coordinate coordinates[],
   223                                       int coordinateCount) const override {
    94                                       int coordinateCount) const override {
   224          SK_ABORT("Should never be called.");
    95          SK_ABORT("Should never be called.");
   225 +	SkUNREACHABLE;
    96 +        SkUNREACHABLE;
   226      }
    97      }
   227      int onGetVariationDesignParameters(SkFontParameters::Variation::Axis parameters[],
    98      int onGetVariationDesignParameters(SkFontParameters::Variation::Axis parameters[],
   228                                         int parameterCount) const override {
    99                                         int parameterCount) const override {
   229          SK_ABORT("Should never be called.");
   100          SK_ABORT("Should never be called.");
   230 +	SkUNREACHABLE;
   101 +        SkUNREACHABLE;
   231      }
   102      }
   232      void onGetFamilyName(SkString* familyName) const override {
   103      void onGetFamilyName(SkString* familyName) const override {
   233          // Used by SkStrikeCache::DumpMemoryStatistics.
   104          // Used by SkStrikeCache::DumpMemoryStatistics.
   234          *familyName = "";
   105 @@ -119,15 +123,19 @@ protected:
       
   106      }
       
   107      bool onGetPostScriptName(SkString*) const override {
       
   108          SK_ABORT("Should never be called.");
       
   109 +        SkUNREACHABLE;
   235      }
   110      }
   236      SkTypeface::LocalizedStrings* onCreateFamilyNameIterator() const override {
   111      SkTypeface::LocalizedStrings* onCreateFamilyNameIterator() const override {
   237          SK_ABORT("Should never be called.");
   112          SK_ABORT("Should never be called.");
   238 +	SkUNREACHABLE;
   113 +        SkUNREACHABLE;
   239      }
   114      }
   240      int onGetTableTags(SkFontTableTag tags[]) const override {
   115      int onGetTableTags(SkFontTableTag tags[]) const override {
   241          SK_ABORT("Should never be called.");
   116          SK_ABORT("Should never be called.");
   242 +	SkUNREACHABLE;
   117 +        SkUNREACHABLE;
   243      }
   118      }
   244      size_t onGetTableData(SkFontTableTag, size_t offset, size_t length, void* data) const override {
   119      size_t onGetTableData(SkFontTableTag, size_t offset, size_t length, void* data) const override {
   245          SK_ABORT("Should never be called.");
   120          SK_ABORT("Should never be called.");
   246 +	SkUNREACHABLE;
   121 +        SkUNREACHABLE;
   247      }
   122      }
   248      SkScalerContext* onCreateScalerContext(const SkScalerContextEffects& effects,
   123      std::unique_ptr<SkScalerContext> onCreateScalerContext(
   249                                             const SkDescriptor* desc) const override {
   124          const SkScalerContextEffects& effects, const SkDescriptor* desc) const override
   250          return new SkScalerContextProxy(sk_ref_sp(const_cast<SkTypefaceProxy*>(this)), effects,
   125 @@ -141,20 +149,25 @@ protected:
   251                                          desc, fDiscardableManager);
   126      }
   252      }
   127      void onGetFontDescriptor(SkFontDescriptor*, bool*) const override {
   253      void onFilterRec(SkScalerContextRec* rec) const override {
   128          SK_ABORT("Should never be called.");
   254          // The rec filtering is already applied by the server when generating
   129 +        SkUNREACHABLE;
   255 @@ -111,26 +119,28 @@ protected:
   130      }
       
   131      void getGlyphToUnicodeMap(SkUnichar*) const override {
       
   132          SK_ABORT("Should never be called.");
       
   133 +        SkUNREACHABLE;
   256      }
   134      }
   257  
   135  
   258      void getPostScriptGlyphNames(SkString*) const override {
   136      void getPostScriptGlyphNames(SkString*) const override {
   259          SK_ABORT("Should never be called.");
   137          SK_ABORT("Should never be called.");
       
   138 +        SkUNREACHABLE;
   260      }
   139      }
   261  
   140  
   262      std::unique_ptr<SkAdvancedTypefaceMetrics> onGetAdvancedMetrics() const override {
   141      std::unique_ptr<SkAdvancedTypefaceMetrics> onGetAdvancedMetrics() const override {
   263          SK_ABORT("Should never be called.");
   142          SK_ABORT("Should never be called.");
   264 +	SkUNREACHABLE;
   143 +        SkUNREACHABLE;
   265      }
   144      }
   266      void onCharsToGlyphs(const SkUnichar* chars, int count, SkGlyphID glyphs[]) const override {
   145      void onCharsToGlyphs(const SkUnichar* chars, int count, SkGlyphID glyphs[]) const override {
   267          SK_ABORT("Should never be called.");
   146          SK_ABORT("Should never be called.");
       
   147 +        SkUNREACHABLE;
   268      }
   148      }
   269      int onCountGlyphs() const override {
   149      int onCountGlyphs() const override {
   270          return this->glyphCount();
   150          return this->glyphCount();
   271      }
   151 @@ -162,6 +175,7 @@ protected:
   272  
   152  
   273      void* onGetCTFontRef() const override {
   153      void* onGetCTFontRef() const override {
   274          SK_ABORT("Should never be called.");
   154          SK_ABORT("Should never be called.");
   275 +	SkUNREACHABLE;
   155 +        SkUNREACHABLE;
   276      }
   156      }
   277  
   157  
   278  private:
   158  private:
   279      const SkFontID                                  fFontId;
   159 Index: firefox-115.0/gfx/skia/skia/src/effects/imagefilters/SkBlurImageFilter.cpp
   280      const int                                       fGlyphCount;
   160 ===================================================================
   281      const bool                                      fIsLogging;
   161 --- firefox-115.0.orig/gfx/skia/skia/src/effects/imagefilters/SkBlurImageFilter.cpp
   282      sk_sp<SkStrikeClient::DiscardableHandleManager> fDiscardableManager;
   162 +++ firefox-115.0/gfx/skia/skia/src/effects/imagefilters/SkBlurImageFilter.cpp
   283  
   163 @@ -815,6 +815,7 @@ sk_sp<SkSpecialImage> cpu_blur(
   284 diff --git a/gfx/skia/skia/src/effects/imagefilters/SkBlurImageFilter.cpp b/gfx/skia/skia/src/effects/imagefilters/SkBlurImageFilter.cpp
   164              return maker;
   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:
       
   293              return GrTextureDomain::kRepeat_Mode;
       
   294          default:
       
   295              SK_ABORT("Unsupported tile mode.");
       
   296 +	    SkUNREACHABLE;
       
   297      }
       
   298  }
       
   299  #endif
       
   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          }
   165          }
   311          case 2: {
   166          SK_ABORT("Sigma is out of range.");
   312              return new SkSpotLight(random_point3(random), random_point3(random),
   167 +        SkUNREACHABLE;
   313                                     random->nextUScalar1(), random->nextUScalar1(), random->nextU());
   168      };
   314          }
   169  
   315          default:
   170      PassMaker* makerX = makeMaker(sigma.x());
   316              SK_ABORT("Unexpected value.");
   171 Index: firefox-115.0/gfx/skia/skia/src/fonts/SkFontMgr_indirect.cpp
   317 +	    SkUNREACHABLE;
   172 ===================================================================
   318      }
   173 --- firefox-115.0.orig/gfx/skia/skia/src/fonts/SkFontMgr_indirect.cpp
   319  }
   174 +++ firefox-115.0/gfx/skia/skia/src/fonts/SkFontMgr_indirect.cpp
   320  
   175 @@ -69,6 +69,7 @@ void SkFontMgr_Indirect::onGetFamilyName
   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  }
       
   335  
   176  
   336  SkFontStyleSet* SkFontMgr_Indirect::onCreateStyleSet(int index) const {
   177  SkFontStyleSet* SkFontMgr_Indirect::onCreateStyleSet(int index) const {
   337      SK_ABORT("Not implemented");
   178      SK_ABORT("Not implemented");
   338 +    SkUNREACHABLE;
   179 +    SkUNREACHABLE;
   339  }
   180  }
   340  
   181  
   341  SkFontStyleSet* SkFontMgr_Indirect::onMatchFamily(const char familyName[]) const {
   182  SkFontStyleSet* SkFontMgr_Indirect::onMatchFamily(const char familyName[]) const {
   342      return new SkStyleSet_Indirect(this, -1, fProxy->matchName(familyName));
   183 Index: firefox-115.0/gfx/skia/skia/src/ports/SkFontMgr_FontConfigInterface.cpp
   343  }
   184 ===================================================================
   344  
   185 --- firefox-115.0.orig/gfx/skia/skia/src/ports/SkFontMgr_FontConfigInterface.cpp
   345  SkTypeface* SkFontMgr_Indirect::createTypefaceFromFontId(const SkFontIdentity& id) const {
   186 +++ firefox-115.0/gfx/skia/skia/src/ports/SkFontMgr_FontConfigInterface.cpp
   346      if (id.fDataId == SkFontIdentity::kInvalidDataId) {
   187 @@ -162,18 +162,22 @@ public:
   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);
       
   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) {
       
   363      switch (type) {
       
   364          case SkImage::kETC1_CompressionType:
       
   365              int numBlocksWidth = num_ETC1_blocks_w(width);
       
   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'
       
   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  
       
   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
       
   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) {
       
   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<
       
   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;
       
   429  
       
   430              default:
       
   431                  SK_ABORT("Unknown path transform type");
       
   432 +		SkUNREACHABLE;
       
   433          }
       
   434      }
       
   435  
       
   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);
       
   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
       
   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()));
       
   466      }
       
   467  
       
   468      SK_ABORT("Unexpected DeviceSpaceType");
       
   469 +    SkUNREACHABLE;
       
   470  }
       
   471  
       
   472  GrReducedClip::ClipResult GrReducedClip::clipOutsideElement(const Element* element) {
       
   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()));
       
   484      }
       
   485  
       
   486      SK_ABORT("Unexpected DeviceSpaceType");
       
   487 +    SkUNREACHABLE;
       
   488  }
       
   489  
       
   490  inline void GrReducedClip::addWindowRectangle(const SkRect& elementInteriorRect, bool elementIsAA) {
       
   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  
       
   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);
       
   512  }
       
   513  
       
   514  GrUniqueKey::Domain GrUniqueKey::GenerateDomain() {
       
   515      static std::atomic<int32_t> nextDomain{INHERITED::kInvalidDomain + 1};
       
   516  
       
   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);
       
   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";
       
   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) {
       
   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");
       
   553              return;
       
   554      }
       
   555      SK_ABORT("Unknown io type.");
       
   556 +    SkUNREACHABLE;
       
   557  }
       
   558  
       
   559  void GrShaderVar::appendDecl(const GrShaderCaps* shaderCaps, SkString* out) const {
       
   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:
       
   574              return GrPrimitiveType::kLineStrip;
       
   575      }
       
   576      SK_ABORT("Unexpected mode");
       
   577 +    SkUNREACHABLE;
       
   578  }
       
   579  
       
   580  void SkGpuDevice::drawPoints(SkCanvas::PointMode mode,
       
   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:
       
   595              break;
       
   596      }
       
   597      SK_ABORT("Invalid mode");
       
   598 +    SkUNREACHABLE;
       
   599  }
       
   600  
       
   601  //////////////////////////////////////////////////////////////////////////////
       
   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";
       
   616          case PrimitiveType::kConics: return "kConics";
       
   617      }
       
   618      SK_ABORT("Invalid PrimitiveType");
       
   619 +    SkUNREACHABLE;
       
   620  }
       
   621  
       
   622  inline void GrCCCoverageProcessor::TriPointInstance::set(
       
   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:
       
   637              return Verb::kRoundJoin;
       
   638      }
       
   639      SK_ABORT("Invalid SkPaint::Join.");
       
   640 +    SkUNREACHABLE;
       
   641  }
       
   642  
       
   643  void GrCCStrokeGeometry::beginPath(const SkStrokeRec& stroke, float strokeDevWidth,
       
   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:
       
   658              return false;
       
   659      }
       
   660      SK_ABORT("Invalid GrCCStrokeGeometry::Verb.");
       
   661 +    SkUNREACHABLE;
       
   662  }
       
   663  #endif
       
   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;
       
   673      }
       
   674  
       
   675      SK_ABORT("Invalid stroke style.");
       
   676 +    SkUNREACHABLE;
       
   677  }
       
   678  
       
   679  bool GrCoverageCountingPathRenderer::onDrawPath(const DrawPathArgs& args) {
       
   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:
       
   694              return new Impl(std::move(shader), 4);
       
   695      }
       
   696      SK_ABORT("Invalid PrimitiveType");
       
   697 +    SkUNREACHABLE;
       
   698  }
       
   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:
       
   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,
       
   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:
       
   731              break;
       
   732      }
       
   733      SK_ABORT("Unexpected type");
       
   734 +    SkUNREACHABLE;
       
   735  }
       
   736  
       
   737  static inline uint32_t grsltype_to_size(GrSLType type) {
       
   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:
       
   749              break;
       
   750      }
       
   751      SK_ABORT("Unexpected type");
       
   752 +    SkUNREACHABLE;
       
   753  }
       
   754  
       
   755  uint32_t get_ubo_offset(uint32_t* currentOffset,
       
   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:
       
   770               return 0;
       
   771      }
       
   772      SK_ABORT("Unexpected type");
       
   773 +    SkUNREACHABLE;
       
   774  }
       
   775  
       
   776  static void finalize_helper(GrDawnVaryingHandler::VarArray& vars) {
       
   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:
       
   791                  return color * input;
       
   792          }
       
   793          SK_ABORT("Unexpected mode");
       
   794 +	SkUNREACHABLE;
       
   795      }
       
   796  }
       
   797  
       
   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          }
       
   812      }
       
   813  #undef _CONSTEXPR_
       
   814      SK_ABORT("Unknown region op.");
       
   815 +    SkUNREACHABLE;
       
   816  }
       
   817  
       
   818  sk_sp<const GrXferProcessor> GrCoverageSetOpXPFactory::makeXferProcessor(
       
   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:
       
   833              return &gScreenPDXPF;
       
   834          default:
       
   835              SK_ABORT("Unexpected blend mode.");
       
   836 +	    SkUNREACHABLE;
       
   837      }
       
   838  }
       
   839  
       
   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;
       
   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 {
       
   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());
       
   872          }
       
   873      }
       
   874      SK_ABORT("unreachable");
       
   875 +    SkUNREACHABLE;
       
   876  }
       
   877  
       
   878  #endif
       
   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:
       
   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));
       
   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:
       
   909              return this->path().getBounds();
       
   910      }
       
   911      SK_ABORT("Unknown shape type");
       
   912 +    SkUNREACHABLE;
       
   913  }
       
   914  
       
   915  SkRect GrShape::styledBounds() const {
       
   916      if (this->isEmpty() && !fStyle.hasNonDashPathEffect()) {
       
   917          return SkRect::MakeEmpty();
       
   918      }
       
   919  
       
   920      SkRect bounds;
       
   921 @@ -249,16 +250,17 @@ int GrShape::unstyledKeySize() const {
       
   922              if (dataKeySize >= 0) {
       
   923                  return dataKeySize;
       
   924              }
       
   925              // The key is the path ID and fill type.
       
   926              return 2;
       
   927          }
       
   928      }
       
   929      SK_ABORT("Should never get here.");
       
   930 +    SkUNREACHABLE;
       
   931  }
       
   932  
       
   933  void GrShape::writeUnstyledKey(uint32_t* key) const {
       
   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              }
       
   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 {
       
   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          }
       
   969          return true;
       
   970      }
       
   971      SK_ABORT("Unknown GL Standard");
       
   972 +    SkUNREACHABLE;
       
   973  }
       
   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:
       
   983              return 2;
       
   984      }
       
   985      SK_ABORT("Unexpected GL texture target.");
       
   986 +    SkUNREACHABLE;
       
   987  }
       
   988  
       
   989  GrGpuResource::UniqueID GrGLGpu::TextureUnitBindings::boundID(GrGLenum target) const {
       
   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;
       
  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) {
       
  1008      switch (filter) {
       
  1009          case GrSamplerState::Filter::kNearest: return GR_GL_NEAREST;
       
  1010          case GrSamplerState::Filter::kBilerp:  return GR_GL_LINEAR;
       
  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,
       
  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());
       
  1026              return GR_GL_CLAMP_TO_BORDER;
       
  1027      }
       
  1028      SK_ABORT("Unknown wrap mode");
       
  1029 +    SkUNREACHABLE;
       
  1030  }
       
  1031  
       
  1032  ///////////////////////////////////////////////////////////////////////////////
       
  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));
       
  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  }
       
  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:
       
  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,
       
  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;
       
  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  
       
  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) {
       
  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;
       
  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:
       
  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) {
       
  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:
       
  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.
       
  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:
       
  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,
       
  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:
       
  1187              return "sampler";
       
  1188      }
       
  1189      SK_ABORT("Unknown shader var type.");
       
  1190 +    SkUNREACHABLE;
       
  1191  }
       
  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());
       
  1201              return true;
       
  1202      }
       
  1203      SK_ABORT("Invalid interpolation");
       
  1204 +    SkUNREACHABLE;
       
  1205  }
       
  1206  
       
  1207  void GrGLSLVaryingHandler::addVarying(const char* name, GrGLSLVarying* varying,
       
  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";
       
  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) {
       
  1229      using OutputType = GrGLSLGeometryBuilder::OutputType;
       
  1230      switch (out) {
       
  1231          case OutputType::kPoints: return "points";
       
  1232          case OutputType::kLineStrip: return "line_strip";
       
  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,
       
  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;
       
  1254          }
       
  1255      }
       
  1256      SK_ABORT("Invalid MTLPixelFormat");
       
  1257 +    SkUNREACHABLE;
       
  1258  }
       
  1259  
       
  1260  void GrMtlCaps::initFormatTable() {
       
  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);
       
  1272  #endif
       
  1273      }
       
  1274      SK_ABORT("Invalid compression type");
       
  1275 +    SkUNREACHABLE;
       
  1276  }
       
  1277  
       
  1278  GrSwizzle GrMtlCaps::getTextureSwizzle(const GrBackendFormat& format, GrColorType colorType) const {
       
  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:
       
  1293              return MTLVertexFormatUShort4Normalized;
       
  1294      }
       
  1295      SK_ABORT("Unknown vertex attribute type");
       
  1296 +    SkUNREACHABLE;
       
  1297  }
       
  1298  
       
  1299  static MTLVertexDescriptor* create_vertex_descriptor(const GrPrimitiveProcessor& primProc) {
       
  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;
       
  1311      }
       
  1312  
       
  1313      SK_ABORT("Unknown blend coefficient");
       
  1314 +    SkUNREACHABLE;
       
  1315  }
       
  1316  
       
  1317  static MTLBlendOperation blend_equation_to_mtl_blend_op(GrBlendEquation equation) {
       
  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;
       
  1332              }
       
  1333      }
       
  1334      SK_ABORT("Unknown wrap mode.");
       
  1335 +    SkUNREACHABLE;
       
  1336  }
       
  1337  
       
  1338  GrMtlSampler* GrMtlSampler::Create(const GrMtlGpu* gpu, const GrSamplerState& samplerState) {
       
  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:
       
  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. */
       
  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:
       
  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
       
  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;
       
  1392              return true;
       
  1393      }
       
  1394      SK_ABORT("Unexpected config");
       
  1395 +    SkUNREACHABLE;
       
  1396  }
       
  1397  
       
  1398  MTLTextureDescriptor* GrGetMTLTextureDescriptor(id<MTLTexture> mtlTexture) {
       
  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);
       
  1413              return 0;
       
  1414      }
       
  1415      SK_ABORT("Incomplete switch\n");
       
  1416 +    SkUNREACHABLE;
       
  1417  }
       
  1418  
       
  1419  static uint32_t primitive_vertices(GrPrimitiveType type) {
       
  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);
       
  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) {
       
  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;
       
  1452          }
       
  1453      }
       
  1454      SK_ABORT("Invalid round rect type.");
       
  1455 +    SkUNREACHABLE;
       
  1456  }
       
  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:
       
  1466              return kVertsPerOverstrokeRRect;
       
  1467      }
       
  1468      SK_ABORT("Invalid type");
       
  1469 +    SkUNREACHABLE;
       
  1470  }
       
  1471  
       
  1472  static int rrect_type_to_index_count(RRectType type) {
       
  1473      switch (type) {
       
  1474          case kFill_RRectType:
       
  1475              return kIndicesPerFillRRect;
       
  1476          case kStroke_RRectType:
       
  1477              return kIndicesPerStrokeRRect;
       
  1478          case kOverstroke_RRectType:
       
  1479              return kIndicesPerOverstrokeRRect;
       
  1480      }
       
  1481      SK_ABORT("Invalid type");
       
  1482 +    SkUNREACHABLE;
       
  1483  }
       
  1484  
       
  1485  static const uint16_t* rrect_type_to_indices(RRectType type) {
       
  1486      switch (type) {
       
  1487          case kFill_RRectType:
       
  1488          case kStroke_RRectType:
       
  1489              return gStandardRRectIndices;
       
  1490          case kOverstroke_RRectType:
       
  1491              return gOverstrokeRRectIndices;
       
  1492      }
       
  1493      SK_ABORT("Invalid type");
       
  1494 +    SkUNREACHABLE;
       
  1495  }
       
  1496  
       
  1497  ///////////////////////////////////////////////////////////////////////////////////////////////////
       
  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:
       
  1512              return kVertsPerOverstrokeRRect;
       
  1513      }
       
  1514      SK_ABORT("Invalid type");
       
  1515 +    SkUNREACHABLE;
       
  1516  }
       
  1517  
       
  1518  static int rrect_type_to_index_count(RRectType type) {
       
  1519      switch (type) {
       
  1520          case kFill_RRectType:
       
  1521              return kIndicesPerFillRRect;
       
  1522          case kStroke_RRectType:
       
  1523              return kIndicesPerStrokeRRect;
       
  1524          case kOverstroke_RRectType:
       
  1525              return kIndicesPerOverstrokeRRect;
       
  1526      }
       
  1527      SK_ABORT("Invalid type");
       
  1528 +    SkUNREACHABLE;
       
  1529  }
       
  1530  
       
  1531  static const uint16_t* rrect_type_to_indices(RRectType type) {
       
  1532      switch (type) {
       
  1533          case kFill_RRectType:
       
  1534          case kStroke_RRectType:
       
  1535              return gRRectIndices + 6*4;
       
  1536          case kOverstroke_RRectType:
       
  1537              return gRRectIndices;
       
  1538      }
       
  1539      SK_ABORT("Invalid type");
       
  1540 +    SkUNREACHABLE;
       
  1541  }
       
  1542  
       
  1543  ///////////////////////////////////////////////////////////////////////////////
       
  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      }
       
  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; }
       
  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());
       
  1579          return true;
       
  1580      }
       
  1581      SK_ABORT("Should not get here");
       
  1582 +    SkUNREACHABLE;
       
  1583  }
       
  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;
       
  1593  
       
  1594          default:
       
  1595              SK_ABORT("Unsupported VkFormat");
       
  1596 +	    SkUNREACHABLE;
       
  1597      }
       
  1598  }
       
  1599  
       
  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:
       
  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 {
       
  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:
       
  1632              return BufferUsage::kCpuOnly;
       
  1633      }
       
  1634      SK_ABORT("Invalid GrVkBuffer::Type");
       
  1635 +    SkUNREACHABLE;
       
  1636  }
       
  1637  
       
  1638  bool GrVkMemory::AllocAndBindBufferMemory(const GrVkGpu* gpu,
       
  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:
       
  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,
       
  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:
       
  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,
       
  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:
       
  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,
       
  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()); }
       
  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 {
       
  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:
       
  1737              break;
       
  1738      }
       
  1739      SK_ABORT("Unexpected type");
       
  1740 +    SkUNREACHABLE;
       
  1741  }
       
  1742  
       
  1743  /** Returns the size in bytes taken up in vulkanbuffers for GrSLTypes. */
       
  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:
       
  1755              break;
       
  1756      }
       
  1757      SK_ABORT("Unexpected type");
       
  1758 +    SkUNREACHABLE;
       
  1759  }
       
  1760  
       
  1761  
       
  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:
       
  1776               return 1;
       
  1777      }
       
  1778      SK_ABORT("Unexpected type");
       
  1779 +    SkUNREACHABLE;
       
  1780  }
       
  1781  
       
  1782  static void finalize_helper(GrVkVaryingHandler::VarArray& vars) {
       
  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);
       
  1797          #undef M
       
  1798      }
       
  1799      SK_ABORT("bad tag");
       
  1800 +    SkUNREACHABLE;
       
  1801  }
       
  1802  
       
  1803  struct SkPDFTagNode {
       
  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  
       
  1818  protected:
   188  protected:
  1819      int onCountFamilies() const override {
   189      int onCountFamilies() const override {
  1820          SK_ABORT("Not implemented.");
   190          SK_ABORT("Not implemented.");
  1821 +	SkUNREACHABLE;
   191 +	SkUNREACHABLE;
  1822      }
   192      }
  1835          SK_ABORT("Not implemented.");
   205          SK_ABORT("Not implemented.");
  1836 +	SkUNREACHABLE;
   206 +	SkUNREACHABLE;
  1837      }
   207      }
  1838  
   208  
  1839      SkTypeface* onMatchFamilyStyle(const char requestedFamilyName[],
   209      SkTypeface* onMatchFamilyStyle(const char requestedFamilyName[],
  1840                                     const SkFontStyle& requestedStyle) const override
   210 Index: firefox-115.0/gfx/skia/skia/src/sksl/SkSLCompiler.cpp
  1841      {
   211 ===================================================================
  1842          SkAutoMutexExclusive ama(fMutex);
   212 --- firefox-115.0.orig/gfx/skia/skia/src/sksl/SkSLCompiler.cpp
  1843  
   213 +++ firefox-115.0/gfx/skia/skia/src/sksl/SkSLCompiler.cpp
  1844          SkFontConfigInterface::FontIdentity identity;
   214 @@ -277,6 +277,7 @@ std::unique_ptr<Expression> Compiler::co
  1845 @@ -210,20 +214,22 @@ protected:
       
  1846          }
   215          }
  1847          return face.release();
   216          default:
  1848      }
   217              SK_ABORT("unsupported symbol type %d\n", (int) result->kind());
  1849  
   218 +            SkUNREACHABLE;
  1850      SkTypeface* onMatchFamilyStyleCharacter(const char familyName[], const SkFontStyle&,
   219      }
  1851                                              const char* bcp47[], int bcp47Count,
   220  }
  1852                                              SkUnichar character) const override {
   221  
  1853          SK_ABORT("Not implemented.");
   222 Index: firefox-115.0/gfx/skia/skia/src/sksl/SkSLOperator.cpp
  1854 +	SkUNREACHABLE;
   223 ===================================================================
  1855      }
   224 --- firefox-115.0.orig/gfx/skia/skia/src/sksl/SkSLOperator.cpp
  1856  
   225 +++ firefox-115.0/gfx/skia/skia/src/sksl/SkSLOperator.cpp
  1857      SkTypeface* onMatchFaceStyle(const SkTypeface*, const SkFontStyle&) const override {
   226 @@ -51,7 +51,7 @@ OperatorPrecedence Operator::getBinaryPr
  1858          SK_ABORT("Not implemented.");
   227          case Kind::BITWISEXOREQ: // fall through
  1859 +	SkUNREACHABLE;
   228          case Kind::BITWISEOREQ:  return OperatorPrecedence::kAssignment;
  1860      }
   229          case Kind::COMMA:        return OperatorPrecedence::kSequence;
  1861  
   230 -        default: SK_ABORT("unsupported binary operator");
  1862      sk_sp<SkTypeface> onMakeFromData(sk_sp<SkData> data, int ttcIndex) const override {
   231 +        default: SkUNREACHABLE;
  1863          return this->onMakeFromStreamIndex(SkMemoryStream::Make(std::move(data)), ttcIndex);
   232      }
  1864      }
   233  }
  1865  
   234  
  1866      sk_sp<SkTypeface> onMakeFromStreamIndex(std::unique_ptr<SkStreamAsset> stream,
   235 Index: firefox-115.0/gfx/skia/skia/src/sksl/ir/SkSLType.h
  1867                                              int ttcIndex) const override {
   236 ===================================================================
  1868 diff --git a/gfx/skia/skia/src/shaders/SkImageShader.cpp b/gfx/skia/skia/src/shaders/SkImageShader.cpp
   237 --- firefox-115.0.orig/gfx/skia/skia/src/sksl/ir/SkSLType.h
  1869 --- a/gfx/skia/skia/src/shaders/SkImageShader.cpp
   238 +++ firefox-115.0/gfx/skia/skia/src/sksl/ir/SkSLType.h
  1870 +++ b/gfx/skia/skia/src/shaders/SkImageShader.cpp
   239 @@ -422,6 +422,7 @@ public:
  1871 @@ -178,16 +178,17 @@ static GrSamplerState::WrapMode tile_mod
   240  
  1872          case SkTileMode::kRepeat:
   241      virtual const std::vector<Field>& fields() const {
  1873              return GrSamplerState::WrapMode::kRepeat;
   242          SK_ABORT("Internal error: not a struct");
  1874          case SkTileMode::kMirror:
   243 +        SkUNREACHABLE;
  1875              return GrSamplerState::WrapMode::kMirrorRepeat;
   244      }
  1876          case SkTileMode::kDecal:
   245  
  1877              return GrSamplerState::WrapMode::kClampToBorder;
   246      /**
  1878      }
   247 Index: firefox-115.0/gfx/skia/skia/src/utils/SkShadowUtils.cpp
  1879      SK_ABORT("Unknown tile mode.");
   248 ===================================================================
  1880 +    SkUNREACHABLE;
   249 --- firefox-115.0.orig/gfx/skia/skia/src/utils/SkShadowUtils.cpp
  1881  }
   250 +++ firefox-115.0/gfx/skia/skia/src/utils/SkShadowUtils.cpp
  1882  
   251 @@ -140,6 +140,7 @@ struct SpotVerticesFactory {
  1883  std::unique_ptr<GrFragmentProcessor> SkImageShader::asFragmentProcessor(
   252                  return true;
  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                  }
       
  1898                  return false;
       
  1899          }
   253          }
  1900          SK_ABORT("Uninitialized occluder type?");
   254          SK_ABORT("Uninitialized occluder type?");
  1901 +	SkUNREACHABLE;
   255 +        SkUNREACHABLE;
  1902      }
   256      }
  1903  
   257  
  1904      sk_sp<SkVertices> makeVertices(const SkPath& path, const SkMatrix& ctm,
   258      sk_sp<SkVertices> makeVertices(const SkPath& path, const SkMatrix& ctm,
  1905                                     SkVector* translate) const {
   259 Index: firefox-115.0/intl/icu/source/i18n/number_rounding.cpp
  1906          bool transparent = OccluderType::kTransparent == fOccluderType;
   260 ===================================================================
  1907          SkPoint3 zParams = SkPoint3::Make(0, 0, fOccluderHeight);
   261 --- firefox-115.0.orig/intl/icu/source/i18n/number_rounding.cpp
  1908          if (ctm.hasPerspective() || OccluderType::kOpaquePartialUmbra == fOccluderType) {
   262 +++ firefox-115.0/intl/icu/source/i18n/number_rounding.cpp
  1909              translate->set(0, 0);
   263 @@ -283,6 +283,7 @@ FractionPrecision Precision::constructFr
  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);
       
  1919      settings.fMaxFrac = static_cast<digits_t>(maxFrac);
   264      settings.fMaxFrac = static_cast<digits_t>(maxFrac);
  1920      settings.fMinSig = -1;
   265      settings.fMinSig = -1;
  1921      settings.fMaxSig = -1;
   266      settings.fMaxSig = -1;
  1922 +    settings.fPriority = UNUM_ROUNDING_PRIORITY_RELAXED;
   267 +    settings.fPriority = UNUM_ROUNDING_PRIORITY_RELAXED;
  1923      PrecisionUnion union_;
   268      PrecisionUnion union_;
  1924      union_.fracSig = settings;
   269      union_.fracSig = settings;
  1925      return {RND_FRACTION, union_};
   270      return {RND_FRACTION, union_};
  1926  }
   271 @@ -294,6 +295,7 @@ Precision Precision::constructSignifican
  1927  
       
  1928  Precision Precision::constructSignificant(int32_t minSig, int32_t maxSig) {
       
  1929      FractionSignificantSettings settings;
       
  1930      settings.fMinFrac = -1;
       
  1931      settings.fMaxFrac = -1;
   272      settings.fMaxFrac = -1;
  1932      settings.fMinSig = static_cast<digits_t>(minSig);
   273      settings.fMinSig = static_cast<digits_t>(minSig);
  1933      settings.fMaxSig = static_cast<digits_t>(maxSig);
   274      settings.fMaxSig = static_cast<digits_t>(maxSig);
  1934 +    settings.fPriority = UNUM_ROUNDING_PRIORITY_RELAXED;
   275 +    settings.fPriority = UNUM_ROUNDING_PRIORITY_RELAXED;
  1935      PrecisionUnion union_;
   276      PrecisionUnion union_;
  1936      union_.fracSig = settings;
   277      union_.fracSig = settings;
  1937      return {RND_SIGNIFICANT, union_};
   278      return {RND_SIGNIFICANT, union_};
  1938  }
   279 Index: firefox-115.0/js/src/irregexp/imported/regexp-parser.cc
  1939  
   280 ===================================================================
  1940  Precision
   281 --- firefox-115.0.orig/js/src/irregexp/imported/regexp-parser.cc
  1941  Precision::constructFractionSignificant(
   282 +++ firefox-115.0/js/src/irregexp/imported/regexp-parser.cc
  1942          const FractionPrecision &base,
   283 @@ -2656,6 +2656,7 @@ bool MayContainStrings(ClassSetOperandTy
  1943 diff --git a/third_party/libwebrtc/api/adaptation/resource.cc b/third_party/libwebrtc/api/adaptation/resource.cc
   284        if (operand->IsClassRanges()) return false;
  1944 --- a/third_party/libwebrtc/api/adaptation/resource.cc
   285        return operand->AsClassSetExpression()->may_contain_strings();
  1945 +++ b/third_party/libwebrtc/api/adaptation/resource.cc
   286    }
  1946 @@ -17,16 +17,17 @@ namespace webrtc {
   287 +  UNREACHABLE();
  1947  const char* ResourceUsageStateToString(ResourceUsageState usage_state) {
   288  }
  1948    switch (usage_state) {
   289  
  1949      case ResourceUsageState::kOveruse:
   290  }  // namespace
  1950        return "kOveruse";
   291 Index: firefox-115.0/third_party/libwebrtc/api/adaptation/resource.cc
  1951      case ResourceUsageState::kUnderuse:
   292 ===================================================================
       
   293 --- firefox-115.0.orig/third_party/libwebrtc/api/adaptation/resource.cc
       
   294 +++ firefox-115.0/third_party/libwebrtc/api/adaptation/resource.cc
       
   295 @@ -22,6 +22,7 @@ const char* ResourceUsageStateToString(R
  1952        return "kUnderuse";
   296        return "kUnderuse";
  1953    }
   297    }
  1954    RTC_CHECK_NOTREACHED();
   298    RTC_CHECK_NOTREACHED();
  1955 +  return nullptr;
   299 +  return nullptr;
  1956  }
   300  }
  1957  
   301  
  1958  ResourceListener::~ResourceListener() {}
   302  ResourceListener::~ResourceListener() {}
  1959  
   303 Index: firefox-115.0/third_party/libwebrtc/api/rtp_parameters.cc
  1960  Resource::Resource() {}
   304 ===================================================================
  1961  
   305 --- firefox-115.0.orig/third_party/libwebrtc/api/rtp_parameters.cc
  1962  Resource::~Resource() {}
   306 +++ firefox-115.0/third_party/libwebrtc/api/rtp_parameters.cc
  1963  
   307 @@ -32,6 +32,7 @@ const char* DegradationPreferenceToStrin
  1964 diff --git a/third_party/libwebrtc/api/rtp_parameters.cc b/third_party/libwebrtc/api/rtp_parameters.cc
       
  1965 --- a/third_party/libwebrtc/api/rtp_parameters.cc
       
  1966 +++ b/third_party/libwebrtc/api/rtp_parameters.cc
       
  1967 @@ -27,16 +27,17 @@ const char* DegradationPreferenceToStrin
       
  1968      case DegradationPreference::MAINTAIN_FRAMERATE:
       
  1969        return "maintain-framerate";
       
  1970      case DegradationPreference::MAINTAIN_RESOLUTION:
       
  1971        return "maintain-resolution";
       
  1972      case DegradationPreference::BALANCED:
       
  1973        return "balanced";
   308        return "balanced";
  1974    }
   309    }
  1975    RTC_CHECK_NOTREACHED();
   310    RTC_CHECK_NOTREACHED();
  1976 +  return "";
   311 +  return "";
  1977  }
   312  }
  1978  
   313  
  1979  const double kDefaultBitratePriority = 1.0;
   314  const double kDefaultBitratePriority = 1.0;
  1980  
   315 Index: firefox-115.0/third_party/libwebrtc/api/video/video_frame_buffer.cc
  1981  RtcpFeedback::RtcpFeedback() = default;
   316 ===================================================================
  1982  RtcpFeedback::RtcpFeedback(RtcpFeedbackType type) : type(type) {}
   317 --- firefox-115.0.orig/third_party/libwebrtc/api/video/video_frame_buffer.cc
  1983  RtcpFeedback::RtcpFeedback(RtcpFeedbackType type,
   318 +++ firefox-115.0/third_party/libwebrtc/api/video/video_frame_buffer.cc
  1984                             RtcpFeedbackMessageType message_type)
   319 @@ -106,6 +106,8 @@ const char* VideoFrameBufferTypeToString
  1985 diff --git a/third_party/libwebrtc/api/video/video_frame_buffer.cc b/third_party/libwebrtc/api/video/video_frame_buffer.cc
       
  1986 --- a/third_party/libwebrtc/api/video/video_frame_buffer.cc
       
  1987 +++ b/third_party/libwebrtc/api/video/video_frame_buffer.cc
       
  1988 @@ -94,16 +94,18 @@ const char* VideoFrameBufferTypeToString
       
  1989        return "kI010";
       
  1990      case VideoFrameBuffer::Type::kI210:
       
  1991        return "kI210";
       
  1992      case VideoFrameBuffer::Type::kNV12:
       
  1993        return "kNV12";
       
  1994      default:
   320      default:
  1995        RTC_DCHECK_NOTREACHED();
   321        RTC_DCHECK_NOTREACHED();
  1996    }
   322    }
  1997 +  RTC_DCHECK_NOTREACHED();
   323 +  RTC_DCHECK_NOTREACHED();
  1998 +  return nullptr;
   324 +  return nullptr;
  1999  }
   325  }
  2000  
   326  
  2001  int I420BufferInterface::ChromaWidth() const {
   327  int I420BufferInterface::ChromaWidth() const {
  2002    return (width() + 1) / 2;
   328 Index: firefox-115.0/third_party/libwebrtc/api/video_codecs/video_codec.cc
  2003  }
   329 ===================================================================
  2004  
   330 --- firefox-115.0.orig/third_party/libwebrtc/api/video_codecs/video_codec.cc
  2005  int I420BufferInterface::ChromaHeight() const {
   331 +++ firefox-115.0/third_party/libwebrtc/api/video_codecs/video_codec.cc
  2006    return (height() + 1) / 2;
   332 @@ -118,6 +118,7 @@ const char* CodecTypeToPayloadString(Vid
  2007 diff --git a/third_party/libwebrtc/api/video_codecs/video_codec.cc b/third_party/libwebrtc/api/video_codecs/video_codec.cc
       
  2008 --- a/third_party/libwebrtc/api/video_codecs/video_codec.cc
       
  2009 +++ b/third_party/libwebrtc/api/video_codecs/video_codec.cc
       
  2010 @@ -113,16 +113,17 @@ const char* CodecTypeToPayloadString(Vid
       
  2011      case kVideoCodecH264:
       
  2012        return kPayloadNameH264;
       
  2013      case kVideoCodecMultiplex:
       
  2014        return kPayloadNameMultiplex;
       
  2015      case kVideoCodecGeneric:
       
  2016        return kPayloadNameGeneric;
   333        return kPayloadNameGeneric;
  2017    }
   334    }
  2018    RTC_CHECK_NOTREACHED();
   335    RTC_CHECK_NOTREACHED();
  2019 +  return "";
   336 +  return "";
  2020  }
   337  }
  2021  
   338  
  2022  VideoCodecType PayloadStringToCodecType(const std::string& name) {
   339  VideoCodecType PayloadStringToCodecType(const std::string& name) {
  2023    if (absl::EqualsIgnoreCase(name, kPayloadNameVp8))
   340 Index: firefox-115.0/third_party/libwebrtc/api/video_codecs/video_encoder_software_fallback_wrapper.cc
  2024      return kVideoCodecVP8;
   341 ===================================================================
  2025    if (absl::EqualsIgnoreCase(name, kPayloadNameVp9))
   342 --- firefox-115.0.orig/third_party/libwebrtc/api/video_codecs/video_encoder_software_fallback_wrapper.cc
  2026      return kVideoCodecVP9;
   343 +++ firefox-115.0/third_party/libwebrtc/api/video_codecs/video_encoder_software_fallback_wrapper.cc
  2027    if (absl::EqualsIgnoreCase(name, kPayloadNameAv1) ||
   344 @@ -163,6 +163,7 @@ class VideoEncoderSoftwareFallbackWrappe
  2028 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
       
  2029 --- a/third_party/libwebrtc/api/video_codecs/video_encoder_software_fallback_wrapper.cc
       
  2030 +++ b/third_party/libwebrtc/api/video_codecs/video_encoder_software_fallback_wrapper.cc
       
  2031 @@ -158,16 +158,17 @@ class VideoEncoderSoftwareFallbackWrappe
       
  2032          [[fallthrough]];
       
  2033        case EncoderState::kMainEncoderUsed:
       
  2034          return encoder_.get();
       
  2035        case EncoderState::kFallbackDueToFailure:
       
  2036        case EncoderState::kForcedFallback:
       
  2037          return fallback_encoder_.get();
   345          return fallback_encoder_.get();
  2038      }
   346      }
  2039      RTC_CHECK_NOTREACHED();
   347      RTC_CHECK_NOTREACHED();
  2040 +    return nullptr;
   348 +    return nullptr;
  2041    }
   349    }
  2042  
   350  
  2043    // Updates encoder with last observed parameters, such as callbacks, rates,
   351    // Updates encoder with last observed parameters, such as callbacks, rates,
  2044    // etc.
   352 @@ -343,6 +344,7 @@ int32_t VideoEncoderSoftwareFallbackWrap
  2045    void PrimeEncoder(VideoEncoder* encoder) const;
       
  2046  
       
  2047    // Settings used in the last InitEncode call and used if a dynamic fallback to
       
  2048    // software is required.
       
  2049 @@ -338,16 +339,17 @@ int32_t VideoEncoderSoftwareFallbackWrap
       
  2050      case EncoderState::kMainEncoderUsed: {
       
  2051        return EncodeWithMainEncoder(frame, frame_types);
       
  2052      }
       
  2053      case EncoderState::kFallbackDueToFailure:
       
  2054      case EncoderState::kForcedFallback:
       
  2055        return fallback_encoder_->Encode(frame, frame_types);
   353        return fallback_encoder_->Encode(frame, frame_types);
  2056    }
   354    }
  2057    RTC_CHECK_NOTREACHED();
   355    RTC_CHECK_NOTREACHED();
  2058 +  return WEBRTC_VIDEO_CODEC_ERROR;
   356 +  return WEBRTC_VIDEO_CODEC_ERROR;
  2059  }
   357  }
  2060  
   358  
  2061  int32_t VideoEncoderSoftwareFallbackWrapper::EncodeWithMainEncoder(
   359  int32_t VideoEncoderSoftwareFallbackWrapper::EncodeWithMainEncoder(
  2062      const VideoFrame& frame,
   360 Index: firefox-115.0/third_party/libwebrtc/call/adaptation/video_stream_adapter.cc
  2063      const std::vector<VideoFrameType>* frame_types) {
   361 ===================================================================
  2064    int32_t ret = encoder_->Encode(frame, frame_types);
   362 --- firefox-115.0.orig/third_party/libwebrtc/call/adaptation/video_stream_adapter.cc
  2065    // If requested, try a software fallback.
   363 +++ firefox-115.0/third_party/libwebrtc/call/adaptation/video_stream_adapter.cc
  2066    bool fallback_requested = (ret == WEBRTC_VIDEO_CODEC_FALLBACK_SOFTWARE);
   364 @@ -168,6 +168,7 @@ const char* Adaptation::StatusToString(A
  2067 diff --git a/third_party/libwebrtc/call/adaptation/video_stream_adapter.cc b/third_party/libwebrtc/call/adaptation/video_stream_adapter.cc
       
  2068 --- a/third_party/libwebrtc/call/adaptation/video_stream_adapter.cc
       
  2069 +++ b/third_party/libwebrtc/call/adaptation/video_stream_adapter.cc
       
  2070 @@ -163,16 +163,17 @@ const char* Adaptation::StatusToString(A
       
  2071      case Status::kInsufficientInput:
       
  2072        return "kInsufficientInput";
       
  2073      case Status::kAdaptationDisabled:
       
  2074        return "kAdaptationDisabled";
       
  2075      case Status::kRejectedByConstraint:
       
  2076        return "kRejectedByConstraint";
   365        return "kRejectedByConstraint";
  2077    }
   366    }
  2078    RTC_CHECK_NOTREACHED();
   367    RTC_CHECK_NOTREACHED();
  2079 +  return "";
   368 +  return "";
  2080  }
   369  }
  2081  
   370  
  2082  Adaptation::Adaptation(int validation_id,
   371  Adaptation::Adaptation(int validation_id,
  2083                         VideoSourceRestrictions restrictions,
   372 @@ -390,6 +391,7 @@ VideoStreamAdapter::RestrictionsOrState
  2084                         VideoAdaptationCounters counters,
       
  2085                         VideoStreamInputState input_state)
       
  2086      : validation_id_(validation_id),
       
  2087        status_(Status::kValid),
       
  2088 @@ -385,16 +386,17 @@ VideoStreamAdapter::RestrictionsOrState 
       
  2089      case DegradationPreference::MAINTAIN_RESOLUTION: {
       
  2090        // Scale up framerate.
       
  2091        return IncreaseFramerate(input_state, current_restrictions_);
       
  2092      }
       
  2093      case DegradationPreference::DISABLED:
       
  2094        return Adaptation::Status::kAdaptationDisabled;
   373        return Adaptation::Status::kAdaptationDisabled;
  2095    }
   374    }
  2096    RTC_CHECK_NOTREACHED();
   375    RTC_CHECK_NOTREACHED();
  2097 +  return Adaptation::Status::kAdaptationDisabled;
   376 +  return Adaptation::Status::kAdaptationDisabled;
  2098  }
   377  }
  2099  
   378  
  2100  Adaptation VideoStreamAdapter::GetAdaptationDown() {
   379  Adaptation VideoStreamAdapter::GetAdaptationDown() {
  2101    RTC_DCHECK_RUN_ON(&sequence_checker_);
   380 @@ -472,6 +474,7 @@ VideoStreamAdapter::GetAdaptationDownSte
  2102    VideoStreamInputState input_state = input_state_provider_->InputState();
       
  2103    ++adaptation_validation_id_;
       
  2104    RestrictionsOrState restrictions_or_state =
       
  2105        GetAdaptationDownStep(input_state, current_restrictions_);
       
  2106 @@ -467,16 +469,17 @@ VideoStreamAdapter::GetAdaptationDownSte
       
  2107      }
       
  2108      case DegradationPreference::MAINTAIN_RESOLUTION: {
       
  2109        return DecreaseFramerate(input_state, current_restrictions);
       
  2110      }
       
  2111      case DegradationPreference::DISABLED:
       
  2112        return Adaptation::Status::kAdaptationDisabled;
   381        return Adaptation::Status::kAdaptationDisabled;
  2113    }
   382    }
  2114    RTC_CHECK_NOTREACHED();
   383    RTC_CHECK_NOTREACHED();
  2115 +  return Adaptation::Status::kAdaptationDisabled;
   384 +  return Adaptation::Status::kAdaptationDisabled;
  2116  }
   385  }
  2117  
   386  
  2118  VideoStreamAdapter::RestrictionsOrState VideoStreamAdapter::DecreaseResolution(
   387  VideoStreamAdapter::RestrictionsOrState VideoStreamAdapter::DecreaseResolution(
  2119      const VideoStreamInputState& input_state,
   388 @@ -625,6 +628,8 @@ Adaptation VideoStreamAdapter::GetAdaptD
  2120      const RestrictionsWithCounters& current_restrictions) {
       
  2121    int target_pixels =
       
  2122        GetLowerResolutionThan(input_state.frame_size_pixels().value());
       
  2123    // Use single active stream if set, this stream could be lower than the input.
       
  2124 @@ -620,16 +623,18 @@ Adaptation VideoStreamAdapter::GetAdaptD
       
  2125      case DegradationPreference::MAINTAIN_FRAMERATE:
       
  2126        return GetAdaptationDown();
       
  2127      case DegradationPreference::BALANCED: {
       
  2128        return RestrictionsOrStateToAdaptation(
       
  2129            GetAdaptDownResolutionStepForBalanced(input_state), input_state);
       
  2130      }
   389      }
  2131    }
   390    }
  2132    RTC_CHECK_NOTREACHED();
   391    RTC_CHECK_NOTREACHED();
  2133 +  return RestrictionsOrStateToAdaptation(
   392 +  return RestrictionsOrStateToAdaptation(
  2134 +         Adaptation::Status::kAdaptationDisabled, input_state);
   393 +         Adaptation::Status::kAdaptationDisabled, input_state);
  2135  }
   394  }
  2136  
   395  
  2137  VideoStreamAdapter::RestrictionsOrState
   396  VideoStreamAdapter::RestrictionsOrState
  2138  VideoStreamAdapter::GetAdaptDownResolutionStepForBalanced(
   397 Index: firefox-115.0/third_party/libwebrtc/call/rtp_payload_params.cc
  2139      const VideoStreamInputState& input_state) const {
   398 ===================================================================
  2140    // Adapt twice if the first adaptation did not decrease resolution.
   399 --- firefox-115.0.orig/third_party/libwebrtc/call/rtp_payload_params.cc
  2141    auto first_step = GetAdaptationDownStep(input_state, current_restrictions_);
   400 +++ firefox-115.0/third_party/libwebrtc/call/rtp_payload_params.cc
  2142    if (!absl::holds_alternative<RestrictionsWithCounters>(first_step)) {
   401 @@ -407,7 +407,7 @@ absl::optional<FrameDependencyStructure>
  2143 diff --git a/third_party/libwebrtc/call/video_send_stream.cc b/third_party/libwebrtc/call/video_send_stream.cc
   402      case VideoCodecType::kVideoCodecMultiplex:
  2144 --- a/third_party/libwebrtc/call/video_send_stream.cc
   403        return absl::nullopt;
  2145 +++ b/third_party/libwebrtc/call/video_send_stream.cc
   404    }
  2146 @@ -25,16 +25,17 @@ const char* StreamTypeToString(VideoSend
   405 -  RTC_DCHECK_NOTREACHED() << "Unsupported codec.";
  2147      case VideoSendStream::StreamStats::StreamType::kMedia:
   406 +  RTC_CHECK_NOTREACHED();
  2148        return "media";
   407  }
  2149      case VideoSendStream::StreamStats::StreamType::kRtx:
   408  
  2150        return "rtx";
   409  void RtpPayloadParams::GenericToGeneric(int64_t shared_frame_id,
  2151      case VideoSendStream::StreamStats::StreamType::kFlexfec:
   410 Index: firefox-115.0/third_party/libwebrtc/call/video_send_stream.cc
       
   411 ===================================================================
       
   412 --- firefox-115.0.orig/third_party/libwebrtc/call/video_send_stream.cc
       
   413 +++ firefox-115.0/third_party/libwebrtc/call/video_send_stream.cc
       
   414 @@ -30,6 +30,7 @@ const char* StreamTypeToString(VideoSend
  2152        return "flexfec";
   415        return "flexfec";
  2153    }
   416    }
  2154    RTC_CHECK_NOTREACHED();
   417    RTC_CHECK_NOTREACHED();
  2155 +  return "";
   418 +  return "";
  2156  }
   419  }
  2157  
   420  
  2158  }  // namespace
   421  }  // namespace
  2159  
   422 Index: firefox-115.0/third_party/libwebrtc/modules/audio_processing/agc2/clipping_predictor.cc
  2160  VideoSendStream::StreamStats::StreamStats() = default;
   423 ===================================================================
  2161  VideoSendStream::StreamStats::~StreamStats() = default;
   424 --- firefox-115.0.orig/third_party/libwebrtc/modules/audio_processing/agc2/clipping_predictor.cc
  2162  
   425 +++ firefox-115.0/third_party/libwebrtc/modules/audio_processing/agc2/clipping_predictor.cc
  2163  std::string VideoSendStream::StreamStats::ToString() const {
   426 @@ -378,7 +378,7 @@ std::unique_ptr<ClippingPredictor> Creat
  2164 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
   427            config.reference_window_delay, config.clipping_threshold,
  2165 --- a/third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_fc.cc
   428            /*adaptive_step_estimation=*/false);
  2166 +++ b/third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_fc.cc
   429    }
  2167 @@ -54,16 +54,18 @@ std::vector<float> PreprocessWeights(rtc
   430 -  RTC_DCHECK_NOTREACHED();
  2168  rtc::FunctionView<float(float)> GetActivationFunction(
   431 +  RTC_CHECK_NOTREACHED();
  2169      ActivationFunction activation_function) {
   432  }
  2170    switch (activation_function) {
   433  
  2171      case ActivationFunction::kTansigApproximated:
   434  }  // namespace webrtc
  2172        return ::rnnoise::TansigApproximated;
   435 Index: firefox-115.0/third_party/libwebrtc/modules/audio_processing/agc2/input_volume_stats_reporter.cc
       
   436 ===================================================================
       
   437 --- firefox-115.0.orig/third_party/libwebrtc/modules/audio_processing/agc2/input_volume_stats_reporter.cc
       
   438 +++ firefox-115.0/third_party/libwebrtc/modules/audio_processing/agc2/input_volume_stats_reporter.cc
       
   439 @@ -48,6 +48,7 @@ constexpr absl::string_view MetricNamePr
       
   440      case InputVolumeType::kRecommended:
       
   441        return "WebRTC.Audio.Apm.RecommendedInputVolume.";
       
   442    }
       
   443 +  RTC_CHECK_NOTREACHED();
       
   444  }
       
   445  
       
   446  metrics::Histogram* CreateVolumeHistogram(InputVolumeType input_volume_type) {
       
   447 Index: firefox-115.0/third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_fc.cc
       
   448 ===================================================================
       
   449 --- firefox-115.0.orig/third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_fc.cc
       
   450 +++ firefox-115.0/third_party/libwebrtc/modules/audio_processing/agc2/rnn_vad/rnn_fc.cc
       
   451 @@ -59,6 +59,8 @@ rtc::FunctionView<float(float)> GetActiv
  2173      case ActivationFunction::kSigmoidApproximated:
   452      case ActivationFunction::kSigmoidApproximated:
  2174        return ::rnnoise::SigmoidApproximated;
   453        return ::rnnoise::SigmoidApproximated;
  2175    }
   454    }
  2176 +  // supposed to be never reached apparently therefore returning bogus
   455 +  // supposed to be never reached apparently therefore returning bogus
  2177 +  return ::rnnoise::TansigApproximated;
   456 +  return ::rnnoise::TansigApproximated;
  2178  }
   457  }
  2179  
   458  
  2180  }  // namespace
   459  }  // namespace
  2181  
   460 Index: firefox-115.0/third_party/libwebrtc/modules/audio_processing/audio_processing_impl.cc
  2182  FullyConnectedLayer::FullyConnectedLayer(
   461 ===================================================================
  2183      const int input_size,
   462 --- firefox-115.0.orig/third_party/libwebrtc/modules/audio_processing/audio_processing_impl.cc
  2184      const int output_size,
   463 +++ firefox-115.0/third_party/libwebrtc/modules/audio_processing/audio_processing_impl.cc
  2185      const rtc::ArrayView<const int8_t> bias,
   464 @@ -99,6 +99,7 @@ GainControl::Mode Agc1ConfigModeToInterf
  2186 diff --git a/third_party/libwebrtc/modules/audio_processing/audio_processing_impl.cc b/third_party/libwebrtc/modules/audio_processing/audio_processing_impl.cc
       
  2187 --- a/third_party/libwebrtc/modules/audio_processing/audio_processing_impl.cc
       
  2188 +++ b/third_party/libwebrtc/modules/audio_processing/audio_processing_impl.cc
       
  2189 @@ -115,16 +115,17 @@ GainControl::Mode Agc1ConfigModeToInterf
       
  2190      case Agc1Config::kAdaptiveAnalog:
       
  2191        return GainControl::kAdaptiveAnalog;
       
  2192      case Agc1Config::kAdaptiveDigital:
       
  2193        return GainControl::kAdaptiveDigital;
       
  2194      case Agc1Config::kFixedDigital:
       
  2195        return GainControl::kFixedDigital;
   465        return GainControl::kFixedDigital;
  2196    }
   466    }
  2197    RTC_CHECK_NOTREACHED();
   467    RTC_CHECK_NOTREACHED();
  2198 +  return GainControl::kAdaptiveAnalog;
   468 +  return GainControl::kAdaptiveAnalog;
  2199  }
   469  }
  2200  
   470  
  2201  bool MinimizeProcessingForUnusedOutput() {
   471  bool MinimizeProcessingForUnusedOutput() {
  2202    return !field_trial::IsEnabled("WebRTC-MutedStateKillSwitch");
   472 @@ -166,7 +167,7 @@ int AudioFormatValidityToErrorCode(Audio
  2203  }
   473      case AudioFormatValidity::kInvalidChannelCount:
  2204  
   474        return AudioProcessing::kBadNumberChannelsError;
  2205  // Maximum lengths that frame of samples being passed from the render side to
   475    }
  2206  // the capture side can have (does not apply to AEC3).
   476 -  RTC_DCHECK(false);
  2207 @@ -1989,16 +1990,17 @@ void AudioProcessingImpl::InitializeNois
   477 +  RTC_CHECK_NOTREACHED();
  2208              case NoiseSuppresionConfig::kModerate:
   478  }
  2209                return NsConfig::SuppressionLevel::k12dB;
   479  
  2210              case NoiseSuppresionConfig::kHigh:
   480  // Returns an AudioProcessing::Error together with the best possible option for
  2211                return NsConfig::SuppressionLevel::k18dB;
   481 @@ -2421,6 +2422,7 @@ void AudioProcessingImpl::InitializeNois
  2212              case NoiseSuppresionConfig::kVeryHigh:
       
  2213                return NsConfig::SuppressionLevel::k21dB;
   482                return NsConfig::SuppressionLevel::k21dB;
  2214            }
   483            }
  2215            RTC_CHECK_NOTREACHED();
   484            RTC_CHECK_NOTREACHED();
  2216 +	  return NsConfig::SuppressionLevel::k6dB;
   485 +	  return NsConfig::SuppressionLevel::k6dB;
  2217          };
   486          };
  2218  
   487  
  2219      NsConfig cfg;
   488      NsConfig cfg;
  2220      cfg.target_level = map_level(config_.noise_suppression.level);
   489 Index: firefox-115.0/third_party/libwebrtc/modules/audio_processing/include/audio_processing.cc
  2221      submodules_.noise_suppressor = std::make_unique<NoiseSuppressor>(
   490 ===================================================================
  2222          cfg, proc_sample_rate_hz(), num_proc_channels());
   491 --- firefox-115.0.orig/third_party/libwebrtc/modules/audio_processing/include/audio_processing.cc
  2223    }
   492 +++ firefox-115.0/third_party/libwebrtc/modules/audio_processing/include/audio_processing.cc
  2224  }
   493 @@ -32,6 +32,7 @@ std::string NoiseSuppressionLevelToStrin
  2225 diff --git a/third_party/libwebrtc/modules/audio_processing/include/audio_processing.cc b/third_party/libwebrtc/modules/audio_processing/include/audio_processing.cc
       
  2226 --- a/third_party/libwebrtc/modules/audio_processing/include/audio_processing.cc
       
  2227 +++ b/third_party/libwebrtc/modules/audio_processing/include/audio_processing.cc
       
  2228 @@ -27,28 +27,30 @@ std::string NoiseSuppressionLevelToStrin
       
  2229      case AudioProcessing::Config::NoiseSuppression::Level::kModerate:
       
  2230        return "Moderate";
       
  2231      case AudioProcessing::Config::NoiseSuppression::Level::kHigh:
       
  2232        return "High";
       
  2233      case AudioProcessing::Config::NoiseSuppression::Level::kVeryHigh:
       
  2234        return "VeryHigh";
   494        return "VeryHigh";
  2235    }
   495    }
  2236    RTC_CHECK_NOTREACHED();
   496    RTC_CHECK_NOTREACHED();
  2237 +  return "";
   497 +  return "";
  2238  }
   498  }
  2239  
   499  
  2240  std::string GainController1ModeToString(const Agc1Config::Mode& mode) {
   500  std::string GainController1ModeToString(const Agc1Config::Mode& mode) {
  2241    switch (mode) {
   501 @@ -44,6 +45,7 @@ std::string GainController1ModeToString(
  2242      case Agc1Config::Mode::kAdaptiveAnalog:
       
  2243        return "AdaptiveAnalog";
       
  2244      case Agc1Config::Mode::kAdaptiveDigital:
       
  2245        return "AdaptiveDigital";
       
  2246      case Agc1Config::Mode::kFixedDigital:
       
  2247        return "FixedDigital";
   502        return "FixedDigital";
  2248    }
   503    }
  2249    RTC_CHECK_NOTREACHED();
   504    RTC_CHECK_NOTREACHED();
  2250 +  return "";
   505 +  return "";
  2251  }
   506  }
  2252  
   507  
  2253  }  // namespace
   508  }  // namespace
  2254  
   509 Index: firefox-115.0/third_party/libwebrtc/modules/audio_processing/transient/transient_suppressor_impl.cc
  2255  constexpr int AudioProcessing::kNativeSampleRatesHz[];
   510 ===================================================================
  2256  
   511 --- firefox-115.0.orig/third_party/libwebrtc/modules/audio_processing/transient/transient_suppressor_impl.cc
  2257  void CustomProcessing::SetRuntimeSetting(
   512 +++ firefox-115.0/third_party/libwebrtc/modules/audio_processing/transient/transient_suppressor_impl.cc
  2258      AudioProcessing::RuntimeSetting setting) {}
   513 @@ -53,6 +53,7 @@ std::string GetVadModeLabel(TransientSup
  2259 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
   514      case TransientSuppressor::VadMode::kNoVad:
  2260 --- a/third_party/libwebrtc/modules/rtp_rtcp/source/create_video_rtp_depacketizer.cc
   515        return "no VAD";
  2261 +++ b/third_party/libwebrtc/modules/rtp_rtcp/source/create_video_rtp_depacketizer.cc
   516    }
  2262 @@ -33,11 +33,12 @@ std::unique_ptr<VideoRtpDepacketizer> Cr
   517 +  RTC_CHECK_NOTREACHED();
  2263        return std::make_unique<VideoRtpDepacketizerVp9>();
   518  }
  2264      case kVideoCodecAV1:
   519  
  2265        return std::make_unique<VideoRtpDepacketizerAv1>();
   520  }  // namespace
  2266      case kVideoCodecGeneric:
   521 Index: firefox-115.0/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_portal.cc
  2267      case kVideoCodecMultiplex:
   522 ===================================================================
       
   523 --- firefox-115.0.orig/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_portal.cc
       
   524 +++ firefox-115.0/third_party/libwebrtc/modules/desktop_capture/linux/wayland/screencast_portal.cc
       
   525 @@ -44,6 +44,7 @@ ScreenCastPortal::CaptureSourceType Scre
       
   526      case CaptureType::kAnyScreenContent:
       
   527        return ScreenCastPortal::CaptureSourceType::kAnyScreenContent;
       
   528    }
       
   529 +  RTC_CHECK_NOTREACHED();
       
   530  }
       
   531  
       
   532  ScreenCastPortal::ScreenCastPortal(CaptureType type, PortalNotifier* notifier)
       
   533 Index: firefox-115.0/third_party/libwebrtc/modules/rtp_rtcp/source/create_video_rtp_depacketizer.cc
       
   534 ===================================================================
       
   535 --- firefox-115.0.orig/third_party/libwebrtc/modules/rtp_rtcp/source/create_video_rtp_depacketizer.cc
       
   536 +++ firefox-115.0/third_party/libwebrtc/modules/rtp_rtcp/source/create_video_rtp_depacketizer.cc
       
   537 @@ -38,6 +38,7 @@ std::unique_ptr<VideoRtpDepacketizer> Cr
  2268        return std::make_unique<VideoRtpDepacketizerGeneric>();
   538        return std::make_unique<VideoRtpDepacketizerGeneric>();
  2269    }
   539    }
  2270    RTC_CHECK_NOTREACHED();
   540    RTC_CHECK_NOTREACHED();
  2271 +  return nullptr;
   541 +  return nullptr;
  2272  }
   542  }
  2273  
   543  
  2274  }  // namespace webrtc
   544  }  // namespace webrtc
  2275 diff --git a/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender.cc b/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender.cc
   545 Index: firefox-115.0/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender.cc
  2276 --- a/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender.cc
   546 ===================================================================
  2277 +++ b/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender.cc
   547 --- firefox-115.0.orig/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender.cc
  2278 @@ -137,16 +137,17 @@ bool IsNonVolatile(RTPExtensionType type
   548 +++ firefox-115.0/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender.cc
  2279  #if defined(WEBRTC_MOZILLA_BUILD)
   549 @@ -142,6 +142,7 @@ bool IsNonVolatile(RTPExtensionType type
  2280      case kRtpExtensionCsrcAudioLevel:
       
  2281        // TODO: Mozilla implement for CsrcAudioLevel
       
  2282        RTC_CHECK(false);
       
  2283        return false;
       
  2284  #endif
   550  #endif
  2285    }
   551    }
  2286    RTC_CHECK_NOTREACHED();
   552    RTC_CHECK_NOTREACHED();
  2287 +  return false;
   553 +  return false;
  2288  }
   554  }
  2289  
   555  
  2290  bool HasBweExtension(const RtpHeaderExtensionMap& extensions_map) {
   556  bool HasBweExtension(const RtpHeaderExtensionMap& extensions_map) {
  2291    return extensions_map.IsRegistered(kRtpExtensionTransportSequenceNumber) ||
   557 Index: firefox-115.0/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender_audio.cc
  2292           extensions_map.IsRegistered(kRtpExtensionTransportSequenceNumber02) ||
   558 ===================================================================
  2293           extensions_map.IsRegistered(kRtpExtensionAbsoluteSendTime) ||
   559 --- firefox-115.0.orig/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender_audio.cc
  2294           extensions_map.IsRegistered(kRtpExtensionTransmissionTimeOffset);
   560 +++ firefox-115.0/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender_audio.cc
  2295  }
   561 @@ -45,6 +45,7 @@ namespace {
  2296 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
       
  2297 --- a/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender_audio.cc
       
  2298 +++ b/third_party/libwebrtc/modules/rtp_rtcp/source/rtp_sender_audio.cc
       
  2299 @@ -40,16 +40,17 @@ namespace {
       
  2300      case AudioFrameType::kEmptyFrame:
       
  2301        return "empty";
       
  2302      case AudioFrameType::kAudioFrameSpeech:
       
  2303        return "audio_speech";
       
  2304      case AudioFrameType::kAudioFrameCN:
       
  2305        return "audio_cn";
   562        return "audio_cn";
  2306    }
   563    }
  2307    RTC_CHECK_NOTREACHED();
   564    RTC_CHECK_NOTREACHED();
  2308 +  return "";
   565 +  return "";
  2309  }
   566  }
  2310  
   567  
  2311  constexpr char kIncludeCaptureClockOffset[] =
   568  constexpr char kIncludeCaptureClockOffset[] =
  2312      "WebRTC-IncludeCaptureClockOffset";
   569 Index: firefox-115.0/third_party/libwebrtc/modules/video_coding/codecs/vp8/default_temporal_layers.cc
       
   570 ===================================================================
       
   571 --- firefox-115.0.orig/third_party/libwebrtc/modules/video_coding/codecs/vp8/default_temporal_layers.cc
       
   572 +++ firefox-115.0/third_party/libwebrtc/modules/video_coding/codecs/vp8/default_temporal_layers.cc
       
   573 @@ -110,6 +110,7 @@ size_t BufferToIndex(Vp8BufferReference
       
   574      case Vp8FrameConfig::Vp8BufferReference::kNone:
       
   575        RTC_CHECK_NOTREACHED();
       
   576    }
       
   577 +  RTC_CHECK_NOTREACHED();
       
   578  }
  2313  
   579  
  2314  }  // namespace
   580  }  // namespace
  2315  
   581 Index: firefox-115.0/third_party/libwebrtc/modules/video_coding/codecs/vp8/temporal_layers_checker.cc
  2316  RTPSenderAudio::RTPSenderAudio(Clock* clock, RTPSender* rtp_sender)
   582 ===================================================================
  2317 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
   583 --- firefox-115.0.orig/third_party/libwebrtc/modules/video_coding/codecs/vp8/temporal_layers_checker.cc
  2318 --- a/third_party/libwebrtc/modules/video_coding/codecs/vp8/temporal_layers_checker.cc
   584 +++ firefox-115.0/third_party/libwebrtc/modules/video_coding/codecs/vp8/temporal_layers_checker.cc
  2319 +++ b/third_party/libwebrtc/modules/video_coding/codecs/vp8/temporal_layers_checker.cc
   585 @@ -30,6 +30,7 @@ TemporalLayersChecker::CreateTemporalLay
  2320 @@ -25,16 +25,17 @@ TemporalLayersChecker::CreateTemporalLay
       
  2321      case Vp8TemporalLayersType::kFixedPattern:
       
  2322        return std::make_unique<DefaultTemporalLayersChecker>(
       
  2323            num_temporal_layers);
       
  2324      case Vp8TemporalLayersType::kBitrateDynamic:
       
  2325        // Conference mode temporal layering for screen content in base stream.
       
  2326        return std::make_unique<TemporalLayersChecker>(num_temporal_layers);
   586        return std::make_unique<TemporalLayersChecker>(num_temporal_layers);
  2327    }
   587    }
  2328    RTC_CHECK_NOTREACHED();
   588    RTC_CHECK_NOTREACHED();
  2329 +  return nullptr;
   589 +  return nullptr;
  2330  }
   590  }
  2331  
   591  
  2332  TemporalLayersChecker::TemporalLayersChecker(int num_temporal_layers)
   592  TemporalLayersChecker::TemporalLayersChecker(int num_temporal_layers)
  2333      : num_temporal_layers_(num_temporal_layers),
   593 Index: firefox-115.0/third_party/libwebrtc/video/adaptation/video_stream_encoder_resource_manager.cc
  2334        sequence_number_(0),
   594 ===================================================================
  2335        last_sync_sequence_number_(0),
   595 --- firefox-115.0.orig/third_party/libwebrtc/video/adaptation/video_stream_encoder_resource_manager.cc
  2336        last_tl0_sequence_number_(0) {}
   596 +++ firefox-115.0/third_party/libwebrtc/video/adaptation/video_stream_encoder_resource_manager.cc
  2337  
   597 @@ -63,6 +63,7 @@ std::string ToString(VideoAdaptationReas
  2338 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
       
  2339 --- a/third_party/libwebrtc/video/adaptation/video_stream_encoder_resource_manager.cc
       
  2340 +++ b/third_party/libwebrtc/video/adaptation/video_stream_encoder_resource_manager.cc
       
  2341 @@ -58,16 +58,17 @@ bool IsFramerateScalingEnabled(Degradati
       
  2342  std::string ToString(VideoAdaptationReason reason) {
       
  2343    switch (reason) {
       
  2344      case VideoAdaptationReason::kQuality:
       
  2345        return "quality";
       
  2346      case VideoAdaptationReason::kCpu:
       
  2347        return "cpu";
   598        return "cpu";
  2348    }
   599    }
  2349    RTC_CHECK_NOTREACHED();
   600    RTC_CHECK_NOTREACHED();
  2350 +  return "";
   601 +  return "";
  2351  }
   602  }
  2352  
   603  
  2353  std::vector<bool> GetActiveLayersFlags(const VideoCodec& codec) {
   604  std::vector<bool> GetActiveLayersFlags(const VideoCodec& codec) {
  2354    std::vector<bool> flags;
       
  2355    if (codec.codecType == VideoCodecType::kVideoCodecVP9) {
       
  2356      flags.resize(codec.VP9().numberOfSpatialLayers);
       
  2357      for (size_t i = 0; i < flags.size(); ++i) {
       
  2358        flags[i] = codec.spatialLayers[i].active;
       
  2359 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
       
  2360 --- a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ast_to_hir.cpp
       
  2361 +++ b/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ast_to_hir.cpp
       
  2362 @@ -2646,16 +2646,17 @@ get_type_name_for_precision_qualifier(co
       
  2363           unreachable("Unsupported sampler/image type");
       
  2364        } /* sampler/image type */
       
  2365        break;
       
  2366     } /* GLSL_TYPE_SAMPLER/GLSL_TYPE_IMAGE */
       
  2367     break;
       
  2368     default:
       
  2369        unreachable("Unsupported type");
       
  2370     } /* base type */
       
  2371 +   return "";
       
  2372  }
       
  2373  
       
  2374  static unsigned
       
  2375  select_gles_precision(unsigned qual_precision,
       
  2376                        const glsl_type *type,
       
  2377                        struct _mesa_glsl_parse_state *state, YYLTYPE *loc)
       
  2378  {
       
  2379     /* Precision qualifiers do not have any meaning in Desktop GLSL.
       
  2380 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
       
  2381 --- a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ir.cpp
       
  2382 +++ b/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/ir.cpp
       
  2383 @@ -619,16 +619,17 @@ ir_expression::get_num_operands(ir_expre
       
  2384  
       
  2385     if (op <= ir_last_triop)
       
  2386        return 3;
       
  2387  
       
  2388     if (op <= ir_last_quadop)
       
  2389        return 4;
       
  2390  
       
  2391     unreachable("Could not calculate number of operands");
       
  2392 +   return -1;
       
  2393  }
       
  2394  
       
  2395  #include "ir_expression_operation_strings.h"
       
  2396  
       
  2397  const char*
       
  2398  depth_layout_string(ir_depth_layout layout)
       
  2399  {
       
  2400     switch(layout) {
       
  2401 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
       
  2402 --- a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/loop_analysis.cpp
       
  2403 +++ b/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/loop_analysis.cpp
       
  2404 @@ -234,16 +234,17 @@ incremented_before_terminator(ir_loop *l
       
  2405        }
       
  2406  
       
  2407        default:
       
  2408           break;
       
  2409        }
       
  2410     }
       
  2411  
       
  2412     unreachable("Unable to find induction variable");
       
  2413 +   return false;
       
  2414  }
       
  2415  
       
  2416  /**
       
  2417   * Record the fact that the given loop variable was referenced inside the loop.
       
  2418   *
       
  2419   * \arg in_assignee is true if the reference was on the LHS of an assignment.
       
  2420   *
       
  2421   * \arg in_conditional_code_or_nested_loop is true if the reference occurred
       
  2422 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
       
  2423 --- a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/opt_vectorize.cpp
       
  2424 +++ b/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl/opt_vectorize.cpp
       
  2425 @@ -224,16 +224,17 @@ write_mask_to_swizzle(unsigned write_mas
       
  2426  {
       
  2427     switch (write_mask) {
       
  2428     case WRITEMASK_X: return SWIZZLE_X;
       
  2429     case WRITEMASK_Y: return SWIZZLE_Y;
       
  2430     case WRITEMASK_Z: return SWIZZLE_Z;
       
  2431     case WRITEMASK_W: return SWIZZLE_W;
       
  2432     }
       
  2433     unreachable("not reached");
       
  2434 +   return 0;
       
  2435  }
       
  2436  
       
  2437  /**
       
  2438   * Returns whether a single-channeled write mask matches a swizzle.
       
  2439   */
       
  2440  static bool
       
  2441  write_mask_matches_swizzle(unsigned write_mask,
       
  2442                             const ir_swizzle *swz)
       
  2443 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
       
  2444 --- a/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl_types.cpp
       
  2445 +++ b/third_party/rust/glslopt/glsl-optimizer/src/compiler/glsl_types.cpp
       
  2446 @@ -455,16 +455,17 @@ const glsl_type *glsl_type::get_bare_typ
       
  2447     case GLSL_TYPE_VOID:
       
  2448     case GLSL_TYPE_SUBROUTINE:
       
  2449     case GLSL_TYPE_FUNCTION:
       
  2450     case GLSL_TYPE_ERROR:
       
  2451        return this;
       
  2452     }
       
  2453  
       
  2454     unreachable("Invalid base type");
       
  2455 +   return nullptr;
       
  2456  }
       
  2457  
       
  2458  const glsl_type *glsl_type::get_float16_type() const
       
  2459  {
       
  2460     assert(this->base_type == GLSL_TYPE_FLOAT);
       
  2461  
       
  2462     return get_instance(GLSL_TYPE_FLOAT16,
       
  2463                         this->vector_elements,
       
  2464 @@ -2011,16 +2012,17 @@ glsl_type::get_explicit_std140_type(bool
       
  2465                                         (enum glsl_interface_packing)this->interface_packing,
       
  2466                                         this->interface_row_major,
       
  2467                                         this->name);
       
  2468  
       
  2469        delete[] fields;
       
  2470        return type;
       
  2471     } else {
       
  2472        unreachable("Invalid type for UBO or SSBO");
       
  2473 +      return nullptr;
       
  2474     }
       
  2475  }
       
  2476  
       
  2477  unsigned
       
  2478  glsl_type::std430_base_alignment(bool row_major) const
       
  2479  {
       
  2480  
       
  2481     unsigned N = is_64bit() ? 8 : 4;
       
  2482 @@ -2369,16 +2371,17 @@ glsl_type::get_explicit_std430_type(bool
       
  2483                                         (enum glsl_interface_packing)this->interface_packing,
       
  2484                                         this->interface_row_major,
       
  2485                                         this->name);
       
  2486  
       
  2487        delete[] fields;
       
  2488        return type;
       
  2489     } else {
       
  2490        unreachable("Invalid type for SSBO");
       
  2491 +      return nullptr;
       
  2492     }
       
  2493  }
       
  2494  
       
  2495  const glsl_type *
       
  2496  glsl_type::get_explicit_interface_type(bool supports_std430) const
       
  2497  {
       
  2498     enum glsl_interface_packing packing =
       
  2499        this->get_internal_ifc_packing(supports_std430);
       
  2500 @@ -2443,16 +2446,17 @@ glsl_type::get_explicit_type_for_size_al
       
  2501        unsigned stride = align(col_size, col_align);
       
  2502  
       
  2503        *size = this->matrix_columns * stride;
       
  2504        *alignment = col_align;
       
  2505        return glsl_type::get_instance(this->base_type, this->vector_elements,
       
  2506                                       this->matrix_columns, stride, false);
       
  2507     } else {
       
  2508        unreachable("Unhandled type.");
       
  2509 +      return nullptr;
       
  2510     }
       
  2511  }
       
  2512  
       
  2513  unsigned
       
  2514  glsl_type::count_vec4_slots(bool is_gl_vertex_input, bool is_bindless) const
       
  2515  {
       
  2516     /* From page 31 (page 37 of the PDF) of the GLSL 1.50 spec:
       
  2517      *
       
  2518 @@ -2943,12 +2947,13 @@ glsl_get_sampler_dim_coordinate_componen
       
  2519     case GLSL_SAMPLER_DIM_SUBPASS:
       
  2520     case GLSL_SAMPLER_DIM_SUBPASS_MS:
       
  2521        return 2;
       
  2522     case GLSL_SAMPLER_DIM_3D:
       
  2523     case GLSL_SAMPLER_DIM_CUBE:
       
  2524        return 3;
       
  2525     default:
       
  2526        unreachable("Unknown sampler dim");
       
  2527 +      return -1;
       
  2528     }
       
  2529  }
       
  2530  
       
  2531  }
       
  2532 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
       
  2533 --- a/third_party/rust/glslopt/glsl-optimizer/src/mesa/main/shaderobj.h
       
  2534 +++ b/third_party/rust/glslopt/glsl-optimizer/src/mesa/main/shaderobj.h
       
  2535 @@ -180,16 +180,17 @@ static inline gl_shader_stage
       
  2536     case GL_COMPUTE_SUBROUTINE_UNIFORM:
       
  2537        return MESA_SHADER_COMPUTE;
       
  2538     case GL_TESS_CONTROL_SUBROUTINE_UNIFORM:
       
  2539        return MESA_SHADER_TESS_CTRL;
       
  2540     case GL_TESS_EVALUATION_SUBROUTINE_UNIFORM:
       
  2541        return MESA_SHADER_TESS_EVAL;
       
  2542     }
       
  2543     unreachable("not reached");
       
  2544 +   return MESA_SHADER_NONE;
       
  2545  }
       
  2546  
       
  2547  static inline gl_shader_stage
       
  2548  _mesa_shader_stage_from_subroutine(GLenum subroutine)
       
  2549  {
       
  2550     switch (subroutine) {
       
  2551     case GL_VERTEX_SUBROUTINE:
       
  2552        return MESA_SHADER_VERTEX;
       
  2553 @@ -200,16 +201,17 @@ static inline gl_shader_stage
       
  2554     case GL_COMPUTE_SUBROUTINE:
       
  2555        return MESA_SHADER_COMPUTE;
       
  2556     case GL_TESS_CONTROL_SUBROUTINE:
       
  2557        return MESA_SHADER_TESS_CTRL;
       
  2558     case GL_TESS_EVALUATION_SUBROUTINE:
       
  2559        return MESA_SHADER_TESS_EVAL;
       
  2560     }
       
  2561     unreachable("not reached");
       
  2562 +   return MESA_SHADER_NONE;
       
  2563  }
       
  2564  
       
  2565  static inline GLenum
       
  2566  _mesa_shader_stage_to_subroutine(gl_shader_stage stage)
       
  2567  {
       
  2568     switch (stage) {
       
  2569     case MESA_SHADER_VERTEX:
       
  2570        return GL_VERTEX_SUBROUTINE;
       
  2571 @@ -225,16 +227,17 @@ static inline GLenum
       
  2572        return GL_TESS_EVALUATION_SUBROUTINE;
       
  2573     case MESA_SHADER_NONE:
       
  2574        break;
       
  2575     case MESA_SHADER_KERNEL:
       
  2576        unreachable("not reached");
       
  2577        break;
       
  2578     }
       
  2579     unreachable("not reached");
       
  2580 +   return GL_VERTEX_PROGRAM_ARB;
       
  2581  }
       
  2582  
       
  2583  static inline GLenum
       
  2584  _mesa_shader_stage_to_subroutine_uniform(gl_shader_stage stage)
       
  2585  {
       
  2586     switch (stage) {
       
  2587     case MESA_SHADER_VERTEX:
       
  2588        return GL_VERTEX_SUBROUTINE_UNIFORM;
       
  2589 @@ -248,16 +251,17 @@ static inline GLenum
       
  2590        return GL_TESS_CONTROL_SUBROUTINE_UNIFORM;
       
  2591     case MESA_SHADER_TESS_EVAL:
       
  2592        return GL_TESS_EVALUATION_SUBROUTINE_UNIFORM;
       
  2593     case MESA_SHADER_NONE:
       
  2594     case MESA_SHADER_KERNEL:
       
  2595        break;
       
  2596     }
       
  2597     unreachable("not reached");
       
  2598 +   return GL_VERTEX_PROGRAM_ARB;
       
  2599  }
       
  2600  
       
  2601  extern bool
       
  2602  _mesa_validate_pipeline_io(struct gl_pipeline_object *);
       
  2603  
       
  2604  #ifdef __cplusplus
       
  2605  }
       
  2606  #endif