Home
last modified time | relevance | path

Searched refs:matrix (Results 1 – 25 of 279) sorted by relevance

12345678910>>...12

/frameworks/base/core/java/com/android/internal/graphics/cam/
DCamUtils.java134 double[][] matrix = XYZ_TO_SRGB; in argbFromXyz() local
135 double linearR = matrix[0][0] * x + matrix[0][1] * y + matrix[0][2] * z; in argbFromXyz()
136 double linearG = matrix[1][0] * x + matrix[1][1] * y + matrix[1][2] * z; in argbFromXyz()
137 double linearB = matrix[2][0] * x + matrix[2][1] * y + matrix[2][2] * z; in argbFromXyz()
241 double[][] matrix = SRGB_TO_XYZ; in yFromInt() local
242 double y = (r * matrix[1][0]) + (g * matrix[1][1]) + (b * matrix[1][2]); in yFromInt()
252 double[][] matrix = SRGB_TO_XYZ; in xyzFromInt() local
253 double x = (r * matrix[0][0]) + (g * matrix[0][1]) + (b * matrix[0][2]); in xyzFromInt()
254 double y = (r * matrix[1][0]) + (g * matrix[1][1]) + (b * matrix[1][2]); in xyzFromInt()
255 double z = (r * matrix[2][0]) + (g * matrix[2][1]) + (b * matrix[2][2]); in xyzFromInt()
DHctSolver.java365 double[][] matrix = SCALED_DISCOUNT_FROM_LINRGB; in hueOf() local
367 double rD = linrgb[0] * matrix[0][0] + row[1] * matrix[0][1] + row[2] * matrix[0][2]; in hueOf()
368 double gD = linrgb[0] * matrix[1][0] + row[1] * matrix[1][1] + row[2] * matrix[1][2]; in hueOf()
369 double bD = linrgb[0] * matrix[2][0] + row[1] * matrix[2][1] + row[2] * matrix[2][2]; in hueOf()
638 double[][] matrix = LINRGB_FROM_SCALED_DISCOUNT; in findResultByJ() local
639 double linrgbR = rCScaled * matrix[0][0] + gCScaled * matrix[0][1] in findResultByJ()
640 + bCScaled * matrix[0][2]; in findResultByJ()
641 double linrgbG = rCScaled * matrix[1][0] + gCScaled * matrix[1][1] in findResultByJ()
642 + bCScaled * matrix[1][2]; in findResultByJ()
643 double linrgbB = rCScaled * matrix[2][0] + gCScaled * matrix[2][1] in findResultByJ()
[all …]
DFrame.java139 float[][] matrix = CamUtils.XYZ_TO_CAM16RGB; in make() local
141 float rW = (xyz[0] * matrix[0][0]) + (xyz[1] * matrix[0][1]) + (xyz[2] * matrix[0][2]); in make()
142 float gW = (xyz[0] * matrix[1][0]) + (xyz[1] * matrix[1][1]) + (xyz[2] * matrix[1][2]); in make()
143 float bW = (xyz[0] * matrix[2][0]) + (xyz[1] * matrix[2][1]) + (xyz[2] * matrix[2][2]); in make()
DCam.java157 float[][] matrix = CamUtils.XYZ_TO_CAM16RGB; in fromIntInFrame() local
158 float rT = (xyz[0] * matrix[0][0]) + (xyz[1] * matrix[0][1]) + (xyz[2] * matrix[0][2]); in fromIntInFrame()
159 float gT = (xyz[0] * matrix[1][0]) + (xyz[1] * matrix[1][1]) + (xyz[2] * matrix[1][2]); in fromIntInFrame()
160 float bT = (xyz[0] * matrix[2][0]) + (xyz[1] * matrix[2][1]) + (xyz[2] * matrix[2][2]); in fromIntInFrame()
323 float[][] matrix = CamUtils.CAM16RGB_TO_XYZ; in viewed() local
324 float x = (rF * matrix[0][0]) + (gF * matrix[0][1]) + (bF * matrix[0][2]); in viewed()
325 float y = (rF * matrix[1][0]) + (gF * matrix[1][1]) + (bF * matrix[1][2]); in viewed()
326 float z = (rF * matrix[2][0]) + (gF * matrix[2][1]) + (bF * matrix[2][2]); in viewed()
/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/
DTransform3dActivity.java61 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/
DRectUtils.java39 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/opt/photoviewer/sample/src/com/example/photoviewersample/
DSampleProvider.java63 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/
Drs_matrix.spec28 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/rs/script_api/include/
Drs_matrix.rsh30 * 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/core/java/android/gesture/
DOrientedBoundingBox.java60 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/tests/VoiceInteraction/src/com/android/test/voiceinteraction/
DAssistVisualizer.java38 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/services/tests/PackageManagerServiceTests/server/src/com/android/server/pm/utils/
DWatcherTest.java956 private void fill(WatchedSparseBooleanMatrix matrix, int size, int[] indexes) { in fill() argument
962 matrix.put(row, col, want); in fill()
968 private void fillNew(WatchedSparseBooleanMatrix matrix, int initialCapacity, in fillNew() argument
979 matrix.put(row, col, cellValue(i, j)); in fillNew()
986 private void verify(WatchedSparseBooleanMatrix matrix, int[] indexes, boolean[] absent) { in verify() argument
987 for (int i = 0; i < matrix.size(); i++) { in verify()
989 for (int j = 0; j < matrix.size(); j++) { in verify()
994 assertEquals(msg, matrix.get(row, col), false); in verify()
995 assertEquals(msg, matrix.get(row, col, false), false); in verify()
996 assertEquals(msg, matrix.get(row, col, true), true); in verify()
[all …]
/frameworks/base/libs/hwui/jni/
DColorFilter.cpp48 float matrix[20]; in CreateColorMatrixFilter() local
49 env->GetFloatArrayRegion(jarray, 0, 20, matrix); in CreateColorMatrixFilter()
51 matrix[ 4] *= (1.0f/255); in CreateColorMatrixFilter()
52 matrix[ 9] *= (1.0f/255); in CreateColorMatrixFilter()
53 matrix[14] *= (1.0f/255); in CreateColorMatrixFilter()
54 matrix[19] *= (1.0f/255); in CreateColorMatrixFilter()
55 return reinterpret_cast<jlong>(SkColorFilters::Matrix(matrix).release()); in CreateColorMatrixFilter()
/frameworks/base/tests/HandwritingIme/src/com/google/android/test/handwritingime/
DBoundsInfoDrawHelper.java57 final Matrix matrix = cursorAnchorInfo.getMatrix(); in draw() local
58 inkView.transformMatrixToLocal(matrix); in draw()
61 drawEditorBoundsInfo(canvas, matrix, cursorAnchorInfo.getEditorBoundsInfo()); in draw()
65 drawVisibleLineBounds(canvas, matrix, cursorAnchorInfo.getVisibleLineBounds()); in draw()
75 private static void drawEditorBoundsInfo(Canvas canvas, Matrix matrix, in drawEditorBoundsInfo() argument
84 matrix.mapRect(localEditorBounds); in drawEditorBoundsInfo()
92 matrix.mapRect(localHandwritingBounds); in drawEditorBoundsInfo()
105 private static void drawVisibleLineBounds(Canvas canvas, Matrix matrix, in drawVisibleLineBounds() argument
112 matrix.mapRect(lineBound); in drawVisibleLineBounds()
/frameworks/base/libs/hwui/
DLayer.cpp65 static bool shouldFilterRect(const SkMatrix& matrix, const SkRect& srcRect, const SkRect& dstRect) { in shouldFilterRect() argument
66 if (!matrix.rectStaysRect()) return true; in shouldFilterRect()
67 SkRect dstDevRect = matrix.mapRect(dstRect); in shouldFilterRect()
69 if (MathUtils::isZero(matrix.getScaleX()) && MathUtils::isZero(matrix.getScaleY())) { in shouldFilterRect()
117 SkMatrix matrix; in draw() local
118 matrix = SkMatrix::Concat(layerTransform, textureMatrix); in draw()
124 const bool nonIdentityMatrix = !matrix.isIdentity(); in draw()
127 canvas->concat(matrix); in draw()
DRenderProperties.cpp106 SkMatrix* matrix) { in dumpMatrix() argument
107 if (matrix) { in dumpMatrix()
108 output << indent << "(" << label << " " << matrix << ": "; in dumpMatrix()
110 output << "[" << matrix->get(0) << " " << matrix->get(1) << " " << matrix->get(2) << "]"; in dumpMatrix()
111 output << " [" << matrix->get(3) << " " << matrix->get(4) << " " << matrix->get(5) << "]"; in dumpMatrix()
112 output << " [" << matrix->get(6) << " " << matrix->get(7) << " " << matrix->get(8) << "]"; in dumpMatrix()
/frameworks/base/tests/Camera2Tests/SmartCamera/SimpleCamera/src/androidx/media/filterfw/
DImageShader.java434 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/libs/WindowManager/Shell/src/com/android/wm/shell/common/bubbles/
DBubblePopupDrawable.kt152 val matrix = Matrix() in <lambda>() constant
154 matrix.setScale(1f, -1f, bounds.width() / 2f, bounds.height() / 2f) in <lambda>()
155 path.transform(matrix) in <lambda>()
159 matrix.invert(matrix) in <lambda>()
160 path.transform(matrix) in <lambda>()
171 val matrix = Matrix() in <lambda>() constant
177 matrix.setTranslate(-translationX, 0f) in <lambda>()
178 path.transform(matrix) in <lambda>()
182 matrix.invert(matrix) in <lambda>()
183 path.transform(matrix) in <lambda>()
/frameworks/base/libs/hwui/hwui/
DAnimatedImageDrawable.cpp135 static void handleBounds(SkMatrix* matrix, const SkRect& intrinsicBounds, const SkRect& bounds) { in handleBounds() argument
136 matrix->preTranslate(bounds.left(), bounds.top()); in handleBounds()
137 matrix->preScale(bounds.width() / intrinsicBounds.width(), in handleBounds()
147 SkMatrix matrix; in onDraw() local
149 handleBounds(&matrix, mSkAnimatedImage->getBounds(), mProperties.mBounds); in onDraw()
152 matrix.preTranslate(mSkAnimatedImage->getBounds().width(), 0); in onDraw()
153 matrix.preScale(-1, 1); in onDraw()
163 canvas->concat(matrix); in onDraw()
174 (void) matrix.invert(&inverse); in onDraw()
241 SkMatrix matrix; in drawStaging() local
[all …]
/frameworks/base/libs/hwui/tests/unit/
DSkiaRenderPropertiesTests.cpp128 Matrix4 matrix; in TEST() local
129 matrix.loadTranslate(10, 10, 0); // left, top in TEST()
130 matrix.scale(1.2f, 1.2f, 1); // static matrix in TEST()
134 matrix.translate(10, 20); in TEST()
137 matrix.translate(50, 50); in TEST()
138 matrix.scale(0.5f, 0.7f, 1); in TEST()
139 matrix.translate(-50, -50); in TEST()
141 EXPECT_MATRIX_APPROX_EQ(matrix, actual) << "Op draw matrix must match expected " in TEST()
/frameworks/base/graphics/java/android/graphics/
DColorMatrixColorFilter.java41 public ColorMatrixColorFilter(@NonNull ColorMatrix matrix) { in ColorMatrixColorFilter() argument
42 mMatrix.set(matrix); in ColorMatrixColorFilter()
83 public void setColorMatrix(@Nullable ColorMatrix matrix) { in setColorMatrix() argument
85 if (matrix == null) { in setColorMatrix()
88 mMatrix.set(matrix); in setColorMatrix()
/frameworks/native/services/surfaceflinger/tests/unittests/
DLayerTest.cpp53 layer_state_t::matrix22_t matrix{0, 0, 0, 0}; in TEST_P() local
54 layer->setMatrix(matrix); in TEST_P()
65 layer_state_t::matrix22_t matrix{INF, 0, 0, INF}; in TEST_P() local
66 layer->setMatrix(matrix); in TEST_P()
77 layer_state_t::matrix22_t matrix{QUIET_NAN, 0, 0, QUIET_NAN}; in TEST_P() local
78 layer->setMatrix(matrix); in TEST_P()
/frameworks/base/services/core/java/com/android/server/display/color/
DAppSaturationController.java136 static void computeGrayscaleTransformMatrix(float saturation, float[] matrix) { in computeGrayscaleTransformMatrix() argument
140 matrix[0] = luminance[0] + saturation; in computeGrayscaleTransformMatrix()
141 matrix[1] = luminance[0]; in computeGrayscaleTransformMatrix()
142 matrix[2] = luminance[0]; in computeGrayscaleTransformMatrix()
143 matrix[3] = luminance[1]; in computeGrayscaleTransformMatrix()
144 matrix[4] = luminance[1] + saturation; in computeGrayscaleTransformMatrix()
145 matrix[5] = luminance[1]; in computeGrayscaleTransformMatrix()
146 matrix[6] = luminance[2]; in computeGrayscaleTransformMatrix()
147 matrix[7] = luminance[2]; in computeGrayscaleTransformMatrix()
148 matrix[8] = luminance[2] + saturation; in computeGrayscaleTransformMatrix()
DTintController.java115 static String matrixToString(float[] matrix, int columns) { in matrixToString() argument
116 if (matrix == null || columns <= 0) { in matrixToString()
118 + " matrix is null: " + (matrix == null) in matrixToString()
124 for (int i = 0; i < matrix.length; i++) { in matrixToString()
128 sb.append(String.format("%9.6f", matrix[i])); in matrixToString()
/frameworks/rs/toolkit/test/
DReferenceColorMatrix.kt30 matrix: FloatArray, addVector: FloatArray, in <lambda>()
32 …require (matrix.size == 16) { "RenderScriptToolkit colorMatrix. Matrix should have 16 values. ${ma… in <lambda>()
41 val outFloatValue = multiplyAndAdd(matrix, inFloatValue, addVector) in <lambda>()
48 private fun multiplyAndAdd(matrix: FloatArray, inVector: FloatArray, addVector: FloatArray): FloatA… in multiplyAndAdd()
53 result[i] += matrix[j * 4 + i] * inVector[j] in multiplyAndAdd()

12345678910>>...12