Home
last modified time | relevance | path

Searched refs:glyphs (Results 1 – 16 of 16) sorted by relevance

/frameworks/base/libs/hwui/
DSkiaCanvasProxy.cpp280 GlyphIDConverter glyphs(text, byteLength, origPaint); in onDrawText() local
283 std::unique_ptr<SkScalar[]> glyphWidths(new SkScalar[glyphs.count]); in onDrawText()
284 glyphs.paint.getTextWidths(glyphs.glyphIDs, glyphs.count << 1, glyphWidths.get()); in onDrawText()
290 glyphs.paint.measureText(glyphs.glyphIDs, glyphs.count << 1, &bounds); in onDrawText()
293 if (glyphs.paint.getTextAlign() != SkPaint::kLeft_Align) { in onDrawText()
295 for (int i = 0; i < glyphs.count; i++) { in onDrawText()
298 if (glyphs.paint.getTextAlign() == SkPaint::kCenter_Align) { in onDrawText()
301 if (glyphs.paint.isVerticalText()) { in onDrawText()
319 memcpy(text, glyphs.glyphIDs, glyphs.count*sizeof(uint16_t)); in onDrawText()
325 if (glyphs.paint.isVerticalText()) { in onDrawText()
[all …]
DTextDropShadowCache.cpp40 if (glyphs) { in hash()
42 hash, reinterpret_cast<const uint16_t*>(glyphs), glyphCount); in hash()
74 if (lhs.glyphs != rhs.glyphs) { in compare()
75 if (!lhs.glyphs) return -1; in compare()
76 if (!rhs.glyphs) return +1; in compare()
78 deltaInt = memcmp(lhs.glyphs, rhs.glyphs, lhs.glyphCount * sizeof(glyph_t)); in compare()
148 ShadowTexture* TextDropShadowCache::get(const SkPaint* paint, const glyph_t* glyphs, int numGlyphs, in get() argument
150 ShadowText entry(paint, radius, numGlyphs, glyphs, positions); in get()
156 FontRenderer::DropShadow shadow = mRenderer->renderDropShadow(&paintCopy, glyphs, numGlyphs, in get()
DTextDropShadowCache.h38 flags(0), italicStyle(0.0f), scaleX(0), glyphs(nullptr), positions(nullptr) { in ShadowText()
51 , glyphs(srcGlyphs) in ShadowText()
71 str.setTo(reinterpret_cast<const char16_t*>(glyphs), glyphCount); in copyTextLocally()
72 glyphs = reinterpret_cast<const glyph_t*>(str.string()); in copyTextLocally()
87 const glyph_t* glyphs; member
DRecordedOp.h385 TextOp(BASE_PARAMS, const glyph_t* glyphs, const float* positions, int glyphCount, in TextOp()
388 , glyphs(glyphs) in TextOp()
393 const glyph_t* glyphs; member
403 const glyph_t* glyphs, int glyphCount, const SkPath* path, float hOffset, float vOffset) in TextOnPathOp()
405 , glyphs(glyphs) in TextOnPathOp()
410 const glyph_t* glyphs; member
DFontRenderer.h94 … void precache(const SkPaint* paint, const glyph_t* glyphs, int numGlyphs, const SkMatrix& matrix);
97 bool renderPosText(const SkPaint* paint, const Rect* clip, const glyph_t* glyphs,
101 bool renderTextOnPath(const SkPaint* paint, const Rect* clip, const glyph_t* glyphs,
115 DropShadow renderDropShadow(const SkPaint* paint, const glyph_t *glyphs, int numGlyphs,
DFontRenderer.cpp560 FontRenderer::DropShadow FontRenderer::renderDropShadow(const SkPaint* paint, const glyph_t *glyphs, in renderDropShadow() argument
580 mCurrentFont->measure(paint, glyphs, numGlyphs, &bounds, positions); in renderDropShadow()
607 mCurrentFont->render(paint, glyphs, numGlyphs, penX, penY, in renderDropShadow()
641 void FontRenderer::precache(const SkPaint* paint, const glyph_t* glyphs, int numGlyphs, in precache() argument
644 font->precache(paint, glyphs, numGlyphs); in precache()
651 bool FontRenderer::renderPosText(const SkPaint* paint, const Rect* clip, const glyph_t* glyphs, in renderPosText() argument
660 mCurrentFont->render(paint, glyphs, numGlyphs, x, y, positions); in renderPosText()
669 bool FontRenderer::renderTextOnPath(const SkPaint* paint, const Rect* clip, const glyph_t* glyphs, in renderTextOnPath() argument
678 mCurrentFont->render(paint, glyphs, numGlyphs, path, hOffset, vOffset); in renderTextOnPath()
DRecordingCanvas.cpp547 uint16_t* glyphs = (glyph_t*)alloc().alloc<glyph_t>(glyphCount * sizeof(glyph_t)); in drawGlyphs() local
549 glyphFunc(glyphs, positions); in drawGlyphs()
556 refPaint(&paint), glyphs, positions, glyphCount, x, y)); in drawGlyphs()
562 uint16_t glyphs[1]; in drawLayoutOnPath() local
564 glyphs[0] = layout.getGlyphId(i); in drawLayoutOnPath()
568 const uint16_t* tempGlyphs = refBuffer<glyph_t>(glyphs, 1); in drawLayoutOnPath()
DSkiaCanvas.cpp683 glyphFunc(buffer.glyphs, buffer.pos); in drawGlyphs()
695 uint16_t* glyphs = (uint16_t*)(xform + N); in drawLayoutOnPath() local
699 glyphs[i - start] = layout.getGlyphId(i); in drawLayoutOnPath()
715 this->asSkCanvas()->drawTextRSXform(glyphs, sizeof(uint16_t) * N, xform, nullptr, paint); in drawLayoutOnPath()
DFrameBuilder.cpp771 fontRenderer.precache(op.paint, op.glyphs, op.glyphCount, SkMatrix::I()); in deferTextOp()
776 fontRenderer.precache(op.paint, op.glyphs, op.glyphCount, SkMatrix::MakeScale( in deferTextOp()
788 op.paint, op.glyphs, op.glyphCount, SkMatrix::I()); in deferTextOnPathOp()
DBakedOpDispatcher.cpp206 op.paint, op.glyphs, op.glyphCount, textShadow.radius, op.positions); in renderTextShadow()
303 fontRenderer.renderPosText(op.paint, localOpClip, op.glyphs, op.glyphCount, x, y, in renderText()
754 if (fontRenderer.renderTextOnPath(op.paint, &localSpaceClip, op.glyphs, op.glyphCount, in onTextOnPathOp()
/frameworks/base/libs/hwui/tests/microbench/
DFontBench.cpp36 std::vector<glyph_t> glyphs; in BM_FontRenderer_precache_cachehits() local
41 &glyphs, &positions, &totalAdvance, &bounds); in BM_FontRenderer_precache_cachehits()
43 fontRenderer.precache(&paint, glyphs.data(), glyphs.size(), SkMatrix::I()); in BM_FontRenderer_precache_cachehits()
46 fontRenderer.precache(&paint, glyphs.data(), glyphs.size(), SkMatrix::I()); in BM_FontRenderer_precache_cachehits()
/frameworks/base/libs/hwui/tests/unit/
DTextDropShadowCacheTests.cpp39 std::vector<glyph_t> glyphs; in RENDERTHREAD_OPENGL_PIPELINE_TEST() local
44 &glyphs, &positions, &totalAdvance, &bounds); in RENDERTHREAD_OPENGL_PIPELINE_TEST()
47 ShadowTexture* texture = cache.get(&paint, glyphs.data(), glyphs.size(), 10, positions.data()); in RENDERTHREAD_OPENGL_PIPELINE_TEST()
DFontRendererTests.cpp39 std::vector<glyph_t> glyphs; in RENDERTHREAD_OPENGL_PIPELINE_TEST() local
44 &glyphs, &positions, &totalAdvance, &bounds); in RENDERTHREAD_OPENGL_PIPELINE_TEST()
47 auto result = fontRenderer.renderDropShadow(&paint, glyphs.data(), glyphs.size(), in RENDERTHREAD_OPENGL_PIPELINE_TEST()
/frameworks/base/libs/hwui/font/
DFont.h86 void render(const SkPaint* paint, const glyph_t* glyphs,
89 void render(const SkPaint* paint, const glyph_t* glyphs,
115 void precache(const SkPaint* paint, const glyph_t* glyphs, int numGlyphs);
117 void render(const SkPaint* paint, const glyph_t* glyphs,
121 void measure(const SkPaint* paint, const glyph_t* glyphs,
DFont.cpp294 void Font::render(const SkPaint* paint, const glyph_t* glyphs, in render() argument
296 render(paint, glyphs, numGlyphs, x, y, FRAMEBUFFER, nullptr, in render()
300 void Font::render(const SkPaint* paint, const glyph_t* glyphs, int numGlyphs, in render() argument
302 if (numGlyphs == 0 || glyphs == nullptr) { in render()
318 float textWidth = SkScalarToFloat(paint->measureText(glyphs, numGlyphs * 2)); in render()
328 glyph_t glyph = *(glyphs++); in render()
348 void Font::measure(const SkPaint* paint, const glyph_t* glyphs, in measure() argument
355 render(paint, glyphs, numGlyphs, 0, 0, MEASURE, nullptr, 0, 0, bounds, positions); in measure()
358 void Font::precache(const SkPaint* paint, const glyph_t* glyphs, int numGlyphs) { in precache() argument
359 if (numGlyphs == 0 || glyphs == nullptr) { in precache()
[all …]
/frameworks/base/core/jni/android/graphics/
DPaint.cpp281 Paint* paint, uint16_t* glyphs, SkPoint* pos) in GetTextFunctor() argument
282 : layout(layout), path(path), x(x), y(y), paint(paint), glyphs(glyphs), pos(pos) { in GetTextFunctor()
287 glyphs[i] = layout.getGlyphId(i); in operator ()()
292 paint->getPosTextPath(glyphs + start, (end - start) << 1, pos + start, path); in operator ()()
294 paint->getPosTextPath(glyphs + start, (end - start) << 1, pos + start, &tmpPath); in operator ()()
304 uint16_t* glyphs; member in android::PaintGlue::GetTextFunctor
314 uint16_t* glyphs = new uint16_t[nGlyphs]; in getTextPath() local
321 GetTextFunctor f(layout, path, x, y, paint, glyphs, pos); in getTextPath()
324 delete[] glyphs; in getTextPath()