mozilla-silence-no-return-type.patch
author Wolfgang Rosenauer <wr@rosenauer.org>
Sun, 17 Oct 2021 20:19:48 +0200
branchfirefox93
changeset 1164 bb219fd0d646
parent 1162 af5e283c2e5d
permissions -rw-r--r--
Firefox 93.0
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
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
     2
# Parent  45a1eadbae67aa05c6fa271d3dec5ac1cb0cfae8
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
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
     7
@@ -2039,18 +2039,16 @@ name = "glsl-to-cxx"
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]]
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
    23
 name = "goblin"
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
    24
 version = "0.1.3"
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
    25
 source = "registry+https://github.com/rust-lang/crates.io-index"
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
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
    29
@@ -78,16 +78,17 @@ opt-level = 2
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
    30
 opt-level = 2
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
    31
 
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
    32
 [patch.crates-io]
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
    33
 chardetng = { git = "https://github.com/hsivonen/chardetng", rev="302c995f91f44cf26e77dc4758ad56c3ff0153ad" }
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
    34
 chardetng_c = { git = "https://github.com/hsivonen/chardetng_c", rev="ed8a4c6f900a90d4dbc1d64b856e61490a1c3570" }
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
    35
 libudev-sys = { path = "dom/webauthn/libudev-sys" }
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
    36
 packed_simd = { git = "https://github.com/hsivonen/packed_simd", rev="6a16f954950401b92b4e220fbf2dfaf6f00e1fb2" }
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
    37
 minidump_writer_linux = { git = "https://github.com/msirringhaus/minidump_writer_linux.git", rev = "029ac0d54b237f27dc7d8d4e51bc0fb076e5e852" }
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    38
+glslopt = { path = "third_party/rust/glslopt/" }
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
    39
 # The following overrides point to dummy projects, as a temporary measure until this is resolved:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
    40
 # https://github.com/rust-lang/cargo/issues/6179
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
    41
 js-sys = { git = "https://github.com/kvark/dummy-web" }
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
    42
 slotmap = { git = "https://github.com/kvark/dummy-web" }
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
    43
 wasm-bindgen = { git = "https://github.com/kvark/dummy-web" }
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
    44
 web-sys = { git = "https://github.com/kvark/dummy-web" }
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    45
 
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    46
 [patch.crates-io.cranelift-codegen]
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    47
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
    48
--- a/gfx/skia/skia/include/codec/SkEncodedOrigin.h
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    49
+++ b/gfx/skia/skia/include/codec/SkEncodedOrigin.h
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
    50
@@ -36,12 +36,13 @@ static inline SkMatrix SkEncodedOriginTo
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
    51
         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
    52
         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
    53
         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
    54
         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
    55
         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
    56
         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
    57
     }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    58
     SK_ABORT("Unexpected origin");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    59
+    SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    60
 }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    61
 
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    62
 
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
    63
 #endif // SkEncodedOrigin_DEFINED
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    64
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
    65
--- a/gfx/skia/skia/include/private/GrTypesPriv.h
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    66
+++ b/gfx/skia/skia/include/private/GrTypesPriv.h
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
    67
@@ -535,32 +535,34 @@ static inline GrSLType GrSLCombinedSampl
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
    68
             return kTexture2DSampler_GrSLType;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
    69
         case GrTextureType::kRectangle:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
    70
             return kTexture2DRectSampler_GrSLType;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
    71
         case GrTextureType::kExternal:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
    72
             return kTextureExternalSampler_GrSLType;
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    73
         default:
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    74
             SK_ABORT("Unexpected texture type");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    75
     }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    76
+    SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    77
 }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    78
 
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    79
 /** 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
    80
  *  MIP maps.
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
    81
  */
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
    82
 static inline bool GrTextureTypeHasRestrictedSampling(GrTextureType type) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
    83
     switch (type) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
    84
         case GrTextureType::k2D:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
    85
             return false;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
    86
         case GrTextureType::kRectangle:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
    87
             return true;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
    88
         case GrTextureType::kExternal:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
    89
             return true;
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    90
         default:
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    91
             SK_ABORT("Unexpected texture type");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    92
     }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    93
