/cts/tests/tests/uirendering/src/android/uirendering/cts/testclasses/ |
D | ExactCanvasTests.java | 55 .addCanvasClient((canvas, width, height) -> { in testBlueRect() 59 canvas.drawRect(rect, p); in testBlueRect() 67 .addCanvasClient((canvas, width, height) -> { in testPoints() 73 canvas.drawPoint(i * 10, i * 10, p); in testPoints() 82 .addCanvasClient((canvas, width, height) -> { in testBlackRectWithStroke() 85 canvas.drawRect(0, 0, ActivityTestBase.TEST_WIDTH, in testBlackRectWithStroke() 89 canvas.drawRect(10, 10, 80, 80, p); in testBlackRectWithStroke() 97 .addCanvasClient((canvas, width, height) -> { in testBlackLineOnGreenBack() 98 canvas.drawColor(Color.GREEN); in testBlackLineOnGreenBack() 102 canvas.drawLine(0, 0, 50, 0, p); in testBlackLineOnGreenBack() [all …]
|
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 | RenderNodeTests.java | 104 Canvas canvas = renderNode.beginRecording(); in testBasicDraw() local 105 assertEquals(rect.width(), canvas.getWidth()); in testBasicDraw() 106 assertEquals(rect.height(), canvas.getHeight()); in testBasicDraw() 107 assertTrue(canvas.isHardwareAccelerated()); in testBasicDraw() 108 canvas.drawColor(Color.BLUE); in testBasicDraw() 116 .addCanvasClientWithoutUsingPicture((canvas, width, height) -> { in testBasicDraw() 117 canvas.drawRenderNode(renderNode); in testBasicDraw() 130 Canvas canvas = renderNode.beginRecording(); in testAlphaOverlappingRendering() local 131 canvas.drawColor(Color.RED); in testAlphaOverlappingRendering() 132 canvas.drawColor(Color.BLUE); in testAlphaOverlappingRendering() [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 | PathClippingTests.java | 53 static final CanvasClient sTorusDrawCanvasClient = (canvas, width, height) -> { 59 canvas.drawCircle(30, 30, 40, paint); 63 static final CanvasClient sTorusClipCanvasClient = (canvas, width, height) -> { 64 canvas.save(); 70 canvas.clipPath(path); 71 canvas.drawColor(Color.BLUE); 73 canvas.restore(); 77 static final CanvasClient sTorusClipOutCanvasClient = (canvas, width, height) -> { 78 canvas.save(); 86 canvas.clipPath(path1); [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 | SurfaceViewTests.java | 55 new CanvasCallback((canvas, width, height) -> canvas.drawColor(Color.GREEN)); 57 new CanvasCallback((canvas, width, height) -> canvas.drawColor(Color.WHITE)); 59 new CanvasCallback((canvas, width, height) -> canvas.drawColor(Color.RED)); 74 Canvas canvas = holder.lockCanvas(); in surfaceChanged() local 75 mCanvasClient.draw(canvas, width, height); in surfaceChanged() 76 holder.unlockCanvasAndPost(canvas); in surfaceChanged() 165 Canvas canvas = holder.lockHardwareCanvas(); in surfaceChanged() local 166 mCanvasClient.draw(canvas, width, height); in surfaceChanged() 167 holder.unlockCanvasAndPost(canvas); in surfaceChanged() 183 SurfaceViewHelper helper = new SurfaceViewHelper((canvas, width, height) -> { in testSurfaceHolderHardwareCanvas() [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 | 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 …]
|
D | ForceDarkTests.java | 76 ((CanvasClientView) view).setCanvasClient((canvas, width, height) -> { in testFgRect() 80 canvas.drawRect(rect, p); in testFgRect() 93 ((CanvasClientView) view).setCanvasClient((canvas, width, height) -> { in testFgRectDisable() 97 canvas.drawRect(rect, p); in testFgRectDisable() 112 bg.setCanvasClient((canvas, width, height) -> { in testSiblings() 113 canvas.drawColor(Color.WHITE); in testSiblings() 116 fg.setCanvasClient((canvas, width, height) -> { in testSiblings() 120 canvas.drawRect(fgRect, p); in testSiblings()
|
D | PictureTest.java | 57 (canvas, width, height) -> { in testPictureRespectsClip() 59 canvas.clipRect(sOffsetRect); in testPictureRespectsClip() 60 pic.draw(canvas); // should be clipped out in testPictureRespectsClip() 69 (canvas, width, height) -> { in testPictureRespectsTranslate() 71 canvas.translate(40, 0); in testPictureRespectsTranslate() 72 pic.draw(canvas); // should be offset in testPictureRespectsTranslate()
|
/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/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 58 canvas.drawPoint(0, 0, paint); in testColorMatrixColorFilter() 61 canvas.drawPoint(0, 0, paint); in testColorMatrixColorFilter() 64 canvas.drawPoint(0, 0, paint); in testColorMatrixColorFilter() 68 canvas.drawPoint(0, 0, paint); in testColorMatrixColorFilter() 81 canvas.drawPoint(0, 0, paint); in testColorMatrixColorFilter() 87 canvas.drawPoint(0, 0, paint); in testColorMatrixColorFilter() 95 canvas.drawPoint(0, 0, paint); in testColorMatrixColorFilter() 99 canvas.drawPoint(0, 0, paint); in testColorMatrixColorFilter()
|
D | BitmapShaderTest.java | 62 Canvas canvas = new Canvas(b); in testBitmapShader() local 63 canvas.drawPaint(paint); in testBitmapShader() 110 Canvas canvas = new Canvas(dstBitmap); in testClamp() local 113 canvas.drawRect(0, 0, 4, 1, paint); in testClamp() 114 canvas.setBitmap(null); in testClamp() 132 Canvas canvas = new Canvas(dstBitmap); in testRepeat() local 135 canvas.drawRect(0, 0, 4, 1, paint); in testRepeat() 136 canvas.setBitmap(null); in testRepeat() 154 Canvas canvas = new Canvas(dstBitmap); in testMirror() local 157 canvas.drawRect(0, 0, 4, 1, paint); in testMirror() [all …]
|
D | LightingColorFilterTest.java | 46 Canvas canvas = new Canvas(bitmap); in testLightingColorFilter() local 52 canvas.drawPaint(paint); in testLightingColorFilter() 57 canvas.drawPaint(paint); in testLightingColorFilter() 62 canvas.drawPaint(paint); in testLightingColorFilter() 69 canvas.drawPaint(paint); in testLightingColorFilter() 75 canvas.drawPaint(paint); in testLightingColorFilter() 82 canvas.drawPaint(paint); in testLightingColorFilter() 90 canvas.drawPaint(paint); in testLightingColorFilter()
|
/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 …]
|
D | DetermineFovActivity.java | 184 Canvas canvas = holder.lockCanvas(); in drawContents() local 185 if (canvas == null || mPhotoBitmap == null) { in drawContents() 189 int canvasWidth = canvas.getWidth(); in drawContents() 190 int canvasHeight = canvas.getHeight(); in drawContents() 212 canvas.drawColor(Color.BLACK); in drawContents() 213 canvas.drawBitmap(mPhotoBitmap, null, drawRect, null); in drawContents() 221 canvas.drawText(mMeasuredText + " " + mFovDegrees + " degrees.", textSize, in drawContents() 223 canvas.drawText(mReportedText + " " + mReportedFovDegrees + " degrees.", in drawContents() 233 canvas.drawLine(centerX, drawRect.top, centerX, drawRect.bottom, paint); in drawContents() 247 canvas.drawLine( in drawContents() [all …]
|
/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 …]
|
/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/systemui/src/android/systemui/cts/ |
D | WindowInsetsPresenterDrawable.java | 114 private void drawInset(Canvas canvas, Insets insets, Paint paint) { in drawInset() argument 118 canvas.drawRect(0, 0, insets.left, rect.bottom, paint); in drawInset() 121 canvas.drawRect(0, 0, rect.width(), insets.top, paint); in drawInset() 124 canvas.drawRect(rect.width() - insets.right, 0, rect.width(), rect.bottom, in drawInset() 128 canvas.drawRect(0, rect.height() - insets.bottom, rect.width(), rect.height(), in drawInset() 134 public void draw(Canvas canvas) { in draw() argument 135 canvas.save(); in draw() 138 drawInset(canvas, mWindowInsets.getSystemGestureInsets(), mSystemGesturePaint); in draw() 139 drawInset(canvas, mWindowInsets.getMandatorySystemGestureInsets(), in draw() 141 drawInset(canvas, mWindowInsets.getTappableElementInsets(), mTappableElementPaint); in draw() [all …]
|
/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()
|