/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/ |
D | CanvasStateTests.java | 48 .addCanvasClient((canvas, width, height) -> { in testClipRectReturnValues() 49 canvas.save(); in testClipRectReturnValues() 50 boolean isNonEmpty = canvas.clipRect(0, 0, 20, 20); in testClipRectReturnValues() 53 isNonEmpty = canvas.clipRect(0, 40, 20, 60); in testClipRectReturnValues() 55 canvas.restore(); in testClipRectReturnValues() 63 .addCanvasClient((canvas, width, height) -> { in testClipPathReturnValues() 64 canvas.save(); in testClipPathReturnValues() 68 boolean isNonEmpty = canvas.clipPath(rectPath); in testClipPathReturnValues() 72 isNonEmpty = canvas.clipPath(rectPath); in testClipPathReturnValues() 74 canvas.restore(); in testClipPathReturnValues() [all …]
|
D | PaintTests.kt | 53 val canvas = Canvas(bitmap) in <lambda>() constant 61 val saveCount = canvas.save() in <lambda>() 62 canvas.translate(dx, dy) in <lambda>() 66 drawCall(blurPaint, canvas) in <lambda>() 67 canvas.restoreToCount(saveCount) in <lambda>() 71 drawCall(paint, canvas) in <lambda>() 84 paint, canvas -> in <lambda>() method 86 canvas.drawText("shadow text", 0f, paint.textSize, paint) in <lambda>() 91 paint, canvas -> in <lambda>() method 95 canvas.drawTextOnPath("shadow text on path", path, 0f, 0f, paint) in <lambda>() [all …]
|
D | ExactCanvasTests.java | 62 .addCanvasClient((canvas, width, height) -> { in testBlueRect() 66 canvas.drawRect(rect, p); in testBlueRect() 74 .addCanvasClient((canvas, width, height) -> { in testPoints() 79 canvas.translate(0.5f, 0.5f); in testPoints() 81 canvas.drawPoint(i * 10, i * 10, p); in testPoints() 90 .addCanvasClient((canvas, width, height) -> { in testBlackRectWithStroke() 93 canvas.drawRect(0, 0, ActivityTestBase.TEST_WIDTH, in testBlackRectWithStroke() 97 canvas.drawRect(10, 10, 80, 80, p); in testBlackRectWithStroke() 105 .addCanvasClient((canvas, width, height) -> { in testBlackLineOnGreenBack() 106 canvas.drawColor(Color.GREEN); in testBlackLineOnGreenBack() [all …]
|
D | PathClippingTests.java | 69 static final CanvasClient sTorusDrawCanvasClient = (canvas, width, height) -> { 75 canvas.drawCircle(30, 30, 40, paint); 79 static final CanvasClient sTorusClipCanvasClient = (canvas, width, height) -> { 80 canvas.save(); 86 canvas.clipPath(path); 87 canvas.drawColor(Color.BLUE); 89 canvas.restore(); 93 static final CanvasClient sTorusClipOutCanvasClient = (canvas, width, height) -> { 94 canvas.save(); 102 canvas.clipPath(path1); [all …]
|
D | HardwareBitmapTests.java | 78 createTest().addCanvasClient((canvas, width, height) -> { in testDecodeResource() 81 canvas.drawBitmap(hardwareBitmap, 0, 0, new Paint()); in testDecodeResource() 91 Canvas canvas = picture.beginRecording(TEST_WIDTH, TEST_HEIGHT); in testCreateFromPicture() local 95 canvas.drawRect(rect, p); in testCreateFromPicture() 102 createTest().addCanvasClient((canvas, width, height) -> { in testCreateFromPicture() 103 canvas.drawBitmap(hardwareBitmap, 0, 0, null); in testCreateFromPicture() 114 Canvas canvas = picture.beginRecording(TEST_WIDTH, TEST_HEIGHT); in testReadbackThroughPicture() local 115 canvas.drawColor(Color.WHITE); in testReadbackThroughPicture() 116 canvas.drawBitmap(hardwareBitmap, 0, 0, null); in testReadbackThroughPicture() 134 Canvas canvas = picture.beginRecording(TEST_WIDTH, TEST_HEIGHT); in testReadbackThroughPictureNoEndRecording() local [all …]
|
D | RenderNodeTests.java | 124 Canvas canvas = renderNode.beginRecording(); in testBasicDraw() local 125 assertEquals(rect.width(), canvas.getWidth()); in testBasicDraw() 126 assertEquals(rect.height(), canvas.getHeight()); in testBasicDraw() 127 assertTrue(canvas.isHardwareAccelerated()); in testBasicDraw() 128 canvas.drawColor(Color.BLUE); in testBasicDraw() 136 .addCanvasClientWithoutUsingPicture((canvas, width, height) -> { in testBasicDraw() 137 canvas.drawRenderNode(renderNode); in testBasicDraw() 150 Canvas canvas = renderNode.beginRecording(); in testAlphaOverlappingRendering() local 151 canvas.drawColor(Color.RED); in testAlphaOverlappingRendering() 152 canvas.drawColor(Color.BLUE); in testAlphaOverlappingRendering() [all …]
|
D | SurfaceViewTests.java | 53 new CanvasCallback((canvas, width, height) -> canvas.drawColor(Color.GREEN)); 55 new CanvasCallback((canvas, width, height) -> canvas.drawColor(Color.WHITE)); 57 new CanvasCallback((canvas, width, height) -> canvas.drawColor(Color.RED)); 72 Canvas canvas = holder.lockCanvas(); in surfaceChanged() local 73 mCanvasClient.draw(canvas, width, height); in surfaceChanged() 74 holder.unlockCanvasAndPost(canvas); in surfaceChanged() 168 Canvas canvas = holder.lockHardwareCanvas(); in surfaceChanged() local 169 mCanvasClient.draw(canvas, width, height); in surfaceChanged() 170 holder.unlockCanvasAndPost(canvas); in surfaceChanged() 186 SurfaceViewHelper helper = new SurfaceViewHelper((canvas, width, height) -> { in testSurfaceHolderHardwareCanvas() [all …]
|
D | ColorSpaceTests.java | 141 private void drawAsset(@NonNull Canvas canvas, Bitmap bitmap) { in drawAsset() argument 143 canvas.save(); in drawAsset() 144 canvas.clipRect(0, 0, 32, 32); in drawAsset() 145 canvas.drawBitmap(bitmap, 0, 0, null); in drawAsset() 146 canvas.restore(); in drawAsset() 151 canvas.drawRect(32.0f, 0.0f, 64.0f, 32.0f, p); in drawAsset() 154 canvas.save(); in drawAsset() 155 canvas.clipRect(0, 32, 64, 48); in drawAsset() 156 canvas.drawBitmap(mMask, 0, 0, p); in drawAsset() 157 canvas.restore(); in drawAsset() [all …]
|
D | RuntimeShaderTests.kt | 210 { canvas: Canvas, width: Int, height: Int -> canvas.drawRect(rect, paint) }, in <lambda>() method 225 { canvas: Canvas, width: Int, height: Int -> canvas.drawRect(rect, paint) }, in <lambda>() method 238 { canvas: Canvas, width: Int, height: Int -> canvas.drawRect(rect, paint) }, in <lambda>() method 254 { canvas: Canvas, width: Int, height: Int -> canvas.drawRect(rect, paint) }, in <lambda>() method 273 { canvas: Canvas, width: Int, height: Int -> canvas.drawRect(rect, paint) }, in <lambda>() method 304 { canvas: Canvas, width: Int, height: Int -> canvas.drawRect(rect, paint) }, in <lambda>() method 313 { canvas: Canvas, width: Int, height: Int -> canvas.drawRect(rect, paint) }, in <lambda>() method 351 { canvas: Canvas, width: Int, height: Int -> canvas.drawRect(rect, paint) }, in <lambda>() method 358 { canvas: Canvas, width: Int, height: Int -> canvas.drawRect(rect, paint) }, in <lambda>() method 374 { canvas: Canvas, width: Int, height: Int -> canvas.drawRect(rect, paint) }, in <lambda>() method [all …]
|
D | Rgba16fTests.java | 46 .addCanvasClient("RGBA16F_TransferFunctions", (canvas, width, height) -> { in testTransferFunctions() 50 canvas.scale( in testTransferFunctions() 53 canvas.drawBitmap(bitmap, 0, 0, null); in testTransferFunctions() 67 .addCanvasClient("RGBA16F_TransferFunctions", (canvas, width, height) -> { in testAlpha() 71 canvas.scale( in testAlpha() 76 canvas.drawColor(0xffff0000); in testAlpha() 77 canvas.drawBitmap(bitmap, 0, 0, p); in testAlpha() 91 .addCanvasClient("RGBA16F_Masked", (canvas, width, height) -> { in testMasked() 107 canvas.scale( in testMasked() 111 canvas.drawBitmap(mask, 0, 0, p); in testMasked() [all …]
|
D | EdgeEffectTests.java | 129 .addCanvasClientWithoutUsingPicture((canvas, width, height) -> { in getStretchDownPixelCount() 130 canvas.drawRenderNode(renderNode); in getStretchDownPixelCount() 301 .addCanvasClientWithoutUsingPicture((canvas, width, height) -> { 302 canvas.drawRenderNode(renderNode); 320 .addCanvasClientWithoutUsingPicture((canvas, width, height) -> { in testStretchBottom() 321 canvas.drawRenderNode(renderNode); in testStretchBottom() 341 RecordingCanvas canvas = node.beginRecording(); in testNoSetSizeCallDoesNotCrash() local 342 edgeEffect.draw(canvas); in testNoSetSizeCallDoesNotCrash() 355 RecordingCanvas canvas = node.beginRecording(); in testInvalidPullDistanceDoesNotCrash() local 357 edgeEffect.draw(canvas); in testInvalidPullDistanceDoesNotCrash() [all …]
|
D | ShaderTests.java | 49 public void draw(Canvas canvas, int width, int height) { in testSinglePixelBitmapShader() 56 canvas.drawRect(0, 0, width, height, mPaint); in testSinglePixelBitmapShader() 69 public void draw(Canvas canvas, int width, int height) { in testSinglePixelComposeShader() 87 canvas.drawRect(0, 0, width, height, mPaint); in testSinglePixelComposeShader() 111 public void draw(Canvas canvas, int width, int height) { in testComplexShaderUsage() 137 canvas.drawBitmap(mBitmap, 0, 0, mPaint); in testComplexShaderUsage() 150 public void draw(Canvas canvas, int width, int height) { in testRepeatAlphaGradientShader() 155 canvas.drawColor(Color.WHITE); in testRepeatAlphaGradientShader() 156 canvas.drawRect(0, 0, width, height, mPaint); in testRepeatAlphaGradientShader() 168 public void draw(Canvas canvas, int width, int height) { in testClampAlphaGradientShader() [all …]
|
/cts/tests/tests/graphics/src/android/graphics/cts/ |
D | PictureTest.java | 54 Canvas canvas = original.beginRecording(TEST_WIDTH, TEST_HEIGHT); in testSaveRestoreBalance() local 55 assertNotNull(canvas); in testSaveRestoreBalance() 56 createImbalance(canvas); in testSaveRestoreBalance() 58 int expectedSaveCount = canvas.getSaveCount(); in testSaveRestoreBalance() 63 assertEquals(expectedSaveCount, canvas.getSaveCount()); in testSaveRestoreBalance() 72 private void createImbalance(Canvas canvas) { in createImbalance() argument 73 canvas.save(); in createImbalance() 74 canvas.clipRect(mClipRect); in createImbalance() 75 canvas.translate(1.0f, 1.0f); in createImbalance() 78 canvas.drawRect(0, 0, 10, 10, paint); in createImbalance() [all …]
|
D | ColorMatrixColorFilterTest.java | 54 Canvas canvas = new Canvas(bitmap); in testColorMatrixColorFilter() local 59 canvas.drawPoint(0, 0, paint); in testColorMatrixColorFilter() 62 canvas.drawPoint(0, 0, paint); in testColorMatrixColorFilter() 65 canvas.drawPoint(0, 0, paint); in testColorMatrixColorFilter() 69 canvas.drawPoint(0, 0, paint); in testColorMatrixColorFilter() 82 canvas.drawPoint(0, 0, paint); in testColorMatrixColorFilter() 88 canvas.drawPoint(0, 0, paint); in testColorMatrixColorFilter() 96 canvas.drawPoint(0, 0, paint); in testColorMatrixColorFilter() 100 canvas.drawPoint(0, 0, paint); in testColorMatrixColorFilter()
|
D | BitmapShaderTest.java | 74 Canvas canvas = new Canvas(b); in testBitmapShader() local 75 canvas.drawPaint(paint); in testBitmapShader() 123 Canvas canvas = new Canvas(dstBitmap); in testClamp() local 126 canvas.drawRect(0, 0, 4, 1, paint); in testClamp() 127 canvas.setBitmap(null); in testClamp() 146 Canvas canvas = new Canvas(dstBitmap); in testRepeat() local 149 canvas.drawRect(0, 0, 4, 1, paint); in testRepeat() 150 canvas.setBitmap(null); in testRepeat() 169 Canvas canvas = new Canvas(dstBitmap); in testMirror() local 172 canvas.drawRect(0, 0, 4, 1, paint); in testMirror() [all …]
|
/cts/tests/tests/uirendering/src/android/uirendering/cts/testinfrastructure/ |
D | DisplayModifier.java | 90 public void modifyDrawing(Paint paint, Canvas canvas) { 96 public void modifyDrawing(Paint paint, Canvas canvas) { 106 public void modifyDrawing(Paint paint, Canvas canvas) { 112 public void modifyDrawing(Paint paint, Canvas canvas) { 118 public void modifyDrawing(Paint paint, Canvas canvas) { 128 public void modifyDrawing(Paint paint, Canvas canvas) { 134 public void modifyDrawing(Paint paint, Canvas canvas) { 140 public void modifyDrawing(Paint paint, Canvas canvas) { 146 public void modifyDrawing(Paint paint, Canvas canvas) { 152 public void modifyDrawing(Paint paint, Canvas canvas) { [all …]
|
D | CanvasClientView.java | 54 public void onDraw(Canvas canvas) { in onDraw() argument 56 String s = canvas.isHardwareAccelerated() ? "HARDWARE" : "SOFTWARE"; in onDraw() 60 canvas.drawText(s, 200, 200, paint); in onDraw() 64 int saveCount = canvas.save(); in onDraw() 65 canvas.clipRect(0, 0, ActivityTestBase.TEST_WIDTH, ActivityTestBase.TEST_HEIGHT); in onDraw() 73 picture.draw(canvas); in onDraw() 75 mCanvasClient.draw(canvas, ActivityTestBase.TEST_WIDTH, ActivityTestBase.TEST_HEIGHT); in onDraw() 77 canvas.restoreToCount(saveCount); in onDraw()
|
D | CanvasClientDrawable.java | 30 public void draw(Canvas canvas) { in draw() argument 31 int saveCount = canvas.save(); in draw() 32 canvas.clipRect(0, 0, ActivityTestBase.TEST_WIDTH, ActivityTestBase.TEST_HEIGHT); in draw() 33 mCanvasClient.draw(canvas, ActivityTestBase.TEST_WIDTH, ActivityTestBase.TEST_HEIGHT); in draw() 34 canvas.restoreToCount(saveCount); in draw()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/camera/fov/ |
D | CameraPreviewView.java | 38 public void onDraw(Canvas canvas) { in onDraw() argument 39 super.onDraw(canvas); in onDraw() 43 float centerX = canvas.getWidth() / 2.0f; in onDraw() 44 float centerY = canvas.getHeight() / 2.0f; in onDraw() 48 canvas.drawLine(centerX, 0, centerX, canvas.getHeight(), mPaint); in onDraw() 52 int vertLines = canvas.getWidth() / 2 / GRID_WIDTH; in onDraw() 53 int horizLines = canvas.getHeight() / 2 / GRID_WIDTH; in onDraw() 56 canvas.drawLine(0, y, canvas.getWidth(), y, mPaint); in onDraw() 58 canvas.drawLine(0, y, canvas.getWidth(), y, mPaint); in onDraw() 62 canvas.drawLine(x, 0, x, canvas.getHeight(), mPaint); in onDraw() [all …]
|
/cts/tests/tests/uirendering27/src/android/uirendering/cts/testclasses/ |
D | ExpandingClipTest.java | 51 .addCanvasClient((canvas, width, height) -> { in testClipReplace() 54 canvas.drawRect(0, 0, width, height, paint); in testClipReplace() 59 canvas.clipRect(0, 0, 5, height); in testClipReplace() 60 canvas.clipRect(5, 0, width, height, Region.Op.REPLACE); in testClipReplace() 63 canvas.drawRect(0, 0, width, height, paint); in testClipReplace() 72 .addCanvasClient((canvas, width, height) -> { in testClipUnsupportedExpandingOps() 74 canvas.clipRect(0, 0, 5, 5, Region.Op.REVERSE_DIFFERENCE); in testClipUnsupportedExpandingOps() 75 canvas.clipRect(5, 5, 10, 10, Region.Op.XOR); in testClipUnsupportedExpandingOps() 76 canvas.clipRect(10, 10, 15, 15, Region.Op.UNION); in testClipUnsupportedExpandingOps() 80 canvas.drawRect(0, 0, width, height, paint); in testClipUnsupportedExpandingOps()
|
/cts/tests/tests/uirendering27/src/android/uirendering/cts/testinfrastructure/ |
D | CanvasClientView.java | 54 public void onDraw(Canvas canvas) { in onDraw() argument 56 String s = canvas.isHardwareAccelerated() ? "HARDWARE" : "SOFTWARE"; in onDraw() 60 canvas.drawText(s, 200, 200, paint); in onDraw() 64 int saveCount = canvas.save(); in onDraw() 65 canvas.clipRect(0, 0, ActivityTestBase.TEST_WIDTH, ActivityTestBase.TEST_HEIGHT); in onDraw() 73 picture.draw(canvas); in onDraw() 75 mCanvasClient.draw(canvas, ActivityTestBase.TEST_WIDTH, ActivityTestBase.TEST_HEIGHT); in onDraw() 77 canvas.restoreToCount(saveCount); in onDraw()
|
D | CanvasClientDrawable.java | 30 public void draw(Canvas canvas) { in draw() argument 31 int saveCount = canvas.save(); in draw() 32 canvas.clipRect(0, 0, ActivityTestBase.TEST_WIDTH, ActivityTestBase.TEST_HEIGHT); in draw() 33 mCanvasClient.draw(canvas, ActivityTestBase.TEST_WIDTH, ActivityTestBase.TEST_HEIGHT); in draw() 34 canvas.restoreToCount(saveCount); in draw()
|
/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/view/ |
D | SkewLayout.java | 39 protected boolean drawChild(Canvas canvas, View child, long drawingTime) { in drawChild() argument 40 canvas.save(); in drawChild() 41 canvas.skew(0.5f, 0f); in drawChild() 42 boolean result = super.drawChild(canvas, child, drawingTime); in drawChild() 43 canvas.restore(); in drawChild()
|
D | CircleClipFrameLayout.java | 44 protected void dispatchDraw(Canvas canvas) { in dispatchDraw() argument 45 canvas.save(); in dispatchDraw() 49 canvas.clipPath(mClipPath); in dispatchDraw() 50 super.dispatchDraw(canvas); in dispatchDraw() 52 canvas.restore(); in dispatchDraw()
|
/cts/apps/CtsVerifier/src/com/android/cts/verifier/sensors/ |
D | MotionIndicatorView.java | 222 protected void onDraw(Canvas canvas) { in onDraw() argument 223 super.onDraw(canvas); in onDraw() 228 canvas.drawRect(10,10, 50, 50, p); in onDraw() 242 canvas.drawRect(xLeft, XBAR_MARGIN, in onDraw() 248 canvas.drawRect( in onDraw() 256 canvas.drawRect(xLeft+xStepSize*2-4, XBAR_MARGIN, in onDraw() 258 canvas.drawRect(xLeft+xStepSize*(xNStep-2)-4, XBAR_MARGIN, in onDraw() 263 canvas.drawRect(t-4, XBAR_MARGIN-XBAR_CURSOR_ADD, t+3, in onDraw() 274 canvas.drawRect(YBAR_MARGIN, yLeft, in onDraw() 280 canvas.drawRect( in onDraw() [all …]
|