+    SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    94
 }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    95
 
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
    96
 static constexpr bool GrSLTypeIsCombinedSamplerType(GrSLType type) {
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
    97
     switch (type) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
    98
         case kTexture2DSampler_GrSLType:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
    99
         case kTextureExternalSampler_GrSLType:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   100
         case kTexture2DRectSampler_GrSLType:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   101
             return true;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   102
@@ -853,16 +855,17 @@ static inline size_t GrCompressedFormatD
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   103
     switch (compressionType) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   104
         case SkImage::kETC1_CompressionType:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   105
             SkASSERT((width & 3) == 0);
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   106
             SkASSERT((height & 3) == 0);
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   107
             return (width >> 2) * (height >> 2) * 8;
1162
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
     SK_ABORT("Invalid pixel config");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   111
+    SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   112
 }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   113
 
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   114
 /**
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   115
  * 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
   116
  * 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
   117
  * 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
   118
  * 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
   119
  * 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
   120
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
   121
--- a/gfx/skia/skia/src/core/SkGeometry.h
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   122
+++ b/gfx/skia/skia/src/core/SkGeometry.h
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   123
@@ -177,28 +177,30 @@ static inline bool SkCubicIsDegenerate(S
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   124
         case SkCubicType::kLocalCusp:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   125
         case SkCubicType::kCuspAtInfinity:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   126
             return false;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   127
         case SkCubicType::kQuadratic:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   128
         case SkCubicType::kLineOrPoint:
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   129
             return true;
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
     SK_ABORT("Invalid SkCubicType");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   132
+    SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   133
 }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   134
 
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   135
 static inline const char* SkCubicTypeName(SkCubicType type) {
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   136
     switch (type) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   137
         case SkCubicType::kSerpentine: return "kSerpentine";
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   138
         case SkCubicType::kLoop: return "kLoop";
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   139
         case SkCubicType::kLocalCusp: return "kLocalCusp";
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   140
         case SkCubicType::kCuspAtInfinity: return "kCuspAtInfinity";
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   141
         case SkCubicType::kQuadratic: return "kQuadratic";
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   142
         case SkCubicType::kLineOrPoint: return "kLineOrPoint";
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
     SK_ABORT("Invalid SkCubicType");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   145
+    SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   146
 }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   147
 
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   148
 /** Returns the cubic classification.
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   149
 
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   150
     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
   151
     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
   152
     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
   153
     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
   154
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
   155
--- a/gfx/skia/skia/src/core/SkTextBlob.cpp
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   156
+++ b/gfx/skia/skia/src/core/SkTextBlob.cpp
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   157
@@ -196,16 +196,17 @@ unsigned SkTextBlob::ScalarsPerGlyph(Gly
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   158
 }
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   159
 
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   160
 void SkTextBlob::operator delete(void* p) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   161
     sk_free(p);
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   162
 }
1162
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
 void* SkTextBlob::operator new(size_t) {
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   165
     SK_ABORT("All blobs are created by placement new.");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   166
+    SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   167
 }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   168
 
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   169
 void* SkTextBlob::operator new(size_t, void* p) {
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   170
     return p;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   171
 }
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   172
 
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   173
 SkTextBlobRunIterator::SkTextBlobRunIterator(const SkTextBlob* blob)
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   174
     : fCurrentRun(SkTextBlob::RunRecord::First(blob)) {
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   175
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
   176
--- a/gfx/skia/skia/src/core/SkTypeface_remote.cpp
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   177
+++ b/gfx/skia/skia/src/core/SkTypeface_remote.cpp
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   178
@@ -24,16 +24,17 @@ void SkScalerContextProxy::initCache(SkS
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   179
     SkASSERT(cache != nullptr);
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   180
 
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   181
     fCache = cache;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   182
     fStrikeCache = strikeCache;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   183
 }
1162
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
 unsigned SkScalerContextProxy::generateGlyphCount()  {
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   186
     SK_ABORT("Should never be called.");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   187
+    SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   188
 }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   189
 
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   190
 bool SkScalerContextProxy::generateAdvance(SkGlyph* glyph) {
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   191
     return false;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   192
 }
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   193
 
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   194
 void SkScalerContextProxy::generateMetrics(SkGlyph* glyph) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   195
     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
   196
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
   197
--- a/gfx/skia/skia/src/core/SkTypeface_remote.h
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   198
+++ b/gfx/skia/skia/src/core/SkTypeface_remote.h
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   199
@@ -58,46 +58,54 @@ public:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   200
             , fGlyphCount{glyphCount}
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   201
             , fIsLogging{isLogging}
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   202
             , fDiscardableManager{std::move(manager)} {}
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   203
     SkFontID remoteTypefaceID() const {return fFontId;}
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   204
     int glyphCount() const {return fGlyphCount;}
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   205
     bool isLogging() const {return fIsLogging;}
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   206
 
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   207
 protected:
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   208
-    int onGetUPEM() const override { SK_ABORT("Should never be called."); }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   209
+    int onGetUPEM() const override { SK_ABORT("Should never be called."); SkUNREACHABLE; }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   210
     std::unique_ptr<SkStreamAsset> onOpenStream(int* ttcIndex) 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
     std::unique_ptr<SkFontData> onMakeFontData() 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
     sk_sp<SkTypeface> onMakeClone(const SkFontArguments& args) const override {
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   219
         SK_ABORT("Should never be called.");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   220
+	SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   221
     }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   222
     int onGetVariationDesignPosition(SkFontArguments::VariationPosition::Coordinate coordinates[],
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   223
                                      int coordinateCount) const override {
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   224
         SK_ABORT("Should never be called.");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   225
+	SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   226
     }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   227
     int onGetVariationDesignParameters(SkFontParameters::Variation::Axis parameters[],
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   228
                                        int parameterCount) const override {
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   229
         SK_ABORT("Should never be called.");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   230
+	SkUNREACHABLE;
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
     void onGetFamilyName(SkString* familyName) const override {
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   233
         // Used by SkStrikeCache::DumpMemoryStatistics.
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   234
         *familyName = "";
1162
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
     SkTypeface::LocalizedStrings* onCreateFamilyNameIterator() 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
     int onGetTableTags(SkFontTableTag tags[]) 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
     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
   245
         SK_ABORT("Should never be called.");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   246
+	SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   247
     }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   248
     SkScalerContext* onCreateScalerContext(const SkScalerContextEffects& effects,
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   249
                                            const SkDescriptor* desc) const override {
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   250
         return new SkScalerContextProxy(sk_ref_sp(const_cast<SkTypefaceProxy*>(this)), effects,
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   251
                                         desc, fDiscardableManager);
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
     void onFilterRec(SkScalerContextRec* rec) const override {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   254
         // The rec filtering is already applied by the server when generating
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   255
@@ -111,26 +119,28 @@ protected:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   256
     }
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   257
 
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   258
     void getPostScriptGlyphNames(SkString*) const override {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   259
         SK_ABORT("Should never be called.");
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   260
     }
1162
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
     std::unique_ptr<SkAdvancedTypefaceMetrics> onGetAdvancedMetrics() const override {
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   263
         SK_ABORT("Should never be called.");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   264
+	SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   265
     }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   266
     void onCharsToGlyphs(const SkUnichar* chars, int count, SkGlyphID glyphs[]) const override {
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   267
         SK_ABORT("Should never be called.");
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   268
     }
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   269
     int onCountGlyphs() const override {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   270
         return this->glyphCount();
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   271
     }
1162
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
     void* onGetCTFontRef() const override {
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   274
         SK_ABORT("Should never be called.");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   275
+	SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   276
     }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   277
 
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   278
 private:
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   279
     const SkFontID                                  fFontId;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   280
     const int                                       fGlyphCount;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   281
     const bool                                      fIsLogging;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   282
     sk_sp<SkStrikeClient::DiscardableHandleManager> fDiscardableManager;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   283
 
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   284
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
   285
--- a/gfx/skia/skia/src/effects/imagefilters/SkBlurImageFilter.cpp
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   286
+++ b/gfx/skia/skia/src/effects/imagefilters/SkBlurImageFilter.cpp
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   287
@@ -139,16 +139,17 @@ static GrTextureDomain::Mode to_texture_
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   288
         case SkTileMode::kDecal:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   289
             return GrTextureDomain::kDecal_Mode;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   290
         case SkTileMode::kMirror:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   291
             // TODO (michaelludwig) - Support mirror mode, treat as repeat for now
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   292
         case SkTileMode::kRepeat:
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   293
             return GrTextureDomain::kRepeat_Mode;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   294
         default:
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   295
             SK_ABORT("Unsupported tile mode.");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   296
+	    SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   297
     }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   298
 }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   299
 #endif
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   300
 
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   301
 // This is defined by the SVG spec:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   302
 // https://drafts.fxtf.org/filter-effects/#feGaussianBlurElement
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   303
 static int calculate_window(double sigma) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   304
     // 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
   305
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
   306
--- a/gfx/skia/skia/src/effects/imagefilters/SkLightingImageFilter.cpp
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   307
+++ b/gfx/skia/skia/src/effects/imagefilters/SkLightingImageFilter.cpp
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   308
@@ -1696,16 +1696,17 @@ static SkImageFilterLight* create_random
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   309
             return new SkPointLight(random_point3(random), random->nextU());
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   310
         }
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   311
         case 2: {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   312
             return new SkSpotLight(random_point3(random), random_point3(random),
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   313
                                    random->nextUScalar1(), random->nextUScalar1(), random->nextU());
1162
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
         default:
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   316
             SK_ABORT("Unexpected value.");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   317
+	    SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   318
     }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   319
 }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   320
 
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   321
 std::unique_ptr<GrFragmentProcessor> GrDiffuseLightingEffect::TestCreate(GrProcessorTestData* d) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   322
     int texIdx = d->fRandom->nextBool() ? GrProcessorUnitTest::kSkiaPMTextureIdx
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   323
                                         : GrProcessorUnitTest::kAlphaTextureIdx;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   324
     sk_sp<GrTextureProxy> proxy = d->textureProxy(texIdx);
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   325
     SkScalar surfaceScale = d->fRandom->nextSScalar1();
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   326
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
   327
--- a/gfx/skia/skia/src/fonts/SkFontMgr_indirect.cpp
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   328
+++ b/gfx/skia/skia/src/fonts/SkFontMgr_indirect.cpp
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   329
@@ -64,16 +64,17 @@ int SkFontMgr_Indirect::onCountFamilies(
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   330
 }
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   331
 
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   332
 void SkFontMgr_Indirect::onGetFamilyName(int index, SkString* familyName) const {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   333
     SK_ABORT("Not implemented");
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   334
 }
1162
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
 SkFontStyleSet* SkFontMgr_Indirect::onCreateStyleSet(int index) const {
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   337
     SK_ABORT("Not implemented");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   338
+    SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   339
 }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   340
 
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   341
 SkFontStyleSet* SkFontMgr_Indirect::onMatchFamily(const char familyName[]) const {
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   342
     return new SkStyleSet_Indirect(this, -1, fProxy->matchName(familyName));
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   343
 }
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   344
 
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   345
 SkTypeface* SkFontMgr_Indirect::createTypefaceFromFontId(const SkFontIdentity& id) const {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   346
     if (id.fDataId == SkFontIdentity::kInvalidDataId) {
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   347
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
   348
--- a/gfx/skia/skia/src/gpu/GrDataUtils.cpp
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   349
+++ b/gfx/skia/skia/src/gpu/GrDataUtils.cpp
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   350
@@ -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
   351
 
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   352
 size_t GrCompressedDataSize(SkImage::CompressionType type, int width, int height) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   353
     switch (type) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   354
         case SkImage::kETC1_CompressionType:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   355
             int numBlocks = num_ETC1_blocks(width, height);
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   356
             return numBlocks * sizeof(ETC1Block);
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
     SK_ABORT("Unexpected compression type");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   359
+    SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   360
 }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   361
 
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   362
 size_t GrCompressedRowBytes(SkImage::CompressionType type, int width) {
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   363
     switch (type) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   364
         case SkImage::kETC1_CompressionType:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   365
             int numBlocksWidth = num_ETC1_blocks_w(width);
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   366
             return numBlocksWidth * sizeof(ETC1Block);
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
     SK_ABORT("Unexpected compression type");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   369
+    SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   370
 }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   371
 
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   372
 // Fill in 'dest' with ETC1 blocks derived from 'colorf'
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   373
 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
   374
     SkColor color = colorf.toSkColor();
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   375
 
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   376
     ETC1Block block;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   377
     create_etc1_block(color, &block);
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   378
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
   379
--- a/gfx/skia/skia/src/gpu/GrFragmentProcessor.h
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   380
+++ b/gfx/skia/skia/src/gpu/GrFragmentProcessor.h
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   381
@@ -370,16 +370,17 @@ protected:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   382
                                                    const Args&... samps) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   383
         return (0 == i) ? samp0 : IthTextureSampler(i - 1, samps...);
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   384
     }
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   385
     inline static const TextureSampler& IthTextureSampler(int i);
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   386
 
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   387
 private:
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   388
     virtual SkPMColor4f constantOutputForConstantInput(const SkPMColor4f& /* inputColor */) const {
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   389
         SK_ABORT("Subclass must override this if advertising this optimization.");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   390
+	SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   391
     }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   392
 
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   393
     /** Returns a new instance of the appropriate *GL* implementation class
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   394
         for the given GrFragmentProcessor; caller is responsible for deleting
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   395
         the object. */
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   396
     virtual GrGLSLFragmentProcessor* onCreateGLSLInstance() const = 0;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   397
 
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   398
     /** Implemented using GLFragmentProcessor::GenKey as described in this class's comment. */
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   399
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
   400
