summaryrefslogtreecommitdiffstats
path: root/src/base/ftbitmap.c
diff options
context:
space:
mode:
authorVictoria Lease <violets@google.com>2013-12-12 09:12:18 -0800
committerVictoria Lease <violets@google.com>2013-12-12 09:23:45 -0800
commitec0bab5697bb31ba980810145f62e3799946ec60 (patch)
treebaa7eea792c50b86250831c67a9f2a6eb5be6a91 /src/base/ftbitmap.c
parent899c67b6cfcd2010784fbf08c5415af16c526e0c (diff)
downloadandroid_external_freetype-ec0bab5697bb31ba980810145f62e3799946ec60.tar.gz
android_external_freetype-ec0bab5697bb31ba980810145f62e3799946ec60.tar.bz2
android_external_freetype-ec0bab5697bb31ba980810145f62e3799946ec60.zip
Update freetype to 8bb09b0fe4d9747bcf452a777cabed7d7ef435e2
Integrated patches from freetype2 git repository, up to hashval 8bb09b0fe4d9747bcf452a777cabed7d7ef435e2, which is post-2.5.2. Most recent commit message from freetype git: [truetype] Simplify logic of rendering modes. Noteworthy patches included: [sfnt] Fix handling of embedded bitmap strikes. [truetype] Improve handling of buggy embedded bitmap strikes. Add FT_FACE_FLAG_COLOR and FT_HAS_COLOR. Change-Id: I4a22d96c9443c7a587475ca0a9c684843e144b18
Diffstat (limited to 'src/base/ftbitmap.c')
-rw-r--r--src/base/ftbitmap.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/base/ftbitmap.c b/src/base/ftbitmap.c
index 975818e..182b1cc 100644
--- a/src/base/ftbitmap.c
+++ b/src/base/ftbitmap.c
@@ -385,6 +385,10 @@
FT_Long l;
+ /* Short-circuit transparent color to avoid div-by-zero. */
+ if ( !a )
+ return 0;
+
/*
* Luminosity for sRGB is defined using ~0.2126,0.7152,0.0722
* coefficients for RGB channels *on the linear colors*.