Home
last modified time | relevance | path

Searched refs:SkM44 (Results 1 – 25 of 87) sorted by relevance

1234

/third_party/skia/modules/androidkit/src/
DMatrix.cpp18 return reinterpret_cast<jlong>(new SkM44(m0, m4, m8, m12, in Matrix_Create()
27 return reinterpret_cast<jlong>(new SkM44(SkM44::LookAt({eyeX, eyeY, eyeZ}, in Matrix_CreateLookAt()
33 return reinterpret_cast<jlong>(new SkM44(SkM44::Perspective(near, far, angle))); in Matrix_CreatePerspective()
38 if (auto* m = reinterpret_cast<SkM44*>(native_matrix)) { in Matrix_GetRowMajor()
51 delete reinterpret_cast<SkM44*>(native_matrix); in Matrix_Release()
55 if (auto* mA = reinterpret_cast<SkM44*>(native_matrixA), in Matrix_PreConcat()
56 * mB = reinterpret_cast<SkM44*>(native_matrixB); mA && mB) { in Matrix_PreConcat()
62 if (auto* m = reinterpret_cast<SkM44*>(native_matrix)) { in Matrix_Inverse()
63 SkM44 inverse(SkM44::kUninitialized_Constructor); in Matrix_Inverse()
65 return reinterpret_cast<jlong>(new SkM44(inverse)); in Matrix_Inverse()
[all …]
/third_party/skia/include/core/
DSkM44.h134 class SK_API SkM44 {
136 SkM44(const SkM44& src) = default;
137 SkM44& operator=(const SkM44& src) = default;
139 constexpr SkM44() in SkM44() function
146 SkM44(const SkM44& a, const SkM44& b) { in SkM44() function
153 SkM44(Uninitialized_Constructor) {} in SkM44() function
158 constexpr SkM44(NaN_Constructor) in SkM44() function
168 constexpr SkM44(SkScalar m0, SkScalar m4, SkScalar m8, SkScalar m12, in SkM44() function
179 static SkM44 Rows(const SkV4& r0, const SkV4& r1, const SkV4& r2, const SkV4& r3) { in Rows()
180 SkM44 m(kUninitialized_Constructor); in Rows()
[all …]
/third_party/skia/src/core/
DSkM44.cpp20 bool SkM44::operator==(const SkM44& other) const { in operator ==()
46 void SkM44::getRowMajor(SkScalar v[]) const { in getRowMajor()
50 SkM44& SkM44::setConcat(const SkM44& a, const SkM44& b) { in setConcat()
72 SkM44& SkM44::preConcat(const SkMatrix& b) { in preConcat()
91 SkM44& SkM44::preTranslate(SkScalar x, SkScalar y, SkScalar z) { in preTranslate()
102 SkM44& SkM44::postTranslate(SkScalar x, SkScalar y, SkScalar z) { in postTranslate()
111 SkM44& SkM44::preScale(SkScalar x, SkScalar y) { in preScale()
120 SkM44& SkM44::preScale(SkScalar x, SkScalar y, SkScalar z) { in preScale()
131 SkV4 SkM44::map(float x, float y, float z, float w) const { in map()
218 SkRect SkMatrixPriv::MapRect(const SkM44& m, const SkRect& src) { in MapRect()
[all …]
DSkMatrixProvider.h20 SkMatrixProvider(const SkM44& localToDevice) in SkMatrixProvider()
32 const SkM44& localToDevice44() const { return fLocalToDevice; } in localToDevice44()
34 virtual bool getLocalToMarker(uint32_t id, SkM44* localToMarker) const = 0;
41 SkM44 fLocalToDevice;
51 bool getLocalToMarker(uint32_t id, SkM44* localToMarker) const override { in getLocalToMarker()
66 : SkMatrixProvider(SkM44::Translate(dx, dy) * parent.localToDevice44()) in SkPostTranslateMatrixProvider()
70 bool getLocalToMarker(uint32_t id, SkM44* localToMarker) const override { in getLocalToMarker()
84 : SkMatrixProvider(parent.localToDevice44() * SkM44(preMatrix)) in SkPreConcatMatrixProvider()
88 bool getLocalToMarker(uint32_t id, SkM44* localToMarker) const override { in getLocalToMarker()
111 bool getLocalToMarker(uint32_t, SkM44*) const override { return false; } in getLocalToMarker() argument
DSkDevice.h116 const SkM44& deviceToGlobal() const { return fDeviceToGlobal; } in deviceToGlobal()
121 const SkM44& globalToDevice() const { return fGlobalToDevice; } in globalToDevice()
147 bool getLocalToMarker(uint32_t, SkM44* localToMarker) const override;
153 void restore(const SkM44& ctm) { in restore()
157 void restoreLocal(const SkM44& localToDevice) { in restoreLocal()
188 void setLocalToDevice(const SkM44& localToDevice) { in setLocalToDevice()
192 void setGlobalCTM(const SkM44& ctm);
436 bool SK_WARN_UNUSED_RESULT setDeviceCoordinateSystem(const SkM44& deviceToGlobal,
437 const SkM44& localToDevice,
441 void setOrigin(const SkM44& globalCTM, int x, int y) { in setOrigin()
[all …]
DSkMarkerStack.h20 void setMarker(uint32_t id, const SkM44& mx, void* boundary);
21 bool findMarker(uint32_t id, SkM44* mx) const;
22 bool findMarkerInverse(uint32_t id, SkM44* mx) const;
28 SkM44 fMatrix;
29 SkM44 fMatrixInverse;
DSkMarkerStack.cpp10 void SkMarkerStack::setMarker(uint32_t id, const SkM44& mx, void* boundary) { in setMarker()
13 SkM44 inv; in setMarker()
32 bool SkMarkerStack::findMarker(uint32_t id, SkM44* mx) const { in findMarker()
45 bool SkMarkerStack::findMarkerInverse(uint32_t id, SkM44* mx) const { in findMarkerInverse()
DSkDevice.cpp45 bool SkBaseDevice::setDeviceCoordinateSystem(const SkM44& deviceToGlobal, in setDeviceCoordinateSystem()
46 const SkM44& localToDevice, in setDeviceCoordinateSystem()
66 void SkBaseDevice::setGlobalCTM(const SkM44& ctm) { in setGlobalCTM()
77 SkM44 pixelAligned = SkM44(); in isPixelAlignedToGlobal()
101 bool SkBaseDevice::getLocalToMarker(uint32_t id, SkM44* localToMarker) const { in getLocalToMarker()
104 SkM44 globalToMarker; in getLocalToMarker()
269 const SkM44 baseLocalToDevice = this->localToDevice44(); in drawEdgeAAImageSet()
283 SkM44(preViewMatrices[images[i].fMatrixIndex])); in drawEdgeAAImageSet()
468 const SkM44 originalLocalToDevice = this->localToDevice44(); in simplifyGlyphRunRSXFormAndRedraw()
482 this->setLocalToDevice(originalLocalToDevice * SkM44(glyphToLocal)); in simplifyGlyphRunRSXFormAndRedraw()
[all …]
DSkRecordDraw.h42 int start, int stop, const SkM44& initialCTM);
51 const SkM44* initialCTM = nullptr)
74 const SkM44 fInitialCTM;
/third_party/skia/modules/sksg/src/
DSkSGTransform.cpp24 SkMatrix AsSkMatrix<SkM44>(const SkM44& m) { return m.asM33(); } in AsSkMatrix()
27 SkM44 AsSkM44(const T&);
30 SkM44 AsSkM44<SkMatrix>(const SkMatrix& m) { return SkM44(m); } in AsSkM44()
33 SkM44 AsSkM44<SkM44>(const SkM44& m) { return m; } in AsSkM44()
39 std::is_same<T, SkM44 >::value >>
64 bool is44() const override { return std::is_same<T, SkM44>::value; } in is44()
71 SkM44 asM44() const override { in asM44()
87 std::is_same<T, SkM44 >::value >>
110 bool is44() const override { return std::is_same<T, SkM44>::value; } in is44()
117 SkM44 asM44() const override { in asM44()
[all …]
DSkSGTransformPriv.h22 std::is_same<T, SkM44 >::value >>
35 inline SkM44 TransformPriv::As<SkM44>(const sk_sp<Transform>& t) {
/third_party/skia/samplecode/
DSample3D.cpp63 SkM44 computeRotation(SkV2 a, SkV2 b) const { in computeRotation()
65 return SkM44::Rotate(axis, angle); in computeRotation()
69 static SkM44 inv(const SkM44& m) { in inv()
70 SkM44 inverse; in inv()
76 static SkM44 normals(SkM44 m) { in normals()
95 SkM44 camera = SkM44::LookAt(fEye, fCOA, fUp), in concatCamera()
96 perspective = SkM44::Perspective(fNear, fFar, fAngle), in concatCamera()
97 viewport = SkM44::Translate(area.centerX(), area.centerY(), 0) * in concatCamera()
98 SkM44::Scale(area.width()*0.5f, area.height()*0.5f, zscale); in concatCamera()
108 static SkM44 T(SkScalar x, SkScalar y, SkScalar z) { in T()
[all …]
DSampleClip.cpp419 static SkM44 inv(const SkM44& m) {
420 SkM44 inverse;
438 SkM44 fRot;
442 SkM44 r; in rotate()
454 SkM44 get44(const SkRect& r) const { in get44()
458 SkM44 camera = SkM44::LookAt(fEye, fCOA, fUp), in get44()
459 perspective = SkM44::Perspective(fNear, fFar, fAngle), in get44()
460 translate = SkM44::Translate(fTrans.x, fTrans.y, fTrans.z), in get44()
461 viewport = SkM44::Translate(r.centerX(), r.centerY(), 0) * in get44()
462 SkM44::Scale(w*0.5f, h*0.5f, 1); in get44()
[all …]
/third_party/skia/gm/
D3d.cpp22 static SkM44 inv(const SkM44& m) { in inv()
23 SkM44 inverse(SkM44::kUninitialized_Constructor); in inv()
30 static SkM44 make_ctm(const Info& info, const SkM44& model, SkSize size) { in make_ctm()
31 SkM44 camera, perspective, viewport; in make_ctm()
36 perspective = SkM44::Perspective(info.fNear, info.fFar, info.fAngle); in make_ctm()
37 camera = SkM44::LookAt(info.fEye, info.fCOA, info.fUp); in make_ctm()
51 SkM44 m = SkM44::Rotate({0, 1, 0}, SK_ScalarPI/6); in do_draw()
Dcrbug_224618.cpp57 SkM44 proj{1.f, 0.f, 0.f, 0.f, in onDraw()
61 SkM44 zoom = SkM44::Translate(0.f, 0.f, radius); in onDraw()
62 SkM44 postZoom = SkM44::Translate(0.f, 0.f, -radius - 1.f); in onDraw()
63 SkM44 rotateHorizontal = SkM44::Rotate({0, 1, 0}, 2.356194490192345f); in onDraw()
84 SkM44 model = SkM44::Rotate({axisAngles[i].x, axisAngles[i].y, axisAngles[i].z}, in onDraw()
86 model = SkM44::Translate(radius, radius) * proj * // project and place content in onDraw()
88 SkM44::Translate(-radius, -radius); // center content in onDraw()
Dpostercircle.cpp84 SkM44 proj; in onDraw()
121 SkM44 model = SkM44::Translate(kStageWidth/2, kStageHeight/2 + 25, 0) in onDraw()
123 * SkM44::Translate(0, ringY, 0) in onDraw()
124 * SkM44::Rotate({0,1,0}, SkDegreesToRadians(yRotation)) in onDraw()
125 * SkM44::Translate(0, 0, kRingRadius); in onDraw()
Dimagefilterstransformed.cpp326 SkM44 m1 = SkM44::Translate(0.9f * image->width(), 0.1f * image->height()) *
327 SkM44::Scale(-.8f, .8f);
329 SkM44 m2 = SkM44::RectToRect({-1.f, -1.f, 1.f, 1.f}, imageRect) *
330 SkM44::Perspective(0.01f, 100.f, SK_ScalarPI / 3.f) *
331 SkM44::Translate(0.f, 0.f, -2.f) *
332 SkM44::Rotate({0.f, 1.f, 0.f}, SK_ScalarPI / 6.f) *
333 SkM44::RectToRect(imageRect, {-1.f, -1.f, 1.f, 1.f});
/third_party/skia/tests/
DM44Test.cpp13 static bool eq(const SkM44& a, const SkM44& b, float tol) { in eq()
26 SkM44 m, im; in DEF_TEST()
28 REPORTER_ASSERT(reporter, SkM44(1, 0, 0, 0, in DEF_TEST()
32 REPORTER_ASSERT(reporter, SkM44() == m); in DEF_TEST()
34 REPORTER_ASSERT(reporter, SkM44() == im); in DEF_TEST()
37 REPORTER_ASSERT(reporter, SkM44(1, 0, 0, 3, in DEF_TEST()
43 m = SkM44::ColMajor(f); in DEF_TEST()
44 REPORTER_ASSERT(reporter, SkM44(f[0], f[4], f[ 8], f[12], in DEF_TEST()
50 SkM44 t = m.transpose(); in DEF_TEST()
53 SkM44 tt = t.transpose(); in DEF_TEST()
[all …]
/third_party/skia/modules/skottie/src/
DCamera.cpp19 SkM44 ComputeCameraMatrix(const SkV3& position, in ComputeCameraMatrix()
26 const auto cam_t = SkM44::Rotate({0, 0, 1}, SkDegreesToRadians(-rotation.z)) in ComputeCameraMatrix()
27 * SkM44::Rotate({0, 1, 0}, SkDegreesToRadians( rotation.y)) in ComputeCameraMatrix()
28 * SkM44::Rotate({1, 0, 0}, SkDegreesToRadians( rotation.x)) in ComputeCameraMatrix()
29 * SkM44::LookAt({ position.x, position.y, -position.z }, in ComputeCameraMatrix()
32 * SkM44::Scale(1, 1, -1); in ComputeCameraMatrix()
43 const auto persp_t = SkM44::Scale(view_size * 0.5f, view_size * 0.5f, 1) in ComputeCameraMatrix()
44 * SkM44::Perspective(0, view_distance, 2 * view_angle); in ComputeCameraMatrix()
46 return SkM44::Translate(viewport_size.width() * 0.5f, in ComputeCameraMatrix()
70 SkM44 CameraAdaper::totalMatrix() const { in totalMatrix()
[all …]
DTransform.cpp144 : INHERITED(sksg::Matrix<SkM44>::Make(SkM44())) { in TransformAdapter3D()
177 SkM44 TransformAdapter3D::totalMatrix() const { in totalMatrix()
183 return SkM44::Translate(position.x, position.y, position.z) in totalMatrix()
184 * SkM44::Rotate({ 1, 0, 0 }, SkDegreesToRadians(rotation.x)) in totalMatrix()
185 * SkM44::Rotate({ 0, 1, 0 }, SkDegreesToRadians(rotation.y)) in totalMatrix()
186 * SkM44::Rotate({ 0, 0, 1 }, SkDegreesToRadians(rotation.z)) in totalMatrix()
187 * SkM44::Scale(scale.x / 100, scale.y / 100, scale.z / 100) in totalMatrix()
188 * SkM44::Translate(-anchor_point.x, -anchor_point.y, -anchor_point.z); in totalMatrix()
199 if (adapter->totalMatrix() == SkM44()) { in attachMatrix3D()
/third_party/skia/bench/
DMatrix44Bench.cpp25 fM1 = SkM44::ColMajor(value + 0); in M4Bench()
26 fM2 = SkM44::ColMajor(value + 16); in M4Bench()
36 SkM44 fM0, fM1, fM2;
89 fM0 = SkM44(fM1, fM2); in performTest()
165 fM = SkM44::Translate(rand.nextF(), rand.nextF()); in MapRectBench()
169 fM = SkM44::Scale(rand.nextF(), rand.nextF()); in MapRectBench()
174 fM = SkM44::Rotate({0.f, 0.f, 1.f}, SkDegreesToRadians(45.f)); in MapRectBench()
179 fM = SkM44::Perspective(0.01f, 10.f, SK_ScalarPI / 3.f); in MapRectBench()
181 fM.preConcat(SkM44::Rotate({0.f, 1.f, 0.f}, 0.008f /* radians */)); in MapRectBench()
186 fM = SkM44(); in MapRectBench()
[all …]
/third_party/skia/experimental/graphite/src/geom/
DTransform_graphite.h43 explicit Transform(const SkM44& m);
48 operator const SkM44&() const { return fM; }
54 const SkM44& matrix() const { return fM; } in matrix()
55 const SkM44& inverse() const { return fInvM; } in inverse()
67 SkM44 fM;
68 SkM44 fInvM; // M^-1
DTransform.cpp17 Rect map_rect(const SkM44& m, const Rect& r) { in map_rect()
26 Transform::Transform(const SkM44& m) in Transform()
30 fType = (fM == SkM44()) ? Type::kIdentity : Type::kPerspective; in Transform()
34 fInvM = SkM44(); in Transform()
/third_party/skia/modules/sksg/include/
DSkSGTransform.h13 class SkM44; variable
35 virtual SkM44 asM44 () const = 0;
59 std::is_same<T, SkM44 >::value>>
71 bool is44() const override { return std::is_same<T, SkM44>::value; } in is44()
74 SkM44 asM44 () const override;
/third_party/skia/modules/skottie/src/text/
DTextAdapter.cpp100 SkM44 getMatrix(float distance, SkTextUtils::Align alignment) const { in getMatrix()
105 return SkM44(); in getMatrix()
130 return SkM44(); in getMatrix()
141 auto m = SkM44::Translate(pos.x(), pos.y()); in getMatrix()
146 m = m * SkM44::Rotate({0,0,1}, std::atan2(tan.y(), tan.x())); in getMatrix()
317 rec.fMatrixNode = sksg::Matrix<SkM44>::Make(SkM44::Translate(frag.fPos.x(), frag.fPos.y())); in addFragment()
675 SkM44 TextAdapter::fragmentMatrix(const TextAnimator::ResolvedProps& props, in fragmentMatrix()
684 return SkM44::Translate(pos.x, pos.y, pos.z); in fragmentMatrix()
704 * SkM44::Translate(0, rel_pos.y, pos.z); in fragmentMatrix()
715 * SkM44::Rotate({ 1, 0, 0 }, SkDegreesToRadians(props.rotation.x)) in pushPropsToFragment()
[all …]

1234