--- a/gfx/skia/skia/src/gpu/GrPathRendering.cpp
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   401
+++ b/gfx/skia/skia/src/gpu/GrPathRendering.cpp
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   402
@@ -14,16 +14,17 @@
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   403
 #include "src/gpu/GrPathRendering.h"
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   404
 #include "src/gpu/GrProgramInfo.h"
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   405
 #include "src/gpu/GrRenderTarget.h"
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   406
 
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   407
 const GrUserStencilSettings& GrPathRendering::GetStencilPassSettings(FillType fill) {
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   408
     switch (fill) {
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   409
         default:
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   410
             SK_ABORT("Unexpected path fill.");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   411
+	    SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   412
         case GrPathRendering::kWinding_FillType: {
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   413
             constexpr static GrUserStencilSettings kWindingStencilPass(
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   414
                 GrUserStencilSettings::StaticInit<
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   415
                     0xffff,
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   416
                     GrUserStencilTest::kAlwaysIfInClip,
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   417
                     0xffff,
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   418
                     GrUserStencilOp::kIncWrap,
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   419
                     GrUserStencilOp::kIncWrap,
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   420
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
   421
--- a/gfx/skia/skia/src/gpu/GrPathRendering.h
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   422
+++ b/gfx/skia/skia/src/gpu/GrPathRendering.h
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   423
@@ -58,16 +58,17 @@ public:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   424
                 return 1;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   425
             case kTranslate_PathTransformType:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   426
                 return 2;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   427
             case kAffine_PathTransformType:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   428
                 return 6;
1162
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
             default:
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   431
                 SK_ABORT("Unknown path transform type");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   432
+		SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   433
         }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   434
     }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   435
 
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   436
     // No native support for inverse at this time
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   437
     enum FillType {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   438
         /** 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
   439
             edge crossings
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   440
         */
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   441
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
   442
--- a/gfx/skia/skia/src/gpu/GrProcessorUnitTest.cpp
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   443
+++ b/gfx/skia/skia/src/gpu/GrProcessorUnitTest.cpp
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   444
@@ -15,11 +15,12 @@ std::unique_ptr<GrFragmentProcessor> GrP
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   445
     std::unique_ptr<GrFragmentProcessor> fp;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   446
     do {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   447
         fp = GrFragmentProcessorTestFactory::Make(data);
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   448
         SkASSERT(fp);
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   449
     } while (fp->numChildProcessors() != 0);
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   450
     return fp;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   451
 #else
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   452
     SK_ABORT("Should not be called if !SK_ALLOW_STATIC_GLOBAL_INITIALIZERS");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   453
+    SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   454
 #endif
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   455
 }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   456
 #endif
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   457
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
   458
--- a/gfx/skia/skia/src/gpu/GrReducedClip.cpp
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   459
+++ b/gfx/skia/skia/src/gpu/GrReducedClip.cpp
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   460
@@ -520,16 +520,17 @@ GrReducedClip::ClipResult GrReducedClip:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   461
                                        GrAA(element->isAA()));
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   462
 
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   463
         case Element::DeviceSpaceType::kPath:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   464
             return this->addAnalyticFP(element->getDeviceSpacePath(),
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   465
                                        Invert(element->isInverseFilled()), GrAA(element->isAA()));
1162
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
     SK_ABORT("Unexpected DeviceSpaceType");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   469
+    SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   470
 }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   471
 
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   472
 GrReducedClip::ClipResult GrReducedClip::clipOutsideElement(const Element* element) {
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   473
     switch (element->getDeviceSpaceType()) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   474
         case Element::DeviceSpaceType::kEmpty:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   475
             return ClipResult::kMadeEmpty;
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::kRect:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   478
@@ -586,16 +587,17 @@ GrReducedClip::ClipResult GrReducedClip:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   479
         }
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   480
 
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   481
         case Element::DeviceSpaceType::kPath:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   482
             return this->addAnalyticFP(element->getDeviceSpacePath(),
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   483
                                        Invert(!element->isInverseFilled()), GrAA(element->isAA()));
