Loading libs/hwui/OpenGLRenderer.cpp +7 −5 Original line number Diff line number Diff line Loading @@ -724,12 +724,14 @@ void OpenGLRenderer::drawPatch(SkBitmap* bitmap, const int32_t* xDivs, const int const Patch* mesh = mCaches.patchCache.get(bitmap->width(), bitmap->height(), right - left, bottom - top, xDivs, yDivs, colors, width, height, numColors); if (mesh) { // Specify right and bottom as +1.0f from left/top to prevent scaling since the // patch mesh already defines the final size drawTextureMesh(left, top, left + 1.0f, top + 1.0f, texture->id, alpha / 255.0f, mode, texture->blend, &mesh->vertices[0].position[0], &mesh->vertices[0].texture[0], GL_TRIANGLES, mesh->verticesCount); } } void OpenGLRenderer::drawLines(float* points, int count, const SkPaint* paint) { if (mSnapshot->invisible) return; Loading libs/hwui/PatchCache.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -67,6 +67,11 @@ Patch* PatchCache::get(const float bitmapWidth, const float bitmapHeight, } } // If the 9patch is made of only transparent quads if (transparentQuads == (width + 1) * (height + 1)) { return NULL; } const PatchDescription description(bitmapWidth, bitmapHeight, pixelWidth, pixelHeight, width, height, transparentQuads, colorKey); Loading libs/hwui/FontRenderer.cpp +2 −2 File changed.Contains only whitespace changes. Show changes Loading
libs/hwui/OpenGLRenderer.cpp +7 −5 Original line number Diff line number Diff line Loading @@ -724,12 +724,14 @@ void OpenGLRenderer::drawPatch(SkBitmap* bitmap, const int32_t* xDivs, const int const Patch* mesh = mCaches.patchCache.get(bitmap->width(), bitmap->height(), right - left, bottom - top, xDivs, yDivs, colors, width, height, numColors); if (mesh) { // Specify right and bottom as +1.0f from left/top to prevent scaling since the // patch mesh already defines the final size drawTextureMesh(left, top, left + 1.0f, top + 1.0f, texture->id, alpha / 255.0f, mode, texture->blend, &mesh->vertices[0].position[0], &mesh->vertices[0].texture[0], GL_TRIANGLES, mesh->verticesCount); } } void OpenGLRenderer::drawLines(float* points, int count, const SkPaint* paint) { if (mSnapshot->invisible) return; Loading
libs/hwui/PatchCache.cpp +5 −0 Original line number Diff line number Diff line Loading @@ -67,6 +67,11 @@ Patch* PatchCache::get(const float bitmapWidth, const float bitmapHeight, } } // If the 9patch is made of only transparent quads if (transparentQuads == (width + 1) * (height + 1)) { return NULL; } const PatchDescription description(bitmapWidth, bitmapHeight, pixelWidth, pixelHeight, width, height, transparentQuads, colorKey); Loading