Loading libs/hwui/SkiaCanvas.h +0 −1 Original line number Diff line number Diff line Loading @@ -136,7 +136,6 @@ public: const Paint* paint) override; virtual double drawAnimatedImage(AnimatedImageDrawable* imgDrawable) override; virtual bool drawTextAbsolutePos() const override { return true; } virtual void drawVectorDrawable(VectorDrawableRoot* vectorDrawable) override; virtual void drawRoundRect(uirenderer::CanvasPropertyPrimitive* left, Loading libs/hwui/hwui/Canvas.cpp +4 −15 Original line number Diff line number Diff line Loading @@ -95,19 +95,11 @@ public: void operator()(size_t start, size_t end) { auto glyphFunc = [&](uint16_t* text, float* positions) { if (canvas->drawTextAbsolutePos()) { for (size_t i = start, textIndex = 0, posIndex = 0; i < end; i++) { text[textIndex++] = layout.getGlyphId(i); positions[posIndex++] = x + layout.getX(i); positions[posIndex++] = y + layout.getY(i); } } else { for (size_t i = start, textIndex = 0, posIndex = 0; i < end; i++) { text[textIndex++] = layout.getGlyphId(i); positions[posIndex++] = layout.getX(i); positions[posIndex++] = layout.getY(i); } } }; size_t glyphCount = end - start; Loading Loading @@ -166,9 +158,6 @@ void Canvas::drawText(const uint16_t* text, int textSize, int start, int count, minikin::MinikinRect bounds; layout.getBounds(&bounds); if (!drawTextAbsolutePos()) { bounds.offset(x, y); } // Set align to left for drawing, as we don't want individual // glyphs centered or right-aligned; the offset above takes Loading libs/hwui/hwui/Canvas.h +0 −9 Original line number Diff line number Diff line Loading @@ -252,15 +252,6 @@ public: virtual double drawAnimatedImage(AnimatedImageDrawable* imgDrawable) = 0; virtual void drawPicture(const SkPicture& picture) = 0; /** * Specifies if the positions passed to ::drawText are absolute or relative * to the (x,y) value provided. * * If true the (x,y) values are ignored. Otherwise, those (x,y) values need * to be added to each glyph's position to get its absolute position. */ virtual bool drawTextAbsolutePos() const = 0; /** * Draws a VectorDrawable onto the canvas. */ Loading Loading
libs/hwui/SkiaCanvas.h +0 −1 Original line number Diff line number Diff line Loading @@ -136,7 +136,6 @@ public: const Paint* paint) override; virtual double drawAnimatedImage(AnimatedImageDrawable* imgDrawable) override; virtual bool drawTextAbsolutePos() const override { return true; } virtual void drawVectorDrawable(VectorDrawableRoot* vectorDrawable) override; virtual void drawRoundRect(uirenderer::CanvasPropertyPrimitive* left, Loading
libs/hwui/hwui/Canvas.cpp +4 −15 Original line number Diff line number Diff line Loading @@ -95,19 +95,11 @@ public: void operator()(size_t start, size_t end) { auto glyphFunc = [&](uint16_t* text, float* positions) { if (canvas->drawTextAbsolutePos()) { for (size_t i = start, textIndex = 0, posIndex = 0; i < end; i++) { text[textIndex++] = layout.getGlyphId(i); positions[posIndex++] = x + layout.getX(i); positions[posIndex++] = y + layout.getY(i); } } else { for (size_t i = start, textIndex = 0, posIndex = 0; i < end; i++) { text[textIndex++] = layout.getGlyphId(i); positions[posIndex++] = layout.getX(i); positions[posIndex++] = layout.getY(i); } } }; size_t glyphCount = end - start; Loading Loading @@ -166,9 +158,6 @@ void Canvas::drawText(const uint16_t* text, int textSize, int start, int count, minikin::MinikinRect bounds; layout.getBounds(&bounds); if (!drawTextAbsolutePos()) { bounds.offset(x, y); } // Set align to left for drawing, as we don't want individual // glyphs centered or right-aligned; the offset above takes Loading
libs/hwui/hwui/Canvas.h +0 −9 Original line number Diff line number Diff line Loading @@ -252,15 +252,6 @@ public: virtual double drawAnimatedImage(AnimatedImageDrawable* imgDrawable) = 0; virtual void drawPicture(const SkPicture& picture) = 0; /** * Specifies if the positions passed to ::drawText are absolute or relative * to the (x,y) value provided. * * If true the (x,y) values are ignored. Otherwise, those (x,y) values need * to be added to each glyph's position to get its absolute position. */ virtual bool drawTextAbsolutePos() const = 0; /** * Draws a VectorDrawable onto the canvas. */ Loading