diff options
Diffstat (limited to 'libs/hwui')
-rw-r--r-- | libs/hwui/OpenGLRenderer.cpp | 9 | ||||
-rw-r--r-- | libs/hwui/PathCache.cpp | 4 |
2 files changed, 10 insertions, 3 deletions
diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index 7561a47..0b5262d 100644 --- a/libs/hwui/OpenGLRenderer.cpp +++ b/libs/hwui/OpenGLRenderer.cpp @@ -939,7 +939,11 @@ void OpenGLRenderer::skew(float sx, float sy) { } void OpenGLRenderer::setMatrix(SkMatrix* matrix) { - mSnapshot->transform->load(*matrix); + if (matrix) { + mSnapshot->transform->load(*matrix); + } else { + mSnapshot->transform->loadIdentity(); + } } void OpenGLRenderer::getMatrix(SkMatrix* matrix) { @@ -2093,6 +2097,9 @@ void OpenGLRenderer::drawText(const char* text, int bytesCount, int count, } FontRenderer& fontRenderer = mCaches.fontRenderer.getFontRenderer(paint); +#if DEBUG_GLYPHS + LOGD("OpenGLRenderer drawText() with FontID=%d", SkTypeface::UniqueID(paint->getTypeface())); +#endif fontRenderer.setFont(paint, SkTypeface::UniqueID(paint->getTypeface()), paint->getTextSize()); diff --git a/libs/hwui/PathCache.cpp b/libs/hwui/PathCache.cpp index 367c627..e893f7a 100644 --- a/libs/hwui/PathCache.cpp +++ b/libs/hwui/PathCache.cpp @@ -34,8 +34,8 @@ PathCache::PathCache(): ShapeCache<PathCacheEntry>("path", void PathCache::remove(SkPath* path) { // TODO: Linear search... - Vector<uint32_t> pathsToRemove; - for (uint32_t i = 0; i < mCache.size(); i++) { + Vector<size_t> pathsToRemove; + for (size_t i = 0; i < mCache.size(); i++) { if (mCache.getKeyAt(i).path == path) { pathsToRemove.push(i); removeTexture(mCache.getValueAt(i)); |