/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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 | 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 …]
|
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 | AdvancedGradientsActivity.java | 69 protected void onDraw(Canvas canvas) { in onDraw() argument 70 super.onDraw(canvas); in onDraw() 71 canvas.drawRGB(255, 255, 255); in onDraw() 73 canvas.save(); in onDraw() 74 canvas.translate(130.0f, 100.0f); in onDraw() 78 canvas.drawRect(0.0f, 0.0f, 200.0f, 200.0f, mPaint); in onDraw() 80 canvas.translate(400.0f, 000.0f); in onDraw() 84 canvas.drawRect(0.0f, 0.0f, 200.0f, 200.0f, mPaint); in onDraw() 86 canvas.translate(400.0f, 000.0f); in onDraw() 90 canvas.drawRect(0.0f, 0.0f, 200.0f, 200.0f, mPaint); in onDraw() [all …]
|
D | NewLayersActivity.java | 49 protected void onDraw(Canvas canvas) { in onDraw() argument 50 super.onDraw(canvas); in onDraw() 51 canvas.drawRGB(128, 255, 128); in onDraw() 53 canvas.save(); in onDraw() 55 canvas.translate(140.0f, 100.0f); in onDraw() 56 drawStuff(canvas, Canvas.ALL_SAVE_FLAG); in onDraw() 58 canvas.translate(0.0f, 200.0f); in onDraw() 59 drawStuff(canvas, Canvas.HAS_ALPHA_LAYER_SAVE_FLAG); in onDraw() 61 canvas.restore(); in onDraw() 64 private void drawStuff(Canvas canvas, int saveFlags) { in drawStuff() argument [all …]
|
D | GradientStopsActivity.java | 44 protected void onDraw(Canvas canvas) { in onDraw() argument 53 canvas.drawRect(0.0f, 0.0f, 256.0f, 50.0f, paint); in onDraw() 62 canvas.translate(0.0f, 75.0f); in onDraw() 63 canvas.drawRect(0.0f, 0.0f, 256.0f, 50.0f, paint); in onDraw() 72 canvas.translate(0.0f, 75.0f); in onDraw() 73 canvas.drawRect(0.0f, 0.0f, 256.0f, 50.0f, paint); in onDraw() 81 canvas.translate(0.0f, 75.0f); in onDraw() 82 canvas.drawRect(0.0f, 0.0f, 256.0f, 50.0f, paint); in onDraw() 89 canvas.translate(0.0f, 75.0f); in onDraw() 90 canvas.drawRect(0.0f, 0.0f, 768.0f, 50.0f, paint); in onDraw() [all …]
|
D | ClearActivity.java | 67 protected void onDraw(Canvas canvas) { in onDraw() argument 68 super.onDraw(canvas); in onDraw() 70 canvas.save(); { in onDraw() 71 canvas.drawARGB(255, 255, 255, 255); in onDraw() 72 canvas.drawRect(100.0f, 100.0f, 200.0f, 200.0f, mClearPaint); in onDraw() 73 canvas.drawCircle(150.0f, 400.0f, 100.0f, mClearPaint); in onDraw() 74 canvas.drawBitmap(mBitmap1, 400.0f, 100.0f, mClearPaint); in onDraw() 75 canvas.save(); { in onDraw() 76 canvas.translate(400.0f, 400.0f); in onDraw() 77 canvas.drawPath(mPath, mClearPaint); in onDraw() [all …]
|
D | ShadersActivity.java | 102 protected void onDraw(Canvas canvas) { in onDraw() argument 103 super.onDraw(canvas); in onDraw() 105 canvas.drawBitmap(mTexture, 0.0f, 0.0f, null); in onDraw() 108 canvas.save(); in onDraw() 109 canvas.translate(40.0f, 40.0f); in onDraw() 112 canvas.drawRect(0.0f, 0.0f, mDrawWidth, mDrawHeight, mPaint); in onDraw() 114 canvas.translate(0.0f, 40.0f + mDrawHeight); in onDraw() 116 canvas.drawRect(0.0f, 0.0f, mDrawWidth, mDrawHeight, mPaint); in onDraw() 118 canvas.translate(0.0f, 40.0f + mDrawHeight); in onDraw() 120 canvas.drawRect(0.0f, 0.0f, mDrawWidth, mDrawHeight, mPaint); in onDraw() [all …]
|
D | AdvancedBlendActivity.java | 101 protected void onDraw(Canvas canvas) { in onDraw() argument 102 super.onDraw(canvas); in onDraw() 103 canvas.drawRGB(255, 255, 255); in onDraw() 105 canvas.save(); in onDraw() 106 canvas.translate(40.0f, 40.0f); in onDraw() 109 canvas.drawRect(0.0f, 0.0f, mDrawWidth, mDrawHeight, mPaint); in onDraw() 111 canvas.translate(0.0f, 40.0f + mDrawHeight); in onDraw() 113 canvas.drawRect(0.0f, 0.0f, mDrawWidth, mDrawHeight, mPaint); in onDraw() 115 canvas.translate(0.0f, 40.0f + mDrawHeight); in onDraw() 117 canvas.drawRect(0.0f, 0.0f, mDrawWidth, mDrawHeight, mPaint); in onDraw() [all …]
|
D | MatrixActivity.java | 42 protected void onDraw(Canvas canvas) { in onDraw() argument 43 super.onDraw(canvas); in onDraw() 44 canvas.drawRGB(255, 255, 255); in onDraw() 46 Log.d("Matrix", "m1=" + canvas.getMatrix()); in onDraw() 48 canvas.save(); in onDraw() 49 canvas.translate(10.0f, 10.0f); in onDraw() 50 Log.d("Matrix", "m2=" + canvas.getMatrix()); in onDraw() 51 canvas.translate(20.0f, 20.0f); in onDraw() 52 Log.d("Matrix", "m3=" + canvas.getMatrix()); in onDraw() 53 canvas.restore(); in onDraw()
|
/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/core/jni/android/graphics/ |
D | Canvas.cpp | 75 static void finalizer(JNIEnv* env, jobject clazz, SkCanvas* canvas) { in finalizer() argument 76 canvas->unref(); in finalizer() 114 SkCanvas* canvas = GraphicsJNI::getNativeCanvas(env, jcanvas); in isOpaque() local 115 return canvas->getDevice()->accessBitmap(false).isOpaque(); in isOpaque() 120 SkCanvas* canvas = GraphicsJNI::getNativeCanvas(env, jcanvas); in getWidth() local 121 return canvas->getDevice()->accessBitmap(false).width(); in getWidth() 126 SkCanvas* canvas = GraphicsJNI::getNativeCanvas(env, jcanvas); in getHeight() local 127 return canvas->getDevice()->accessBitmap(false).height(); in getHeight() 140 static int saveLayer(JNIEnv* env, jobject, SkCanvas* canvas, jobject bounds, in saveLayer() argument 148 return canvas->saveLayer(bounds_, paint, (SkCanvas::SaveFlags)flags); in saveLayer() [all …]
|