aboutsummaryrefslogtreecommitdiffstats
path: root/src/ports
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'jb-mr1-release' of ↵Steve Kondik2012-11-184-196/+510
|\ | | | | | | | | | | https://android.googlesource.com/platform/external/skia into mr1-staging Change-Id: I5cf0639d6ad25f58af4d5e0e480ee063148991f8
| * Update Skia's handling of vertical text when freetype metrics are available.Derek Sollenberger2012-09-251-2/+51
| | | | | | | | | | | | | | | | This is a cherry-pick of a larger change going into upstream Skia at... https://codereview.appspot.com/6554064/ bug: 7124435 Change-Id: Id8b030afaf493741e133b592a4e08a3fd90ec2f3
| * DO NOT MERGE Han PreferenceBilly Hewlett2012-08-203-183/+210
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cherry-pick Id8c91ae0be6cad8a7ef77a0cd5803676290986c1 from master. During font initialization, create a seperate fallback list for each locale. At runtime, use the fallbacklist associated with the locale set in the paint object. Fallback files are associated with locales in fallback_fonts.xml. Multiple files can be associated with the same locale, ordering within that langauge and apart from that language in the fallback order is preserved. This changelist also includes some refactoring, notably of the functions that call getNextContext(). Change-Id: I121f0e491a522c4a8558a0066b2d8969fb8a3667
| * Merge "Fix bug 6888377: crash in GetUnitsPerEm on locale change" into jb-mr1-devRaph Levien2012-07-311-0/+7
| |\
| | * Fix bug 6888377: crash in GetUnitsPerEm on locale changeRaph Levien2012-07-301-0/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The underlying problem is that no SkScalerContext objects existed at the time shapeFontRun is called immediately after a locale change from en to ja (apparently the dumping of the cache caused all these to be deallocated), so gFTLibrary was null (and the call tio ref_ft_face assumes that it's initialized). There's a pattern for calls which might not necessarily be called from a scaler context (GetAdvancedTypefaceMetrics is one such), to explicitly check for an uninitialized library, and create one for the length of the call if so. This patch changes GetUnitsPerEm to follow this pattern. Change-Id: I19a4b6fa49fad0aeacc04bf971101aacca6bc94f
| * | Reduce embolden effect.Victoria Lease2012-07-261-1/+11
| |/ | | | | | | | | | | | | | | | | | | Certain CJK glyphs become essentially unreadable when emboldened at sizes used by common apps like News/Weather. Reducing embolden strength slightly makes these glyphs much more readable without sacrificing bold/normal weight differentiation. Bug: 6712857 Change-Id: Iec1c478171e33751be1cddbaae6a8ec30bb6cbab
| * Accurately calculate advances in general case. Fixes bug 6833339.Raph Levien2012-07-171-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The advance values computed by generateAdvance() were inconsistent with those computed by generateMetrics, because the fMatrix22 was being applied in the latter but not former case. Since fMatrix22.xx is 1.0 almost all the time (the exception is only when skew and scale are both applied), failures were rare. This patch is an alternative to ag/#/c/207887, in that they both fix the problem, but in different ways. That patch made fMatrix22.xx equal to 1.0 in almost all cases, while this one gives correct advance values for arbitrary fMatrix22 values. Change-Id: Iedfa36e884e3e3e2f078a5d4edfc82004a54e895
| * Cleanup ref counts for SkCreateTypefaceForScriptBilly Hewlett2012-07-091-10/+32
| | | | | | | | | | | | | | | | | | | | After this checkin, SkCreateTypefaceForScript refs each typeface that it creates before it returns it. Additionally, all supported harfbuzz codepoints are added to the unicode mapping array. This patch also fixes a test crash (see bug) Bug:6756432 Change-Id: Ida3276b76e745b817f9e63be54945e411516dd03
| * Revert "Revert "Use Elegant fonts for Webkit, Compact fonts for Textview""Billy Hewlett2012-06-213-131/+205
| | | | | | This reverts commit 81957ccb58db76c172e195dc3e31eba85d3e4ac9
| * Revert "Use Elegant fonts for Webkit, Compact fonts for Textview"Billy Hewlett2012-06-213-205/+131
| | | | | | This reverts commit 421654d4bf3ca50e2247a7389851d2e8f4812564
| * Use Elegant fonts for Webkit, Compact fonts for TextviewBilly Hewlett2012-06-203-131/+205
| | | | | | | | | | | | | | | | | | | | Fonts can be marked with elegant or compact in fallback_fonts.xml. Webkit uses elegant fonts, Textview uses compact fonts (the default), unmarked fonts are used by both. Bug: 6649136 Change-Id: I6ab6173c2efc50eba8fcc488c89dfdd083fb9c06
| * Merge "Fix hardcoded font path. Allow adding new font path thru Skia ↵Billy Hewlett2012-06-071-0/+135
| |\ | | | | | | | | | changes. Bug: 6609231 Change-Id: Ie37ada42e7e78ab78318f3ed76eb627bffaddb1a"
| | * Fix hardcoded font path. Allow adding new font path thru Skia changes.Billy Hewlett2012-06-041-0/+135
| | | | | | | | | | | | | | | Bug: 6609231 Change-Id: Ie37ada42e7e78ab78318f3ed76eb627bffaddb1a
* | | Merge branch 'jb-mr0-release' of ↵Steve Kondik2012-10-091-1/+11
|\ \ \ | | | | | | | | | | | | https://android.googlesource.com/platform/external/skia into aosp-merge
| * | | Reduce embolden effect. DO NOT MERGEVictoria Lease2012-07-271-1/+11
| |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cherry-pick of Iec1c478171e33751be1cddbaae6a8ec30bb6cbab Certain CJK glyphs become essentially unreadable when emboldened at sizes used by common apps like News/Weather. Reducing embolden strength slightly makes these glyphs much more readable without sacrificing bold/normal weight differentiation. Bug: 6712857 Change-Id: I1025f72b5ed07f0a65924ba58aa19511bc417eb1
* | | Squashed commit of font rendering fixes from Skia masterbungeman@google.com2012-09-121-53/+84
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When guessing at the dest, use linear space instead of color space. http://codereview.appspot.com/5732044/ --this line, and those below, will be ignored-- M src/ports/SkFontHost_FreeType.cpp git-svn-id: http://skia.googlecode.com/svn/trunk@3313 2bbb7eff-a529-9590-31e7-b0007b416f81 Don't override the user's hinting level. http://codereview.appspot.com/5792049/ git-svn-id: http://skia.googlecode.com/svn/trunk@3344 2bbb7eff-a529-9590-31e7-b0007b416f81 Use default lcd filter until we have the means to specify one. git-svn-id: http://skia.googlecode.com/svn/trunk@3358 2bbb7eff-a529-9590-31e7-b0007b416f81 Use floats for mask table for accuracy. http://codereview.appspot.com/5783099/ git-svn-id: http://skia.googlecode.com/svn/trunk@3374 2bbb7eff-a529-9590-31e7-b0007b416f81 Glyph advances from generateAdvance do not always match generateMetrics results. http://codereview.appspot.com/5841071/ git-svn-id: http://skia.googlecode.com/svn/trunk@3480 2bbb7eff-a529-9590-31e7-b0007b416f81 Temp fix for very large text sizes. http://codereview.appspot.com/5970065/ git-svn-id: http://skia.googlecode.com/svn/trunk@3569 2bbb7eff-a529-9590-31e7-b0007b416f81 Compare scalars to scalars (fixes fixed point). git-svn-id: http://skia.googlecode.com/svn/trunk@3570 2bbb7eff-a529-9590-31e7-b0007b416f81 Need to apply matrix to advance in generateAdvance (as we already were in generateMetrics) Fixes b/6833339 Expand existing unittest to detect this (we needed to set both scale and skew on the paint) git-svn-id: http://skia.googlecode.com/svn/trunk@4647 2bbb7eff-a529-9590-31e7-b0007b416f81
* | | Landing arm patch from contributor.djsollen@google.com2012-09-111-43/+33
|/ / | | | | | | | | | | http://codereview.appspot.com/5649055 git-svn-id: http://skia.googlecode.com/svn/trunk@3541 2bbb7eff-a529-9590-31e7-b0007b416f81
* | Use FreeType's "embolden", but only if face is not already bold.Victoria Lease2012-05-311-7/+7
|/ | | | | | | | | | | | | A side-effect of not knowing the actual SkTypeface used to draw text until render-time is that we cannot make decisions based upon the face's proper font metrics. As a result, attempts to draw bold text will fail when a fallback font with normal weight is selected. With this, we can feel free to enable fake bold mode even if the primary font is bold, as the extraneous fake bold bit will just get ignored at render-time if the actual font used to draw the text is bold. Bug: 6522642 Change-Id: Icdd13f6bd36a85ba374b6ed7a08b596d4c31e86f
* Cleanup pixel ref mutexes in SkiaDerek Sollenberger2012-05-141-0/+3
| | | | | | | | | | | | | | | | | | | | | | | Mutexes in pixelrefs were done very sloppily initially. The code (a) assumes all pixelref subclasses want a mutex to guard their lock/unlock virtuals, and (b) most subclasses use the same mutex for *all* of their instances, even when there is no explicit need to guard modifying one instances with another. When we try drawing bitmaps from multiple threads, we are seeing a lot of slow- down from these mutexes. This CL has two changes to try to speed things up. 1. Add setPreLocked(), for pixelrefs who never need the onLockPixels virtual to be called. This speeds up those subclasses in multithreaded environs as it avoids the mutex lock all together (e.g. SkMallocPixelRef). 2. Add setMutex() to allow a subclass to change the mutex choice. ashmem wants this, since its unflattening constructor cannot pass down the null, it needs to cleanup afterwards. see https://codereview.appspot.com/6199075/ bug: 6469917 Change-Id: I81a7cfa0b2ead5a42059697eafa58de1e7a87da2
* Fix bug 6479740: Serif font gone in tot/jb-devRaph Levien2012-05-111-13/+9
| | | | | | | addNameLocked() was failing when namelist count == 0, which was causing the fonts not to be loaded. Change-Id: Ib7c9ee96e3f0574ac3cc920ce086338d60ef7397
* Fix bugs with duplicate fallback fonts.Fabrice Di Meglio2012-05-091-172/+169
| | | | | | | | | | | | | Cleaned up the system font and fallback font list memory management using smart arrays. Cleaned up the addition and removal of font records from the font family lists. Previously, list insertion was occurring when the typeface was constructed, which obscured much of the logic. Bug #6406249 SystemUI crashed when changing Locale Change-Id: I3e33f7868f1b0a6835b91652652a457799d991d5
* Fix lock issue in Skia fonthost for Android.Jeff Brown2012-05-091-115/+150
| | | | | | | | | load_system_fonts() could potentially be called without a lock held. To make this problem less likely to happen again in the future, adopted a naming convention for all locked methods. Change-Id: I04ff5e8ad005e5c1180aae9be8c134d0d384ac2c
* Fix two font issue that are causing crashes and ANRsDerek Sollenberger2012-05-011-8/+40
| | | | | | | | | | | 1) fixes a bug where the a custom font can be loaded prior to the system fonts being loaded when Skia is first loaded. 2) fixes a bug where the lists for system fonts and fallbacks can be corrupted if the font in the configuration file is not present This should fix bug 5911298 Change-Id: I93b93e0f20d916b91438e8bbaa50a32ac5e20d88
* Reset Skia to the default font cache size that we used in ICS.Derek Sollenberger2012-04-191-2/+0
| | | | | bug: 6226962 Change-Id: I8d078faa836c1daa38810bc24aa24942cb70676f
* Fix grabbing a lock recursivelyJohn Reck2012-03-291-3/+4
| | | | | | Bug: 5383693 Change-Id: I71258a269aa1b739c655c9ef9f2cf043c9928079
* Update Freetype to support vertical text drawing.Derek Sollenberger2012-03-191-18/+105
| | | | | bug: 5558851 Change-Id: Icf85ad7846e42c248556de8fce70b3d086e5b602
* Reload fallback fonts when system language changesRussell Brenner2012-03-133-17/+222
| | | | | | | | | When the system locale is changed, skia reloads its fallback fonts using the best-matching configuration files for both framework and vendor. Bug: 5873170 Change-Id: Ie1d13cb404905ae2af05d8f20fbd857c96f39e4b
* Skia Merge (revision 3312)Derek Sollenberger2012-03-0615-347/+635
| | | | | | | This CL also includes changes made to Android's copy of Skia in their J release branch. Change-Id: Ib2baecf48004951a3ad4a1574cdc38790c814cbc
* Skia merge (revision 3022)Derek Sollenberger2012-02-0650-1578/+2730
| | | | | | | | This CL has companion changes to account for API updates in... (1) frameworks/base (2) external/webkit Change-Id: Ibb989e76e8bd24313849f9631dbef42cdef9eb7d
* Fix serialization crash for saved pages in the browser.Derek Sollenberger2011-10-141-4/+4
| | | | | | | | | The uint packing optimization was producing incorrect results in this case. Since it only saves us approx 1 byte per font there is no need to try to keep it around. bug: 5461283 Change-Id: Ic2b0154d433fa620e588b048c32064358aa94bc4
* Fix font issue for some sites using offline reading mode.Derek Sollenberger2011-10-121-25/+70
| | | | | | | | | | Custom fonts (e.g. WebFonts) were not properly serialized and resulted in unexpected behavior when a picture was saved for offline reading. This CL serializes the custom font so that we can use it later when playing the picture back. bug: 5388379 Change-Id: Ic29e9bf10ac70c46a45f3902ea93558b235fd2dd
* Read font info from system config filesChet Haase2011-07-153-50/+302
| | | | | | | | | | | | This change adds new files in /system/etc: system_fonts.xml and fallback_fonts.xml. The change also allows a third file to be added by vendors in /vendor/etc/fallback_fonts.xml. These files, loaded at boot time, mimic the logic that used to be in code, but which is now configurable through editing these files, making the system more flexible and easy to work with for us and vendors as future fonts are added to the system. Change-Id: Iac0af4924ca0454c6dde4d53058b1425200ed4b7
* Add support for multiple styles in the fallback fonts.Derek Sollenberger2011-07-121-3/+23
| | | | | bug: 4390209 Change-Id: I74774b43b3f0c903fb96911e156d9911cf55bb68
* Revert "Allow multiple styles for fallback fonts"Russell Brenner2011-07-111-69/+52
| | | | | | | | | | | | The change being reverted somehow alters the reference counting of SkTypeface instances, resulting in prematurely freed font data, which is the underlying issue with the disappearing clock on the lockscreen (http://b/5004404). This reverts commit 792a256ab723bbc4b55ba00194fe2a9195cae8c0. Bug: 5004404 Change-Id: I5c3b225f860ce2dcfc0751bded2d842b43a2d3c4
* Add null-check in remove_from_family()Russell Brenner2011-07-071-5/+9
| | | | | | | | An invalid face is not expected here, but still should not be allowed to crash. Bug: 5002710 Change-Id: Ifd11e918f968d5eef67932e514ea6754819fb7a5
* Merge "Restored null-check in SkFontHost::NextLogicalFont"Russell Brenner2011-07-071-1/+1
|\
| * Restored null-check in SkFontHost::NextLogicalFontRussell Brenner2011-07-071-1/+1
| | | | | | | | | | | | | | | | This updated line was to have been included in CL 118811, but some bad gerrit-fu caused it to go amiss. Bug: 4390209 Change-Id: Ia7b8e2849cfae3cdfbebc09a91fe26f2355f1ebb
* | Add Droid Ethiopic to fallback listRussell Brenner2011-07-061-0/+2
|/ | | | | | | Regular and Bold styles are now included in the fallback list. Bug: 4902641 Change-Id: Ia88dedb136ab00dee3ae4e4cc5552e0d3a743f13
* Allow multiple styles for fallback fontsRussell Brenner2011-07-061-52/+67
| | | | | | | | | | | | | | Fallback fonts are now recorded with their styles in the list of available fonts (which is now a doubly-linked list). NextLogicalFont() has a new parameter, providing the originally requested fontID, from which we can determine the requested style, which we then pass to find_best_face() to pick from the available styles. SkFontHost::NextLogicalFont() no longer assumes that origFontID is valid (see http://b/issue?id=4980240). Bug: 4390209 Change-Id: I2e600f7eb75d207e95bae8cc9ed8379ade396058
* Revert "Allow multiple styles for fallback fonts"Russell Brenner2011-06-301-67/+52
| | | | | | | This reverts commit da49dc51598fa6f5ffae857f73bb8be12caf216e. Bug: 4980240 Change-Id: Ib0470d458db12821a89ce019d395152d06296305
* Allow multiple styles for fallback fontsRussell Brenner2011-06-291-52/+67
| | | | | | | | | | | Fallback fonts are now recorded with their styles in the list of available fonts (which is now a doubly-linked list). NextLogicalFont() has a new parameter, providing the originally requested fontID, from which we can determine the requested style, which we then pass to find_best_face() to pick from the available styles. Bug: 4390209 Change-Id: I0c45fd7cefd00df3805bd75df77c519f6d922fe7
* Skia Merge (revision 1562)Derek Sollenberger2011-06-238-13/+12
| | | | Change-Id: Ief005abc9eb741ccf5efec3d1f29fe2dfc23103d
* Skia Merge (revision 1510)Derek Sollenberger2011-06-074-31/+364
| | | | | | | | | | | | | | | | | | This CL includes bug fixes and closely mirrors the version of Skia used in Chrome M13, which is likely to be our baseline for ICS. The CL also adds source files for the SampleApp which will allow us to execute basic skia tests. The SampleApp requires the utils/views directory in order to run. Finally, we have included the PDF backend for Skia in order to experiment with using it to generate PDF files for certain applications. Note: The SampleApp and PDF code are not built as part of libskia. Change-Id: I1895ccfbd8074e25f19148cc7bd1b4af571fb307
* Skia Merge (revision 1327)Derek Sollenberger2011-05-175-459/+441
| | | | Change-Id: I46f41274d07a3d7bac4728f8841c7f5e89dc9181
* Skia Merge (revision 1116)Derek Sollenberger2011-04-148-159/+210
| | | | | | There is a companion change in external/webkit Change-Id: I1c4110e7520bbef3f4e5f9551adb7ec79ac1e3ed
* Skia Merge (revision 950)Derek Sollenberger2011-03-173-856/+984
| | | | | | | This merge will allow us to now import the sample app infrastructure in skia to do on device measurements. Change-Id: Idcab6b1524f371521717cde61a6e98a12d897e6b
* Skia Merge (revision 922)Derek Sollenberger2011-03-145-140/+235
| | | | Change-Id: I7ed57d10905d8bad6486a4d7410165eec1cc2b4f
* Skia Merge (revision 842)Derek Sollenberger2011-02-244-51/+101
| | | | | | | This merge picks up the fixed width font updates and improved blur code from the Skia repository. Change-Id: Iad2301a353c31da27ca214527cf4ed8f24641749
* Skia Merge (revision 808)Derek Sollenberger2011-02-2323-95/+5746
| | | | | | | | | | This merge has companion changes in the following projects in order to be compatible with changes to skia interfaces and practices: 1. /frameworks/base 2. /external/webkit Change-Id: I54092971305579e81a8fdb27bbe04ec340792e3b
* am d178ac36: am 956f20ce: Use MOTOYA Japanese fonts (MTLmr3m.ttf, ↵satok2010-09-241-0/+2
|\ | | | | | | | | | | | | | | | | MTLc3m.ttf) for Japanese fonts Merge commit 'd178ac36bda038176a99943e2b50a2f0ae3ecc5c' * commit 'd178ac36bda038176a99943e2b50a2f0ae3ecc5c': Use MOTOYA Japanese fonts (MTLmr3m.ttf, MTLc3m.ttf) for Japanese fonts