/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 …]
|
/frameworks/base/libs/hwui/tests/unit/ |
D | RenderNodeDrawableTests.cpp | 44 TestUtils::createNode(0, 0, 200, 400, [](RenderProperties& props, Canvas& canvas) { in TEST() argument 45 canvas.drawColor(Color::Red_500, SkBlendMode::kSrcOver); in TEST() 49 RecordingCanvas canvas; in TEST() local 50 canvas.reset(&skLiteDL, SkIRect::MakeWH(1, 1)); in TEST() 51 canvas.translate(100, 100); in TEST() 52 RenderNodeDrawable drawable(rootNode.get(), &canvas); in TEST() 56 ASSERT_EQ(drawable.getRecordedMatrix(), canvas.getTotalMatrix()); in TEST() 61 static void drawOrderedRect(Canvas* canvas, uint8_t expectedDrawOrder) { in drawOrderedRect() argument 65 canvas->drawRect(0, 0, 100, 100, paint); in drawOrderedRect() 68 static void drawOrderedNode(Canvas* canvas, uint8_t expectedDrawOrder, float z) { in drawOrderedNode() argument [all …]
|
/frameworks/base/libs/hwui/tests/microbench/ |
D | DisplayListCanvasBench.cpp | 46 std::unique_ptr<Canvas> canvas(Canvas::create_recording_canvas(100, 100)); in BM_DisplayListCanvas_record_empty() local 47 delete canvas->finishRecording(); in BM_DisplayListCanvas_record_empty() 50 canvas->resetRecording(100, 100); in BM_DisplayListCanvas_record_empty() 51 benchmark::DoNotOptimize(canvas.get()); in BM_DisplayListCanvas_record_empty() 52 delete canvas->finishRecording(); in BM_DisplayListCanvas_record_empty() 58 std::unique_ptr<Canvas> canvas(Canvas::create_recording_canvas(100, 100)); in BM_DisplayListCanvas_record_saverestore() local 59 delete canvas->finishRecording(); in BM_DisplayListCanvas_record_saverestore() 62 canvas->resetRecording(100, 100); in BM_DisplayListCanvas_record_saverestore() 63 canvas->save(SaveFlags::MatrixClip); in BM_DisplayListCanvas_record_saverestore() 64 canvas->save(SaveFlags::MatrixClip); in BM_DisplayListCanvas_record_saverestore() [all …]
|
/frameworks/base/apct-tests/perftests/core/src/android/graphics/perftests/ |
D | CanvasPerfTest.java | 47 RecordingCanvas canvas = node.start(100, 100); in testBasicViewGroupDraw() local 48 node.end(canvas); in testBasicViewGroupDraw() 49 canvas = child.start(50, 50); in testBasicViewGroupDraw() 50 canvas.drawColor(Color.WHITE); in testBasicViewGroupDraw() 51 child.end(canvas); in testBasicViewGroupDraw() 54 canvas = node.start(200, 200); in testBasicViewGroupDraw() 55 int save = canvas.save(); in testBasicViewGroupDraw() 56 canvas.clipRect(1, 1, 199, 199); in testBasicViewGroupDraw() 57 canvas.insertReorderBarrier(); in testBasicViewGroupDraw() 59 canvas.drawRenderNode(child); in testBasicViewGroupDraw() [all …]
|
/frameworks/base/libs/hwui/tests/common/scenes/ |
D | ShapeAnimation.cpp | 30 void createContent(int width, int height, Canvas& canvas) override { in createContent() argument 32 0, 0, width, height, [width](RenderProperties& props, Canvas& canvas) { in createContent() argument 34 [](Canvas& canvas, float size, const SkPaint& paint) { in createContent() 35 canvas.drawArc(0, 0, size, size, 50, 189, true, paint); in createContent() 37 [](Canvas& canvas, float size, const SkPaint& paint) { in createContent() 38 canvas.drawOval(0, 0, size, size, paint); in createContent() 40 [](Canvas& canvas, float size, const SkPaint& paint) { in createContent() 47 canvas.drawPath(diamondPath, paint); in createContent() 49 [](Canvas& canvas, float size, const SkPaint& paint) { in createContent() 51 canvas.drawLines(data, sizeof(data) / sizeof(float), paint); in createContent() [all …]
|
D | SaveLayerAnimation.cpp | 31 void createContent(int width, int height, Canvas& canvas) override { in createContent() argument 32 canvas.drawColor(Color::White, SkBlendMode::kSrcOver); // background in createContent() 34 card = TestUtils::createNode(0, 0, 400, 800, [](RenderProperties& props, Canvas& canvas) { in createContent() argument 36 canvas.saveLayerAlpha(0, 0, 400, 400, 200, SaveFlags::ClipToLayer); in createContent() 37 canvas.drawColor(Color::Green_700, SkBlendMode::kSrcOver); in createContent() 38 canvas.clipRect(50, 50, 350, 350, SkClipOp::kIntersect); in createContent() 39 canvas.saveLayerAlpha(100, 100, 300, 300, 128, SaveFlags::ClipToLayer); in createContent() 40 canvas.drawColor(Color::Blue_500, SkBlendMode::kSrcOver); in createContent() 41 canvas.restore(); in createContent() 42 canvas.restore(); in createContent() [all …]
|
/frameworks/base/libs/hwui/pipeline/skia/ |
D | RenderNodeDrawable.cpp | 30 RenderNodeDrawable::RenderNodeDrawable(RenderNode* node, SkCanvas* canvas, bool composeLayer, in RenderNodeDrawable() argument 33 , mRecordedTransform(canvas->getTotalMatrix()) in RenderNodeDrawable() 43 void RenderNodeDrawable::drawBackwardsProjectedNodes(SkCanvas* canvas, in drawBackwardsProjectedNodes() argument 52 SkAutoCanvasRestore acr2(canvas, true); in drawBackwardsProjectedNodes() 55 canvas->concat(child.getRecordedMatrix()); in drawBackwardsProjectedNodes() 56 child.drawContent(canvas); in drawBackwardsProjectedNodes() 62 SkAutoCanvasRestore acr(canvas, true); in drawBackwardsProjectedNodes() 68 canvas->concat(nodeMatrix); in drawBackwardsProjectedNodes() 72 drawBackwardsProjectedNodes(canvas, *childDisplayList, nestLevel + 1); in drawBackwardsProjectedNodes() 78 static void clipOutline(const Outline& outline, SkCanvas* canvas, const SkRect* pendingClip) { in clipOutline() argument [all …]
|
/frameworks/base/services/usb/java/com/android/server/usb/descriptors/ |
D | UsbEndpointDescriptor.java | 136 public void report(ReportCanvas canvas) { in report() argument 137 super.report(canvas); in report() 139 canvas.openList(); in report() 142 canvas.writeListItem("Address: " in report() 148 canvas.openListItem(); in report() 149 canvas.write("Attributes: " + ReportCanvas.getHexString(attributes) + " "); in report() 152 canvas.write("Control"); in report() 155 canvas.write("Iso"); in report() 158 canvas.write("Bulk"); in report() 161 canvas.write("Interrupt"); in report() [all …]
|
D | Usb10ACMixerUnit.java | 72 public void report(ReportCanvas canvas) { in report() argument 73 super.report(canvas); in report() 75 canvas.writeParagraph("Mixer Unit", false); in report() 76 canvas.openList(); in report() 78 canvas.writeListItem("Unit ID: " + ReportCanvas.getHexString(getUnitID())); in report() 81 canvas.openListItem(); in report() 82 canvas.write("Num Inputs: " + numInputs + " ["); in report() 84 canvas.write("" + ReportCanvas.getHexString(inputIDs[input])); in report() 86 canvas.write(" "); in report() 89 canvas.write("]"); in report() [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/layoutlib/bridge/src/android/view/ |
D | RectShadowPainter.java | 51 public static void paintShadow(Outline viewOutline, float elevation, Canvas canvas, in paintShadow() argument 62 int saved = modifyCanvas(canvas, shadowSize); in paintShadow() 106 sideShadow(canvas, edgePaint, edgeShadowRect, outline.left, inset.top, 0); in paintShadow() 108 sideShadow(canvas, edgePaint, edgeShadowRect, outline.right, inset.bottom, 2); in paintShadow() 111 sideShadow(canvas, edgePaint, edgeShadowRect, inset.right, outline.top, 1); in paintShadow() 117 sideShadow(canvas, edgePaint, edgeShadowRect, inset.left, outline.bottom, 3); in paintShadow() 120 drawCorner(canvas, cornerPaint, path, inset.right, inset.bottom, outerArcRadius, 0); in paintShadow() 121 drawCorner(canvas, cornerPaint, path, inset.left, inset.bottom, outerArcRadius, 1); in paintShadow() 122 drawCorner(canvas, cornerPaint, path, inset.left, inset.top, outerArcRadius, 2); in paintShadow() 123 drawCorner(canvas, cornerPaint, path, inset.right, inset.top, outerArcRadius, 3); in paintShadow() [all …]
|
/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/impl/ |
D | SysUiOverlay.java | 99 private void paintRoundedBorders(Canvas canvas) { in paintRoundedBorders() argument 101 canvas.drawPath(mCornerPath, mCornerPaint); in paintRoundedBorders() 103 canvas.save(); in paintRoundedBorders() 104 canvas.translate(getWidth(), 0); in paintRoundedBorders() 105 canvas.rotate(90); in paintRoundedBorders() 106 canvas.drawPath(mCornerPath, mCornerPaint); in paintRoundedBorders() 107 canvas.restore(); in paintRoundedBorders() 109 canvas.save(); in paintRoundedBorders() 110 canvas.translate( getWidth(), getHeight()); in paintRoundedBorders() 111 canvas.rotate(180); in paintRoundedBorders() [all …]
|