Lines Matching refs:ctm
37 void tessellate_shadow(skiatest::Reporter* reporter, const SkPath& path, const SkMatrix& ctm,
40 auto verts = SkShadowTessellator::MakeAmbient(path, ctm, heightParams, true);
43 verts = SkShadowTessellator::MakeAmbient(path, ctm, heightParams, false);
46 verts = SkShadowTessellator::MakeSpot(path, ctm, heightParams, {0, 0, 128}, 128.f, true, false);
49 verts = SkShadowTessellator::MakeSpot(path, ctm, heightParams, {0, 0, 128}, 128.f, false,
53 verts = SkShadowTessellator::MakeSpot(path, ctm, heightParams, {0, 0, 128}, 128.f, true, true);
56 verts = SkShadowTessellator::MakeSpot(path, ctm, heightParams, {0, 0, 128}, 128.f, false, true);
125 void check_xformed_bounds(skiatest::Reporter* reporter, const SkPath& path, const SkMatrix& ctm) {
136 SkDrawShadowMetrics::GetLocalBounds(path, rec, ctm, &bounds);
137 ctm.mapRect(&bounds);
139 auto verts = SkShadowTessellator::MakeAmbient(path, ctm, rec.fZPlaneParams, true);
144 SkPoint mapXY = ctm.mapXY(rec.fLightPos.fX, rec.fLightPos.fY);
146 verts = SkShadowTessellator::MakeSpot(path, ctm, rec.fZPlaneParams, devLightPos,
155 SkDrawShadowMetrics::GetLocalBounds(path, rec, ctm, &bounds);
156 ctm.mapRect(&bounds);
158 verts = SkShadowTessellator::MakeAmbient(path, ctm, rec.fZPlaneParams, true);
165 verts = SkShadowTessellator::MakeSpot(path, ctm, rec.fZPlaneParams, devLightPos,
175 SkMatrix ctm;
176 ctm.setTranslate(100, 100);
177 check_xformed_bounds(reporter, path, ctm);
178 ctm.postScale(2, 2);
179 check_xformed_bounds(reporter, path, ctm);
180 ctm.preRotate(45);
181 check_xformed_bounds(reporter, path, ctm);
182 ctm.preSkew(40, -20);
183 check_xformed_bounds(reporter, path, ctm);
185 ctm[SkMatrix::kMPersp0] = 0.0001f;
186 ctm[SkMatrix::kMPersp1] = 12.f;
187 check_xformed_bounds(reporter, path, ctm);
188 ctm[SkMatrix::kMPersp0] = 0.0001f;
189 ctm[SkMatrix::kMPersp1] = -12.f;
190 check_xformed_bounds(reporter, path, ctm);
191 ctm[SkMatrix::kMPersp0] = 12.f;
192 ctm[SkMatrix::kMPersp1] = 0.0001f;
193 check_xformed_bounds(reporter, path, ctm);