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