Fix crash in SampleCCPRGeometry
Fixes a crash introduced by 0e13db707f
.
Change-Id: If250c57804705f35d11c1914efe5de2e6d5edb38
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/330936
Reviewed-by: Greg Daniel <egdaniel@google.com>
Commit-Queue: Chris Dalton <csmartdalton@google.com>
This commit is contained in:
parent
869cdefdd1
commit
a3df50000f
@ -66,7 +66,6 @@ class CCPRGeometryView : public Sample {
|
||||
void updateGpuData();
|
||||
|
||||
PrimitiveType fPrimitiveType = PrimitiveType::kCubics;
|
||||
SkCubicType fCubicType;
|
||||
|
||||
SkPoint fPoints[4] = {
|
||||
{100.05f, 100.05f}, {400.75f, 100.05f}, {400.75f, 300.95f}, {100.05f, 300.95f}};
|
||||
@ -187,7 +186,7 @@ void CCPRGeometryView::onDrawContent(SkCanvas* canvas) {
|
||||
caption.appendf("PrimitiveType_%s",
|
||||
GrCCCoverageProcessor::PrimitiveTypeName(fPrimitiveType));
|
||||
if (PrimitiveType::kCubics == fPrimitiveType) {
|
||||
caption.appendf(" (%s)", SkCubicTypeName(fCubicType));
|
||||
caption.appendf(" (%s)", SkCubicTypeName(SkClassifyCubic(fPoints)));
|
||||
} else if (PrimitiveType::kConics == fPrimitiveType) {
|
||||
caption.appendf(" (w=%f)", fConicWeight);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user