/external/skia/modules/jetski/src/ |
D | Matrix.cpp | 20 return reinterpret_cast<jlong>(new SkM44(m0, m4, m8, m12, in Matrix_Create() 29 return reinterpret_cast<jlong>(new SkM44(SkM44::LookAt({eyeX, eyeY, eyeZ}, in Matrix_CreateLookAt() 35 return reinterpret_cast<jlong>(new SkM44(SkM44::Perspective(near, far, angle))); in Matrix_CreatePerspective() 40 if (auto* m = reinterpret_cast<SkM44*>(native_matrix)) { in Matrix_GetRowMajor() 53 delete reinterpret_cast<SkM44*>(native_matrix); in Matrix_Release() 57 if (auto* mA = reinterpret_cast<SkM44*>(native_matrixA), in Matrix_PreConcat() 58 * mB = reinterpret_cast<SkM44*>(native_matrixB); mA && mB) { in Matrix_PreConcat() 64 if (auto* m = reinterpret_cast<SkM44*>(native_matrix)) { in Matrix_Inverse() 65 SkM44 inverse(SkM44::kUninitialized_Constructor); in Matrix_Inverse() 67 return reinterpret_cast<jlong>(new SkM44(inverse)); in Matrix_Inverse() [all …]
|
D | Canvas.cpp | 58 SkM44* m = new SkM44(canvas->getLocalToDevice()); in Canvas_LocalToDevice() 66 auto* matrix = reinterpret_cast<SkM44* >(native_matrix); in Canvas_Concat() 78 canvas->concat(SkM44::RowMajor(m)); in Canvas_Concat16f() 86 canvas->concat(SkM44::Translate(tx, ty, tz)); in Canvas_Translate() 92 canvas->concat(SkM44::Scale(sx, sy, sz)); in Canvas_Scale()
|
/external/skia/include/core/ |
D | SkM44.h | 146 class SK_API SkM44 { 148 SkM44(const SkM44& src) = default; 149 SkM44& operator=(const SkM44& src) = default; 151 constexpr SkM44() in SkM44() function 158 SkM44(const SkM44& a, const SkM44& b) { in SkM44() function 165 SkM44(Uninitialized_Constructor) {} in SkM44() function 170 constexpr SkM44(NaN_Constructor) in SkM44() function 180 constexpr SkM44(SkScalar m0, SkScalar m4, SkScalar m8, SkScalar m12, in SkM44() function 191 static SkM44 Rows(const SkV4& r0, const SkV4& r1, const SkV4& r2, const SkV4& r3) { in Rows() 192 SkM44 m(kUninitialized_Constructor); in Rows() [all …]
|
/external/skia/modules/sksg/src/ |
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>::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 …]
|
D | SkSGTransformPriv.h | 22 std::is_same<T, SkM44 >::value >> 35 inline SkM44 TransformPriv::As<SkM44>(const sk_sp<Transform>& t) {
|
/external/skia/src/core/ |
D | SkM44.cpp | 16 bool SkM44::operator==(const SkM44& other) const { in operator ==() 42 void SkM44::getRowMajor(SkScalar v[]) const { in getRowMajor() 46 SkM44& SkM44::setConcat(const SkM44& a, const SkM44& b) { in setConcat() 68 SkM44& SkM44::preConcat(const SkMatrix& b) { in preConcat() 87 SkM44& SkM44::preTranslate(SkScalar x, SkScalar y, SkScalar z) { in preTranslate() 98 SkM44& SkM44::postTranslate(SkScalar x, SkScalar y, SkScalar z) { in postTranslate() 107 SkM44& SkM44::preScale(SkScalar x, SkScalar y) { in preScale() 116 SkM44& SkM44::preScale(SkScalar x, SkScalar y, SkScalar z) { in preScale() 127 SkV4 SkM44::map(float x, float y, float z, float w) const { in map() 214 SkRect SkMatrixPriv::MapRect(const SkM44& m, const SkRect& src) { in MapRect() [all …]
|
D | SkMatrixProvider.h | 41 SkMatrixProvider(const SkM44& localToDevice) in SkMatrixProvider() 47 const SkM44& localToDevice44() const { return fLocalToDevice; } in localToDevice44() 52 SkM44 fLocalToDevice; 59 : SkMatrixProvider(SkM44::Translate(dx, dy) * parent.localToDevice44()) {} in SkPostTranslateMatrixProvider() 65 : SkMatrixProvider(parent.localToDevice44() * SkM44(preMatrix)) {} in SkPreConcatMatrixProvider()
|
D | SkDevice.h | 142 const SkM44& deviceToGlobal() const { return fDeviceToGlobal; } in deviceToGlobal() 147 const SkM44& globalToDevice() const { return fGlobalToDevice; } in globalToDevice() 172 void restore(const SkM44& ctm) { in restore() 176 void restoreLocal(const SkM44& localToDevice) { in restoreLocal() 207 void setLocalToDevice(const SkM44& localToDevice) { in setLocalToDevice() 212 void setGlobalCTM(const SkM44& ctm); 491 void setDeviceCoordinateSystem(const SkM44& deviceToGlobal, 492 const SkM44& globalToDevice, 493 const SkM44& localToDevice, 498 void setOrigin(const SkM44& globalCTM, int x, int y) { in setOrigin() [all …]
|
D | SkRecordDraw.h | 42 int start, int stop, const SkM44& initialCTM); 51 const SkM44* initialCTM = nullptr) 74 const SkM44 fInitialCTM;
|
/external/skia/tools/viewer/ |
D | 3DSlide.cpp | 64 SkM44 computeRotation(SkV2 a, SkV2 b) const { in computeRotation() 66 return SkM44::Rotate(axis, angle); in computeRotation() 70 static SkM44 inv(const SkM44& m) { in inv() 71 SkM44 inverse; in inv() 77 static SkM44 normals(SkM44 m) { in normals() 96 SkM44 camera = SkM44::LookAt(fEye, fCOA, fUp), in concatCamera() 97 perspective = SkM44::Perspective(fNear, fFar, fAngle), in concatCamera() 98 viewport = SkM44::Translate(area.centerX(), area.centerY(), 0) * in concatCamera() 99 SkM44::Scale(area.width()*0.5f, area.height()*0.5f, zscale); in concatCamera() 109 static SkM44 T(SkScalar x, SkScalar y, SkScalar z) { in T() [all …]
|
D | ClipSlide.cpp | 425 static SkM44 inv(const SkM44& m) { 426 SkM44 inverse; 444 SkM44 fRot; 448 SkM44 r; in rotate() 460 SkM44 get44(const SkRect& r) const { in get44() 464 SkM44 camera = SkM44::LookAt(fEye, fCOA, fUp), in get44() 465 perspective = SkM44::Perspective(fNear, fFar, fAngle), in get44() 466 translate = SkM44::Translate(fTrans.x, fTrans.y, fTrans.z), in get44() 467 viewport = SkM44::Translate(r.centerX(), r.centerY(), 0) * in get44() 468 SkM44::Scale(w*0.5f, h*0.5f, 1); in get44() [all …]
|
/external/skia/gm/ |
D | 3d.cpp | 24 static SkM44 inv(const SkM44& m) { in inv() 25 SkM44 inverse(SkM44::kUninitialized_Constructor); in inv() 32 static SkM44 make_ctm(const Info& info, const SkM44& model, SkSize size) { in make_ctm() 33 SkM44 camera, perspective, viewport; in make_ctm() 38 perspective = SkM44::Perspective(info.fNear, info.fFar, info.fAngle); in make_ctm() 39 camera = SkM44::LookAt(info.fEye, info.fCOA, info.fUp); in make_ctm() 53 SkM44 m = SkM44::Rotate({0, 1, 0}, SK_ScalarPI/6); in do_draw()
|
D | crbug_224618.cpp | 57 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()
|
D | postercircle.cpp | 84 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()
|
D | imagefilterstransformed.cpp | 326 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});
|
/external/skia/tests/ |
D | M44Test.cpp | 18 static bool eq(const SkM44& a, const SkM44& b, float tol) { in eq() 31 SkM44 m, im; in DEF_TEST() 33 REPORTER_ASSERT(reporter, SkM44(1, 0, 0, 0, in DEF_TEST() 37 REPORTER_ASSERT(reporter, SkM44() == m); in DEF_TEST() 39 REPORTER_ASSERT(reporter, SkM44() == im); in DEF_TEST() 42 REPORTER_ASSERT(reporter, SkM44(1, 0, 0, 3, in DEF_TEST() 48 m = SkM44::ColMajor(f); in DEF_TEST() 49 REPORTER_ASSERT(reporter, SkM44(f[0], f[4], f[ 8], f[12], in DEF_TEST() 55 SkM44 t = m.transpose(); in DEF_TEST() 58 SkM44 tt = t.transpose(); in DEF_TEST() [all …]
|
/external/skia/src/gpu/graphite/geom/ |
D | Transform_graphite.h | 46 explicit Transform(const SkM44& m); 54 operator const SkM44&() const { return fM; } 60 const SkM44& matrix() const { return fM; } in matrix() 61 const SkM44& inverse() const { return fInvM; } in inverse() 84 Transform concat(const SkM44& t) const { return Transform(fM * t); } in concat() 88 Transform concatInverse(const SkM44& t) const; 91 Transform(const SkM44& m, const SkM44& invM, Type type, const SkV2 scale) in Transform() 94 SkM44 fM; 95 SkM44 fInvM; // M^-1
|
D | Transform.cpp | 18 Rect map_rect(const SkM44& m, const Rect& r) { in map_rect() 25 void map_points(const SkM44& m, const SkV4* in, SkV4* out, int count) { in map_points() 38 Transform::Type get_matrix_info(const SkM44& m, SkM44* inverse, SkV2* scale) { in get_matrix_info() 93 Transform::Transform(const SkM44& m) : fM(m) { in Transform() 98 static const Transform kIdentity{SkM44()}; in Identity() 102 static const Transform kInvalid{SkM44(SkM44::kNaN_Constructor)}; in Invalid() 183 Transform Transform::concatInverse(const SkM44& t) const { in concatInverse()
|
/external/skia/modules/skottie/src/ |
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 CameraAdaper::totalMatrix() const { in totalMatrix() [all …]
|
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() 199 if (adapter->totalMatrix() == SkM44()) { in attachMatrix3D()
|
D | Transform.h | 76 class TransformAdapter3D : public DiscardableAdapterBase<TransformAdapter3D, sksg::Matrix<SkM44>> { 81 virtual SkM44 totalMatrix() const; 99 using INHERITED = DiscardableAdapterBase<TransformAdapter3D, sksg::Matrix<SkM44>>;
|
/external/skia/bench/ |
D | Matrix44Bench.cpp | 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); 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 …]
|
/external/skia/modules/sksg/include/ |
D | SkSGTransform.h | 13 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;
|
/external/skia/src/gpu/graphite/ |
D | KeyContext.h | 36 KeyContext(Recorder*, const SkM44& local2Dev, const SkColorInfo&); 42 const SkM44& local2Dev() const { return fLocal2Dev; } in local2Dev() 52 SkM44 fLocal2Dev;
|
/external/skia/modules/skottie/src/text/ |
D | TextAdapter.cpp | 133 sk_sp<sksg::Matrix<SkM44>> fMatrixNode; 203 SkM44 getMatrix(float distance, SkTextUtils::Align alignment) const { in getMatrix() 208 return SkM44(); in getMatrix() 233 return SkM44(); in getMatrix() 244 auto m = SkM44::Translate(pos.x(), pos.y()); in getMatrix() 249 m = m * SkM44::Rotate({0,0,1}, std::atan2(tan.y(), tan.x())); in getMatrix() 453 rec.fMatrixNode = sksg::Matrix<SkM44>::Make(SkM44::Translate(frag.fOrigin.x(), in addFragment() 891 SkM44 TextAdapter::fragmentMatrix(const TextAnimator::ResolvedProps& props, in fragmentMatrix() 900 return SkM44::Translate(pos.x, pos.y, pos.z); in fragmentMatrix() 920 * SkM44::Translate(0, rel_pos.y, pos.z); in fragmentMatrix() [all …]
|