aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ports
Commit message (Collapse)AuthorAge
...
* 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
* Move SkOSFile::Iter impls into ports.Gravatar bungeman2015-02-12
| | | | | | | This was one large ifdef in SkOSFile.cpp in utils. This moves the code to existing ports files. Review URL: https://codereview.chromium.org/920593002
* Fix append_fallback_font_families_for_locale.Gravatar bungeman2015-02-11
| | | | | | | | | The language was being set to garbage, now set to part of the file name. Add a test to ensure we continue to parse fallback directories correctly. BUG=chromium:422180 Review URL: https://codereview.chromium.org/912053003
* Additional cleanups to Android config parsing.Gravatar bungeman2015-02-10
| | | | | | | | | | Properly labels several methods as static. Use XML_GetBuffer to avoid an extra copy. Set the memory allocators to Skia's. Set define in 'defines' instead of cflags. Update debug dumper. Review URL: https://codereview.chromium.org/915443002
* Add factory for Android font manager.Gravatar bungeman2015-02-06
| | | | | | | | | | | This allows users to create an Android font manager with their own set of fonts, or augment the system set. This will allow for removal of the current globals which are used for a similar, but more constained, purpose. BUG=skia:2817,skia:3314,chromium:407340 Review URL: https://codereview.chromium.org/887113002
* Add missing SK_OVERRIDEGravatar rmistry2015-02-02
| | | | | | | | | | Tested by running on clang head + ubuntu 14.04: GYP_DEFINES=”skia_gpu=0 skia_warnings_as_errors=1" tools/xsan_build thread dm BUILDTYPE=Release out/Release/dm -v BUG=skia:3386 Review URL: https://codereview.chromium.org/894833002
* Don't read unecessary font files on Android.Gravatar bungeman2015-02-02
| | | | | | | | | | | | With a new style fonts.xml (version >= 21) fallback fonts are specified as font families without a name. The current code reads these, but then also reads in the old fallback and vendor xml files. With this change, when a new style xml file is encoutered, no further files will be read. This both lowers memory use and speeds font lookup. Locally, this change reduces the number of font families loaded on my 'L' device from 148 to 80. All of the families removed are duplicates. Review URL: https://codereview.chromium.org/888923003
* Convert FamilyData to Skia style field names.Gravatar bungeman2015-01-30
| | | | | | | The Skia convention is to prefix field names with 'f'. This change is mostly mechanical. Review URL: https://codereview.chromium.org/892733002
* Do not leak FamilyData in Android SkFontMgr.Gravatar bungeman2015-01-30
| | | | | | | Currently, it appears one FamilyData is leaking per scanned file. This also cleans up the hanging currentFamily memory management. Review URL: https://codereview.chromium.org/889943005
* Do not add indirection to XML_Parser.Gravatar bungeman2015-01-30
| | | | | | | The expat type XML_Parser is already a pointer, so pass it by value instead of by indirection. Review URL: https://codereview.chromium.org/880783003
* Reland "remove unused SkAvoidXfermode"Gravatar scroggo2015-01-30
| | | | | | | | (patchset #2 id:20001 of https://codereview.chromium.org/860583002/) SkAvoidXfermode has been moved into Android, so it is safe to remove. Review URL: https://codereview.chromium.org/890893003
* SkFontHost_FreeType takes advantage of SkStreamAsset.Gravatar bungeman2015-01-27
| | | | | | | With recent changes, SkTypeface now deals in SkStreamAsset instead of SkStream. Take advantage of this for performance with FreeType. Review URL: https://codereview.chromium.org/882763002
* SkTypeface to use SkStreamAsset.Gravatar bungeman2015-01-27
| | | | | | | SkTypeface already requires typeface streams to support SkStreamAsset in practice, and in practice all users are already supplying them. Review URL: https://codereview.chromium.org/869763002
* Move sync code to include/, switch from using platform define to a proxy ↵Gravatar mtklein2015-01-21
| | | | | | | | | | | | | | header in core/ This fixes two problems: 1) #include SK_SOME_DEFINE doesn't work well for all our clients. 2) Things in include/ are #including things in src/, which we don't like. TBR=reed@google.com BUG=skia: Review URL: https://codereview.chromium.org/862983002
* And change SkAutoTUnref<const SkStream to SkAutoTDelete.Gravatar scroggo2015-01-21
| | | | | | | | | | Should have been included with https://codereview.chromium.org/860353005/ TBR=bungeman@google.com NOTRY=true NOTREECHECKS=true Review URL: https://codereview.chromium.org/844193007
* Remove another caller of SkRef(SkStream)Gravatar scroggo2015-01-21
| | | | | | | | TBR=bungeman@google.com NOTRY=true NOTREECHECKS=true Review URL: https://codereview.chromium.org/860353005
* Make SkStream *not* ref counted.Gravatar scroggo2015-01-21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | SkStream is a stateful object, so it does not make sense for it to have multiple owners. Make SkStream inherit directly from SkNoncopyable. Update methods which previously called SkStream::ref() (e.g. SkImageDecoder::buildTileIndex() and SkFrontBufferedStream::Create(), which required the existing owners to call SkStream::unref()) to take ownership of their SkStream parameters and delete when done (including on failure). Switch all SkAutoTUnref<SkStream>s to SkAutoTDelete<SkStream>s. In some cases this means heap allocating streams that were previously stack allocated. Respect ownership rules of SkTypeface::CreateFromStream() and SkImageDecoder::buildTileIndex(). Update the comments for exceptional methods which do not affect the ownership of their SkStream parameters (e.g. SkPicture::CreateFromStream() and SkTypeface::Deserialize()) to be explicit about ownership. Remove test_stream_life, which tested that buildTileIndex() behaved correctly when SkStream was a ref counted object. The test does not make sense now that it is not. In SkPDFStream, remove the SkMemoryStream member. Instead of using it, create a new SkMemoryStream to pass to fDataStream (which is now an SkAutoTDelete). Make other pdf rasterizers behave like SkPDFDocumentToBitmap. SkPDFDocumentToBitmap delete the SkStream, so do the same in the following pdf rasterizers: SkPopplerRasterizePDF SkNativeRasterizePDF SkNoRasterizePDF Requires a change to Android, which currently treats SkStreams as ref counted objects. Review URL: https://codereview.chromium.org/849103004
* Lcd request early check in SkFontHost_FreeType::onFilterRec.Gravatar bungeman2015-01-21
| | | | | | | If the user didn't request lcd, don't spend any time checking if the FT_Library supports it. Review URL: https://codereview.chromium.org/864903002