Skip to content

Commit

Permalink
Replace more SkASSERTs with SkDEBUGFAIL
Browse files Browse the repository at this point in the history
Did more grepping after https://skia-review.googlesource.com/c/skia/+/680536

Change-Id: If21105c6337176e6746c59071561ea276a9048d9
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/680996
Reviewed-by: John Stiles <[email protected]>
  • Loading branch information
kjlubick committed Apr 25, 2023
1 parent 933bac6 commit f6f0c4b
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion src/gpu/ganesh/dawn/GrDawnBuffer.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ namespace {
case GrGpuBufferType::kXferGpuToCpu:
return wgpu::BufferUsage::MapRead | wgpu::BufferUsage::CopyDst;
default:
SkASSERT(!"buffer type not supported by Dawn");
SkDEBUGFAIL("buffer type not supported by Dawn");
return wgpu::BufferUsage::Vertex;
}
}
Expand Down
10 changes: 5 additions & 5 deletions src/gpu/ganesh/dawn/GrDawnProgramBuilder.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ static wgpu::BlendFactor to_dawn_blend_factor(skgpu::BlendCoeff coeff) {
case skgpu::BlendCoeff::kS2A:
case skgpu::BlendCoeff::kIS2A:
default:
SkASSERT(!"unsupported blend coefficient");
SkDEBUGFAIL("unsupported blend coefficient");
return wgpu::BlendFactor::One;
}
}
Expand Down Expand Up @@ -78,7 +78,7 @@ static wgpu::BlendOperation to_dawn_blend_operation(skgpu::BlendEquation equatio
case skgpu::BlendEquation::kReverseSubtract:
return wgpu::BlendOperation::ReverseSubtract;
default:
SkASSERT(!"unsupported blend equation");
SkDEBUGFAIL("unsupported blend equation");
return wgpu::BlendOperation::Add;
}
}
Expand All @@ -102,7 +102,7 @@ static wgpu::CompareFunction to_dawn_compare_function(GrStencilTest test) {
case GrStencilTest::kNotEqual:
return wgpu::CompareFunction::NotEqual;
default:
SkASSERT(!"unsupported stencil test");
SkDEBUGFAIL("unsupported stencil test");
return wgpu::CompareFunction::Always;
}
}
Expand All @@ -126,7 +126,7 @@ static wgpu::StencilOperation to_dawn_stencil_operation(GrStencilOp op) {
case GrStencilOp::kDecWrap:
return wgpu::StencilOperation::DecrementWrap;
default:
SkASSERT(!"unsupported stencil function");
SkDEBUGFAIL("unsupported stencil function");
return wgpu::StencilOperation::Keep;
}
}
Expand Down Expand Up @@ -167,7 +167,7 @@ static wgpu::VertexFormat to_dawn_vertex_format(GrVertexAttribType type) {
case kUByte4_norm_GrVertexAttribType:
return wgpu::VertexFormat::Unorm8x4;
default:
SkASSERT(!"unsupported vertex format");
SkDEBUGFAIL("unsupported vertex format");
return wgpu::VertexFormat::Float32x4;
}
}
Expand Down

0 comments on commit f6f0c4b

Please sign in to comment.