1162
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
     SK_ABORT("Unexpected DeviceSpaceType");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   487
+    SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   488
 }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   489
 
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   490
 inline void GrReducedClip::addWindowRectangle(const SkRect& elementInteriorRect, bool elementIsAA) {
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   491
     SkIRect window;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   492
     if (!elementIsAA) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   493
         elementInteriorRect.round(&window);
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   494
     } else {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   495
         elementInteriorRect.roundIn(&window);
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   496
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
   497
--- a/gfx/skia/skia/src/gpu/GrResourceCache.cpp
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   498
+++ b/gfx/skia/skia/src/gpu/GrResourceCache.cpp
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   499
@@ -35,27 +35,29 @@ DECLARE_SKMESSAGEBUS_MESSAGE(GrTextureFr
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   500
 //////////////////////////////////////////////////////////////////////////////
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   501
 
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   502
 GrScratchKey::ResourceType GrScratchKey::GenerateResourceType() {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   503
     static std::atomic<int32_t> nextType{INHERITED::kInvalidDomain + 1};
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   504
 
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   505
     int32_t type = nextType++;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   506
     if (type > SkTo<int32_t>(UINT16_MAX)) {
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   507
         SK_ABORT("Too many Resource Types");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   508
+	SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   509
     }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   510
 
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   511
     return static_cast<ResourceType>(type);
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   512
 }
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   513
 
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   514
 GrUniqueKey::Domain GrUniqueKey::GenerateDomain() {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   515
     static std::atomic<int32_t> nextDomain{INHERITED::kInvalidDomain + 1};
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   516
 
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   517
     int32_t domain = nextDomain++;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   518
     if (domain > SkTo<int32_t>(UINT16_MAX)) {
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   519
         SK_ABORT("Too many GrUniqueKey Domains");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   520
+	SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   521
     }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   522
 
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   523
     return static_cast<Domain>(domain);
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   524
 }
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   525
 
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   526
 uint32_t GrResourceKeyHash(const uint32_t* data, size_t size) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   527
     return SkOpts::hash(data, size);
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   528
 }
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   529
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
   530
--- a/gfx/skia/skia/src/gpu/GrShaderVar.cpp
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   531
+++ b/gfx/skia/skia/src/gpu/GrShaderVar.cpp
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   532
@@ -13,30 +13,32 @@ static const char* type_modifier_string(
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   533
     switch (t) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   534
         case GrShaderVar::kNone_TypeModifier: return "";
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   535
         case GrShaderVar::kIn_TypeModifier: return "in";
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   536
         case GrShaderVar::kInOut_TypeModifier: return "inout";
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   537
         case GrShaderVar::kOut_TypeModifier: return "out";
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   538
         case GrShaderVar::kUniform_TypeModifier: return "uniform";
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
     SK_ABORT("Unknown shader variable type modifier.");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   541
+    SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   542
 }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   543
 
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   544
 void GrShaderVar::setIOType(GrIOType ioType) {
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   545
     switch (ioType) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   546
         case kRW_GrIOType:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   547
             return;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   548
         case kRead_GrIOType:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   549
             this->addModifier("readonly");
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   550
             return;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   551
         case kWrite_GrIOType:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   552
             this->addModifier("writeonly");
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   553
             return;
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
     SK_ABORT("Unknown io type.");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   556
+    SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   557
 }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   558
 
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   559
 void GrShaderVar::appendDecl(const GrShaderCaps* shaderCaps, SkString* out) const {
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   560
     SkString layout = fLayoutQualifier;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   561
     if (!fLayoutQualifier.isEmpty()) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   562
         out->appendf("layout(%s) ", fLayoutQualifier.c_str());
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   563
     }
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   564
     out->append(fExtraModifiers);
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   565
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
   566
--- a/gfx/skia/skia/src/gpu/SkGpuDevice.cpp
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   567
+++ b/gfx/skia/skia/src/gpu/SkGpuDevice.cpp
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   568
@@ -278,16 +278,17 @@ static inline GrPrimitiveType point_mode
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   569
         case SkCanvas::kPoints_PointMode:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   570
             return GrPrimitiveType::kPoints;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   571
         case SkCanvas::kLines_PointMode:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   572
             return GrPrimitiveType::kLines;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   573
         case SkCanvas::kPolygon_PointMode:
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   574
             return GrPrimitiveType::kLineStrip;
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
     SK_ABORT("Unexpected mode");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   577
+    SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   578
 }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   579
 
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   580
 void SkGpuDevice::drawPoints(SkCanvas::PointMode mode,
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   581
                              size_t count, const SkPoint pts[], const SkPaint& paint) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   582
     ASSERT_SINGLE_OWNER
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   583
     GR_CREATE_TRACE_MARKER_CONTEXT("SkGpuDevice", "drawPoints", fContext.get());
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   584
     SkScalar width = paint.getStrokeWidth();
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   585
     if (width < 0) {
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   586
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
   587
--- a/gfx/skia/skia/src/gpu/SkGr.h
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   588
+++ b/gfx/skia/skia/src/gpu/SkGr.h
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   589
@@ -154,16 +154,17 @@ static inline GrPrimitiveType SkVertexMo
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   590
         case SkVertices::kTriangles_VertexMode:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   591
             return GrPrimitiveType::kTriangles;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   592
         case SkVertices::kTriangleStrip_VertexMode:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   593
             return GrPrimitiveType::kTriangleStrip;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   594
         case SkVertices::kTriangleFan_VertexMode:
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   595
             break;
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
     SK_ABORT("Invalid mode");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   598
+    SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   599
 }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   600
 
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   601
 //////////////////////////////////////////////////////////////////////////////
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   602
 
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   603
 GR_STATIC_ASSERT((int)kZero_GrBlendCoeff == (int)SkBlendModeCoeff::kZero);
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   604
 GR_STATIC_ASSERT((int)kOne_GrBlendCoeff == (int)SkBlendModeCoeff::kOne);
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   605
 GR_STATIC_ASSERT((int)kSC_GrBlendCoeff == (int)SkBlendModeCoeff::kSC);
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   606
 GR_STATIC_ASSERT((int)kISC_GrBlendCoeff == (int)SkBlendModeCoeff::kISC);
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   607
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
   608
