From 15c3f19a445b8df575911a16e8a6dba755a084b5 Mon Sep 17 00:00:00 2001 From: Chris Craik Date: Thu, 3 Dec 2015 12:16:56 -0800 Subject: Merged op dispatch in OpReorderer bug:22480459 Also switches std::functions to function pointers on OpReorderer, and switches AssetAtlas' entry getter methods to using pixelRef pointers, so it's clear they're the keys. Change-Id: I3040ce5ff4e178a8364e0fd7ab0876ada7d4de05 --- libs/hwui/OpenGLRenderer.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'libs/hwui/OpenGLRenderer.cpp') diff --git a/libs/hwui/OpenGLRenderer.cpp b/libs/hwui/OpenGLRenderer.cpp index e386b1cacf74..2cb32c404525 100644 --- a/libs/hwui/OpenGLRenderer.cpp +++ b/libs/hwui/OpenGLRenderer.cpp @@ -1525,7 +1525,7 @@ void OpenGLRenderer::drawBitmapMesh(const SkBitmap* bitmap, int meshWidth, int m colors = tempColors.get(); } - Texture* texture = mRenderState.assetAtlas().getEntryTexture(bitmap); + Texture* texture = mRenderState.assetAtlas().getEntryTexture(bitmap->pixelRef()); const UvMapper& mapper(getMapper(texture)); for (int32_t y = 0; y < meshHeight; y++) { @@ -2146,7 +2146,7 @@ void OpenGLRenderer::drawText(const char* text, int bytesCount, int count, float bool status; #if HWUI_NEW_OPS LOG_ALWAYS_FATAL("unsupported"); - TextDrawFunctor functor(nullptr, nullptr, x, y, pureTranslate, alpha, mode, paint); + TextDrawFunctor functor(nullptr, nullptr, nullptr, x, y, pureTranslate, alpha, mode, paint); #else TextDrawFunctor functor(this, x, y, pureTranslate, alpha, mode, paint); #endif @@ -2190,7 +2190,7 @@ void OpenGLRenderer::drawTextOnPath(const char* text, int bytesCount, int count, SkXfermode::Mode mode = PaintUtils::getXfermodeDirect(paint); #if HWUI_NEW_OPS LOG_ALWAYS_FATAL("unsupported"); - TextDrawFunctor functor(nullptr, nullptr, 0.0f, 0.0f, false, alpha, mode, paint); + TextDrawFunctor functor(nullptr, nullptr, nullptr, 0.0f, 0.0f, false, alpha, mode, paint); #else TextDrawFunctor functor(this, 0.0f, 0.0f, false, alpha, mode, paint); #endif @@ -2308,7 +2308,7 @@ void OpenGLRenderer::setDrawFilter(SkDrawFilter* filter) { /////////////////////////////////////////////////////////////////////////////// Texture* OpenGLRenderer::getTexture(const SkBitmap* bitmap) { - Texture* texture = mRenderState.assetAtlas().getEntryTexture(bitmap); + Texture* texture = mRenderState.assetAtlas().getEntryTexture(bitmap->pixelRef()); if (!texture) { return mCaches.textureCache.get(bitmap); } -- cgit v1.2.3-59-g8ed1b