aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/ports
Commit message (Collapse)AuthorAge
...
* Glyph advances from generateAdvance do not always match generateMetrics results.Gravatar bungeman@google.com2012-03-23
| | | | | | | http://codereview.appspot.com/5841071/ git-svn-id: http://skia.googlecode.com/svn/trunk@3480 2bbb7eff-a529-9590-31e7-b0007b416f81
* Update GetAdvancedTypefaceMetrics API in usually-unbuilt files.Gravatar tomhudson@google.com2012-03-23
| | | | | | | | | Originally caught by LJin.zq http://code.google.com/p/skia/issues/detail?id=405 git-svn-id: http://skia.googlecode.com/svn/trunk@3478 2bbb7eff-a529-9590-31e7-b0007b416f81
* Upstream changes from Android repository.Gravatar djsollen@google.com2012-03-21
| | | | | | Review URL: https://codereview.appspot.com/5752055 git-svn-id: http://skia.googlecode.com/svn/trunk@3449 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add basic support for vertical text into freetype.Gravatar djsollen@google.com2012-03-19
| | | | | | Review URL: https://codereview.appspot.com/5794081 git-svn-id: http://skia.googlecode.com/svn/trunk@3433 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix broken android buildGravatar djsollen@google.com2012-03-15
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3404 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add CreateFallbackForScript to SkTypeface for Android.Gravatar djsollen@google.com2012-03-15
| | | | | | | | | | | | | | | WebKit uses HarfBuzz directly to do Complex Text Layout, so it needs to get the proper SkTypeface to pass it to HarfBuzz. However, on Android, fallback scripts have no name, and we can only get them by file name each time (CreateFromFile). This actually breaks the semantics of SkTypeface, which states 'The ID should be unique for the underlying font file/data, not unique per typeface instance.' And add 2 helper function to convert between FallbackScripts enum and font file name. These are useful for WebKit's FontCache, which needs string as key. https://codereview.appspot.com/5797066/ git-svn-id: http://skia.googlecode.com/svn/trunk@3403 2bbb7eff-a529-9590-31e7-b0007b416f81
* Use floats for mask table for accuracy.Gravatar bungeman@google.com2012-03-13
| | | | | | | | http://codereview.appspot.com/5783099/ git-svn-id: http://skia.googlecode.com/svn/trunk@3374 2bbb7eff-a529-9590-31e7-b0007b416f81
* Use default lcd filter until we have the means to specify one.Gravatar bungeman@google.com2012-03-09
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3358 2bbb7eff-a529-9590-31e7-b0007b416f81
* reenable vertical lcd supportGravatar reed@google.com2012-03-08
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3351 2bbb7eff-a529-9590-31e7-b0007b416f81
* [PDF] Treat TTF Fonts that report zero glyphs as other font type.Gravatar vandebo@chromium.org2012-03-08
| | | | | | | | | | Fix crbug.com/117322 crash Patch from Arthur Hsu, Original CL: http://codereview.appspot.com/5786057/ Review URL: https://codereview.appspot.com/5792050 git-svn-id: http://skia.googlecode.com/svn/trunk@3345 2bbb7eff-a529-9590-31e7-b0007b416f81
* Don't override the user's hinting level.Gravatar bungeman@google.com2012-03-08
| | | | | | | http://codereview.appspot.com/5792049/ git-svn-id: http://skia.googlecode.com/svn/trunk@3344 2bbb7eff-a529-9590-31e7-b0007b416f81
* When guessing at the dest, use linear space instead of color space.Gravatar bungeman@google.com2012-03-05
| | | | | | | | | | 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
* On Mac, also check for a loca table before calling a font true type.Gravatar vandebo@chromium.org2012-03-02
| | | | | | Review URL: https://codereview.appspot.com/5720056 git-svn-id: http://skia.googlecode.com/svn/trunk@3311 2bbb7eff-a529-9590-31e7-b0007b416f81
* Check to see if font is TrueType before making TrueType specific calls.Gravatar caryclark@google.com2012-03-02
| | | | | | | See chromium bug 116185 Review URL: https://codereview.appspot.com/5731046 git-svn-id: http://skia.googlecode.com/svn/trunk@3309 2bbb7eff-a529-9590-31e7-b0007b416f81
* restore old no-gamma behavior when requestedGravatar reed@google.com2012-03-02
| | | | | | Review URL: https://codereview.appspot.com/5722047 git-svn-id: http://skia.googlecode.com/svn/trunk@3303 2bbb7eff-a529-9590-31e7-b0007b416f81
* allow gamma params to be changed in .gypGravatar reed@google.com2012-03-01
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3294 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix clipping of lcd edge pixelsGravatar reed@google.com2012-03-01
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3293 2bbb7eff-a529-9590-31e7-b0007b416f81
* apply contrast before blend-gamma-calcGravatar reed@google.com2012-02-29
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3283 2bbb7eff-a529-9590-31e7-b0007b416f81
* implement gamma correction for freetype text.Gravatar reed@google.com2012-02-28
| | | | | | | | | Need to opt-in to have it applied to kA8 text (which chrome can't for a while) A8 text needs to use Slight hinting to look better, but that is not forced... git-svn-id: http://skia.googlecode.com/svn/trunk@3277 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove SkFontHost::ValidFontID PART 2: remove definition and skia callers ↵Gravatar bungeman@google.com2012-02-24
| | | | | | | | | | not that Chrome's font host has been updated. See also https://chromiumcodereview.appspot.com/9347043/ http://codereview.appspot.com/5654055/ git-svn-id: http://skia.googlecode.com/svn/trunk@3255 2bbb7eff-a529-9590-31e7-b0007b416f81
* add SkCreateDataProviderFromStream to SkCGUtilsGravatar reed@google.com2012-02-24
| | | | | | | | implement SkFontHost create_from_file/stream using SkCGUtils git-svn-id: http://skia.googlecode.com/svn/trunk@3249 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix memory leak in GetTableData() and add unittests for itGravatar reed@google.com2012-02-23
| | | | | | Review URL: https://codereview.appspot.com/5693048 git-svn-id: http://skia.googlecode.com/svn/trunk@3239 2bbb7eff-a529-9590-31e7-b0007b416f81
* Provide fallbacks for web fonts.Gravatar caryclark@google.com2012-02-23
| | | | | | | This fixes http://code.google.com/p/chromium/issues/detail?id=114531 Review URL: https://codereview.appspot.com/5683078 git-svn-id: http://skia.googlecode.com/svn/trunk@3231 2bbb7eff-a529-9590-31e7-b0007b416f81
* Use intrinsics for atomic inc and dec on Windows.Gravatar bungeman@google.com2012-02-17
| | | | | | | http://codereview.appspot.com/5677080/ git-svn-id: http://skia.googlecode.com/svn/trunk@3223 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove SkFontHost::ValidFontID PART 1: remove only caller.Gravatar bungeman@google.com2012-02-17
| | | | | | | http://codereview.appspot.com/5654055/ git-svn-id: http://skia.googlecode.com/svn/trunk@3222 2bbb7eff-a529-9590-31e7-b0007b416f81
* Lazily allocate gNameList, and protect its usage behind the global mutex.Gravatar djsollen@google.com2012-02-16
| | | | | | https://codereview.appspot.com/5674059 git-svn-id: http://skia.googlecode.com/svn/trunk@3207 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix TypefaceCache races. Gravatar bungeman@google.com2012-02-16
| | | | | | | http://codereview.appspot.com/5656066/ git-svn-id: http://skia.googlecode.com/svn/trunk@3205 2bbb7eff-a529-9590-31e7-b0007b416f81
* Fix regression where we disable fonts with no specified nameGravatar djsollen@google.com2012-02-15
| | | | | | Review URL: https://codereview.appspot.com/5675061 git-svn-id: http://skia.googlecode.com/svn/trunk@3202 2bbb7eff-a529-9590-31e7-b0007b416f81
* Merge changes from the android repo upstream to SkiaGravatar djsollen@google.com2012-02-15
| | | | | | Review URL: https://codereview.appspot.com/5545070 git-svn-id: http://skia.googlecode.com/svn/trunk@3199 2bbb7eff-a529-9590-31e7-b0007b416f81
* suport A8 grayscale text with COLOR_LUMINANCE build optionGravatar reed@google.com2012-02-15
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3197 2bbb7eff-a529-9590-31e7-b0007b416f81
* if SK_USE_COLOR_LUMINANCE is defined, then we store 2 bits of each componentGravatar reed@google.com2012-02-13
| | | | | | | | | to create a per-component-luminance value for the fonthost to use. Only supported on Mac at the moment (but still disabled by default) git-svn-id: http://skia.googlecode.com/svn/trunk@3180 2bbb7eff-a529-9590-31e7-b0007b416f81
* enable color-luminance in font cache (disabled by default)Gravatar reed@google.com2012-02-10
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3168 2bbb7eff-a529-9590-31e7-b0007b416f81
* Make SkImageEncoder_CG report more failures to its caller.Gravatar epoger@google.com2012-01-31
| | | | | | Review URL: https://codereview.appspot.com/5580052 git-svn-id: http://skia.googlecode.com/svn/trunk@3115 2bbb7eff-a529-9590-31e7-b0007b416f81
* posix: Avoid static initializers in static/global mutexesGravatar digit@google.com2012-01-26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes static initializers related to static and global mutexes from the final library's machine code when building on a pthread-capable system. We use PTHREAD_MUTEX_INITIALIZER to perform POD-style initialization. You need a line like the following to declare a global mutex with it: SkBaseMutex gMutex = { PTHREAD_MUTEX_INITIALIZER }; We introduce the SK_DECLARE_STATIC_MUTEX and SK_DECLARE_GLOBAL_MUTEX macros to be able to declare static/global mutexes in the source tree uniformly. SkMutex is now defined as a sub-class of SkBaseMutex, with standard construction/destruction semantics. This is useful if the mutex object is a member of another C++ class, or allocated dynamically. We also modify a few places to refer to SkBaseMutex instead of a SkMutex, where it makes sense. Generally speaking, client code should hold and use pointers to SkBaseMutex whenever they can now. We defined a new built-time macro named SK_USE_POSIX_THREADS to indicate that we're using a pthread-based SkThread.h interface. The macro will also be used in future patches to implement other helper thread synchronization classes. Finally, we inline the acquire() and release() functions in the case of Posix to improve performance a bit. Running: 'bench -repeat 10 -match mutex' on an Android device or a 2.4GHz Xeon Linux desktop shows the following improvements: Before After Galaxy Nexus 1.64 1.45 Nexus S 1.47 1.16 Xoom 1.86 1.66 Xeon 0.36 0.31 This removes 5 static mutex initializers from the library Review URL: https://codereview.appspot.com/5501066 git-svn-id: http://skia.googlecode.com/svn/trunk@3091 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix vertical bold text on macGravatar caryclark@google.com2012-01-25
| | | | | | | | M src/ports/SkFontHost_mac_coretext.cpp git-svn-id: http://skia.googlecode.com/svn/trunk@3086 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove apparent SkIntToScalar(SkScalar) call in SkScalerContext_FreeTypeGravatar epoger@google.com2012-01-18
| | | | | | | | | | | This change seems to fix the following assertion failure we have been seeing in the Skia_Linux_Fixed_Debug build since http://code.google.com/p/skia/source/detail?r=3059 : drawing... bitmapfilters [540 330] ../include/core/SkFixed.h:67: failed assertion "n >= -32768 && n <= 32767" Review URL: https://codereview.appspot.com/5557049 git-svn-id: http://skia.googlecode.com/svn/trunk@3066 2bbb7eff-a529-9590-31e7-b0007b416f81
* add GenA8FromLCD as a hack to force GDI to create the A8 mask from the LCDGravatar reed@google.com2012-01-18
| | | | | | | | | results, rather than asking GDI directly for A8 (which it sometimes decides to interpret as BW) git-svn-id: http://skia.googlecode.com/svn/trunk@3061 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove unused bool param to SkMutex constructorGravatar reed@google.com2012-01-12
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@3025 2bbb7eff-a529-9590-31e7-b0007b416f81
* android: optimize atomics routinesGravatar digit@google.com2012-01-11
| | | | | | | | | This patch provides a slightly optimized implementation of atomic increment/decrement functions by using static inlined versions of the gcc intrinsics. Review URL: http://codereview.appspot.com/5498069 git-svn-id: http://skia.googlecode.com/svn/trunk@3012 2bbb7eff-a529-9590-31e7-b0007b416f81
* Change remaining ANDROID ifdefs to SK_BUILD_FOR_ANDROIDGravatar djsollen@google.com2012-01-09
| | | | | | Review URL: http://codereview.appspot.com/5528050 git-svn-id: http://skia.googlecode.com/svn/trunk@2990 2bbb7eff-a529-9590-31e7-b0007b416f81
* Mac generateFontMetrics not converting to scalar.Gravatar bungeman@google.com2012-01-05
| | | | | | | http://codereview.appspot.com/5519045/ git-svn-id: http://skia.googlecode.com/svn/trunk@2979 2bbb7eff-a529-9590-31e7-b0007b416f81
* Remove attempt at subpixel handling from GDI font host.Gravatar bungeman@google.com2012-01-05
| | | | | | | http://codereview.appspot.com/5515046/ git-svn-id: http://skia.googlecode.com/svn/trunk@2976 2bbb7eff-a529-9590-31e7-b0007b416f81
* Add SkDEBUGFAIL to clean up use of SkASSERT(!"text");Gravatar tomhudson@google.com2011-12-28
| | | | | | | | | | catch a couple of latent SkASSERT("text") bugs. http://codereview.appspot.com/5504090/ git-svn-id: http://skia.googlecode.com/svn/trunk@2926 2bbb7eff-a529-9590-31e7-b0007b416f81
* support vertical text and typeface-by-name on LeopardGravatar caryclark@google.com2011-12-21
| | | | | | | | | | M src/ports/SkFontHost_mac_coretext.cpp M gyp/gmslides.gypi A gm/verttext2.cpp git-svn-id: http://skia.googlecode.com/svn/trunk@2920 2bbb7eff-a529-9590-31e7-b0007b416f81
* fix vertical text on LionGravatar caryclark@google.com2011-12-20
| | | | | | | | M src/ports/SkFontHost_mac_coretext.cpp git-svn-id: http://skia.googlecode.com/svn/trunk@2906 2bbb7eff-a529-9590-31e7-b0007b416f81
* partial fix for vertical text on LionGravatar caryclark@google.com2011-12-19
| | | | | | | | M src/ports/SkFontHost_mac_coretext.cpp git-svn-id: http://skia.googlecode.com/svn/trunk@2896 2bbb7eff-a529-9590-31e7-b0007b416f81
* add optional manual global initializationGravatar caryclark@google.com2011-12-15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | M include/effects/SkAvoidXfermode.h M include/effects/SkDiscretePathEffect.h M include/effects/Sk1DPathEffect.h M include/effects/Sk2DPathEffect.h M include/effects/SkBlurDrawLooper.h M include/effects/SkPixelXorXfermode.h M include/effects/SkDashPathEffect.h M include/effects/SkColorMatrixFilter.h M include/effects/SkEmbossMaskFilter.h M include/effects/SkLayerDrawLooper.h M include/effects/SkGroupShape.h M include/effects/SkBlurImageFilter.h M include/effects/SkRectShape.h A include/effects/SkEffects.h M include/effects/SkCornerPathEffect.h M include/effects/SkGradientShader.h M include/effects/SkBlurMaskFilter.h M include/effects/SkLayerRasterizer.h M include/core/SkMallocPixelRef.h M include/core/SkFlattenable.h M include/core/SkShape.h M include/core/SkPixelRef.h M include/core/SkGraphics.h M include/core/SkPathEffect.h M include/core/SkPostConfig.h M include/core/SkXfermode.h M include/core/SkColorFilter.h M include/images/SkFlipPixelRef.h M include/images/SkImageRef_GlobalPool.h M src/effects/SkDashPathEffect.cpp M src/effects/SkColorMatrixFilter.cpp M src/effects/SkBlurImageFilter.cpp M src/effects/SkGroupShape.cpp M src/effects/SkCornerPathEffect.cpp M src/effects/SkGradientShader.cpp M src/effects/SkBlurMaskFilter.cpp M src/effects/SkAvoidXfermode.cpp M src/effects/Sk2DPathEffect.cpp M src/effects/SkBlurDrawLooper.cpp M src/effects/SkPixelXorXfermode.cpp M src/effects/SkColorFilters.cpp M src/effects/SkLayerDrawLooper.cpp M src/effects/SkRectShape.cpp A src/effects/SkEffects.cpp M src/effects/SkLayerRasterizer.cpp M src/effects/SkDiscretePathEffect.cpp M src/effects/Sk1DPathEffect.cpp A src/effects/SkEffects_none.cpp M src/core/SkPixelRef.cpp M src/core/SkGraphics.cpp M src/core/SkFlattenable.cpp M src/core/SkBitmapProcShader.h M src/core/SkPathEffect.cpp M src/core/SkShape.cpp M src/core/SkXfermode.cpp M src/core/SkMallocPixelRef.cpp M src/core/SkBitmapProcShader.cpp M src/images/SkFlipPixelRef.cpp M src/images/SkImageRef_GlobalPool.cpp A src/ports/SkGlobalInitialization_chromium.cpp M src/ports/SkImageRef_ashmem.h M src/ports/SkImageRef_ashmem.cpp A src/ports/SkGlobalInitialization_default.cpp M gyp/effects.gyp M gyp/tools.gyp M gyp/ports.gyp git-svn-id: http://skia.googlecode.com/svn/trunk@2876 2bbb7eff-a529-9590-31e7-b0007b416f81
* move variable declarations above goto lines, to fix warning/error aboutGravatar reed@google.com2011-11-28
| | | | | | | | skipping over them. git-svn-id: http://skia.googlecode.com/svn/trunk@2750 2bbb7eff-a529-9590-31e7-b0007b416f81
* remove obsolete assertGravatar reed@google.com2011-11-22
| | | | git-svn-id: http://skia.googlecode.com/svn/trunk@2734 2bbb7eff-a529-9590-31e7-b0007b416f81
* store 3 bits of luminance, but (for now) discretize that in fonthost::filterecGravatar reed@google.com2011-11-22
| | | | | | | | for backward compatibility git-svn-id: http://skia.googlecode.com/svn/trunk@2732 2bbb7eff-a529-9590-31e7-b0007b416f81