--- a/gfx/skia/skia/src/gpu/ccpr/GrCCCoverageProcessor.h
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   609
+++ b/gfx/skia/skia/src/gpu/ccpr/GrCCCoverageProcessor.h
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   610
@@ -235,16 +235,17 @@ inline const char* GrCCCoverageProcessor
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   611
     switch (type) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   612
         case PrimitiveType::kTriangles: return "kTriangles";
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   613
         case PrimitiveType::kWeightedTriangles: return "kWeightedTriangles";
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   614
         case PrimitiveType::kQuadratics: return "kQuadratics";
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   615
         case PrimitiveType::kCubics: return "kCubics";
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   616
         case PrimitiveType::kConics: return "kConics";
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
     SK_ABORT("Invalid PrimitiveType");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   619
+    SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   620
 }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   621
 
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   622
 inline void GrCCCoverageProcessor::TriPointInstance::set(
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   623
         const SkPoint p[3], const Sk2f& translate, Ordering ordering) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   624
     this->set(p[0], p[1], p[2], translate, ordering);
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   625
 }
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   626
 
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   627
 inline void GrCCCoverageProcessor::TriPointInstance::set(
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   628
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
   629
--- a/gfx/skia/skia/src/gpu/ccpr/GrCCStrokeGeometry.cpp
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   630
+++ b/gfx/skia/skia/src/gpu/ccpr/GrCCStrokeGeometry.cpp
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   631
@@ -55,16 +55,17 @@ static GrCCStrokeGeometry::Verb join_ver
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   632
         case SkPaint::kBevel_Join:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   633
             return Verb::kBevelJoin;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   634
         case SkPaint::kMiter_Join:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   635
             return Verb::kMiterJoin;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   636
         case SkPaint::kRound_Join:
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   637
             return Verb::kRoundJoin;
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
     SK_ABORT("Invalid SkPaint::Join.");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   640
+    SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   641
 }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   642
 
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   643
 void GrCCStrokeGeometry::beginPath(const SkStrokeRec& stroke, float strokeDevWidth,
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   644
                                    InstanceTallies* tallies) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   645
     SkASSERT(!fInsideContour);
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   646
     // 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
   647
     SkASSERT(strokeDevWidth > 0);
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   648
 
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   649
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
   650
--- a/gfx/skia/skia/src/gpu/ccpr/GrCCStrokeGeometry.h
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   651
+++ b/gfx/skia/skia/src/gpu/ccpr/GrCCStrokeGeometry.h
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   652
@@ -170,10 +170,11 @@ inline bool GrCCStrokeGeometry::IsIntern
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   653
         case Verb::kMiterJoin:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   654
         case Verb::kRoundJoin:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   655
         case Verb::kSquareCap:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   656
         case Verb::kRoundCap:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   657
         case Verb::kEndContour:
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   658
             return false;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   659
     }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   660
     SK_ABORT("Invalid GrCCStrokeGeometry::Verb.");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   661
+    SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   662
 }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   663
 #endif
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   664
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
   665
--- a/gfx/skia/skia/src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   666
+++ b/gfx/skia/skia/src/gpu/ccpr/GrCoverageCountingPathRenderer.cpp
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   667
@@ -159,16 +159,17 @@ GrPathRenderer::CanDrawPath GrCoverageCo
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   668
             return CanDrawPath::kYes;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   669
         }
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   670
 
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   671
         case SkStrokeRec::kStrokeAndFill_Style:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   672
             return CanDrawPath::kNo;
1162
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
     SK_ABORT("Invalid stroke style.");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   676
+    SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   677
 }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   678
 
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   679
 bool GrCoverageCountingPathRenderer::onDrawPath(const DrawPathArgs& args) {
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   680
     SkASSERT(!fFlushing);
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   681
 
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   682
     SkIRect clipIBounds;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   683
     GrRenderTargetContext* rtc = args.fRenderTargetContext;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   684
     args.fClip->getConservativeBounds(rtc->width(), rtc->height(), &clipIBounds, nullptr);
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   685
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
   686
--- a/gfx/skia/skia/src/gpu/ccpr/GrVSCoverageProcessor.cpp
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   687
+++ b/gfx/skia/skia/src/gpu/ccpr/GrVSCoverageProcessor.cpp
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   688
@@ -545,9 +545,10 @@ GrGLSLPrimitiveProcessor* GrVSCoveragePr
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   689
         case PrimitiveType::kWeightedTriangles:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   690
             return new Impl(std::move(shader), 3);
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   691
         case PrimitiveType::kQuadratics:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   692
         case PrimitiveType::kCubics:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   693
         case PrimitiveType::kConics:
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   694
             return new Impl(std::move(shader), 4);
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   695
     }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   696
     SK_ABORT("Invalid PrimitiveType");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   697
+    SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   698
 }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   699
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
   700
--- a/gfx/skia/skia/src/gpu/dawn/GrDawnOpsRenderPass.cpp
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   701
+++ b/gfx/skia/skia/src/gpu/dawn/GrDawnOpsRenderPass.cpp
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   702
@@ -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
   703
             // Load should be equivalent to DontCare for desktop; Clear would
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   704
             // probably be better for tilers. If Dawn does add DontCare
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   705
             // as an extension, use it here.
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   706
             return dawn::LoadOp::Load;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   707
         case GrLoadOp::kClear:
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   708
             return dawn::LoadOp::Clear;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   709
         default:
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   710
             SK_ABORT("Invalid LoadOp");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   711
+	    SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   712
     }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   713
