diff options
Diffstat (limited to 'libs/hwui/FontRenderer.cpp')
-rw-r--r-- | libs/hwui/FontRenderer.cpp | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/libs/hwui/FontRenderer.cpp b/libs/hwui/FontRenderer.cpp index c79ae77..9664f58 100644 --- a/libs/hwui/FontRenderer.cpp +++ b/libs/hwui/FontRenderer.cpp @@ -51,17 +51,20 @@ namespace uirenderer { /////////////////////////////////////////////////////////////////////////////// void TextDrawFunctor::draw(CacheTexture& texture, bool linearFiltering) { - int textureFillFlags = static_cast<int>(texture.getFormat() == GL_ALPHA - ? TextureFillFlags::kIsAlphaMaskTexture : TextureFillFlags::kNone); + int textureFillFlags = TextureFillFlags::None; + if (texture.getFormat() == GL_ALPHA) { + textureFillFlags |= TextureFillFlags::IsAlphaMaskTexture; + } if (linearFiltering) { - textureFillFlags |= TextureFillFlags::kForceFilter; + textureFillFlags |= TextureFillFlags::ForceFilter; } - const Matrix4& transform = pureTranslate ? Matrix4::identity() : *(renderer->currentTransform()); + int transformFlags = pureTranslate + ? TransformFlags::MeshIgnoresCanvasTransform : TransformFlags::None; Glop glop; GlopBuilder(renderer->mRenderState, renderer->mCaches, &glop) .setMeshTexturedIndexedQuads(texture.mesh(), texture.meshElementCount()) .setFillTexturePaint(texture.getTexture(), textureFillFlags, paint, renderer->currentSnapshot()->alpha) - .setTransform(renderer->currentSnapshot()->getOrthoMatrix(), transform, false) + .setTransform(*(renderer->currentSnapshot()), transformFlags) .setModelViewOffsetRect(0, 0, Rect(0, 0, 0, 0)) .setRoundRectClipState(renderer->currentSnapshot()->roundRectClipState) .build(); |