/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/ |
D | Transform3dActivity.java | 61 final Matrix matrix = mMatrix; in onDraw() local 63 rotate(centerX, centerY, camera, matrix, 32.0f); in onDraw() 64 drawBitmap(canvas, centerX, centerY, 0.0f, matrix); in onDraw() 66 rotate(centerX, centerY, camera, matrix, 12.0f); in onDraw() 67 drawBitmap(canvas, centerX, centerY, -mBitmap1.getWidth(), matrix); in onDraw() 69 rotate(centerX, centerY, camera, matrix, 52.0f); in onDraw() 70 drawBitmap(canvas, centerX, centerY, mBitmap1.getWidth(), matrix); in onDraw() 72 rotate(centerX, centerY, camera, matrix, 122.0f); in onDraw() 73 drawBitmap(canvas, centerX, centerY, mBitmap1.getWidth() * 2.0f, matrix); in onDraw() 78 Matrix matrix) { in drawBitmap() argument [all …]
|
/frameworks/opt/bitmap/src/com/android/bitmap/util/ |
D | RectUtils.java | 39 final Matrix matrix = new Matrix(); in rotateRectForOrientation() local 42 matrix.setRotate(-orientation); in rotateRectForOrientation() 45 matrix.mapRect(fullRectF); in rotateRectForOrientation() 46 matrix.mapRect(partialRectF); in rotateRectForOrientation() 48 matrix.reset(); in rotateRectForOrientation() 49 matrix.setTranslate(-fullRectF.left, -fullRectF.top); in rotateRectForOrientation() 50 matrix.mapRect(fullRectF); in rotateRectForOrientation() 51 matrix.mapRect(partialRectF); in rotateRectForOrientation() 61 final Matrix matrix = new Matrix(); in rotateRect() local 62 matrix.setRotate(degrees, px, py); in rotateRect() [all …]
|
/frameworks/rs/script_api/ |
D | rs_matrix.spec | 28 a vector is done by postmultiplying the vector, e.g. <code>(matrix * vector)</code>, 31 To create a transformation matrix that performs two transformations at once, 33 argument. E.g. to create a transformation matrix that applies the 39 style simply stores the transformation matrix in the first argument. The latter 40 modifies a pre-existing transformation matrix so that the new transformation 41 happens first. E.g. if you call @rsMatrixTranslate() on a matrix that already 42 does a scaling, the resulting matrix when applied to a vector will first do the 60 Computes 6 frustum planes from the view projection matrix 187 Returns one element of a matrix. 196 summary: Inverts a matrix in place [all …]
|
/frameworks/opt/photoviewer/sample/src/com/example/photoviewersample/ |
D | SampleProvider.java | 63 MatrixCursor matrix = new MatrixCursor(projection); in query() local 72 addRow(matrix, PHOTO_INDIVIDUAL_1); in query() 73 addRow(matrix, PHOTO_INDIVIDUAL_2); in query() 74 addRow(matrix, PHOTO_INDIVIDUAL_3); in query() 75 addRow(matrix, PHOTO_INDIVIDUAL_4); in query() 80 addRow(matrix, PHOTO_INDIVIDUAL_1); in query() 83 addRow(matrix, PHOTO_INDIVIDUAL_2); in query() 86 addRow(matrix, PHOTO_INDIVIDUAL_3); in query() 89 addRow(matrix, PHOTO_INDIVIDUAL_4); in query() 97 return matrix; in query() [all …]
|
/frameworks/rs/script_api/include/ |
D | rs_matrix.rsh | 30 * a vector is done by postmultiplying the vector, e.g. (matrix * vector), 33 * To create a transformation matrix that performs two transformations at once, 35 * argument. E.g. to create a transformation matrix that applies the 41 * style simply stores the transformation matrix in the first argument. The latter 42 * modifies a pre-existing transformation matrix so that the new transformation 43 * happens first. E.g. if you call rsMatrixTranslate() on a matrix that already 44 * does a scaling, the resulting matrix when applied to a vector will first do the 56 * Computes 6 frustum planes from the view projection matrix 178 * Returns one element of a matrix. 197 * rsMatrixInverse: Inverts a matrix in place [all …]
|
/frameworks/base/libs/hwui/tests/common/scenes/ |
D | SimpleColorMatrixAnimation.cpp | 56 float matrix[20] = {0}; in createCard() local 59 matrix[SkColorMatrix::kR_Scale] = 1.1f; in createCard() 60 matrix[SkColorMatrix::kG_Scale] = 1.1f; in createCard() 61 matrix[SkColorMatrix::kB_Scale] = 1.1f; in createCard() 62 matrix[SkColorMatrix::kA_Scale] = 0.5f; in createCard() 64 matrix[SkColorMatrix::kR_Trans] = 5.0f; in createCard() 65 matrix[SkColorMatrix::kG_Trans] = 5.0f; in createCard() 66 matrix[SkColorMatrix::kB_Trans] = 5.0f; in createCard() 67 matrix[SkColorMatrix::kA_Trans] = 10.0f; in createCard() 69 paint.setColorFilter(SkColorFilter::MakeMatrixFilterRowMajor255(matrix)); in createCard()
|
D | ListOfFadedTextAnimation.cpp | 49 SkMatrix matrix; in createListItem() local 50 matrix.setScale(1, length); in createListItem() 51 matrix.postRotate(-90); in createListItem() 53 fadingPaint.setShader(s->makeWithLocalMatrix(matrix)); in createListItem()
|
/frameworks/base/libs/hwui/pipeline/skia/ |
D | LayerDrawable.cpp | 42 static bool shouldFilterRect(const SkMatrix& matrix, const SkRect& srcRect, const SkRect& dstRect) { in shouldFilterRect() argument 43 if (!matrix.rectStaysRect()) return true; in shouldFilterRect() 44 SkRect dstDevRect = matrix.mapRect(dstRect); in shouldFilterRect() 46 if (MathUtils::isZero(matrix.getScaleX()) && MathUtils::isZero(matrix.getScaleY())) { in shouldFilterRect() 98 SkMatrix matrix; in DrawLayer() local 100 matrix = SkMatrix::Concat(layerTransform, textureMatrix); in DrawLayer() 102 matrix = textureMatrix; in DrawLayer() 109 const bool nonIdentityMatrix = !matrix.isIdentity(); in DrawLayer() 112 canvas->concat(matrix); in DrawLayer() 117 if (!matrix.invert(&matrixInv)) { in DrawLayer() [all …]
|
/frameworks/base/tests/VoiceInteraction/src/com/android/test/voiceinteraction/ |
D | AssistVisualizer.java | 38 final Matrix matrix; field in AssistVisualizer.TextEntry 47 TextEntry(AssistStructure.ViewNode node, int parentLeft, int parentTop, Matrix matrix) { in TextEntry() argument 53 this.matrix = new Matrix(matrix); in TextEntry() 97 Matrix matrix = new Matrix(); in setAssistStructure() local 98 matrix.setTranslate(windowNode.getLeft(), windowNode.getTop()); in setAssistStructure() 99 mMatrixStack.add(matrix); in setAssistStructure() 120 + " matrix=" + te.matrix.toShortString() in logText() 147 Matrix matrix; 149 matrix = mMatrixStack.get(matrixStackIndex); 150 matrix.set(parentMatrix); [all …]
|
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/ |
D | ImageShader.java | 434 public void setSourceTransform(float[] matrix) { in setSourceTransform() argument 435 if (matrix.length != 16) { in setSourceTransform() 439 matrix[12], in setSourceTransform() 440 matrix[13], in setSourceTransform() 442 matrix[0] + matrix[12], in setSourceTransform() 443 matrix[1] + matrix[13], in setSourceTransform() 445 matrix[4] + matrix[12], in setSourceTransform() 446 matrix[5] + matrix[13], in setSourceTransform() 448 matrix[0] + matrix[4] + matrix[12], in setSourceTransform() 449 matrix[1] + matrix[5] + matrix[13], in setSourceTransform() [all …]
|
/frameworks/base/core/java/android/gesture/ |
D | OrientedBoundingBox.java | 60 Matrix matrix = new Matrix(); in toPath() local 61 matrix.setRotate(orientation); in toPath() 62 matrix.postTranslate(centerX, centerY); in toPath() 63 matrix.mapPoints(point); in toPath() 68 matrix.mapPoints(point); in toPath() 73 matrix.mapPoints(point); in toPath() 78 matrix.mapPoints(point); in toPath()
|
/frameworks/base/services/core/java/com/android/server/display/color/ |
D | AppSaturationController.java | 134 static void computeGrayscaleTransformMatrix(float saturation, float[] matrix) { in computeGrayscaleTransformMatrix() argument 138 matrix[0] = luminance[0] + saturation; in computeGrayscaleTransformMatrix() 139 matrix[1] = luminance[0]; in computeGrayscaleTransformMatrix() 140 matrix[2] = luminance[0]; in computeGrayscaleTransformMatrix() 141 matrix[3] = luminance[1]; in computeGrayscaleTransformMatrix() 142 matrix[4] = luminance[1] + saturation; in computeGrayscaleTransformMatrix() 143 matrix[5] = luminance[1]; in computeGrayscaleTransformMatrix() 144 matrix[6] = luminance[2]; in computeGrayscaleTransformMatrix() 145 matrix[7] = luminance[2]; in computeGrayscaleTransformMatrix() 146 matrix[8] = luminance[2] + saturation; in computeGrayscaleTransformMatrix()
|
D | TintController.java | 106 static String matrixToString(float[] matrix, int columns) { in matrixToString() argument 107 if (matrix == null || columns <= 0) { in matrixToString() 109 + " matrix is null: " + (matrix == null) in matrixToString() 115 for (int i = 0; i < matrix.length; i++) { in matrixToString() 119 sb.append(String.format("%9.6f", matrix[i])); in matrixToString()
|
/frameworks/base/core/jni/android/graphics/ |
D | Shader.cpp | 67 const SkMatrix* matrix = reinterpret_cast<const SkMatrix*>(matrixPtr); in BitmapShader_constructor() local 83 if (matrix) { in BitmapShader_constructor() 84 shader = shader->makeWithLocalMatrix(*matrix); in BitmapShader_constructor() 128 const SkMatrix* matrix = reinterpret_cast<const SkMatrix*>(matrixPtr); in LinearGradient_create() local 129 if (matrix) { in LinearGradient_create() 130 shader = shader->makeWithLocalMatrix(*matrix); in LinearGradient_create() 158 const SkMatrix* matrix = reinterpret_cast<const SkMatrix*>(matrixPtr); in RadialGradient_create() local 159 if (matrix) { in RadialGradient_create() 160 shader = shader->makeWithLocalMatrix(*matrix); in RadialGradient_create() 184 const SkMatrix* matrix = reinterpret_cast<const SkMatrix*>(matrixPtr); in SweepGradient_create() local [all …]
|
D | Matrix.cpp | 61 SkMatrix* matrix = reinterpret_cast<SkMatrix*>(matrixHandle); in mapPoints() local 70 matrix->mapPoints((SkPoint*) dstArray, (const SkPoint*) srcArray, in mapPoints() 73 matrix->mapVectors((SkVector*) dstArray, (const SkVector*) srcArray, in mapPoints() 79 SkMatrix* matrix = reinterpret_cast<SkMatrix*>(matrixHandle); in mapRect__RectFRectF() local 82 jboolean rectStaysRect = matrix->mapRect(&dst_, src_); in mapRect__RectFRectF() 89 SkMatrix* matrix = reinterpret_cast<SkMatrix*>(matrixHandle); in setRectToRect() local 95 return matrix->setRectToRect(src_, dst_, stf) ? JNI_TRUE : JNI_FALSE; in setRectToRect() 101 SkMatrix* matrix = reinterpret_cast<SkMatrix*>(matrixHandle); in setPolyToPoly() local 114 result = matrix->setPolyToPoly((const SkPoint*) src, in setPolyToPoly() 121 SkMatrix* matrix = reinterpret_cast<SkMatrix*>(matrixHandle); in getValues() local [all …]
|
/frameworks/base/libs/hwui/tests/unit/ |
D | SkiaRenderPropertiesTests.cpp | 126 Matrix4 matrix; in TEST() local 127 matrix.loadTranslate(10, 10, 0); // left, top in TEST() 128 matrix.scale(1.2f, 1.2f, 1); // static matrix in TEST() 132 matrix.translate(10, 20); in TEST() 135 matrix.translate(50, 50); in TEST() 136 matrix.scale(0.5f, 0.7f, 1); in TEST() 137 matrix.translate(-50, -50); in TEST() 139 EXPECT_MATRIX_APPROX_EQ(matrix, actual) << "Op draw matrix must match expected " in TEST()
|
/frameworks/base/libs/hwui/ |
D | RenderProperties.cpp | 98 SkMatrix* matrix) { in dumpMatrix() argument 99 if (matrix) { in dumpMatrix() 100 output << indent << "(" << label << " " << matrix << ": "; in dumpMatrix() 102 output << "[" << matrix->get(0) << " " << matrix->get(1) << " " << matrix->get(2) << "]"; in dumpMatrix() 103 output << " [" << matrix->get(3) << " " << matrix->get(4) << " " << matrix->get(5) << "]"; in dumpMatrix() 104 output << " [" << matrix->get(6) << " " << matrix->get(7) << " " << matrix->get(8) << "]"; in dumpMatrix()
|
D | Matrix.h | 211 friend std::ostream& operator<<(std::ostream& os, const Matrix4& matrix) { 212 if (matrix.isSimple()) { 213 os << "offset " << matrix.getTranslateX() << "x" << matrix.getTranslateY(); 214 if (!matrix.isPureTranslate()) { 215 os << ", scale " << matrix[kScaleX] << "x" << matrix[kScaleY]; 218 os << "[" << matrix[0]; 220 os << ", " << matrix[i];
|
D | RecordingCanvas.cpp | 134 Concat(const SkMatrix& matrix) : matrix(matrix) {} in Concat() 135 SkMatrix matrix; member 136 void draw(SkCanvas* c, const SkMatrix&) const { c->concat(matrix); } in draw() 140 SetMatrix(const SkMatrix& matrix) : matrix(matrix) {} in SetMatrix() 141 SkMatrix matrix; member 143 c->setMatrix(SkMatrix::Concat(original, matrix)); in draw() 270 DrawDrawable(SkDrawable* drawable, const SkMatrix* matrix) : drawable(sk_ref_sp(drawable)) { in DrawDrawable() 271 if (matrix) { in DrawDrawable() 272 this->matrix = *matrix; in DrawDrawable() 276 SkMatrix matrix = SkMatrix::I(); member [all …]
|
/frameworks/base/graphics/java/android/graphics/ |
D | ColorMatrixColorFilter.java | 40 public ColorMatrixColorFilter(@NonNull ColorMatrix matrix) { in ColorMatrixColorFilter() argument 41 mMatrix.set(matrix); in ColorMatrixColorFilter() 82 public void setColorMatrix(@Nullable ColorMatrix matrix) { in setColorMatrix() argument 84 if (matrix == null) { in setColorMatrix() 87 mMatrix.set(matrix); in setColorMatrix()
|
/frameworks/base/core/java/android/view/ |
D | GhostView.java | 64 public void setMatrix(Matrix matrix) { in setMatrix() argument 65 mRenderNode.setAnimationMatrix(matrix); in setMatrix() 90 public static void calculateMatrix(View view, ViewGroup host, Matrix matrix) { in calculateMatrix() argument 92 matrix.reset(); in calculateMatrix() 93 parent.transformMatrixToGlobal(matrix); in calculateMatrix() 94 matrix.preTranslate(-parent.getScrollX(), -parent.getScrollY()); in calculateMatrix() 95 host.transformMatrixToLocal(matrix); in calculateMatrix() 99 public static GhostView addGhost(View view, ViewGroup viewGroup, Matrix matrix) { in addGhost() argument 117 if (matrix == null) { in addGhost() 118 matrix = new Matrix(); in addGhost() [all …]
|
D | SyncRtSurfaceTransactionApplier.java | 75 t.setMatrix(params.surface, params.matrix, tmpFloat9); in applyParams() 127 public SurfaceParams(SurfaceControl surface, float alpha, Matrix matrix, in SurfaceParams() argument 131 this.matrix = new Matrix(matrix); in SurfaceParams() 148 public final Matrix matrix; field in SyncRtSurfaceTransactionApplier.SurfaceParams
|
/frameworks/base/core/java/android/transition/ |
D | TransitionUtils.java | 90 Matrix matrix = new Matrix(); in copyViewImage() local 91 matrix.setTranslate(-parent.getScrollX(), -parent.getScrollY()); in copyViewImage() 92 view.transformMatrixToGlobal(matrix); in copyViewImage() 93 sceneRoot.transformMatrixToLocal(matrix); in copyViewImage() 95 matrix.mapRect(bounds); in copyViewImage() 103 Bitmap bitmap = createViewBitmap(view, matrix, bounds, sceneRoot); in copyViewImage() 160 public static Bitmap createViewBitmap(View view, Matrix matrix, RectF bounds, in createViewBitmap() argument 180 matrix.postTranslate(-bounds.left, -bounds.top); in createViewBitmap() 181 matrix.postScale(scale, scale); in createViewBitmap() 185 canvas.concat(matrix); in createViewBitmap()
|
/frameworks/base/services/core/java/com/android/server/input/ |
D | PersistentDataStore.java | 471 float[] matrix = TouchCalibration.IDENTITY.getAffineTransform(); in loadFromXml() local 477 for (int i = 0; i < matrix.length && i < CALIBRATION_NAME.length; i++) { in loadFromXml() 479 matrix[i] = Float.parseFloat(value); in loadFromXml() 488 mTouchCalibration[r] = new TouchCalibration(matrix[0], in loadFromXml() 489 matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]); in loadFromXml() 492 mTouchCalibration[r] = new TouchCalibration(matrix[0], in loadFromXml() 493 matrix[1], matrix[2], matrix[3], matrix[4], matrix[5]); in loadFromXml()
|
/frameworks/native/libs/input/ |
D | Input.cpp | 383 static void transformPoint(const float matrix[9], float x, float y, float *outX, float *outY) { in transformPoint() 385 float newX = matrix[0] * x + matrix[1] * y + matrix[2]; in transformPoint() 386 float newY = matrix[3] * x + matrix[4] * y + matrix[5]; in transformPoint() 387 float newZ = matrix[6] * x + matrix[7] * y + matrix[8]; in transformPoint() 395 static float transformAngle(const float matrix[9], float angleRadians, in transformAngle() 401 transformPoint(matrix, x, y, &x, &y); in transformAngle() 415 void MotionEvent::transform(const float matrix[9]) { in transform() 425 transformPoint(matrix, rawX + oldXOffset, rawY + oldYOffset, &newX, &newY); in transform() 432 transformPoint(matrix, 0, 0, &originX, &originY); in transform() 440 transformPoint(matrix, x, y, &x, &y); in transform() [all …]
|