From 8f9a9f61ab793d9387a5942b307e74324704893b Mon Sep 17 00:00:00 2001 From: Romain Guy Date: Mon, 5 Dec 2011 11:53:26 -0800 Subject: Clip text correctly Bug #5706056 A newly introduced optimization relied on the display list renderer to properly measure text to perform fast clipping. The paint used to measure text needs to have AA and glyph id encoding set to return the correct results. Unfortunately these properties were set by the GL renderer and not by the display list renderer. This change simply sets the properties in the display list renderer instead. This change also improves the error message printed out when the application attempts to use a bitmap larger than the max texture size. Change-Id: I4d84e1c7d194aed9ad476f69434eaa2c8f3836a8 --- libs/hwui/TextureCache.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'libs/hwui/TextureCache.cpp') diff --git a/libs/hwui/TextureCache.cpp b/libs/hwui/TextureCache.cpp index 711277a56d8a..60f4ca19d9b4 100644 --- a/libs/hwui/TextureCache.cpp +++ b/libs/hwui/TextureCache.cpp @@ -125,7 +125,8 @@ Texture* TextureCache::get(SkBitmap* bitmap) { if (!texture) { if (bitmap->width() > mMaxTextureSize || bitmap->height() > mMaxTextureSize) { - LOGW("Bitmap too large to be uploaded into a texture"); + LOGW("Bitmap too large to be uploaded into a texture (%dx%d, max=%dx%d)", + bitmap->width(), bitmap->height(), mMaxTextureSize, mMaxTextureSize); return NULL; } -- cgit v1.2.3-59-g8ed1b