+    SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   714
 }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   715
 
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   716
 GrDawnOpsRenderPass::GrDawnOpsRenderPass(GrDawnGpu* gpu, GrRenderTarget* rt, GrSurfaceOrigin origin,
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   717
                                          const LoadAndStoreInfo& colorInfo,
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   718
                                          const StencilLoadAndStoreInfo& stencilInfo)
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   719
         : INHERITED(rt, origin)
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   720
         , fGpu(gpu)
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   721
         , fColorInfo(colorInfo) {
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   722
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
   723
--- a/gfx/skia/skia/src/gpu/dawn/GrDawnUniformHandler.cpp
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   724
+++ b/gfx/skia/skia/src/gpu/dawn/GrDawnUniformHandler.cpp
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   725
@@ -90,16 +90,17 @@ uint32_t grsltype_to_alignment_mask(GrSL
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   726
         case kTexture2DSampler_GrSLType:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   727
         case kTextureExternalSampler_GrSLType:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   728
         case kTexture2DRectSampler_GrSLType:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   729
         case kTexture2D_GrSLType:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   730
         case kSampler_GrSLType:
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   731
             break;
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
     SK_ABORT("Unexpected type");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   734
+    SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   735
 }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   736
 
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   737
 static inline uint32_t grsltype_to_size(GrSLType type) {
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   738
     switch(type) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   739
         case kByte_GrSLType:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   740
         case kUByte_GrSLType:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   741
             return 1;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   742
         case kByte2_GrSLType:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   743
@@ -168,16 +169,17 @@ static inline uint32_t grsltype_to_size(
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   744
         case kTexture2DSampler_GrSLType:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   745
         case kTextureExternalSampler_GrSLType:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   746
         case kTexture2DRectSampler_GrSLType:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   747
         case kTexture2D_GrSLType:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   748
         case kSampler_GrSLType:
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   749
             break;
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
     SK_ABORT("Unexpected type");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   752
+    SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   753
 }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   754
 
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   755
 uint32_t get_ubo_offset(uint32_t* currentOffset,
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   756
                         GrSLType type,
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   757
                         int arrayCount) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   758
     uint32_t alignmentMask = grsltype_to_alignment_mask(type);
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   759
     // 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
   760
     if (arrayCount || type == kFloat2x2_GrSLType) {
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   761
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
   762
--- a/gfx/skia/skia/src/gpu/dawn/GrDawnVaryingHandler.cpp
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   763
+++ b/gfx/skia/skia/src/gpu/dawn/GrDawnVaryingHandler.cpp
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   764
@@ -71,16 +71,17 @@ static inline int grsltype_to_location_s
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   765
         case kUByte_GrSLType:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   766
              return 1;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   767
         case kTexture2D_GrSLType:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   768
              return 0;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   769
         case kSampler_GrSLType:
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   770
              return 0;
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
     SK_ABORT("Unexpected type");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   773
+    SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   774
 }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   775
 
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   776
 static void finalize_helper(GrDawnVaryingHandler::VarArray& vars) {
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   777
     int locationIndex = 0;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   778
     for (int i = 0; i < vars.count(); ++i) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   779
         GrShaderVar& var = vars[i];
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   780
         SkString location;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   781
         location.appendf("location = %d", locationIndex);
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   782
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
   783
--- a/gfx/skia/skia/src/gpu/effects/GrConstColorProcessor.fp
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   784
+++ b/gfx/skia/skia/src/gpu/effects/GrConstColorProcessor.fp
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   785
@@ -53,16 +53,17 @@ void main() {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   786
             case InputMode::kIgnore:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   787
                 return color;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   788
             case InputMode::kModulateA:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   789
                 return color * input.fA;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   790
             case InputMode::kModulateRGBA:
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   791
                 return color * input;
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
         SK_ABORT("Unexpected mode");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   794
+	SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   795
     }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   796
 }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   797
 
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   798
 @test(d) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   799
     SkPMColor4f color;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   800
     int colorPicker = d->fRandom->nextULessThan(3);
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   801
     switch (colorPicker) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   802
         case 0: {
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   803
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
   804
--- a/gfx/skia/skia/src/gpu/effects/GrCoverageSetOpXP.cpp
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   805
+++ b/gfx/skia/skia/src/gpu/effects/GrCoverageSetOpXP.cpp
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   806
@@ -199,16 +199,17 @@ const GrXPFactory* GrCoverageSetOpXPFact
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   807
                 static _CONSTEXPR_ const GrCoverageSetOpXPFactory gRevDiffCDXPF(
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   808
                         SkRegion::kReverseDifference_Op, false);
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   809
                 return &gRevDiffCDXPF;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   810
             }
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   811
         }
1162
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
 #undef _CONSTEXPR_
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   814
     SK_ABORT("Unknown region op.");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   815
+    SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   816
 }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   817
 
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   818
 sk_sp<const GrXferProcessor> GrCoverageSetOpXPFactory::makeXferProcessor(
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   819
         const GrProcessorAnalysisColor&,
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   820
         GrProcessorAnalysisCoverage,
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   821
         bool hasMixedSamples,
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   822
         const GrCaps& caps,
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   823
         GrClampType) const {
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   824
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
   825
--- a/gfx/skia/skia/src/gpu/effects/GrPorterDuffXferProcessor.cpp
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   826
+++ b/gfx/skia/skia/src/gpu/effects/GrPorterDuffXferProcessor.cpp
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   827
@@ -748,16 +748,17 @@ const GrXPFactory* GrPorterDuffXPFactory
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   828
         case SkBlendMode::kPlus:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   829
             return &gPlusPDXPF;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   830
         case SkBlendMode::kModulate:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   831
             return &gModulatePDXPF;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   832
         case SkBlendMode::kScreen:
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   833
             return &gScreenPDXPF;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   834
         default:
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   835
             SK_ABORT("Unexpected blend mode.");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   836
+	    SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   837
     }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   838
 }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   839
 
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   840
 sk_sp<const GrXferProcessor> GrPorterDuffXPFactory::makeXferProcessor(
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   841
         const GrProcessorAnalysisColor& color, GrProcessorAnalysisCoverage coverage,
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   842
         bool hasMixedSamples, const GrCaps& caps, GrClampType clampType) const {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   843
     BlendFormula blendFormula;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   844
     bool isLCD = coverage == GrProcessorAnalysisCoverage::kLCD;
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   845
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
   846
--- a/gfx/skia/skia/src/gpu/effects/GrSkSLFP.cpp
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   847
+++ b/gfx/skia/skia/src/gpu/effects/GrSkSLFP.cpp
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   848
@@ -149,16 +149,17 @@ public:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   849
             return kHalf4x4_GrSLType;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   850
         } else if (type == *fContext.fBool_Type) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   851
             return kBool_GrSLType;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   852
         } else if (type == *fContext.fInt_Type) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   853
             return kInt_GrSLType;
1162
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
         printf("%s\n", SkSL::String(type.fName).c_str());
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   856
         SK_ABORT("unsupported uniform type");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   857
+	SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   858
     }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   859
 
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   860
     void emitCode(EmitArgs& args) override {
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   861
         for (const auto& v : fInAndUniformVars) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   862
             if (v->fModifiers.fFlags & SkSL::Modifiers::kUniform_Flag && v->fType !=
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   863
                                                                 *fContext.fFragmentProcessor_Type) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   864
                 fUniformHandles.push_back(args.fUniformHandler->addUniform(
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   865
                                                                    kFragment_GrShaderFlag,
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   866
@@ -563,11 +564,12 @@ std::unique_ptr<GrFragmentProcessor> GrS
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   867
             }
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   868
             std::unique_ptr<GrSkSLFP> result = GrSkSLFP::Make(d->context(), overdrawIndex,
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   869
                                                               "Overdraw", SKSL_OVERDRAW_SRC,
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   870
                                                               &inputs, sizeof(inputs));
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   871
             return std::unique_ptr<GrFragmentProcessor>(result.release());
1162
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
     SK_ABORT("unreachable");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   875
+    SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   876
 }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   877
 
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   878
 #endif
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   879
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
   880
--- a/gfx/skia/skia/src/gpu/effects/generated/GrConstColorProcessor.h
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   881
+++ b/gfx/skia/skia/src/gpu/effects/generated/GrConstColorProcessor.h
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   882
@@ -36,16 +36,17 @@ public:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   883
             case InputMode::kIgnore:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   884
                 return color;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   885
             case InputMode::kModulateA:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   886
                 return color * input.fA;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   887
             case InputMode::kModulateRGBA:
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   888
                 return color * input;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   889
         }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   890
         SK_ABORT("Unexpected mode");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   891
