/third_party/skia/modules/androidkit/src/ |
H A D | Matrix.cpp | 10 #include "include/core/SkM44.h" 18 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_matrix in Matrix_PreConcat() [all...] |
/third_party/skia/include/core/ |
H A D | SkM44.h | 134 class SK_API SkM44 { class 136 SkM44(const SkM44& src) = default; 137 SkM44& operator=(const SkM44& src) = default; 139 constexpr SkM44() in SkM44() function in SkM44 146 SkM44(const SkM44& a, const SkM44& b) { in SkM44() function in SkM44 153 SkM44(Uninitialized_Constructo function in SkM44 158 constexpr SkM44(NaN_Constructor) SkM44() function in SkM44 168 constexpr SkM44(SkScalar m0, SkScalar m4, SkScalar m8, SkScalar m12, SkM44() function in SkM44 406 explicit SkM44(const SkMatrix& src) SkM44() function in SkM44 [all...] |
/third_party/skia/modules/sksg/src/ |
H A D | SkSGTransform.cpp | 24 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> [all...] |
H A D | SkSGTransformPriv.h | 22 std::is_same<T, SkM44 >::value >> 35 inline SkM44 TransformPriv::As<SkM44>(const sk_sp<Transform>& t) { in As()
|
/third_party/skia/src/core/ |
H A D | SkM44.cpp | 8 #include "include/core/SkM44.h" 20 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 [all...] |
H A D | SkMatrixProvider.h | 11 #include "include/core/SkM44.h" 20 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 { 66 : SkMatrixProvider(SkM44::Translate(dx, dy) * parent.localToDevice44()) in SkPostTranslateMatrixProvider() 70 bool getLocalToMarker(uint32_t id, SkM44* localToMarker) const override { 84 : SkMatrixProvider(parent.localToDevice44() * SkM44(preMatrix)) in SkPreConcatMatrixProvider() 88 bool getLocalToMarker(uint32_t id, SkM44* localToMarke [all...] |
H A D | SkMarkerStack.h | 11 #include "include/core/SkM44.h" 20 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;
|
H A D | SkDevice.h | 117 const SkM44& deviceToGlobal() const { return fDeviceToGlobal; } in deviceToGlobal() 122 const SkM44& globalToDevice() const { return fGlobalToDevice; } in globalToDevice() 148 bool getLocalToMarker(uint32_t, SkM44* localToMarker) const override; 154 void restore(const SkM44& ctm) { in restore() 158 void restoreLocal(const SkM44& localToDevice) { in restoreLocal() 189 void setLocalToDevice(const SkM44& localToDevice) { in setLocalToDevice() 193 void setGlobalCTM(const SkM44& ctm); 439 bool SK_WARN_UNUSED_RESULT setDeviceCoordinateSystem(const SkM44& deviceToGlobal, 440 const SkM44& localToDevice, 444 void setOrigin(const SkM44 [all...] |
H A D | SkMarkerStack.cpp | 10 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()
|
H A D | SkDevice.cpp | 45 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 originalLocalToDevic in simplifyGlyphRunRSXFormAndRedraw() [all...] |
H A D | SkRecordDraw.h | 42 int start, int stop, const SkM44& initialCTM); 51 const SkM44* initialCTM = nullptr) in Draw() 74 const SkM44 fInitialCTM;
|
/third_party/skia/gm/ |
H A D | 3d.cpp | 22 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 in do_draw() [all...] |
H A D | crbug_224618.cpp | 11 #include "include/core/SkM44.h" 57 SkM44 proj{1.f, 0.f, 0.f, 0.f, 61 SkM44 zoom = SkM44::Translate(0.f, 0.f, radius); 62 SkM44 postZoom = SkM44::Translate(0.f, 0.f, -radius - 1.f); 63 SkM44 rotateHorizontal = SkM44::Rotate({0, 1, 0}, 2.356194490192345f); 84 SkM44 model = SkM44 [all...] |
H A D | postercircle.cpp | 14 #include "include/core/SkM44.h" 84 SkM44 proj; 121 SkM44 model = SkM44::Translate(kStageWidth/2, kStageHeight/2 + 25, 0) 123 * SkM44::Translate(0, ringY, 0) 124 * SkM44::Rotate({0,1,0}, SkDegreesToRadians(yRotation)) 125 * SkM44::Translate(0, 0, kRingRadius);
|
H A D | imagefilterstransformed.cpp | 326 SkM44 m1 = SkM44::Translate(0.9f * image->width(), 0.1f * image->height()) * in DEF_SIMPLE_GM() 327 SkM44::Scale(-.8f, .8f); in DEF_SIMPLE_GM() 329 SkM44 m2 = SkM44::RectToRect({-1.f, -1.f, 1.f, 1.f}, imageRect) * in DEF_SIMPLE_GM() 330 SkM44::Perspective(0.01f, 100.f, SK_ScalarPI / 3.f) * in DEF_SIMPLE_GM() 331 SkM44::Translate(0.f, 0.f, -2.f) * in DEF_SIMPLE_GM() 332 SkM44::Rotate({0.f, 1.f, 0.f}, SK_ScalarPI / 6.f) * in DEF_SIMPLE_GM() 333 SkM44::RectToRect(imageRect, {-1.f, -1.f, 1.f, 1.f}); in DEF_SIMPLE_GM()
|
/third_party/skia/samplecode/ |
H A D | Sample3D.cpp | 9 #include "include/core/SkM44.h" 63 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 in concatCamera() [all...] |
/third_party/skia/tests/ |
H A D | M44Test.cpp | 8 #include "include/core/SkM44.h" 13 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( in DEF_TEST() [all...] |
/third_party/skia/modules/skottie/src/ |
H A D | Camera.cpp | 19 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 CameraAdape [all...] |
H A D | Transform.cpp | 144 : 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() 198 // TODO: SkM44 in attachMatrix3D() [all...] |
H A D | Transform.h | 11 #include "include/core/SkM44.h" 76 class TransformAdapter3D : public DiscardableAdapterBase<TransformAdapter3D, sksg::Matrix<SkM44>> { 81 virtual SkM44 totalMatrix() const; 99 using INHERITED = DiscardableAdapterBase<TransformAdapter3D, sksg::Matrix<SkM44>>;
|
/third_party/skia/experimental/graphite/src/geom/ |
H A D | Transform_graphite.h | 11 #include "include/core/SkM44.h" 17 // Transform encapsulates an SkM44 matrix, its inverse, and other properties dependent on the 43 explicit Transform(const SkM44& m); 48 operator const SkM44&() const { return fM; } in operator const SkM44&() 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
|
H A D | Transform.cpp | 17 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/bench/ |
H A D | Matrix44Bench.cpp | 9 #include "include/core/SkM44.h" 25 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); 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 in MapRectBench() [all...] |
/third_party/skia/modules/sksg/include/ |
H A D | SkSGTransform.h | 13 class SkM44; 35 virtual SkM44 asM44 () const = 0; 46 * Supported instantiations: SkMatrix, SkM44. 59 std::is_same<T, SkM44 >::value>> 71 bool is44() const override { return std::is_same<T, SkM44>::value; } 74 SkM44 asM44 () const override;
|
/third_party/skia/modules/skottie/src/text/ |
H A D | TextAdapter.cpp | 12 #include "include/core/SkM44.h" 100 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 in fragmentMatrix() [all...] |