Make converting from 4x4 to 3x3 explicit
Change-Id: I4d190d6831cb517d5e9f22b3f872013367bddc08
Reviewed-on: https://skia-review.googlesource.com/c/skia/+/264856
Reviewed-by: Robert Phillips <robertphillips@google.com>
diff --git a/samplecode/Sample3D.cpp b/samplecode/Sample3D.cpp
index df3fab1..1410fb6 100644
--- a/samplecode/Sample3D.cpp
+++ b/samplecode/Sample3D.cpp
@@ -227,7 +227,7 @@
SkMatrix44 trans;
trans.setTranslate(200, 200, 0); // center of the rotation
- canvas->concat(trans * fRot * m * inv(trans));
+ canvas->experimental_concat44(trans * fRot * m * inv(trans));
if (!front(canvas->experimental_getLocalToDevice())) {
return;
diff --git a/samplecode/SampleClip.cpp b/samplecode/SampleClip.cpp
index a25bd54..6b037c7 100644
--- a/samplecode/SampleClip.cpp
+++ b/samplecode/SampleClip.cpp
@@ -557,7 +557,7 @@
if (fShowUnclipped) {
canvas->save();
- canvas->concat(mx);
+ canvas->experimental_concat44(mx);
paint.setAlphaf(0.33f);
canvas->drawPath(fPath, paint);
paint.setAlphaf(1.f);
@@ -567,16 +567,16 @@
SkColor planeColor = SK_ColorBLUE;
SkPath clippedPath, *path = &fPath;
- if (SkPathPriv::PerspectiveClip(fPath, mx, &clippedPath)) {
+ if (SkPathPriv::PerspectiveClip(fPath, SkMatrix(mx), &clippedPath)) {
path = &clippedPath;
planeColor = SK_ColorRED;
}
canvas->save();
- canvas->concat(mx);
+ canvas->experimental_concat44(mx);
canvas->drawPath(*path, paint);
canvas->restore();
- SkHalfPlane hpw = half_plane_w0(mx);
+ SkHalfPlane hpw = half_plane_w0(SkMatrix(mx));
draw_halfplane(canvas, hpw, planeColor);
}
};
@@ -615,7 +615,7 @@
SkPaint paint;
canvas->save();
- canvas->concat(this->get44({0, 0, 300, 300}));
+ canvas->experimental_concat44(this->get44({0, 0, 300, 300}));
const SkPoint* tex = nullptr;
const SkColor* col = nullptr;