/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/ |
D | ShapesActivity.java | 79 protected void onDraw(Canvas canvas) { in onDraw() argument 80 super.onDraw(canvas); in onDraw() 82 canvas.save(); in onDraw() 83 canvas.translate(50.0f, 50.0f); in onDraw() 84 canvas.drawRoundRect(mRect, 6.0f, 6.0f, mNormalPaint); in onDraw() 86 canvas.translate(0.0f, 110.0f); in onDraw() 87 canvas.drawRoundRect(mRect, 6.0f, 6.0f, mStrokePaint); in onDraw() 89 canvas.translate(0.0f, 110.0f); in onDraw() 90 canvas.drawRoundRect(mRect, 6.0f, 6.0f, mFillPaint); in onDraw() 91 canvas.restore(); in onDraw() [all …]
|
D | XfermodeActivity.java | 54 protected void onDraw(Canvas canvas) { in onDraw() argument 55 super.onDraw(canvas); in onDraw() 58 canvas.translate(100.0f, 100.0f); in onDraw() 61 canvas.save(); in onDraw() 63 drawRects(canvas, Mode.SRC_OVER); in onDraw() 64 canvas.translate(0.0f, 100.0f); in onDraw() 66 drawRects(canvas, Mode.SRC_IN); in onDraw() 67 canvas.translate(0.0f, 100.0f); in onDraw() 69 drawRects(canvas, Mode.SRC_OUT); in onDraw() 70 canvas.translate(0.0f, 100.0f); in onDraw() [all …]
|
D | Lines2Activity.java | 75 private void drawLines(Canvas canvas, Paint p, float xOffset, float yOffset) { in drawLines() argument 76 canvas.drawLine(10 + xOffset, yOffset, 10 + xOffset, 40 + yOffset, p); in drawLines() 77 canvas.drawLine(30 + xOffset, yOffset, 40 + xOffset, 40 + yOffset, p); in drawLines() 78 canvas.drawLine(40 + xOffset, yOffset, 75 + xOffset, 35 + yOffset, p); in drawLines() 79 canvas.drawLine(50 + xOffset, 5+ yOffset, 100 + xOffset, 15 + yOffset, p); in drawLines() 80 canvas.drawLine(60 + xOffset, yOffset, 110 + xOffset, 2 + yOffset, p); in drawLines() 81 canvas.drawLine(60 + xOffset, 40 + yOffset, 110 + xOffset, 40 + yOffset, p); in drawLines() 86 canvas.drawLines(copyPoints, 0, 12, p); in drawLines() 89 private void drawVerticalLine(Canvas canvas, Paint p, float length, float x, float y) { in drawVerticalLine() argument 90 canvas.drawLine(x, y, x, y + length, p); in drawVerticalLine() [all …]
|
D | ColoredRectsActivity.java | 72 protected void onDraw(Canvas canvas) { in onDraw() argument 73 super.onDraw(canvas); in onDraw() 79 canvas.save(); in onDraw() 80 canvas.translate(mOffset, yOffset); in onDraw() 81 canvas.drawRect(0, 0, 20, 10, p); in onDraw() 82 canvas.drawRect(35, 0, 45, 20, p); in onDraw() 83 canvas.translate(0, -yOffset); in onDraw() 84 canvas.scale(2, 2); in onDraw() 85 canvas.translate(60, yOffset/2); in onDraw() 86 canvas.drawRect(0, 0, 20, 10, p); in onDraw() [all …]
|
D | AlphaLayersActivity.java | 65 protected void onDraw(Canvas canvas) { in onDraw() argument 66 super.onDraw(canvas); in onDraw() 67 canvas.drawRGB(0, 255, 0); in onDraw() 80 public void dispatchDraw(Canvas canvas) { in dispatchDraw() argument 81 canvas.drawRGB(255, 255, 255); in dispatchDraw() 84 canvas.drawRect(200.0f, 0.0f, 220.0f, 20.0f, mPaint); in dispatchDraw() 86 canvas.save(); in dispatchDraw() 87 canvas.clipRect(20.0f, 0.0f, 40.0f, 20.0f); in dispatchDraw() 88 Log.d(LOG_TAG, "clipRect = " + canvas.getClipBounds()); in dispatchDraw() 89 Log.d(LOG_TAG, "rejected = " + canvas.quickReject(100.0f, 100.0f, 110.0f, 110.0f, in dispatchDraw() [all …]
|
D | QuickRejectActivity.java | 52 protected void onDraw(Canvas canvas) { in onDraw() argument 53 super.onDraw(canvas); in onDraw() 55 int count = canvas.getSaveCount(); in onDraw() 57 count = canvas.save(); in onDraw() 59 count = canvas.getSaveCount(); in onDraw() 61 canvas.restore(); in onDraw() 62 count = canvas.getSaveCount(); in onDraw() 64 canvas.save(); in onDraw() 65 Log.d("OpenGLRenderer", "count after save=" + canvas.getSaveCount()); in onDraw() 66 canvas.save(); in onDraw() [all …]
|
D | ScaledTextActivity.java | 94 protected void onDraw(Canvas canvas) { in onDraw() argument 95 super.onDraw(canvas); in onDraw() 97 canvas.drawText(TEXT, 30.0f, 30.0f, mPaint); in onDraw() 99 canvas.drawText(TEXT, 30.0f, 50.0f, mPaint); in onDraw() 101 canvas.drawText(TEXT, 30.0f, 70.0f, mPaint); in onDraw() 103 canvas.save(); in onDraw() 104 canvas.translate(400.0f, 0.0f); in onDraw() 105 canvas.scale(3.0f, 3.0f); in onDraw() 108 canvas.drawText(TEXT, 30.0f, 30.0f, mPaint); in onDraw() 111 canvas.drawText(TEXT, 30.0f, 50.0f, mPaint); in onDraw() [all …]
|
D | TextActivity.java | 83 protected void onDraw(Canvas canvas) { in onDraw() argument 84 super.onDraw(canvas); in onDraw() 85 canvas.drawRGB(255, 255, 255); in onDraw() 87 canvas.drawText("Hello OpenGL renderer!", 300, 20, mEventPaint); in onDraw() 91 canvas.drawText("Hello OpenGL renderer!", 100, 20, mMediumPaint); in onDraw() 95 canvas.drawText("Hello OpenGL renderer!", 100, 40, mMediumPaint); in onDraw() 100 canvas.drawText("Hello OpenGL renderer!", 100, 60, mMediumPaint); in onDraw() 104 canvas.drawText("Hello OpenGL renderer!", 100, 100, mMediumPaint); in onDraw() 107 canvas.drawText("Hello OpenGL renderer!", 100, 150, mMediumPaint); in onDraw() 109 canvas.drawText("Hello OpenGL renderer!", 100, 200, mLargePaint); in onDraw() [all …]
|
D | LinesActivity.java | 115 protected void onDraw(Canvas canvas) { in onDraw() argument 116 super.onDraw(canvas); in onDraw() 118 canvas.save(); in onDraw() 119 canvas.translate(100.0f, 20.0f); in onDraw() 121 canvas.drawLine(0.0f, 0.0f, 40.0f, 400.0f, mSmallPaint); in onDraw() 122 canvas.drawLine(5.0f, 0.0f, 95.0f, 400.0f, mMediumPaint); in onDraw() 123 canvas.drawLine(22.0f, 0.0f, 162.0f, 400.0f, mLargePaint); in onDraw() 126 canvas.drawLine(42.0f, 0.0f, 222.0f, 400.0f, mLargePaint); in onDraw() 129 canvas.drawPoint(500.0f + x * (15.0f + mOffset), in onDraw() 135 canvas.drawLines(mPoints, mAlphaPaint); in onDraw() [all …]
|
D | FramebufferBlendActivity.java | 64 protected void onDraw(Canvas canvas) { in onDraw() argument 65 super.onDraw(canvas); in onDraw() 66 canvas.drawRGB(255, 255, 255); in onDraw() 68 canvas.save(); in onDraw() 69 canvas.translate(40.0f, 40.0f); in onDraw() 71 drawBlendedBitmap(canvas, PorterDuff.Mode.DARKEN); in onDraw() 72 drawBlendedBitmap(canvas, PorterDuff.Mode.LIGHTEN); in onDraw() 73 drawBlendedBitmap(canvas, PorterDuff.Mode.MULTIPLY); in onDraw() 75 canvas.restore(); in onDraw() 77 canvas.save(); in onDraw() [all …]
|
D | LayersActivity.java | 48 protected void onDraw(Canvas canvas) { in onDraw() argument 49 super.onDraw(canvas); in onDraw() 51 canvas.translate(140.0f, 100.0f); in onDraw() 55 int count = canvas.saveLayer(0.0f, 0.0f, 200.0f, 100.0f, mLayerPaint, in onDraw() 59 canvas.drawRect(0.0f, 0.0f, 200.0f, 100.0f, mRectPaint); in onDraw() 61 canvas.restoreToCount(count); in onDraw() 63 canvas.translate(0.0f, 125.0f); in onDraw() 65 count = canvas.saveLayer(0.0f, 0.0f, 200.0f, 100.0f, mLayerPaint, in onDraw() 70 canvas.drawRect(0.0f, 0.0f, 200.0f, 100.0f, mRectPaint); in onDraw() 72 canvas.restoreToCount(count); in onDraw() [all …]
|
D | PathsActivity.java | 101 Canvas canvas = new Canvas(mBitmap); in PathsView() local 102 canvas.translate(-mPathBounds.left + mOffset * 1.5f, -mPathBounds.top + mOffset * 1.5f); in PathsView() 103 canvas.drawPath(mPath, mMediumPaint); in PathsView() 104 canvas.setBitmap(null); in PathsView() 108 protected void onDraw(Canvas canvas) { in onDraw() argument 109 super.onDraw(canvas); in onDraw() 111 canvas.drawARGB(255, 255, 255, 255); in onDraw() 113 canvas.save(); in onDraw() 114 canvas.translate(200.0f, 60.0f); in onDraw() 115 canvas.drawPath(mPath, mSmallPaint); in onDraw() [all …]
|
D | ScaledPathsActivity.java | 61 protected void onDraw(Canvas canvas) { in onDraw() argument 62 super.onDraw(canvas); in onDraw() 63 canvas.drawARGB(255, 255, 255, 255); in onDraw() 68 canvas.save(); in onDraw() 69 drawPath(canvas, 1.0f, 1.0f); in onDraw() 70 drawPath(canvas, 2.0f, 2.0f); in onDraw() 71 drawPath(canvas, 4.0f, 4.0f); in onDraw() 72 canvas.restore(); in onDraw() 77 canvas.save(); in onDraw() 78 drawPath(canvas, 1.0f, 1.0f); in onDraw() [all …]
|
D | TJunctionActivity.java | 46 protected void onDraw(Canvas canvas) { in onDraw() argument 47 super.onDraw(canvas); in onDraw() 51 canvas.translate(10.0f, 10.0f); in onDraw() 52 canvas.drawRect(0.0f, 0.0f, 100.0f, 50.0f, mPaint); in onDraw() 56 canvas.translate(50.0f, 50.0f); in onDraw() 57 canvas.drawRect(0.0f, 0.0f, 100.0f, 50.0f, mPaint); in onDraw() 61 canvas.translate(-25.0f, 50.0f); in onDraw() 62 canvas.drawRect(0.0f, 0.0f, 100.0f, 50.0f, mPaint); in onDraw() 66 canvas.translate(150.0f, 75.0f); in onDraw() 67 canvas.drawRect(0.0f, 0.0f, 100.0f, 50.0f, mPaint); in onDraw() [all …]
|
D | TextOnPathActivity.java | 107 protected void onDraw(Canvas canvas) { in onDraw() argument 108 super.onDraw(canvas); in onDraw() 110 canvas.drawARGB(255, 255, 255, 255); in onDraw() 112 canvas.save(); in onDraw() 113 canvas.translate(400.0f, 350.0f); in onDraw() 115 canvas.drawTextOnPath(mText + mText, mPath, 0.0f, 0.0f, mPaint); in onDraw() 116 canvas.drawPath(mPath, mPathPaint); in onDraw() 125 canvas.drawLines(mLines, mPathPaint); in onDraw() 127 canvas.translate(200.0f, 0.0f); in onDraw() 128 canvas.drawTextOnPath(mText + mText, mStraightPath, 0.0f, 0.0f, mPaint); in onDraw() [all …]
|
D | ColorFiltersActivity.java | 69 protected void onDraw(Canvas canvas) { in onDraw() argument 70 super.onDraw(canvas); in onDraw() 72 canvas.drawARGB(255, 255, 255, 255); in onDraw() 74 canvas.save(); in onDraw() 75 canvas.translate(120.0f, 50.0f); in onDraw() 76 canvas.drawBitmap(mBitmap1, 0.0f, 0.0f, mColorMatrixPaint); in onDraw() 78 canvas.translate(0.0f, 50.0f + mBitmap1.getHeight()); in onDraw() 79 canvas.drawBitmap(mBitmap1, 0.0f, 0.0f, mLightingPaint); in onDraw() 81 canvas.translate(0.0f, 50.0f + mBitmap1.getHeight()); in onDraw() 82 canvas.drawBitmap(mBitmap1, 0.0f, 0.0f, mBlendPaint); in onDraw() [all …]
|
/frameworks/base/libs/hwui/tests/unit/ |
D | RecordingCanvasTests.cpp | 50 auto dl = TestUtils::createDisplayList<RecordingCanvas>(100, 200, [](RecordingCanvas& canvas) { in TEST() argument 51 canvas.save(SaveFlags::MatrixClip); in TEST() 52 canvas.restore(); in TEST() 58 auto dl = TestUtils::createDisplayList<RecordingCanvas>(100, 100, [](RecordingCanvas& canvas) { in TEST() argument 59 canvas.save(SaveFlags::MatrixClip); in TEST() 60 canvas.clipRect(0, 0, 100, 100, SkRegion::kIntersect_Op); in TEST() 61 canvas.drawRect(0, 0, 50, 50, SkPaint()); in TEST() 62 canvas.drawRect(50, 50, 100, 100, SkPaint()); in TEST() 63 canvas.restore(); in TEST() 74 auto dl = TestUtils::createDisplayList<RecordingCanvas>(200, 200, [](RecordingCanvas& canvas) { in TEST() argument [all …]
|
D | FrameBuilderTests.cpp | 131 [](RenderProperties& props, RecordingCanvas& canvas) { in RENDERTHREAD_TEST() argument 133 canvas.drawRect(0, 0, 100, 200, SkPaint()); in RENDERTHREAD_TEST() 134 canvas.drawBitmap(bitmap, 10, 10, nullptr); in RENDERTHREAD_TEST() 159 [](RenderProperties& props, RecordingCanvas& canvas) { in RENDERTHREAD_TEST() argument 162 canvas.drawPoint(50, 50, strokedPaint); in RENDERTHREAD_TEST() 175 [](RenderProperties& props, RecordingCanvas& canvas) { in RENDERTHREAD_TEST() argument 176 canvas.save(SaveFlags::MatrixClip); in RENDERTHREAD_TEST() 177 … canvas.clipRect(200, 200, 400, 400, SkRegion::kIntersect_Op); // intersection should be empty in RENDERTHREAD_TEST() 178 canvas.drawRect(0, 0, 400, 400, SkPaint()); in RENDERTHREAD_TEST() 179 canvas.restore(); in RENDERTHREAD_TEST() [all …]
|
/frameworks/base/libs/hwui/tests/microbench/ |
D | DisplayListCanvasBench.cpp | 55 TestCanvas canvas(100, 100); in BM_DisplayListCanvas_record_empty() local 56 delete canvas.finishRecording(); in BM_DisplayListCanvas_record_empty() 59 canvas.resetRecording(100, 100); in BM_DisplayListCanvas_record_empty() 60 benchmark::DoNotOptimize(&canvas); in BM_DisplayListCanvas_record_empty() 61 delete canvas.finishRecording(); in BM_DisplayListCanvas_record_empty() 67 TestCanvas canvas(100, 100); in BM_DisplayListCanvas_record_saverestore() local 68 delete canvas.finishRecording(); in BM_DisplayListCanvas_record_saverestore() 71 canvas.resetRecording(100, 100); in BM_DisplayListCanvas_record_saverestore() 72 canvas.save(SaveFlags::MatrixClip); in BM_DisplayListCanvas_record_saverestore() 73 canvas.save(SaveFlags::MatrixClip); in BM_DisplayListCanvas_record_saverestore() [all …]
|
/frameworks/base/libs/hwui/tests/common/scenes/ |
D | ShapeAnimation.cpp | 33 void createContent(int width, int height, TestCanvas& canvas) override { in createContent() argument 35 [width](RenderProperties& props, TestCanvas& canvas) { in createContent() argument 37 [](TestCanvas& canvas, float size, const SkPaint& paint) { in createContent() 38 canvas.drawArc(0, 0, size, size, 50, 189, true, paint); in createContent() 40 [](TestCanvas& canvas, float size, const SkPaint& paint) { in createContent() 41 canvas.drawOval(0, 0, size, size, paint); in createContent() 43 [](TestCanvas& canvas, float size, const SkPaint& paint) { in createContent() 50 canvas.drawPath(diamondPath, paint); in createContent() 52 [](TestCanvas& canvas, float size, const SkPaint& paint) { in createContent() 54 canvas.drawLines(data, sizeof(data) / sizeof(float), paint); in createContent() [all …]
|
D | SaveLayerAnimation.cpp | 31 void createContent(int width, int height, TestCanvas& canvas) override { in createContent() argument 32 canvas.drawColor(Color::White, SkXfermode::kSrcOver_Mode); // background in createContent() 35 [](RenderProperties& props, TestCanvas& canvas) { in createContent() argument 37 canvas.saveLayerAlpha(0, 0, 400, 400, 200, SaveFlags::ClipToLayer); in createContent() 38 canvas.drawColor(Color::Green_700, SkXfermode::kSrcOver_Mode); in createContent() 39 canvas.clipRect(50, 50, 350, 350, SkRegion::kIntersect_Op); in createContent() 40 canvas.saveLayerAlpha(100, 100, 300, 300, 128, SaveFlags::ClipToLayer); in createContent() 41 canvas.drawColor(Color::Blue_500, SkXfermode::kSrcOver_Mode); in createContent() 42 canvas.restore(); in createContent() 43 canvas.restore(); in createContent() [all …]
|
D | ClippingAnimation.cpp | 31 void createContent(int width, int height, TestCanvas& canvas) override { in createContent() argument 32 canvas.drawColor(Color::White, SkXfermode::kSrcOver_Mode); in createContent() 34 [](RenderProperties& props, TestCanvas& canvas) { in createContent() argument 35 canvas.save(SaveFlags::MatrixClip); in createContent() 37 canvas.clipRect(0, 0, 200, 200, SkRegion::kIntersect_Op); in createContent() 38 canvas.translate(100, 100); in createContent() 39 canvas.rotate(45); in createContent() 40 canvas.translate(-100, -100); in createContent() 41 canvas.clipRect(0, 0, 200, 200, SkRegion::kIntersect_Op); in createContent() 42 canvas.drawColor(Color::Blue_500, SkXfermode::kSrcOver_Mode); in createContent() [all …]
|
/frameworks/base/tests/CanvasCompare/src/com/android/test/hwuicompare/ |
D | DisplayModifier.java | 40 abstract public void modifyDrawing(Paint paint, Canvas canvas); in modifyDrawing() argument 85 public void modifyDrawing(Paint paint, Canvas canvas) { 91 public void modifyDrawing(Paint paint, Canvas canvas) { 101 public void modifyDrawing(Paint paint, Canvas canvas) { 107 public void modifyDrawing(Paint paint, Canvas canvas) { 115 public void modifyDrawing(Paint paint, Canvas canvas) { 128 public void modifyDrawing(Paint paint, Canvas canvas) { 136 public void modifyDrawing(Paint paint, Canvas canvas) { 142 public void modifyDrawing(Paint paint, Canvas canvas) { 148 public void modifyDrawing(Paint paint, Canvas canvas) { [all …]
|
/frameworks/base/tools/layoutlib/bridge/src/android/view/ |
D | RectShadowPainter.java | 46 public static void paintShadow(Outline viewOutline, float elevation, Canvas canvas) { in paintShadow() argument 53 int saved = modifyCanvas(canvas, shadowSize); in paintShadow() 84 sideShadow(canvas, edgePaint, edgeShadowRect, outline.left, inset.top, 0); in paintShadow() 86 sideShadow(canvas, edgePaint, edgeShadowRect, outline.right, inset.bottom, 2); in paintShadow() 89 sideShadow(canvas, edgePaint, edgeShadowRect, inset.right, outline.top, 1); in paintShadow() 95 sideShadow(canvas, edgePaint, edgeShadowRect, inset.left, outline.bottom, 3); in paintShadow() 98 drawCorner(canvas, cornerPaint, path, inset.right, inset.bottom, outerArcRadius, 0); in paintShadow() 99 drawCorner(canvas, cornerPaint, path, inset.left, inset.bottom, outerArcRadius, 1); in paintShadow() 100 drawCorner(canvas, cornerPaint, path, inset.left, inset.top, outerArcRadius, 2); in paintShadow() 101 drawCorner(canvas, cornerPaint, path, inset.right, inset.top, outerArcRadius, 3); in paintShadow() [all …]
|
/frameworks/support/core-ui/java/android/support/v4/widget/ |
D | SwipeProgressBar.java | 138 void draw(Canvas canvas) { in draw() argument 144 int restoreCount = canvas.save(); in draw() 145 canvas.clipRect(mBounds); in draw() 172 canvas.saveLayerAlpha(mClipRect, 0, 0); in draw() 182 canvas.drawColor(mColor1); in draw() 185 canvas.drawColor(mColor4); in draw() 187 canvas.drawColor(mColor1); in draw() 189 canvas.drawColor(mColor2); in draw() 191 canvas.drawColor(mColor3); in draw() 203 drawCircle(canvas, cx, cy, mColor1, pct); in draw() [all …]
|