+	SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   892
     }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   893
     static std::unique_ptr<GrFragmentProcessor> Make(SkPMColor4f color, InputMode mode) {
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   894
         return std::unique_ptr<GrFragmentProcessor>(new GrConstColorProcessor(color, mode));
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   895
     }
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   896
     GrConstColorProcessor(const GrConstColorProcessor& src);
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   897
     std::unique_ptr<GrFragmentProcessor> clone() const override;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   898
     const char* name() const override { return "ConstColorProcessor"; }
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   899
     SkPMColor4f color;
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   900
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
   901
--- a/gfx/skia/skia/src/gpu/geometry/GrShape.cpp
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   902
+++ b/gfx/skia/skia/src/gpu/geometry/GrShape.cpp
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   903
@@ -159,16 +159,17 @@ SkRect GrShape::bounds() const {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   904
             return fRRectData.fRRect.getBounds();
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   905
         case Type::kArc:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   906
             // Could make this less conservative by looking at angles.
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   907
             return fArcData.fOval;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   908
         case Type::kPath:
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   909
             return this->path().getBounds();
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
     SK_ABORT("Unknown shape type");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   912
+    SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   913
 }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   914
 
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   915
 SkRect GrShape::styledBounds() const {
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   916
     if (this->isEmpty() && !fStyle.hasNonDashPathEffect()) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   917
         return SkRect::MakeEmpty();
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   918
     }
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   919
 
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   920
     SkRect bounds;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   921
@@ -249,16 +250,17 @@ int GrShape::unstyledKeySize() const {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   922
             if (dataKeySize >= 0) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   923
                 return dataKeySize;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   924
             }
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   925
             // The key is the path ID and fill type.
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   926
             return 2;
1162
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
     SK_ABORT("Should never get here.");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   930
+    SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   931
 }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   932
 
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   933
 void GrShape::writeUnstyledKey(uint32_t* key) const {
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   934
     SkASSERT(this->unstyledKeySize());
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   935
     SkDEBUGCODE(uint32_t* origKey = key;)
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   936
     if (fInheritedKey.count()) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   937
         memcpy(key, fInheritedKey.get(), sizeof(uint32_t) * fInheritedKey.count());
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   938
         SkDEBUGCODE(key += fInheritedKey.count();)
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   939
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
   940
--- a/gfx/skia/skia/src/gpu/gl/GrGLCaps.cpp
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   941
+++ b/gfx/skia/skia/src/gpu/gl/GrGLCaps.cpp
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   942
@@ -4154,16 +4154,17 @@ GrBackendFormat GrGLCaps::getBackendForm
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   943
         case SkImage::kETC1_CompressionType:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   944
             // if ETC2 is available default to that format
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   945
             if (this->isFormatTexturable(GrGLFormat::kCOMPRESSED_RGB8_ETC2)) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   946
                 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
   947
             }
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   948
             return GrBackendFormat::MakeGL(GR_GL_COMPRESSED_ETC1_RGB8, GR_GL_TEXTURE_2D);
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
     SK_ABORT("Invalid compression type");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   951
+    SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   952
 }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   953
 
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   954
 GrSwizzle GrGLCaps::getTextureSwizzle(const GrBackendFormat& format, GrColorType colorType) const {
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   955
     const auto& info = this->getFormatInfo(format.asGLFormat());
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   956
     for (int i = 0; i < info.fColorTypeInfoCount; ++i) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   957
         const auto& ctInfo = info.fColorTypeInfos[i];
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   958
         if (ctInfo.fColorType == colorType) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   959
             return ctInfo.fTextureSwizzle;
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   960
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
   961
--- a/gfx/skia/skia/src/gpu/gl/GrGLGLSL.cpp
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   962
+++ b/gfx/skia/skia/src/gpu/gl/GrGLGLSL.cpp
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   963
@@ -63,9 +63,10 @@ bool GrGLGetGLSLGeneration(const GrGLInt
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   964
         if (ver >= GR_GLSL_VER(2,0)) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   965
             *generation = k330_GrGLSLGeneration;  // ES 3.0
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   966
         } else {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   967
             *generation = k110_GrGLSLGeneration;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   968
         }
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   969
         return true;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   970
     }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   971
     SK_ABORT("Unknown GL Standard");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   972
+    SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   973
 }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   974
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
   975
--- a/gfx/skia/skia/src/gpu/gl/GrGLGpu.cpp
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   976
+++ b/gfx/skia/skia/src/gpu/gl/GrGLGpu.cpp
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   977
@@ -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
   978
         case GR_GL_TEXTURE_2D:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   979
             return 0;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   980
         case GR_GL_TEXTURE_RECTANGLE:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   981
             return 1;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   982
         case GR_GL_TEXTURE_EXTERNAL:
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   983
             return 2;
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
     SK_ABORT("Unexpected GL texture target.");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   986
+    SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   987
 }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   988
 
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
   989
 GrGpuResource::UniqueID GrGLGpu::TextureUnitBindings::boundID(GrGLenum target) const {
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   990
     return fTargetBindings[gl_target_to_binding_index(target)].fBoundResourceID;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   991
 }
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
 bool GrGLGpu::TextureUnitBindings::hasBeenModified(GrGLenum target) const {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   994
     return fTargetBindings[gl_target_to_binding_index(target)].fHasBeenModified;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   995
@@ -229,39 +230,42 @@ void GrGLGpu::TextureUnitBindings::inval
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   996
 
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   997
 static GrGLenum filter_to_gl_mag_filter(GrSamplerState::Filter filter) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   998
     switch (filter) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
   999
         case GrSamplerState::Filter::kNearest: return GR_GL_NEAREST;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1000
         case GrSamplerState::Filter::kBilerp:  return GR_GL_LINEAR;
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1001
         case GrSamplerState::Filter::kMipMap:  return GR_GL_LINEAR;
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
     SK_ABORT("Unknown filter");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1004
+    SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1005
 }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1006
 
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1007
 static GrGLenum filter_to_gl_min_filter(GrSamplerState::Filter filter) {
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1008
     switch (filter) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1009
         case GrSamplerState::Filter::kNearest: return GR_GL_NEAREST;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1010
         case GrSamplerState::Filter::kBilerp:  return GR_GL_LINEAR;
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1011
         case GrSamplerState::Filter::kMipMap:  return GR_GL_LINEAR_MIPMAP_LINEAR;
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
     SK_ABORT("Unknown filter");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1014
+    SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1015
 }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1016
 
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1017
 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
  1018
                                             const GrCaps& caps) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1019
     switch (wrapMode) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1020
         case GrSamplerState::WrapMode::kClamp:        return GR_GL_CLAMP_TO_EDGE;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1021
         case GrSamplerState::WrapMode::kRepeat:       return GR_GL_REPEAT;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1022
         case GrSamplerState::WrapMode::kMirrorRepeat: return GR_GL_MIRRORED_REPEAT;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1023
         case GrSamplerState::WrapMode::kClampToBorder:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1024
             // May not be supported but should have been caught earlier
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1025
             SkASSERT(caps.clampToBorderSupport());
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1026
             return GR_GL_CLAMP_TO_BORDER;
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
     SK_ABORT("Unknown wrap mode");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1029
