aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ports
Commit message (Collapse)AuthorAge
...
* Make SkAdvancedTypefaceMetrics private.Gravatar reed2015-05-12
| | | | Review URL: https://codereview.chromium.org/1129283003
* stop calling SkScalarDivGravatar reed2015-05-12
| | | | | | | BUG=skia: TBR= Review URL: https://codereview.chromium.org/1135053002
* Trim whitespace from parsed filename in Android v21.Gravatar bungeman2015-05-08
| | | | | | | | | | | | | | | | | | | | | The entire text content of the 'font' element is currently used as the file name. This wasn't an issue in earlier versions, as the 'file' element was dedicated to only containing the file name. The new 'font' element also contains a number of attributes and potentially other tags. This means that a 'font' element can become quite long, making it desireable to be able to split it across multiple lines. However, splitting the 'font' element across multiple lines is currently difficult and awkward as any whitespace outside of tags will be considered part of the file name. This change means that any leading or trailing whitespace will not be considered part of the file name. This only applies to v21 and later files, so while this restricts font file names from beginning and ending with whitespace, it is unlikely to break any users in practice. It is probably also undesireable to have font files with names that begin or end with whitespace in any event. Review URL: https://codereview.chromium.org/1125413003
* remove dead code behind BOOL_ONGETINFOGravatar reed2015-05-05
| | | | | | | | | need this to land in chrome first https://codereview.chromium.org/1125573002 BUG=skia: TBR= Review URL: https://codereview.chromium.org/1123473004
* Fix typeface ids on Mac.Gravatar bungeman2015-05-04
| | | | | | | | | | The current typeface ids with CoreText rely on ATS (which causes memory use issues) or font data (which is unreliable, and will not work with axes and synthetics). This changes the code so that stream fonts never end up in the cache and always get a unique id, and system fonts will be given an id as they are used. Review URL: https://codereview.chromium.org/1125763002
* SkTime: return timezone information; format in ISO-8601Gravatar halcanary2015-05-01
| | | | | | | | | | | Motivation: PDF/A metadata will need the creation date embedded in it. Also, GetDateTime returns local time in Win32. This now behaves the same as on Unix systems. BUG=skia:3110 Review URL: https://codereview.chromium.org/1109593002
* Check for NULL familyName in SkFontMgr_fontconfig.Gravatar bungeman2015-04-29
| | | | | | | If the familyName is NULL, don't bother spending time trying to add it to the FcPattern. Review URL: https://codereview.chromium.org/1115073002
* FontConfig character/lang match requires weak family.Gravatar bungeman2015-04-29
| | | | | | | | | In FontConfig the normal priority order of matches is character, family, language; however family can be marked as weak which changes the order to character, language, family. This is what is desired in matchFamilyStyleCharacter. Review URL: https://codereview.chromium.org/1118553002
* Remove system call in DW for default font.Gravatar bungeman2015-04-29
| | | | | | | | | | | The last user of the GDI default font in DW is onMatchFamilyStyleCharacter and it doesn't appear to actually need to use it. This change removes a system call, making things a bit faster, as well as eliminating a call blocked in the sandbox. BUG=chromium:459056 Review URL: https://codereview.chromium.org/1107283003
* Cleanup: Remove unnecessary double-semicolons.Gravatar tfarina2015-04-27
| | | | | | | | | | | | | | | The entries were found by the following command line: $ find . -regex ".*\.[cChH]\(pp\)?" | xargs git grep -e ';;' --and --not -e 'for *(.*;;' Which is a combination of http://stackoverflow.com/a/3858879 and http://gitster.livejournal.com/27674.html BUG=None R=mtklein@google.com Review URL: https://codereview.chromium.org/1088763005
* Regularize lmp::XXX_element_handler.Gravatar bungeman2015-04-20
| | | | | | | | | | | | | | This makes all non-XMLCALL element_handler functions uniform by making their signature void XXX_element_handler(FamilyData* self, const char** attributes) This makes the code somewhat easier to follow, as it makes explicit which functions are actually logically methods of FamilyData (start with 'FamilyData* self') and which are called directly by expat (start with 'void* data'). Review URL: https://codereview.chromium.org/1086943007
* Regularize informative messages in Android font parser.Gravatar bungeman2015-04-20
| | | | | | | | The Android font parser prints a number of helpful messages when something seems amiss in the configuration file. Give all of these messages a common and more informative format. Review URL: https://codereview.chromium.org/1096063003
* Respect declared font style on Android.Gravatar bungeman2015-04-17
| | | | | | | | | | | | | | | | | | | | Previously the normal/italic style bit was obtained from scanning the font file. With the new format the style may be stated explicitly, and this explicit value in the configuration file should override any information obtained from the font data itself. This change allows the font element's style attribute to override the font's style, but retains the default 'auto' setting for backwards compatibility. Repecting the style bit may become more important with variation fonts, because it will be up to the configuration writer to determine what values of the 'slnt' variation should be considered 'normal' or 'italic'. DOCS_PREVIEW= https://skia.org/?cl=1092093002 Committed: https://skia.googlesource.com/skia/+/673e902c9b9982a167f54f1cc175d8d9cab8bcaf Review URL: https://codereview.chromium.org/1092093002
* Revert of Respect declared font style on Android. (patchset #6 id:100001 of ↵Gravatar jcgregorio2015-04-17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/1092093002/) Reason for revert: Failed on the compile bots. Original issue's description: > Respect declared font style on Android. > > Previously the normal/italic style bit was obtained from scanning the > font file. With the new format the style may be stated explicitly, and > this explicit value in the configuration file should override any > information obtained from the font data itself. > > This change allows the font element's style attribute to override the > font's style, but retains the default 'auto' setting for backwards > compatibility. Repecting the style bit may become more important with > variation fonts, because it will be up to the configuration writer to > determine what values of the 'slnt' variation should be considered > 'normal' or 'italic'. > > DOCS_PREVIEW= https://skia.org/?cl=1092093002 > > Committed: https://skia.googlesource.com/skia/+/673e902c9b9982a167f54f1cc175d8d9cab8bcaf TBR=mtklein@google.com,tomhudson@google.com,scroggo@google.com,bungeman@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true Review URL: https://codereview.chromium.org/1082173004
* Respect declared font style on Android.Gravatar bungeman2015-04-17
| | | | | | | | | | | | | | | | | | Previously the normal/italic style bit was obtained from scanning the font file. With the new format the style may be stated explicitly, and this explicit value in the configuration file should override any information obtained from the font data itself. This change allows the font element's style attribute to override the font's style, but retains the default 'auto' setting for backwards compatibility. Repecting the style bit may become more important with variation fonts, because it will be up to the configuration writer to determine what values of the 'slnt' variation should be considered 'normal' or 'italic'. DOCS_PREVIEW= https://skia.org/?cl=1092093002 Review URL: https://codereview.chromium.org/1092093002
* Remove filename from SkFontDescriptor.Gravatar bungeman2015-04-17
| | | | | | | | | | No one actually uses it, so remove it. Keep the string id for backward compatibility. TBR=reed@google.com This doesn't change any public API. Review URL: https://codereview.chromium.org/1057413005
* Add PS 'all' weight name to scanFont.Gravatar bungeman2015-04-16
| | | | | | | | Multiple Master fonts often list their weight as 'all'. However, they usually default to normal weight. State explicitly that we know about this weight string. Review URL: https://codereview.chromium.org/1092793002
* Ammend font table data experiment on Mac.Gravatar bungeman2015-04-10
| | | | | | | | | | | Calling CGFontCopyTableForTag did not affect the runtime results, so try to actually access the data to see if that makes a difference. TBR=reed1 This is a test change, allow data to be collected. Review URL: https://codereview.chromium.org/1076183004
* Attempted mitigation of font tables released early.Gravatar bungeman2015-04-07
| | | | | | | | | On Mac, it appears that sometimes fonts created from data have their table data used after the table data copy is freed. This appears to be most common with 'sbix' fonts for some reason, so pin that table while in use. Review URL: https://codereview.chromium.org/1061123002
* Add option to embed font data into executable.Gravatar bungeman2015-03-30
| | | | | | | | Some tools would like to be built with all resources embedded. This change makes it possible to build a font manager which uses font data embedded into the executable. Review URL: https://codereview.chromium.org/1015723004
* C++11 override should now be supported by all of {bots,Chrome,Android,Mozilla}Gravatar mtklein2015-03-25
| | | | | | | | | NOPRESUBMIT=true BUG=skia: DOCS_PREVIEW= https://skia.org/?cl=1037793002 Review URL: https://codereview.chromium.org/1037793002
* Add font "index" to lmp parser.Gravatar bungeman2015-03-23
| | | | | | | When ttc index support was added, it was added and tested on Android with the jb parser. This adds it to the lmp parser. Review URL: https://codereview.chromium.org/1023313002
* Support BGR with DirectWrite.Gravatar bungeman2015-03-19
| | | | | | BUG=chromium:468509 Review URL: https://codereview.chromium.org/1018863003
* Use typographic font metrics when the font requests.Gravatar bungeman2015-03-19
| | | | | | | | | FreeType always returns the 'hhea' font metrics for ascent and descent, and ignores the 'OS/2'::fsSelection::UseTypoMetrics bit. (It also ignores the VDMX table, which makes this change correct.) This change uses the typographic font metrics when the font requests their use. Review URL: https://codereview.chromium.org/1020643002
* guarded change to SkImageGenerator to make getInfo() constGravatar reed2015-03-19
| | | | | | BUG=skia: Review URL: https://codereview.chromium.org/1017293002
* Restore GDI text size rounding.Gravatar bungeman2015-03-18
| | | | | | | | | | | | | | | | | | Add call to SkScalarRoundToScalar(). The old code calculated the scale from the text size, but now the text size is calculated from the scale (which is arguably the right way to think about it). However, the old code always rounded the final resulting text size, while the new code does not. In the 'no hinting' case, the text size is already rounded to an integer (so that the rest of the matrix is minimized). In the 'hinted' case, the entire scale has been removed from the matrix, so the scale value is the 'real' residual size. The old code rounded this size, and the new code should as well. BUG=464784 Review URL: https://codereview.chromium.org/1014953002
* Option for SkCodec to treat dst as all zeroes.Gravatar scroggo2015-03-17
| | | | | | | This recreates SkImageDecoder's feature to skip writing zeroes for SkCodec. Review URL: https://codereview.chromium.org/980903002
* SkPaint::FilterLevel -> SkFilterQualityGravatar reed2015-03-16
| | | | | | | | | clone (+rebase) of https://codereview.chromium.org/1009183002/ BUG=skia: TBR=scroggo@google.com Review URL: https://codereview.chromium.org/1014533004
* For safety include SkTypes.h in SkFontHost_mac.cppGravatar mtklein2015-03-11
| | | | | | BUG=skia:3362 Review URL: https://codereview.chromium.org/996113003
* Draw glyphs on Mac without font transform.Gravatar bungeman2015-03-02
| | | | | | | | The transform on the font is increasingly going untested on Mac. As a result, only use the transform on the context when possible. This fixes color emoji on OSX10.2. Review URL: https://codereview.chromium.org/975493002
* Set the ttcIndex on Mac onOpenStream.Gravatar bungeman2015-03-02
| | | | | | | Since on Mac onOpenStream always creates a new stream of a non-collection font, be sure the out ttcIndex is always set to 0. Review URL: https://codereview.chromium.org/975473002
* add compose-colorfilterGravatar reed2015-03-01
| | | | | | | | | | | now with serialization registration This reverts commit 5bd055c0386499f2dc8c66173a7534b75af602bf. BUG=skia: TBR= Review URL: https://codereview.chromium.org/970753002
* Clang warnings for SkFontHost_FreeType_common.cppGravatar fmalita2015-02-27
| | | | | | | | | Signed/unsigned comparison warnings while attempting to build with Clang on Linux. R=bungeman@google.com,joshualitt@chromium.org Review URL: https://codereview.chromium.org/961103002
* BUG=skia:Gravatar herb2015-02-25
| | | | | | | | | | (mtklein from here on) No public API changes. TBR=reed@google.com Committed: https://skia.googlesource.com/skia/+/f8d24e2c0c7b44b7ccf20e40890514db4cde7b15 Review URL: https://codereview.chromium.org/939123002
* FreeType uses unsigned int, Skia uses int.Gravatar joshualitt2015-02-24
| | | | | | Fix warning about assert which compared signed and unsigned. Review URL: https://codereview.chromium.org/956623004
* Revert of Make fID and MixedID calculations private (patchset #5 id:80001 of ↵Gravatar scroggo2015-02-24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | https://codereview.chromium.org/939123002/) Reason for revert: This actually *does* change the public API - fID is now private, and it was being used on Android. See https://android-build.storage.googleapis.com/builds/git_master-skia-linux-volantis-userdebug/1751533/5242b865d3e9bebc650c9b326dfa9d68c8bd1f59562bf32b85301fb984dc8b26/logs/build.log?Signature=Q0el9M4kTu1KQ8u02KX9TH1Pa22y9BkDK1IW%2B9OeJJNfrDEVzLXAz0XQ%2BHHQM8xVjft06jZJva1V8InZmgjcOk6PdZQbQW6XwwsHLKsbpbAE48iTWH3AlJAAoTtj9cifzgeHW8g80IcVxwHXmINRER%2BLPz3eHGisgfTTFUoWYCc%3D&GoogleAccessId=701025073339-mqn0q2nvir9iurm6q5d00tdv7blbgvjr%40developer.gserviceaccount.com&Expires=1424786471 : In file included from frameworks/base/libs/hwui/tests/../font/Font.cpp:26:0: external/skia/src/core/SkGlyph.h: In member function 'android::uirenderer::CachedGlyphInfo* android::uirenderer::Font::cacheGlyph(const SkPaint*, glyph_t, bool)': external/skia/src/core/SkGlyph.h:157:17: error: 'uint32_t SkGlyph::fID' is private uint32_t fID; ^ frameworks/base/libs/hwui/tests/../font/Font.cpp:482:39: error: within this context newGlyph->mGlyphIndex = skiaGlyph.fID; We need to update Android in order to hide fID. Original issue's description: > BUG=skia: > > (mtklein from here on) > No public API changes. > TBR=reed@google.com > > Committed: https://skia.googlesource.com/skia/+/f8d24e2c0c7b44b7ccf20e40890514db4cde7b15 TBR=mtklein@google.com,herb@google.com NOPRESUBMIT=true NOTREECHECKS=true NOTRY=true BUG=skia: Review URL: https://codereview.chromium.org/951353002
* BUG=skia:Gravatar herb2015-02-24
| | | | | | | | (mtklein from here on) No public API changes. TBR=reed@google.com Review URL: https://codereview.chromium.org/939123002
* Provide Mac 10.6 SDK support for kCTFontColorGlyphsTrait.Gravatar bungeman2015-02-23
| | | | | | | | | | kCTFontColorGlyphsTrait was introduced in Mac 10.7 and iPhone 4.3 SDKs. Chromium still builds with the 10.6 SDK, so provide this constant when it is otherwise unavailable. TBR=mtklein@google.com Review URL: https://codereview.chromium.org/951723003
* Use traits instead of table for color glyph detection.Gravatar bungeman2015-02-23
| | | | | | | The CTFont already knows if a font might contain color glyphs, so use that information directly instead of guessing ourselves. Review URL: https://codereview.chromium.org/949933003
* Use #if instead of #ifdef with SK_HAS_DWRITE_X.Gravatar bungeman2015-02-23
| | | | Review URL: https://codereview.chromium.org/943233004
* Use IDWriteFontFallback when available.Gravatar bungeman2015-02-23
| | | | | | | This is prefereable to the current IDWriteTextLayout method, but is only available on Windows 8.1 and later. Review URL: https://codereview.chromium.org/942083004
* Remove SkFontHost includes and friends.Gravatar bungeman2015-02-23
| | | | | | | SkFontHost no longer exists as a class, so remove the includes and stop making it a friend. Review URL: https://codereview.chromium.org/943333004
* Implement onMatchFamilyStyleCharacter for DirectWrite.Gravatar bungeman2015-02-20
| | | | Review URL: https://codereview.chromium.org/946603002
* Rename onGetPixelsEnum back to onGetPixels.Gravatar scroggo2015-02-19
| | | | | | | | | | | | | | | | Replace the old signature of onGetPixels (return bool) to return an enum (Result). Remove onGetPixelsEnum. Add a define for onGetPixelsEnum to onGetPixels. This is for staging in Chromium, where some implementations override onGetPixelsEnum. Add the define in skia_for_chromium_defines. Remove SK_SUPPORT_LEGACY_IMAGE_GENERATOR_RETURN, which is no longer needed by Chromium. BUG=skia:3257 Review URL: https://codereview.chromium.org/939113002
* Clarify desired behavior of FontConfigTypeface::LegacyCreateTypeface.Gravatar bungeman2015-02-19
| | | | | | | | This should have no real effect on behavior, but cleans up some names and removes an unused parameter. This is a step toward separating the SkTypeface cache from the request cache. Review URL: https://codereview.chromium.org/936893002
* Remove FontConfigTypeface::getFamilyName().Gravatar bungeman2015-02-18
| | | | | | | This method is hiding a method of the same name from the superclass. This is confusing and error prone, and doesn't really add anything. Review URL: https://codereview.chromium.org/924333003
* Update DirectWrite streams to SkStreamAsset.Gravatar bungeman2015-02-18
| | | | | | | SkTypefaces now deal in terms of SkStreamAsset, but the DirectWrite port was never fully converted. Review URL: https://codereview.chromium.org/940563002
* FontFamily SkTArrays can be moved.Gravatar bungeman2015-02-13
| | | | | | | | | The FontFamily type in SkFontConfigParser_android.h contains two fields of type SkTArray. Both of these contain types which can be moved instead of calling constructors and destructors on resize. This change avoids a number of unneeded SkString refs and unrefs. Review URL: https://codereview.chromium.org/929473002
* Make SkImageGenerator::getPixels() return an enum.Gravatar scroggo2015-02-13
| | | | | | | | | | | | | | | | | | | | | | The new enum describes the nature of the failure. This is in preparation for writing a replacement for SkImageDecoder, which will use this interface. Update the comments for getPixels() to specify what it means to pass an SkImageInfo with a different size. Make SkImageGenerator Noncopyable. Leave onGetYUV8Planes alone, since we have separate discussions regarding modifying that API. Make callers of SkImageDecoder consistently handle kPartialSuccess. Previously, some callers considered it a failure, and others considered it a success. BUG=skia:3257 Review URL: https://codereview.chromium.org/919693002
* Verify all parsed test font files start with cap.Gravatar bungeman2015-02-13
| | | | | | | | | All of the Android test font configuration files have file names which start with a capital latin letter. Verify this is true of the parsed file names. This would have caught previous issues with slicing, and will hopefully prevent such issues going unnoticed in the future. Review URL: https://codereview.chromium.org/925933003