Loading libs/hwui/OpenGLRenderer.cpp +12 −0 Original line number Diff line number Diff line Loading @@ -575,6 +575,14 @@ void OpenGLRenderer::drawText(const char* text, int bytesCount, int count, return; } float scaleX = paint->getTextScaleX(); bool applyScaleX = scaleX < 0.9999f || scaleX > 1.0001f; if (applyScaleX) { save(0); translate(x - (x * scaleX), 0.0f); scale(scaleX, 1.0f); } float length = -1.0f; switch (paint->getTextAlign()) { case SkPaint::kCenter_Align: Loading Loading @@ -626,6 +634,10 @@ void OpenGLRenderer::drawText(const char* text, int bytesCount, int count, glDisableVertexAttribArray(mCurrentProgram->getAttrib("texCoords")); drawTextDecorations(text, bytesCount, length, x, y, paint); if (applyScaleX) { restore(); } } void OpenGLRenderer::drawPath(SkPath* path, SkPaint* paint) { Loading tests/HwAccelerationTest/AndroidManifest.xml +1 −2 Original line number Diff line number Diff line Loading @@ -119,8 +119,7 @@ <activity android:name="TextActivity" android:label="_Text" android:theme="@android:style/Theme.NoTitleBar" android:hardwareAccelerated="true"> android:theme="@android:style/Theme.NoTitleBar"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> Loading Loading
libs/hwui/OpenGLRenderer.cpp +12 −0 Original line number Diff line number Diff line Loading @@ -575,6 +575,14 @@ void OpenGLRenderer::drawText(const char* text, int bytesCount, int count, return; } float scaleX = paint->getTextScaleX(); bool applyScaleX = scaleX < 0.9999f || scaleX > 1.0001f; if (applyScaleX) { save(0); translate(x - (x * scaleX), 0.0f); scale(scaleX, 1.0f); } float length = -1.0f; switch (paint->getTextAlign()) { case SkPaint::kCenter_Align: Loading Loading @@ -626,6 +634,10 @@ void OpenGLRenderer::drawText(const char* text, int bytesCount, int count, glDisableVertexAttribArray(mCurrentProgram->getAttrib("texCoords")); drawTextDecorations(text, bytesCount, length, x, y, paint); if (applyScaleX) { restore(); } } void OpenGLRenderer::drawPath(SkPath* path, SkPaint* paint) { Loading
tests/HwAccelerationTest/AndroidManifest.xml +1 −2 Original line number Diff line number Diff line Loading @@ -119,8 +119,7 @@ <activity android:name="TextActivity" android:label="_Text" android:theme="@android:style/Theme.NoTitleBar" android:hardwareAccelerated="true"> android:theme="@android:style/Theme.NoTitleBar"> <intent-filter> <action android:name="android.intent.action.MAIN" /> <category android:name="android.intent.category.LAUNCHER" /> Loading