+    SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1030
 }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1031
 
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1032
 ///////////////////////////////////////////////////////////////////////////////
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1033
 
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1034
 class GrGLGpu::SamplerObjectCache {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1035
 public:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1036
     SamplerObjectCache(GrGLGpu* gpu) : fGpu(gpu) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1037
         fNumTextureUnits = fGpu->glCaps().shaderCaps()->maxFragmentSamplers();
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1038
@@ -1102,17 +1106,17 @@ static bool renderbuffer_storage_msaa(co
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1039
             GL_ALLOC_CALL(ctx.interface(),
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1040
                             RenderbufferStorageMultisampleES2EXT(GR_GL_RENDERBUFFER,
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1041
                                                                 sampleCount,
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1042
                                                                 format,
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1043
                                                                 width, height));
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1044
             break;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1045
         case GrGLCaps::kNone_MSFBOType:
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1046
             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
  1047
-            break;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1048
+	    SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1049
     }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1050
     return (GR_GL_NO_ERROR == CHECK_ALLOC_ERROR(ctx.interface()));
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1051
 }
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1052
 
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1053
 bool GrGLGpu::createRenderTargetObjects(const GrGLTexture::Desc& desc,
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1054
                                         int sampleCount,
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1055
                                         GrGLRenderTarget::IDs* rtIDs) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1056
     rtIDs->fMSColorRenderbufferID = 0;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1057
@@ -2270,19 +2274,20 @@ static GrGLenum gr_primitive_type_to_gl_
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1058
         case GrPrimitiveType::kPoints:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1059
             return GR_GL_POINTS;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1060
         case GrPrimitiveType::kLines:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1061
             return GR_GL_LINES;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1062
         case GrPrimitiveType::kLineStrip:
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1063
             return GR_GL_LINE_STRIP;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1064
         case GrPrimitiveType::kPath:
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1065
             SK_ABORT("non-mesh-based GrPrimitiveType");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1066
-            return 0;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1067
+            SkUNREACHABLE;
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
     SK_ABORT("invalid GrPrimitiveType");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1070
+    SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1071
 }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1072
 
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1073
 void GrGLGpu::sendMeshToGpu(GrPrimitiveType primitiveType, const GrBuffer* vertexBuffer,
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1074
                             int vertexCount, int baseVertex) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1075
     const GrGLenum glPrimType = gr_primitive_type_to_gl_mode(primitiveType);
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1076
     if (this->glCaps().drawArraysBaseVertexIsBroken()) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1077
         this->setupGeometry(nullptr, vertexBuffer, baseVertex, nullptr, 0, GrPrimitiveRestart::kNo);
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1078
         GL_CALL(DrawArrays(glPrimType, 0, vertexCount));
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1079
@@ -4001,17 +4006,18 @@ int GrGLGpu::TextureToCopyProgramIdx(GrT
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1080
     switch (GrSLCombinedSamplerTypeForTextureType(texture->texturePriv().textureType())) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1081
         case kTexture2DSampler_GrSLType:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1082
             return 0;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1083
         case kTexture2DRectSampler_GrSLType:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1084
             return 1;
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1085
         case kTextureExternalSampler_GrSLType:
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1086
             return 2;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1087
         default:
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1088
-            SK_ABORT("Unexpected samper type");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1089
+            SK_ABORT("Unexpected sampler type");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1090
+	    SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1091
     }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1092
 }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1093
 
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1094
 #ifdef SK_ENABLE_DUMP_GPU
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1095
 #include "src/utils/SkJSONWriter.h"
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1096
 void GrGLGpu::onDumpJSON(SkJSONWriter* writer) const {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1097
     // 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
  1098
     // all of our caps information in a named sub-object.
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1099
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
  1100
--- a/gfx/skia/skia/src/gpu/gl/GrGLPath.cpp
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1101
+++ b/gfx/skia/skia/src/gpu/gl/GrGLPath.cpp
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1102
@@ -192,16 +192,17 @@ inline bool init_path_object_for_general
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1103
 
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1104
 /*
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1105
  * 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
  1106
  */
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1107
 static GrPathRendering::FillType convert_skpath_filltype(SkPath::FillType fill) {
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1108
     switch (fill) {
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1109
         default:
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1110
             SK_ABORT("Incomplete Switch\n");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1111
+	    SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1112
         case SkPath::kWinding_FillType:
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1113
         case SkPath::kInverseWinding_FillType:
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1114
             return GrPathRendering::kWinding_FillType;
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1115
         case SkPath::kEvenOdd_FillType:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1116
         case SkPath::kInverseEvenOdd_FillType:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1117
             return GrPathRendering::kEvenOdd_FillType;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1118
     }
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1119
 }
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1120
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
  1121
--- a/gfx/skia/skia/src/gpu/gl/GrGLTexture.cpp
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1122
+++ b/gfx/skia/skia/src/gpu/gl/GrGLTexture.cpp
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1123
@@ -20,30 +20,33 @@ GrTextureType GrGLTexture::TextureTypeFr
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1124
         case GR_GL_TEXTURE_2D:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1125
             return GrTextureType::k2D;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1126
         case GR_GL_TEXTURE_RECTANGLE:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1127
             return GrTextureType::kRectangle;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1128
         case GR_GL_TEXTURE_EXTERNAL:
1162
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1129
             return GrTextureType::kExternal;
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
     SK_ABORT("Unexpected texture target");
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1132
+    SkUNREACHABLE;
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1133
 }
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1134
 
af5e283c2e5d Firefox 91.1
Wolfgang Rosenauer <wr@rosenauer.org>
parents:
diff changeset
  1135
 static inline GrGLenum target_from_texture_type(GrTextureType type) {
1164
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1136
     switch (type) {
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1137
         case GrTextureType::k2D:
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1138
             return GR_GL_TEXTURE_2D;
bb219fd0d646 Firefox 93.0
Wolfgang Rosenauer <wr@rosenauer.org>
parents: 1162
diff changeset
  1139
         case GrTextureType::kRectangle: