Commit Graph

410 Commits

Author SHA1 Message Date
Mike Hommey
318137c0da Bug 1342707 - Don't use Init_neon if runtime detection of neon is not enabled. r=lsalzman
--HG--
extra : rebase_source : 7f15d77c902a923d4dcc384c4fc10e877ce0bdf1
2017-02-26 08:12:18 +09:00
Lee Salzman
13b36b3f35 Bug 1339637 - fix overflow in SkClampRange::init(). r=jrmuizel
MozReview-Commit-ID: 7NtQP5QPsFk
2017-02-21 14:32:39 -05:00
Jonathan Kew
36f52391d9 Bug 1331683 - Don't attempt to use any Core Text and Core Graphics variation-font APIs on pre-Sierra systems. r=jrmuizel,lsalzman 2017-02-09 21:37:24 +00:00
Mason Chang
189cf8b6db Bug 1322897. Use only the G channel for grayscale AA Dwrite fonts and Skia. r=lsalzman 2017-02-01 15:47:33 -08:00
Lee Salzman
bf02f8d486 Bug 1334366 - verify that glyph position rect is non-empty in GrAtlasTextBlob::appendGlyph. r=mchang
MozReview-Commit-ID: JcPZSGfitmH
2017-01-27 16:14:18 -05:00
Lee Salzman
f899d6e6ff Bug 1325259 - fix A8_RowProc_Opaque to not use legacy broken lerp. r=vliu
MozReview-Commit-ID: FU7WxzQ3n7T
2017-01-18 10:15:09 -05:00
Lee Salzman
a25a4562c0 Bug 1322337 - load color bitmaps in SkFontHost_cairo when building with FreeType before 2.5.0. r=mchang
MozReview-Commit-ID: Ay7hJi7RK4T
2017-01-17 12:27:16 -05:00
Lee Salzman
9c04aa009c Bug 1330166 - ensure path bounds after rounding contain path edges when using SK_RASTERIZE_EVEN_ROUNDING. r=jrmuizel
MozReview-Commit-ID: Jb48BkbHEPs
2017-01-13 12:10:40 -05:00
Jonathan Kew
3d478b5e48 Bug 1324739 - patch 2 - Enable use of sfntly in Skia-PDF to subset fonts. r=lsalzman,glandium 2017-01-07 22:20:25 +00:00
Lee Salzman
b8debd5aca Bug 1325518 - make SkPath::conservativelyContainsRect consume degenerate segments. r=mchang
MozReview-Commit-ID: 78rE2oNc3IU
2017-01-11 12:40:46 -05:00
Jonathan Kew
c021e933d7 Bug 1321031 pt 3 - Preserve variations settings when creating a new CTFont in SkFontHost_mac. r=lsalzman 2017-01-06 16:35:12 +00:00
Ryan VanderMeulen
e897fba434 Backed out 6 changesets (bug 1321031) for bustage.
Backed out changeset e0be4f5390fb (bug 1321031)
Backed out changeset ba071046f8ab (bug 1321031)
Backed out changeset 7cb4242dc636 (bug 1321031)
Backed out changeset bc58e479eb58 (bug 1321031)
Backed out changeset c551913ae892 (bug 1321031)
Backed out changeset f4ae57d5358f (bug 1321031)

CLOSED TREE
2017-01-06 12:46:27 -05:00
Jonathan Kew
4c288caa59 Bug 1321031 pt 3 - Preserve variations settings when creating a new CTFont in SkFontHost_mac. r=lsalzman 2017-01-06 16:35:12 +00:00
Lee Salzman
9efc50d84e Bug 1318769 - make SkFontHost_cairo match cairo-ft's handling of FcPattern embeddedbitmap option. r=jfkthame
MozReview-Commit-ID: BSDuwZfKi1a
2017-01-01 09:25:15 -05:00
Nathan Froyd
0c4b96a65e Bug 1029245 - part 0 - tweak Skia's SkOnce.h header to work around issues with std::atomic::compare_exchange_strong; r=lsalzman
Building Skia inside of mozilla-central with GCC 4.9.4 causes problems:

[...]c++/4.9.4/bits/atomic_base.h:581:70: error: failure memory model cannot be stronger than success memory model for '__atomic_compare_exchange'

The error stack accompanying this message points at SkEventTracer::GetInstance:

SkEventTracer* SkEventTracer::GetInstance() {
    if (SkEventTracer* tracer = sk_atomic_load(&gUserTracer, sk_memory_order_acquire)) {
        return tracer;
    }
    static SkOnce once;
    static SkDefaultEventTracer* defaultTracer;
    once([] { defaultTracer = new SkDefaultEventTracer; });
    return defaultTracer;
}

The only place that compare_exchange_strong could be called here is from SkOnce::operator():

    template <typename Fn, typename... Args>
    void operator()(Fn&& fn, Args&&... args) {
        auto state = fState.load(std::memory_order_acquire);

        if (state == Done) {
            return;
        }

        // If it looks like no one has started calling fn(), try to claim that job.
        if (state == NotStarted && fState.compare_exchange_strong(state, Claimed,
                                                                  std::memory_order_relaxed)) {
            // Great!  We'll run fn() then notify the other threads by releasing Done into fState.
            fn(std::forward<Args>(args)...);
            return fState.store(Done, std::memory_order_release);
        }
        [...code elided...]

where |fState| is an atomic<uint8_t>.

The three-argument form of atomic<uint8_t>::compare_exchange_strong is defined as:

      _GLIBCXX_ALWAYS_INLINE bool
      compare_exchange_strong(__int_type& __i1, __int_type __i2,
			      memory_order __m = memory_order_seq_cst) noexcept
      {
	return compare_exchange_strong(__i1, __i2, __m,
				       __cmpexch_failure_order(__m));
      }

__cmpexch_failure_order relaxes the given memory_order:

  // Drop release ordering as per [atomics.types.operations.req]/21
  constexpr memory_order
  __cmpexch_failure_order2(memory_order __m) noexcept
  {
    return __m == memory_order_acq_rel ? memory_order_acquire
      : __m == memory_order_release ? memory_order_relaxed : __m;
  }

  constexpr memory_order
  __cmpexch_failure_order(memory_order __m) noexcept
  {
    return memory_order(__cmpexch_failure_order2(__m & __memory_order_mask)
      | (__m & __memory_order_modifier_mask));
  }

which then gets us to the four-argument version of compare_exchange_strong:

      _GLIBCXX_ALWAYS_INLINE bool
      compare_exchange_strong(__int_type& __i1, __int_type __i2,
			      memory_order __m1, memory_order __m2) noexcept
      {
        memory_order __b2 = __m2 & __memory_order_mask;
        memory_order __b1 = __m1 & __memory_order_mask;
	__glibcxx_assert(__b2 != memory_order_release);
	__glibcxx_assert(__b2 != memory_order_acq_rel);
	__glibcxx_assert(__b2 <= __b1);

	return __atomic_compare_exchange_n(&_M_i, &__i1, __i2, 0, __m1, __m2);
      }

Despite the constexpr annotation on __cmpexch_failure_order and friends,
which ought to imply that they get constant-folded, I think what is
happening is that GCC doesn't see |memory_order_relaxed| when it
examines __m2.  Instead, it seems some internal tree representation for
the call to __cmpexch_failure_order.  Since this is not an integer
constant, GCC treats __m2 as being equivalent to memory_order_seq_cst
(see gcc/builtins.c:get_memmodel).  And since memory_order_seq_cst is
stronger than memory_order_relaxed, we get the above error.

In any event, the easiest fix is to simply use the four-argument form of
compare_exchange_strong directly, explicitly specifying the failure
memory order.
2016-12-21 04:28:08 -05:00
Mason Chang
5902ea8a82 Bug 1323587 Part 1: Use correct gamma and contrast for dwrite fonts. r=lsalzman 2016-12-16 08:04:45 -08:00
Mason Chang
49715dce65 Bug 1321901 - Use IDWriteFontFace::GetRecommendedRenderingMode for font rendering mode in Skia. r=lsalzman 2016-12-15 08:33:43 -08:00
Lee Salzman
36bd8ec521 Bug 1320644 - don't use __stdcall with SkiaGLGlue. r=mchang
MozReview-Commit-ID: 5pljJkGSN8R
2016-11-30 15:12:40 -05:00
Lee Salzman
03322ca26d Bug 1315848 - Skia clamped gradient fix r=mchang
MozReview-Commit-ID: GUHZC7VRrlC

--HG--
extra : source : f51d3ab82dc60c54403cc6f64f4e0a5a87a5f5ff
2016-11-21 14:10:05 -05:00
Mason Chang
793727bf2c Bug 1315568 Use Force GDI information from SkTypeface for GDI rendering modes in skia. r=lsalzman 2016-11-29 08:03:33 -08:00
Mike Hommey
b4a7c9cf1c Bug 1319389 - Generically set SK_CPU_[BL]ENDIAN based on __BYTE_ORDER__ when available. r=lsalzman
--HG--
extra : rebase_source : 895f2166b36df699d542bd39e22bdddd0b423594
2016-11-22 20:09:02 +09:00
Lee Salzman
0e267ba5b2 Bug 1306628 - Handle large sizes in GrResourceProvider::createBuffer. r=mchang
MozReview-Commit-ID: 3ZGDmIum5OU

--HG--
extra : rebase_source : 01be35ac1a6b192c4a7e30e022b3d692ad82138d
2016-10-25 00:31:43 -04:00
Kevin Chen
ed05291591 Bug 1313135 - Make an early return if the clip rect can be ignored. r=mchang
--HG--
extra : rebase_source : 3e1b5c15398a2536528c5b8799d2272ee4d07c66
2016-11-21 18:55:00 -05:00
Jonathan Watt
7b894d6da6 Bug 1309272, part 1 - Add an --enable-skia-pdf configuration option. r=lsalzman
--HG--
extra : rebase_source : 2edd8282c26e8772caea3db0a3d9204a4838e8db
2016-10-26 19:23:07 +01:00
Jonathan Watt
f17619fa58 Bug 1313549 - Fix gfx/skia/generate_mozbuild.py to not generate gonk configurations. r=lsalzman
--HG--
extra : rebase_source : 97800251c8c099fd13e8ea41ce33eb5238f11b48
2016-10-25 13:59:42 +01:00
Matt Woodrow
4d0b10822d Bug 1308363 - Remove GONK specific code from gfx/. r=jrmuizel,sotaro 2016-10-27 13:17:10 +13:00
Lee Salzman
a7e455026a Bug 1299435 - part 4 - update Skia source to m55. r=mchang
MozReview-Commit-ID: 8TA6Lovdc28

--HG--
rename : gfx/skia/skia/src/animator/SkCondensedDebug.cpp => gfx/skia/skia/src/animator/SkCondensedDebug.inc
rename : gfx/skia/skia/src/animator/SkCondensedRelease.cpp => gfx/skia/skia/src/animator/SkCondensedRelease.inc
2016-10-24 22:41:34 -04:00
Lee Salzman
5baede4297 Bug 1299435 - part 1 - fix Skia moz.build for Skia m55 update. r=mchang
MozReview-Commit-ID: IFyQJUElomB
2016-10-24 22:40:40 -04:00
Wes Kocher
951194ee45 Backed out 6 changesets (bug 1299435) for windows reftest failures a=backout
Backed out changeset 0d587a1cab8f (bug 1299435)
Backed out changeset 3ab9d3cb13aa (bug 1299435)
Backed out changeset 1ed742f88f49 (bug 1299435)
Backed out changeset 51ad497c7ac2 (bug 1299435)
Backed out changeset 06ca6acef0a2 (bug 1299435)
Backed out changeset ebd4625e101a (bug 1299435)

--HG--
rename : gfx/skia/skia/src/animator/SkCondensedDebug.inc => gfx/skia/skia/src/animator/SkCondensedDebug.cpp
rename : gfx/skia/skia/src/animator/SkCondensedRelease.inc => gfx/skia/skia/src/animator/SkCondensedRelease.cpp
2016-10-24 16:45:46 -07:00
Lee Salzman
97e509997e Bug 1299435 - part 4 - update Skia source to m55. r=mchang
MozReview-Commit-ID: 8TA6Lovdc28

--HG--
rename : gfx/skia/skia/src/animator/SkCondensedDebug.cpp => gfx/skia/skia/src/animator/SkCondensedDebug.inc
rename : gfx/skia/skia/src/animator/SkCondensedRelease.cpp => gfx/skia/skia/src/animator/SkCondensedRelease.inc
2016-10-24 15:22:26 -04:00
Lee Salzman
d3d6a89296 Bug 1299435 - part 1 - fix Skia moz.build for Skia m55 update. r=mchang
MozReview-Commit-ID: IFyQJUElomB
2016-10-24 15:22:16 -04:00
Lee Salzman
23d29e987a Bug 1308316 - ensure Skia disables hinting if Fontconfig disables it. r=jrmuizel
MozReview-Commit-ID: KGQfXQ82qfJ
2016-10-21 22:26:20 -04:00
Mason Chang
b844183f9d Bug 1309917 - Stop defaulting to system wide default fonts if no IDWriteFont exists. r=jfkthame 2016-10-12 15:53:04 -07:00
Phil Ringnalda
fd7b7476c2 Merge m-i to m-c, a=merge
MozReview-Commit-ID: 93ZdJbK1x05
2016-10-06 19:58:18 -07:00
Daniel Holbert
1b1a0c7bad Bug 1308025: Disable -Wunreachable-code compile warning for skia (which includes some intentionally disabled code). r=gw280
MozReview-Commit-ID: FRLbZR4anWI

--HG--
extra : rebase_source : 6a5dbace62ac7d9687bac52670711014a3d744dc
2016-10-06 09:40:54 -07:00
Makoto Kato
ef0d953d9e Bug 1142056 - Add aarch64 configuration on Skia's moz.build. r=gw280
MozReview-Commit-ID: 60iAZjFg6W6

--HG--
extra : histedit_source : b3bb5a3e556393ba49f43dc4ab8bdaa9be40fb0c
2016-08-23 16:54:06 +09:00
Lee Salzman
fa14fbbbf5 Bug 1305151 - allow disabling Skia debug assertions via MOZ_SKIA_DISABLE_ASSERTS env-var. r=milan
MozReview-Commit-ID: DlBiKILV5Jm
2016-09-26 11:26:42 -04:00
Jonathan Watt
995ce8d997 Update gfx/skia/README_MOZILLA to point to SkMilestone.h for the milestone number. No bug. r=me DONTBUILD 2016-10-06 10:22:26 +01:00
Lee Salzman
1e0c767fd6 Bug 1304114 - fix invalid Sk4f store to SkColor in SkPixmap::erase. r=jrmuizel
MozReview-Commit-ID: 840x1nXgYns
2016-09-21 16:40:44 -04:00
Alexandre Lissy
18acbedbf0 Bug 1303522 - Include Skia libc++ workaround (https://codereview.chromium.org/2134693002) r=lsalzman
MozReview-Commit-ID: KYRuKaaH2Iu

--HG--
extra : rebase_source : a0738dcfe863bedd3361fb60e1d10f03cfcd8eb2
2016-09-17 14:25:55 +02:00
Makoto Kato
1ab5272de6 Bug 1298569 - Part 2. Replace -fpu=neon with CONFIG['NEON_FLAGS']. r=glandium
Use CONFIG['NEON_FLAGS'] on moz.build instead.

MozReview-Commit-ID: F6R532Hi5mg

--HG--
extra : rebase_source : 7243f316de3138c702f09b336f6d430e6c9c15b5
2016-09-14 18:34:19 +09:00
Lee Salzman
7cd3c97c52 Bug 1298833 - disable gamma correction in SkFontHost_cairo to match cairo-ft. r=mchang
MozReview-Commit-ID: Ee70HBUJxou
2016-08-29 16:36:09 -04:00
Mats Palmgren
13d9155235 Bug 1298112 - Remove always-true null-check to fix compile warning. r=gwright
warning: reference cannot be bound to dereferenced null pointer in
well-defined C++ code; pointer may be assumed to always convert to
true [-Wundefined-bool-conversion]

--HG--
extra : rebase_source : 2de925356078f191b953cc8f6eec546686940c63
2016-08-25 11:27:00 -04:00
Lee Salzman
37f7205455 Bug 1298691 - silence debug warning in SkScalerContext_CairoFT::generateFontMetrics. r=mchang
MozReview-Commit-ID: KB6ihxdFfbG
2016-08-29 11:13:25 -04:00
Lee Salzman
5a843ae70c Bug 1294337 - prefer default shader procs over special-cases in SkBitmapProcState. r=mchang
MozReview-Commit-ID: FlaGXKyYvDX
2016-08-23 13:37:44 -04:00
vincentliu
6b56ae4268 Bug 1286458 - Check SkScalarIsFinite for SkVector::DotProduct(). r=lsalzman
---
 gfx/skia/skia/src/core/SkGeometry.cpp | 3 +++
 1 file changed, 3 insertions(+)
2016-08-15 16:00:31 +08:00
Lee Salzman
1d7feaf99c Bug 1294455 - disable slow debug validation in Skia. r=mchang
MozReview-Commit-ID: 2vbnbuJARh3
2016-08-11 11:34:44 -04:00
Lee Salzman
a695c40d38 Bug 1294207 - detect if FreeType supports lcd filtering in SkFontHost_cairo. r=gw280
MozReview-Commit-ID: AZkcZG4PegJ
2016-08-10 18:23:34 -04:00
Lee Salzman
ca87957544 Bug 1200684 - revise Skia row blits to preserve color when blended against itself. r=mchang
MozReview-Commit-ID: Enz05s8vGuI
2016-08-05 19:50:49 -04:00
Ethan Lin
41b10604fb Bug 1290628 - Change the assertion rule to prevent assert with large number. r=lsalzman 2016-08-02 19:47:00 +02:00