Home
last modified time | relevance | path

Searched refs:SkMatrix (Results 1 – 25 of 561) sorted by relevance

12345678910>>...23

/external/skia/src/gpu/glsl/
DGrGLSLUtil.cpp11 template<> void GrGLSLGetMatrix<3>(float* dest, const SkMatrix& src) { in GrGLSLGetMatrix()
13 dest[0] = SkScalarToFloat(src[SkMatrix::kMScaleX]); in GrGLSLGetMatrix()
14 dest[1] = SkScalarToFloat(src[SkMatrix::kMSkewY]); in GrGLSLGetMatrix()
15 dest[2] = SkScalarToFloat(src[SkMatrix::kMPersp0]); in GrGLSLGetMatrix()
18 dest[3] = SkScalarToFloat(src[SkMatrix::kMSkewX]); in GrGLSLGetMatrix()
19 dest[4] = SkScalarToFloat(src[SkMatrix::kMScaleY]); in GrGLSLGetMatrix()
20 dest[5] = SkScalarToFloat(src[SkMatrix::kMPersp1]); in GrGLSLGetMatrix()
23 dest[6] = SkScalarToFloat(src[SkMatrix::kMTransX]); in GrGLSLGetMatrix()
24 dest[7] = SkScalarToFloat(src[SkMatrix::kMTransY]); in GrGLSLGetMatrix()
25 dest[8] = SkScalarToFloat(src[SkMatrix::kMPersp2]); in GrGLSLGetMatrix()
[all …]
DGrGLSLPrimitiveProcessor.cpp15 SkMatrix GrGLSLPrimitiveProcessor::GetTransformMatrix(const SkMatrix& localMatrix, in GetTransformMatrix()
17 SkMatrix combined; in GetTransformMatrix()
27 combined.set(SkMatrix::kMSkewY, in GetTransformMatrix()
28 combined[SkMatrix::kMPersp0] - combined[SkMatrix::kMSkewY]); in GetTransformMatrix()
29 combined.set(SkMatrix::kMScaleY, in GetTransformMatrix()
30 combined[SkMatrix::kMPersp1] - combined[SkMatrix::kMScaleY]); in GetTransformMatrix()
31 combined.set(SkMatrix::kMTransY, in GetTransformMatrix()
32 combined[SkMatrix::kMPersp2] - combined[SkMatrix::kMTransY]); in GetTransformMatrix()
DGrGLSLProgramDataManager.cpp13 void GrGLSLProgramDataManager::setSkMatrix(UniformHandle u, const SkMatrix& matrix) const { in setSkMatrix()
15 matrix.get(SkMatrix::kMScaleX), in setSkMatrix()
16 matrix.get(SkMatrix::kMSkewY), in setSkMatrix()
17 matrix.get(SkMatrix::kMPersp0), in setSkMatrix()
18 matrix.get(SkMatrix::kMSkewX), in setSkMatrix()
19 matrix.get(SkMatrix::kMScaleY), in setSkMatrix()
20 matrix.get(SkMatrix::kMPersp1), in setSkMatrix()
21 matrix.get(SkMatrix::kMTransX), in setSkMatrix()
22 matrix.get(SkMatrix::kMTransY), in setSkMatrix()
23 matrix.get(SkMatrix::kMPersp2), in setSkMatrix()
/external/skia/src/core/
DSkMatrix.cpp27 if (0 == mat[SkMatrix::kMPersp0] && 0 == mat[SkMatrix::kMPersp1]) { in normalize_perspective()
28 SkScalar p2 = mat[SkMatrix::kMPersp2]; in normalize_perspective()
34 mat[SkMatrix::kMPersp2] = 1; in normalize_perspective()
64 void SkMatrix::reset() { in reset()
72 void SkMatrix::set9(const SkScalar buffer[]) { in set9()
78 void SkMatrix::setAffine(const SkScalar buffer[]) { in setAffine()
102 uint8_t SkMatrix::computePerspectiveTypeMask() const { in computePerspectiveTypeMask()
117 uint8_t SkMatrix::computeTypeMask() const { in computeTypeMask()
130 int m00 = SkScalarAs2sCompliment(fMat[SkMatrix::kMScaleX]); in computeTypeMask()
131 int m01 = SkScalarAs2sCompliment(fMat[SkMatrix::kMSkewX]); in computeTypeMask()
[all …]
DSkMatrixImageFilter.cpp18 SkMatrixImageFilter::SkMatrixImageFilter(const SkMatrix& transform, in SkMatrixImageFilter()
26 SkMatrixImageFilter* SkMatrixImageFilter::Create(const SkMatrix& transform, in Create()
34 SkMatrix matrix; in CreateProc()
65 SkMatrix matrix; in onFilterImageDeprecated()
102 void SkMatrixImageFilter::onFilterNodeBounds(const SkIRect& src, const SkMatrix& ctm, in onFilterNodeBounds()
104 SkMatrix matrix; in onFilterNodeBounds()
112 SkMatrix transformInverse; in onFilterNodeBounds()
131 fTransform[SkMatrix::kMScaleX], in toString()
132 fTransform[SkMatrix::kMSkewX], in toString()
133 fTransform[SkMatrix::kMTransX], in toString()
[all …]
DSkLocalMatrixImageFilter.cpp12 SkImageFilter* SkLocalMatrixImageFilter::Create(const SkMatrix& localM, SkImageFilter* input) { in Create()
16 if (localM.getType() & (SkMatrix::kAffine_Mask | SkMatrix::kPerspective_Mask)) { in Create()
25 SkLocalMatrixImageFilter::SkLocalMatrixImageFilter(const SkMatrix& localM, SkImageFilter* input) in SkLocalMatrixImageFilter()
31 SkMatrix lm; in CreateProc()
44 Context localCtx(SkMatrix::Concat(ctx.ctm(), fLocalM), ctx.clipBounds(), ctx.cache()); in onFilterImageDeprecated()
48 bool SkLocalMatrixImageFilter::onFilterBounds(const SkIRect& src, const SkMatrix& matrix, in onFilterBounds()
50 return this->getInput(0)->filterBounds(src, SkMatrix::Concat(matrix, fLocalM), dst, direction); in onFilterBounds()
DSkBitmapProcState.cpp64 static bool matrix_only_scale_translate(const SkMatrix& m) { in matrix_only_scale_translate()
65 return m.getType() <= (SkMatrix::kScale_Mask | SkMatrix::kTranslate_Mask); in matrix_only_scale_translate()
72 static bool just_trans_clamp(const SkMatrix& matrix, const SkPixmap& pixmap) { in just_trans_clamp()
75 if (matrix.getType() & SkMatrix::kScale_Mask) { in just_trans_clamp()
98 static bool just_trans_general(const SkMatrix& matrix) { in just_trans_general()
101 if (matrix.getType() & SkMatrix::kScale_Mask) { in just_trans_general()
104 if (!SkScalarNearlyZero(matrix[SkMatrix::kMScaleX] - SK_Scalar1, tol)) { in just_trans_general()
107 if (!SkScalarNearlyZero(matrix[SkMatrix::kMScaleY] - SK_Scalar1, tol)) { in just_trans_general()
131 bool SkBitmapProcState::chooseProcs(const SkMatrix& inv, const SkPaint& paint) { in chooseProcs()
155 bool trivialMatrix = (fInvMatrix.getType() & ~SkMatrix::kTranslate_Mask) == 0; in chooseProcs()
[all …]
/external/skia/include/core/
DSkShader.h38 SkShader(const SkMatrix* localMatrix = NULL);
47 const SkMatrix& getLocalMatrix() const { return fLocalMatrix; } in getLocalMatrix()
108 ContextRec(const SkPaint& paint, const SkMatrix& matrix, const SkMatrix* localM, in ContextRec()
116 const SkMatrix* fMatrix; // the current matrix in the canvas
117 const SkMatrix* fLocalMatrix; // optional local matrix
172 static MatrixClass ComputeMatrixClass(const SkMatrix&);
175 const SkMatrix& getTotalInverse() const { return fTotalInverse; } in getTotalInverse()
177 const SkMatrix& getCTM() const { return fCTM; } in getCTM()
179 SkMatrix fCTM;
180 SkMatrix fTotalInverse;
[all …]
DSkMatrix.h26 class SK_API SkMatrix {
28 static SkMatrix SK_WARN_UNUSED_RESULT MakeScale(SkScalar sx, SkScalar sy) { in MakeScale()
29 SkMatrix m; in MakeScale()
34 static SkMatrix SK_WARN_UNUSED_RESULT MakeScale(SkScalar scale) { in MakeScale()
35 SkMatrix m; in MakeScale()
40 static SkMatrix SK_WARN_UNUSED_RESULT MakeTrans(SkScalar dx, SkScalar dy) { in MakeTrans()
41 SkMatrix m; in MakeTrans()
250 SkMatrix& setRSXform(const SkRSXform&);
264 void setConcat(const SkMatrix& a, const SkMatrix& b);
297 void preConcat(const SkMatrix& other);
[all …]
DSkMaskFilter.h26 class SkMatrix; variable
63 virtual bool filterMask(SkMask* dst, const SkMask& src, const SkMatrix&,
77 virtual bool asFragmentProcessor(GrFragmentProcessor**, GrTexture*, const SkMatrix& ctm) const;
107 const SkMatrix& ctm,
118 const SkMatrix& viewMatrix,
129 const SkMatrix& viewMatrix,
142 const SkMatrix& ctm,
212 const SkMatrix&,
218 virtual FilterReturn filterRRectToNine(const SkRRect&, const SkMatrix&,
230 bool filterPath(const SkPath& devPath, const SkMatrix& ctm, const SkRasterClip&, SkBlitter*,
[all …]
/external/skia/src/gpu/effects/
DGrBezierEffect.h62 const SkMatrix& viewMatrix,
65 const SkMatrix& localMatrix,
101 const SkMatrix& viewMatrix() const { return fViewMatrix; } in viewMatrix()
102 const SkMatrix& localMatrix() const { return fLocalMatrix; } in localMatrix()
111 GrConicEffect(GrColor, const SkMatrix& viewMatrix, uint8_t coverage, GrPrimitiveEdgeType,
112 const SkMatrix& localMatrix, bool usesLocalCoords);
115 SkMatrix fViewMatrix;
116 SkMatrix fLocalMatrix;
142 const SkMatrix& viewMatrix,
145 const SkMatrix& localMatrix,
[all …]
/external/skia/tests/
DMatrixTest.cpp19 static bool nearly_equal(const SkMatrix& a, const SkMatrix& b) { in nearly_equal()
30 const SkMatrix& a, in are_equal()
31 const SkMatrix& b) { in are_equal()
68 static bool is_identity(const SkMatrix& m) { in is_identity()
69 SkMatrix identity; in is_identity()
74 static void assert9(skiatest::Reporter* reporter, const SkMatrix& m, in assert9()
93 SkMatrix m; in test_set9()
105 buffer[SkMatrix::kMScaleX] = 1; in test_set9()
106 buffer[SkMatrix::kMScaleY] = 1; in test_set9()
107 buffer[SkMatrix::kMPersp2] = 1; in test_set9()
[all …]
/external/skia/src/gpu/batches/
DGrAAFillRectBatch.h15 class SkMatrix; variable
20 const SkMatrix& viewMatrix,
25 const SkMatrix& viewMatrix,
26 const SkMatrix& localMatrix,
30 const SkMatrix& viewMatrix,
31 const SkMatrix& localMatrix,
36 const SkMatrix& viewMatrix,
42 const SkMatrix& viewMatrix,
48 const SkMatrix& viewMatrix,
49 const SkMatrix& localMatrix,
DGrAAFillRectBatch.cpp48 const SkMatrix& viewMatrix, in create_fill_rect_gp()
68 return GrDefaultGeoProcFactory::Create(color, coverage, localCoords, SkMatrix::I()); in create_fill_rect_gp()
79 const SkMatrix& viewMatrix, in generate_aa_fill_rect_geometry()
83 const SkMatrix* localMatrix) { in generate_aa_fill_rect_geometry()
96 { viewMatrix[SkMatrix::kMScaleX], viewMatrix[SkMatrix::kMSkewY] }, in generate_aa_fill_rect_geometry()
97 { viewMatrix[SkMatrix::kMSkewX], viewMatrix[SkMatrix::kMScaleY] } in generate_aa_fill_rect_geometry()
132 SkMatrix invViewMatrix; in generate_aa_fill_rect_geometry()
135 invViewMatrix = SkMatrix::I(); in generate_aa_fill_rect_geometry()
137 SkMatrix localCoordMatrix; in generate_aa_fill_rect_geometry()
212 SkMatrix fViewMatrix;
[all …]
DGrNonAAFillRectBatch.h14 class SkMatrix; variable
20 const SkMatrix& viewMatrix,
23 const SkMatrix* localMatrix);
26 const SkMatrix& viewMatrix,
29 const SkMatrix* localMatrix);
32 const SkMatrix& viewMatrix,
35 const SkMatrix* localMatrix);
DGrRectBatchFactory.h28 const SkMatrix& viewMatrix, in CreateNonAAFill()
31 const SkMatrix* localMatrix) { in CreateNonAAFill()
41 const SkMatrix& viewMatrix, in CreateAAFill()
48 const SkMatrix& viewMatrix, in CreateAAFill()
49 const SkMatrix& localMatrix, in CreateAAFill()
56 const SkMatrix& viewMatrix, in CreateNonAAStroke()
64 const SkMatrix& viewMatrix, in CreateAAStroke()
72 const SkMatrix& viewMatrix,
/external/skia/src/gpu/
DGrPathProcessor.h21 const SkMatrix& viewMatrix = SkMatrix::I(),
22 const SkMatrix& localMatrix = SkMatrix::I()) {
29 const SkMatrix& viewMatrix() const { return fViewMatrix; } in viewMatrix()
30 const SkMatrix& localMatrix() const { return fLocalMatrix; } in localMatrix()
47 const SkMatrix& viewMatrix, const SkMatrix& localMatrix);
52 const SkMatrix fViewMatrix;
53 const SkMatrix fLocalMatrix;
DSkGpuDevice_drawTexture.cpp44 const SkMatrix& m, in may_color_bleed()
73 const SkMatrix& srcRectToDeviceSpace, in can_ignore_bilerp_constraint()
94 const SkMatrix& viewMatrix, in drawTextureProducer()
106 SkMatrix srcToDstMatrix; in drawTextureProducer()
116 if (!srcToDstMatrix.setRectToRect(*srcRect, *dstRect, SkMatrix::kFill_ScaleToFit)) { in drawTextureProducer()
123 if (!srcToDstMatrix.setRectToRect(*srcRect, *dstRect, SkMatrix::kFill_ScaleToFit)) { in drawTextureProducer()
131 if (!srcToDstMatrix.setRectToRect(srcBounds, *dstRect, SkMatrix::kFill_ScaleToFit)) { in drawTextureProducer()
148 const SkMatrix& viewMatrix, in drawTextureProducerImpl()
149 const SkMatrix& srcToDstMatrix, in drawTextureProducerImpl()
183 SkMatrix combinedMatrix; in drawTextureProducerImpl()
[all …]
/external/skia/include/gpu/
DGrDrawContext.h34 class SkMatrix; variable
56 const SkMatrix& viewMatrix, const char text[], size_t byteLength,
59 const SkMatrix& viewMatrix, const char text[], size_t byteLength,
63 const SkMatrix& viewMatrix, const SkTextBlob*,
85 void drawPaint(const GrClip&, const GrPaint&, const SkMatrix& viewMatrix);
101 const SkMatrix& viewMatrix,
115 const SkMatrix& viewMatrix,
124 const SkMatrix& viewMatrix,
126 const SkMatrix& localMatrix);
139 const SkMatrix& viewMatrix,
[all …]
DGrCoordTransform.h64 GrCoordTransform(GrCoordSet sourceCoords, const SkMatrix& m, in GrCoordTransform()
74 GrCoordTransform(GrCoordSet sourceCoords, const SkMatrix& m,
87 void reset(GrCoordSet, const SkMatrix&, const GrTexture*, GrTextureParams::FilterMode filter);
88 void reset(GrCoordSet sourceCoords, const SkMatrix& m,
104 SkMatrix* accessMatrix() { in accessMatrix()
119 const SkMatrix& getMatrix() const { return fMatrix; } in getMatrix()
125 static inline SkMatrix MakeDivByTextureWHMatrix(const GrTexture* texture) { in MakeDivByTextureWHMatrix()
127 SkMatrix mat; in MakeDivByTextureWHMatrix()
134 SkMatrix fMatrix;
/external/skia/bench/
DDrawBitmapAABench.cpp20 DrawBitmapAABench(bool doAA, const SkMatrix& matrix, const char name[]) in DrawBitmapAABench()
49 SkMatrix fMatrix;
56 DEF_BENCH( return new DrawBitmapAABench(false, SkMatrix::MakeScale(1), "ident"); )
58 DEF_BENCH( return new DrawBitmapAABench(false, SkMatrix::MakeScale(1.17f), "scale"); )
60 DEF_BENCH( return new DrawBitmapAABench(false, SkMatrix::MakeTrans(17.5f, 17.5f), "translate"); )
63 SkMatrix m;
69 DEF_BENCH( return new DrawBitmapAABench(true, SkMatrix::MakeScale(1), "ident"); )
71 DEF_BENCH( return new DrawBitmapAABench(true, SkMatrix::MakeScale(1.17f), "scale"); )
73 DEF_BENCH( return new DrawBitmapAABench(true, SkMatrix::MakeTrans(17.5f, 17.5f), "translate"); )
76 SkMatrix m;
DMatrixBench.cpp50 SkMatrix m0, m1, m2; in performTest()
76 SkMatrix m; in performTest()
82 SkMatrix fM0, fM1, fM2;
138 SkMatrix fMatrix;
167 SkMatrix fMatrix[10];
210 SkMatrix inv; in performTest()
221 SkMatrix fMatrix;
270 static SkMatrix make_trans() { return SkMatrix::MakeTrans(2, 3); }
271 static SkMatrix make_scale() { SkMatrix m(make_trans()); m.postScale(1.5f, 0.5f); return m; } in make_scale()
272 static SkMatrix make_afine() { SkMatrix m(make_trans()); m.postRotate(15); return m; } in make_afine()
[all …]
/external/skia/src/effects/
DSk2DPathEffect.cpp17 Sk2DPathEffect::Sk2DPathEffect(const SkMatrix& mat) : fMatrix(mat) { in Sk2DPathEffect()
55 const SkMatrix& mat = this->getMatrix(); in nextSpan()
80 fMatrix[SkMatrix::kMScaleX], fMatrix[SkMatrix::kMSkewX], fMatrix[SkMatrix::kMTransX], in toString()
81 fMatrix[SkMatrix::kMSkewY], fMatrix[SkMatrix::kMScaleY], fMatrix[SkMatrix::kMTransY], in toString()
82 fMatrix[SkMatrix::kMPersp0], fMatrix[SkMatrix::kMPersp1], fMatrix[SkMatrix::kMPersp2]); in toString()
111 SkMatrix matrix; in CreateProc()
134 SkPath2DPathEffect::SkPath2DPathEffect(const SkMatrix& m, const SkPath& p) in SkPath2DPathEffect()
139 SkMatrix matrix; in CreateProc()
/external/skia/src/gpu/text/
DGrTextUtils.h23 class SkMatrix; variable
41 GrColor, const SkMatrix& viewMatrix,
47 GrColor, const SkMatrix& viewMatrix,
53 static bool CanDrawAsDistanceFields(const SkPaint& skPaint, const SkMatrix& viewMatrix,
59 const SkMatrix& viewMatrix,
65 GrColor color, const SkMatrix& viewMatrix,
72 const SkPaint& origPaint, const SkMatrix& viewMatrix,
80 const SkPaint& origPaint, const SkMatrix& viewMatrix,
94 const SkMatrix& viewMatrix);
104 SkScalar textRatio, const SkMatrix& viewMatrix);
/external/skia/include/utils/
DSkLayer.h37 const SkMatrix& getMatrix() const { return fMatrix; } in getMatrix()
38 const SkMatrix& getChildrenMatrix() const { return fChildrenMatrix; } in getChildrenMatrix()
48 void setMatrix(const SkMatrix&);
49 void setChildrenMatrix(const SkMatrix&);
93 void getLocalTransform(SkMatrix* matrix) const;
99 void localToGlobal(SkMatrix* matrix) const;
121 SkMatrix fMatrix;
122 SkMatrix fChildrenMatrix;

12345678910>>...23