/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) { 86 paint.setAntiAlias(true); 91 public void modifyDrawing(Paint paint, Canvas canvas) { 92 paint.setAntiAlias(false); 101 public void modifyDrawing(Paint paint, Canvas canvas) { 102 paint.setStyle(Paint.Style.FILL); 107 public void modifyDrawing(Paint paint, Canvas canvas) { 108 paint.setStyle(Paint.Style.STROKE); 115 public void modifyDrawing(Paint paint, Canvas canvas) { [all …]
|
/frameworks/base/graphics/java/android/graphics/ |
D | BaseCanvas.java | 84 float sweepAngle, boolean useCenter, @NonNull Paint paint) { in drawArc() argument 85 throwIfHasHwBitmapInSwMode(paint); in drawArc() 87 useCenter, paint.getNativeInstance()); in drawArc() 91 @NonNull Paint paint) { in drawArc() argument 92 throwIfHasHwBitmapInSwMode(paint); in drawArc() 94 paint); in drawArc() 101 public void drawBitmap(@NonNull Bitmap bitmap, float left, float top, @Nullable Paint paint) { in drawBitmap() argument 103 throwIfHasHwBitmapInSwMode(paint); in drawBitmap() 105 paint != null ? paint.getNativeInstance() : 0, mDensity, mScreenDensity, in drawBitmap() 109 public void drawBitmap(@NonNull Bitmap bitmap, @NonNull Matrix matrix, @Nullable Paint paint) { in drawBitmap() argument [all …]
|
D | Canvas.java | 441 public int saveLayer(@Nullable RectF bounds, @Nullable Paint paint, @Saveflags int saveFlags) { in saveLayer() argument 445 return saveLayer(bounds.left, bounds.top, bounds.right, bounds.bottom, paint, saveFlags); in saveLayer() 474 public int saveLayer(@Nullable RectF bounds, @Nullable Paint paint) { in saveLayer() argument 475 return saveLayer(bounds, paint, ALL_SAVE_FLAG); in saveLayer() 483 public int saveLayer(float left, float top, float right, float bottom, @Nullable Paint paint, in saveLayer() argument 486 paint != null ? paint.getNativeInstance() : 0, in saveLayer() 494 public int saveLayer(float left, float top, float right, float bottom, @Nullable Paint paint) { in saveLayer() argument 495 return saveLayer(left, top, right, bottom, paint, ALL_SAVE_FLAG); in saveLayer() 1322 @NonNull Paint paint) { in drawArc() argument 1323 super.drawArc(oval, startAngle, sweepAngle, useCenter, paint); in drawArc() [all …]
|
/frameworks/base/libs/hwui/utils/ |
D | PaintUtils.h | 35 static inline GLenum getFilter(const SkPaint* paint) { in getFilter() argument 36 if (!paint || paint->getFilterQuality() != kNone_SkFilterQuality) { in getFilter() 42 static bool isOpaquePaint(const SkPaint* paint) { in isOpaquePaint() argument 43 if (!paint) return true; // default (paintless) behavior is SrcOver, black in isOpaquePaint() 45 if (paint->getAlpha() != 0xFF in isOpaquePaint() 46 || PaintUtils::isBlendedShader(paint->getShader()) in isOpaquePaint() 47 || PaintUtils::isBlendedColorFilter(paint->getColorFilter())) { in isOpaquePaint() 52 SkBlendMode mode = paint->getBlendMode(); in isOpaquePaint() 78 static inline bool getTextShadow(const SkPaint* paint, TextShadow* textShadow) { in getTextShadow() argument 80 if (paint && paint->getLooper() && paint->getLooper()->asABlurShadow(&blur)) { in getTextShadow() [all …]
|
/frameworks/layoutlib/bridge/src/com/android/layoutlib/bridge/android/graphics/ |
D | NopCanvas.java | 59 public int saveLayer(RectF bounds, Paint paint, int saveFlags) { in saveLayer() argument 64 public int saveLayer(RectF bounds, Paint paint) { in saveLayer() argument 69 public int saveLayer(float left, float top, float right, float bottom, Paint paint, in saveLayer() argument 75 public int saveLayer(float left, float top, float right, float bottom, Paint paint) { in saveLayer() argument 130 public void drawPaint(Paint paint) { in drawPaint() argument 134 public void drawPoints(float[] pts, int offset, int count, Paint paint) { in drawPoints() argument 138 public void drawPoints(float[] pts, Paint paint) { in drawPoints() argument 142 public void drawPoint(float x, float y, Paint paint) { in drawPoint() argument 146 public void drawLine(float startX, float startY, float stopX, float stopY, Paint paint) { in drawLine() argument 150 public void drawLines(float[] pts, int offset, int count, Paint paint) { in drawLines() argument [all …]
|
/frameworks/base/core/java/android/view/ |
D | RecordingCanvas.java | 58 float sweepAngle, boolean useCenter, @NonNull Paint paint) { in drawArc() argument 60 useCenter, paint.getNativeInstance()); in drawArc() 65 boolean useCenter, @NonNull Paint paint) { in drawArc() argument 67 paint); in drawArc() 77 @Nullable Paint paint) { in drawBitmap() argument 80 paint != null ? paint.getNativeInstance() : 0, mDensity, mScreenDensity, in drawBitmap() 86 @Nullable Paint paint) { in drawBitmap() argument 88 paint != null ? paint.getNativeInstance() : 0); in drawBitmap() 93 @Nullable Paint paint) { in drawBitmap() argument 98 final long nativePaint = paint == null ? 0 : paint.getNativeInstance(); in drawBitmap() [all …]
|
/frameworks/base/libs/hwui/hwui/ |
D | Canvas.cpp | 39 const SkPaint& paint, Canvas* canvas) { in drawStroke() argument 42 canvas->drawRect(left, top, right, bottom, paint); in drawStroke() 45 void Canvas::drawTextDecorations(float x, float y, float length, const SkPaint& paint) { in drawTextDecorations() argument 49 SkPaint paintCopy(paint); in drawTextDecorations() 53 flags = paint.getFlags(); in drawTextDecorations() 60 paint.getFontMetrics(&metrics); in drawTextDecorations() 63 position = paint.getTextSize() * Paint::kStdUnderline_Top; in drawTextDecorations() 67 thickness = paint.getTextSize() * Paint::kStdUnderline_Thickness; in drawTextDecorations() 70 drawStroke(left, right, top, thickness, paint, this); in drawTextDecorations() 73 const float textSize = paint.getTextSize(); in drawTextDecorations() [all …]
|
D | MinikinUtils.cpp | 30 const Paint* paint, Typeface* typeface) { in prepareMinikinPaint() argument 35 minikin::FontVariant minikinVariant = (paint->getFontVariant() == minikin::VARIANT_ELEGANT) ? in prepareMinikinPaint() 37 const uint32_t langListId = paint->getMinikinLangListId(); in prepareMinikinPaint() 45 minikinPaint->size = (int)paint->getTextSize(); in prepareMinikinPaint() 46 minikinPaint->scaleX = paint->getTextScaleX(); in prepareMinikinPaint() 47 minikinPaint->skewX = paint->getTextSkewX(); in prepareMinikinPaint() 48 minikinPaint->letterSpacing = paint->getLetterSpacing(); in prepareMinikinPaint() 49 minikinPaint->wordSpacing = paint->getWordSpacing(); in prepareMinikinPaint() 50 minikinPaint->paintFlags = MinikinFontSkia::packPaintFlags(paint); in prepareMinikinPaint() 51 minikinPaint->fontFeatureSettings = paint->getFontFeatureSettings(); in prepareMinikinPaint() [all …]
|
D | MinikinSkia.cpp | 34 const minikin::MinikinPaint& paint) { in MinikinFontSkia_SetSkiaPaint() argument 36 skPaint->setTextSize(paint.size); in MinikinFontSkia_SetSkiaPaint() 37 skPaint->setTextScaleX(paint.scaleX); in MinikinFontSkia_SetSkiaPaint() 38 skPaint->setTextSkewX(paint.skewX); in MinikinFontSkia_SetSkiaPaint() 39 MinikinFontSkia::unpackPaintFlags(skPaint, paint.paintFlags); in MinikinFontSkia_SetSkiaPaint() 41 MinikinFontSkia::populateSkPaint(skPaint, font, paint.fakery); in MinikinFontSkia_SetSkiaPaint() 45 const minikin::MinikinPaint &paint) const { in GetHorizontalAdvance() 49 MinikinFontSkia_SetSkiaPaint(this, &skPaint, paint); in GetHorizontalAdvance() 58 const minikin::MinikinPaint& paint) const { in GetBounds() 62 MinikinFontSkia_SetSkiaPaint(this, &skPaint, paint); in GetBounds() [all …]
|
D | MinikinUtils.h | 38 const Paint* paint, Typeface* typeface); 40 ANDROID_API static minikin::Layout doLayout(const Paint* paint, int bidiFlags, 44 ANDROID_API static float measureText(const Paint* paint, int bidiFlags, Typeface* typeface, 50 ANDROID_API static float xOffsetForTextAlign(Paint* paint, const minikin::Layout& layout); 52 ANDROID_API static float hOffsetForTextAlign(Paint* paint, const minikin::Layout& layout, 56 ANDROID_API static void forFontRun(const minikin::Layout& layout, Paint* paint, F& f) { in forFontRun() argument 57 float saveSkewX = paint->getTextSkewX(); in forFontRun() 58 bool savefakeBold = paint->isFakeBoldText(); in forFontRun() 65 MinikinFontSkia::populateSkPaint(paint, curFont, layout.getFakery(start)); in forFontRun() 67 paint->setTextSkewX(saveSkewX); in forFontRun() [all …]
|
D | Canvas.h | 160 uirenderer::CanvasPropertyPrimitive* ry, uirenderer::CanvasPropertyPaint* paint) = 0; 163 uirenderer::CanvasPropertyPaint* paint) = 0; 181 const SkPaint* paint, SaveFlags::Flags flags) = 0; 215 virtual void drawPaint(const SkPaint& paint) = 0; 218 virtual void drawPoint(float x, float y, const SkPaint& paint) = 0; 219 virtual void drawPoints(const float* points, int floatCount, const SkPaint& paint) = 0; 221 const SkPaint& paint) = 0; 222 virtual void drawLines(const float* points, int floatCount, const SkPaint& paint) = 0; 224 const SkPaint& paint) = 0; 225 virtual void drawRegion(const SkRegion& region, const SkPaint& paint) = 0; [all …]
|
D | PaintImpl.cpp | 26 Paint::Paint(const Paint& paint) : SkPaint(paint), in Paint() argument 27 mLetterSpacing(paint.mLetterSpacing), mWordSpacing(paint.mWordSpacing), in Paint() 28 mFontFeatureSettings(paint.mFontFeatureSettings), in Paint() 29 mMinikinLangListId(paint.mMinikinLangListId), mFontVariant(paint.mFontVariant), in Paint() 30 mHyphenEdit(paint.mHyphenEdit) { in Paint() 33 Paint::Paint(const SkPaint& paint) : SkPaint(paint), in Paint() argument
|
/frameworks/base/tests/HwAccelerationTest/src/com/android/test/hwui/ |
D | GradientStopsActivity.java | 50 Paint paint = new Paint(); in onDraw() local 51 paint.setShader(gradient); in onDraw() 53 canvas.drawRect(0.0f, 0.0f, 256.0f, 50.0f, paint); in onDraw() 60 paint.setShader(gradient); in onDraw() 63 canvas.drawRect(0.0f, 0.0f, 256.0f, 50.0f, paint); in onDraw() 70 paint.setShader(gradient); in onDraw() 73 canvas.drawRect(0.0f, 0.0f, 256.0f, 50.0f, paint); in onDraw() 79 paint.setShader(gradient); in onDraw() 82 canvas.drawRect(0.0f, 0.0f, 256.0f, 50.0f, paint); in onDraw() 87 paint.setShader(gradient); in onDraw() [all …]
|
/frameworks/base/libs/hwui/tests/common/scenes/ |
D | ShapeAnimation.cpp | 37 [](Canvas& canvas, float size, const SkPaint& paint) { in createContent() 38 canvas.drawArc(0, 0, size, size, 50, 189, true, paint); in createContent() 40 [](Canvas& canvas, float size, const SkPaint& paint) { in createContent() 41 canvas.drawOval(0, 0, size, size, paint); in createContent() 43 [](Canvas& canvas, float size, const SkPaint& paint) { in createContent() 50 canvas.drawPath(diamondPath, paint); in createContent() 52 [](Canvas& canvas, float size, const SkPaint& paint) { in createContent() 54 canvas.drawLines(data, sizeof(data) / sizeof(float), paint); in createContent() 56 [](Canvas& canvas, float size, const SkPaint& paint) { in createContent() 58 canvas.drawPoints(data, sizeof(data) / sizeof(float), paint); in createContent() [all …]
|
D | ListViewAnimation.cpp | 39 SkPaint paint; in createRandomCharIcon() local 40 paint.setAntiAlias(true); in createRandomCharIcon() 42 paint.setColor(randomColor); in createRandomCharIcon() 43 canvas.drawCircle(size / 2, size / 2, size / 2, paint); in createRandomCharIcon() 47 paint.setColor(bgDark ? Color::White : Color::Grey_700); in createRandomCharIcon() 48 paint.setTextAlign(SkPaint::kCenter_Align); in createRandomCharIcon() 49 paint.setTextSize(size / 2); in createRandomCharIcon() 54 canvas.drawPosText(&charToShow, 1, pos, paint); in createRandomCharIcon() 66 SkPaint paint; in createBoxBitmap() local 67 paint.setAntiAlias(true); in createBoxBitmap() [all …]
|
/frameworks/base/libs/hwui/ |
D | RecordingCanvas.h | 79 CanvasPropertyPaint* paint) override; 81 CanvasPropertyPrimitive* radius, CanvasPropertyPaint* paint) override; 110 virtual int saveLayer(float left, float top, float right, float bottom, const SkPaint* paint, 114 SkPaint paint; in saveLayerAlpha() local 115 paint.setAlpha(alpha); in saveLayerAlpha() 116 return saveLayer(left, top, right, bottom, &paint, flags); in saveLayerAlpha() 148 virtual void drawPaint(const SkPaint& paint) override; 151 virtual void drawPoint(float x, float y, const SkPaint& paint) override { in drawPoint() argument 153 drawPoints(points, 2, paint); in drawPoint() 155 virtual void drawPoints(const float* points, int floatCount, const SkPaint& paint) override; [all …]
|
D | RecordingCanvas.cpp | 119 const SkPaint* paint, SaveFlags::Flags flags) { in saveLayer() argument 171 refPaint(paint))) >= 0) { in saveLayer() 187 refPaint(paint))) >= 0) { in saveLayer() 254 void RecordingCanvas::drawPaint(const SkPaint& paint) { in drawPaint() argument 257 drawRect(bounds.fLeft, bounds.fTop, bounds.fRight, bounds.fBottom, paint); in drawPaint() 270 void RecordingCanvas::drawPoints(const float* points, int floatCount, const SkPaint& paint) { in drawPoints() argument 271 if (CC_UNLIKELY(floatCount < 2 || paint.nothingToDraw())) return; in drawPoints() 278 refPaint(&paint), refBuffer<float>(points, floatCount), floatCount)); in drawPoints() 281 void RecordingCanvas::drawLines(const float* points, int floatCount, const SkPaint& paint) { in drawLines() argument 282 if (CC_UNLIKELY(floatCount < 4 || paint.nothingToDraw())) return; in drawLines() [all …]
|
D | SkiaCanvasProxy.cpp | 44 void SkiaCanvasProxy::onDrawPaint(const SkPaint& paint) { in onDrawPaint() argument 45 mCanvas->drawPaint(paint); in onDrawPaint() 49 const SkPaint& paint) { in onDrawPoints() argument 61 mCanvas->drawPoints(floatArray, floatCount, paint); in onDrawPoints() 65 mCanvas->drawLines(floatArray, floatCount, paint); in onDrawPoints() 69 SkPaint strokedPaint(paint); in onDrawPoints() 86 void SkiaCanvasProxy::onDrawOval(const SkRect& rect, const SkPaint& paint) { in onDrawOval() argument 87 mCanvas->drawOval(rect.fLeft, rect.fTop, rect.fRight, rect.fBottom, paint); in onDrawOval() 90 void SkiaCanvasProxy::onDrawRect(const SkRect& rect, const SkPaint& paint) { in onDrawRect() argument 91 mCanvas->drawRect(rect.fLeft, rect.fTop, rect.fRight, rect.fBottom, paint); in onDrawRect() [all …]
|
D | SkiaCanvas.cpp | 187 const SkPaint* paint, SaveFlags::Flags flags) { in saveLayer() argument 189 const SkCanvas::SaveLayerRec rec(&bounds, paint, layerFlags(flags)); in saveLayer() 442 void SkiaCanvas::drawPaint(const SkPaint& paint) { in drawPaint() argument 443 mCanvas->drawPaint(paint); in drawPaint() 450 void SkiaCanvas::drawPoints(const float* points, int count, const SkPaint& paint, in drawPoints() argument 452 if (CC_UNLIKELY(count < 2 || paint.nothingToDraw())) return; in drawPoints() 460 mCanvas->drawPoints(mode, count, pts.get(), paint); in drawPoints() 464 void SkiaCanvas::drawPoint(float x, float y, const SkPaint& paint) { in drawPoint() argument 465 mCanvas->drawPoint(x, y, paint); in drawPoint() 468 void SkiaCanvas::drawPoints(const float* points, int count, const SkPaint& paint) { in drawPoints() argument [all …]
|
D | PathCache.cpp | 74 PathDescription::PathDescription(ShapeType type, const SkPaint* paint) in PathDescription() argument 76 , join(paint->getStrokeJoin()) in PathDescription() 77 , cap(paint->getStrokeCap()) in PathDescription() 78 , style(paint->getStyle()) in PathDescription() 79 , miter(paint->getStrokeMiter()) in PathDescription() 80 , strokeWidth(paint->getStrokeWidth()) in PathDescription() 81 , pathEffect(paint->getPathEffect()) { in PathDescription() 128 static void computePathBounds(const SkPath* path, const SkPaint* paint, PathTexture* texture, in computePathBounds() argument 137 texture->offset = (int) floorf(std::max(paint->getStrokeWidth(), 1.0f) * 1.5f + 0.5f); in computePathBounds() 143 static void initPaint(SkPaint& paint) { in initPaint() argument [all …]
|
D | BakedOpDispatcher.cpp | 78 .setFillTexturePaint(*texture, textureFillFlags, firstState.op->paint, firstState.alpha) in onMergedBitmapOps() 182 .setFillTexturePaint(*texture, textureFillFlags, firstOp.paint, firstState.alpha) in onMergedPatchOps() 193 if (CC_LIKELY(!PaintUtils::hasTextShadow(op.paint))) return; in renderTextShadow() 196 fontRenderer.setFont(op.paint, SkMatrix::I()); in renderTextShadow() 200 if (!PaintUtils::getTextShadow(op.paint, &textShadow)) { in renderTextShadow() 206 op.paint, op.glyphs, op.glyphCount, textShadow.radius, op.positions); in renderTextShadow() 219 .setFillShadowTexturePaint(*texture, textShadow.color, *op.paint, textOpState.alpha) in renderTextShadow() 229 const bool expandForStroke = op.paint->getStyle() != SkPaint::kFill_Style; in renderTextShadow() 231 shadowBounds.outset(op.paint->getStrokeWidth() * 0.5f); in renderTextShadow() 237 (!transform.isPureTranslate() || op.paint->getStrokeWidth() < 1.0f))) { in renderTextShadow() [all …]
|
D | SkiaCanvas.h | 83 const SkPaint* paint, SaveFlags::Flags flags) override; 108 virtual void drawPaint(const SkPaint& paint) override; 110 virtual void drawPoint(float x, float y, const SkPaint& paint) override; 111 virtual void drawPoints(const float* points, int count, const SkPaint& paint) override; 113 const SkPaint& paint) override; 114 virtual void drawLines(const float* points, int count, const SkPaint& paint) override; 116 const SkPaint& paint) override; 117 virtual void drawRegion(const SkRegion& region, const SkPaint& paint) override; 119 float rx, float ry, const SkPaint& paint) override; 120 virtual void drawCircle(float x, float y, float radius, const SkPaint& paint) override; [all …]
|
/frameworks/base/libs/hwui/tests/unit/ |
D | RecordingCanvasTests.cpp | 130 SkPaint paint; in OPENGL_PIPELINE_TEST() local 131 paint.setStrokeWidth(20); // doesn't affect recorded bounds - would be resolved at bake time in OPENGL_PIPELINE_TEST() 133 canvas.drawLines(&points[0], 7, paint); in OPENGL_PIPELINE_TEST() 176 SkPaint paint; in OPENGL_PIPELINE_TEST() local 177 paint.setAntiAlias(true); in OPENGL_PIPELINE_TEST() 178 paint.setTextSize(20); in OPENGL_PIPELINE_TEST() 179 paint.setTextEncoding(SkPaint::kGlyphID_TextEncoding); in OPENGL_PIPELINE_TEST() 180 TestUtils::drawUtf8ToCanvas(&canvas, "test text", paint, 25, 25); in OPENGL_PIPELINE_TEST() 197 SkPaint paint; in OPENGL_PIPELINE_TEST() local 198 paint.setAntiAlias(true); in OPENGL_PIPELINE_TEST() [all …]
|
/frameworks/base/core/java/android/text/ |
D | BoringLayout.java | 39 TextPaint paint, int outerwidth, in make() argument 43 return new BoringLayout(source, paint, outerwidth, align, in make() 49 TextPaint paint, int outerwidth, in make() argument 54 return new BoringLayout(source, paint, outerwidth, align, in make() 64 public BoringLayout replaceOrMake(CharSequence source, TextPaint paint, in replaceOrMake() argument 69 replaceWith(source, paint, outerwidth, align, spacingmult, in replaceOrMake() 76 init(source, paint, outerwidth, align, spacingmult, spacingadd, in replaceOrMake() 86 public BoringLayout replaceOrMake(CharSequence source, TextPaint paint, in replaceOrMake() argument 96 replaceWith(source, paint, outerwidth, align, spacingmult, in replaceOrMake() 104 replaceWith(TextUtils.ellipsize(source, paint, ellipsizedWidth, in replaceOrMake() [all …]
|
/frameworks/opt/setupwizard/library/recyclerview/test/instrumentation/src/com/android/setupwizardlib/test/ |
D | DividerItemDecorationTest.java | 76 Paint paint = new Paint(); in testShouldDrawDividerBelowWithEitherCondition() local 77 paint.setColor(Color.RED); in testShouldDrawDividerBelowWithEitherCondition() 78 expectedCanvas.drawRect(0, 5, 20, 6, paint); in testShouldDrawDividerBelowWithEitherCondition() 79 expectedCanvas.drawRect(0, 10, 20, 11, paint); in testShouldDrawDividerBelowWithEitherCondition() 80 expectedCanvas.drawRect(0, 15, 20, 16, paint); in testShouldDrawDividerBelowWithEitherCondition() 92 paint.setColor(Color.TRANSPARENT); in testShouldDrawDividerBelowWithEitherCondition() 93 paint.setXfermode(new PorterDuffXfermode(PorterDuff.Mode.CLEAR)); in testShouldDrawDividerBelowWithEitherCondition() 94 expectedCanvas.drawRect(0, 15, 20, 16, paint); in testShouldDrawDividerBelowWithEitherCondition() 100 expectedCanvas.drawRect(0, 5, 20, 6, paint); in testShouldDrawDividerBelowWithEitherCondition() 101 expectedCanvas.drawRect(0, 10, 20, 11, paint); in testShouldDrawDividerBelowWithEitherCondition() [all …]
|