Commit Graph

24091 Commits

Author SHA1 Message Date
Bas Schouten
1d78258aee Bug 1325199: Only read system parameters for ClearType when we receive a paint event. r=jrmuizel
MozReview-Commit-ID: EjQyCcdWXEc
2016-12-22 12:06:15 +01:00
John Lin
0bc851e265 Bug 1325072 - fall back to sw vsync source when Java environment is not available. r=snorp
MozReview-Commit-ID: KYWKB1WWdzp
2016-12-22 12:55:48 +08:00
John Lin
340ed6dfc5 Bug 1075025 - part 2: implement AndroidVsyncSource. r=snorp
MozReview-Commit-ID: FRgVsLEdKan
2016-12-22 12:55:32 +08:00
David Anderson
504484a456 Remove PLayer. (bug 1323539 part 2, r=mattwoodrow) 2016-12-21 10:43:47 -05:00
David Anderson
6dda51a503 Don't access ShadowableLayer from ClientLayer's destructor. (bug 1323539 part 1, r=mattwoodrow) 2016-12-21 10:43:04 -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
Cameron McCormack
d4d8ba1d5f Bug 1324624 - stylo: Mark currently failing crashtests with asserts-if(stylo,...). r=xidorn
MozReview-Commit-ID: 7iiwRwiQ8s4
2016-12-21 15:42:36 +08:00
Wes Kocher
b5f33578be Merge m-c to inbound, a=merge 2016-12-20 11:47:17 -08:00
Wes Kocher
584a2f0f62 Merge inbound to central, a=merge
MozReview-Commit-ID: Cr9L1dhIzP2
2016-12-20 11:41:57 -08:00
Lee Salzman
d9d2ea27be Bug 1323821 - only replace texture-backed SkImage on success in SourceSurfaceSkia::GetData. r=jrmuizel
MozReview-Commit-ID: FbySOGcLhwt
2016-12-20 12:37:19 -05:00
Jonathan Kew
2a3c8294aa Bug 1322989 - Preserve accent on Greek disjunctive eta (ή) when applying text-transform:uppercase. r=m_kato 2016-12-20 10:06:51 +00:00
Carsten "Tomcat" Book
fc4bd848dd Backed out changeset 422af49b7ae8 (bug 1322989) for bustage 2016-12-20 11:35:57 +01:00
Jonathan Kew
60ef0df121 Bug 1322989 - Preserve accent on Greek disjunctive eta (ή) when applying text-transform:uppercase. r=m_kato 2016-12-20 10:06:51 +00:00
peter chang
ea69eeb193 Bug 1323837 - Draw nothing if there are no color stops for gradient effect, r=bas
MozReview-Commit-ID: BnZlh2NhdHX

--HG--
extra : rebase_source : e221cebdb64e55926c63fd105df0a55635b28e19
2016-12-16 13:55:22 +08:00
Lee Salzman
731702eb1c Bug 1324422 - initialize mPermitSubpixelAA for all tiles in DrawTargetTiled. r=sotaro
MozReview-Commit-ID: AM0OxyhLrzJ
2016-12-19 21:12:07 -05:00
Wes Kocher
b427632e5a Merge m-c to inbound, a=merge 2016-12-19 16:48:34 -08:00
Jeff Gilbert
4fe7340dc2 Bug 1309643 - Only enable primitive restart index on OSX for DrawElements. - r=ethlin 2016-12-19 15:24:30 -08:00
Nicholas Nethercote
3af5047314 Bug 1299335 (part 8) - Streamline nsIWidget::Enable. r=mstange.
This patch changes it from |NS_IMETHOD| to |virtual void| because every
implementation of these functions always returns |NS_OK|.

--HG--
extra : rebase_source : 07ee29c514bf35b97d7195c53bb5b9220d1ef961
2016-12-19 20:54:16 +11:00
Nicholas Nethercote
a28c8f38b2 Bug 1299335 (part 7) - Streamline nsIWidget::{Move,Resize}. r=mstange.
This patch changes them from |NS_IMETHOD| to |virtual void| because every
implementation of these functions always returns |NS_OK|.

--HG--
extra : rebase_source : 6207df5a46aeb6b8aaa0f697447a51bc6a6dc366
2016-12-19 20:54:03 +11:00
Milan Sreckovic
6fcbf9169d Bug 1323625: The callers are using Factory::CheckSurfaceSize to guard against zero sized surfaces, so we'll remove the warning. r=rhunt
MozReview-Commit-ID: DzFUjTlXfeT

--HG--
extra : rebase_source : 683250aecffa1e738e5f4963c677b4e169debdfd
2016-12-15 10:32:10 -05:00
Milan Sreckovic
010d912f51 Bug 795627: Allow Skia canvas with accelerated Windows. r=gw280
MozReview-Commit-ID: DKyKC7n3OEM

--HG--
extra : rebase_source : 67d8b897d0e2bf520d92b3a617f01ae0fa0bf45d
2016-12-14 19:10:27 -05:00
Daosheng Mu
370aa4a0c8 Bug 1315896 - Part 3: Remove MOZ_GAMEPAD in VR module; r=kip
MozReview-Commit-ID: I9vJvxgFgIh

--HG--
extra : rebase_source : 270e971ace44b00d9877a67f68f349bbd9b550c1
2016-12-08 13:01:11 -10:00
Phil Ringnalda
3abfe370ac Merge m-i to m-c, a=merge
MozReview-Commit-ID: 3TWj1elRxgV
2016-12-17 14:00:48 -08:00
Chris Peterson
78f7bd1dd7 Bug 1323923 - Part 2: Suppress more clang warnings and unify CLANG_CXX/CLANG_CL warning flags in gfx/cairo. r=lsalzman
gfx/cairo/cairo/src/cairo-image-surface.c:1225:35 [-Wabsolute-value] using floating point absolute value function 'fabs' when argument is of integer type
gfx/cairo/cairo/src/cairo-image-surface.c:1227:35 [-Wabsolute-value] using floating point absolute value function 'fabs' when argument is of integer type
gfx/cairo/cairo/src/cairo-quartz-surface.c:1919:12 [-Wunreachable-code] code will never be executed
gfx/cairo/cairo/src/cairo-quartz-surface.c:1920:6 [-Wunreachable-code] code will never be executed
gfx/cairo/cairo/src/cairo-quartz-surface.c:3530:18 [-Wunused-variable] unused variable 'i'
gfx/cairo/cairo/src/cairo-version.c:39:9 [-Wmacro-redefined] 'CAIRO_VERSION_H' macro redefined
2016-12-15 23:59:12 -08:00
Chris Peterson
a2deb2ec60 Bug 1323923 - Part 1: Fix -Wunknown-warning-option clang warning in gfx/cairo. r=lsalzman
warning: unknown warning option '-Wno-unused-but-set-variable'; did you mean '-Wno-unused-const-variable'? [-Wunknown-warning-option]
2016-12-15 23:58:57 -08: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
Jonathan Watt
e3366cf656 Bug 1322729 - Have gfxContext always use DrawTarget::PushLayer/PopLayer. r=lsalzman 2016-12-16 11:02:04 -05:00
Lee Salzman
90fe07ab69 Bug 1322729 - fix DrawTargetSkia::BorrowCGContext to work with PushLayer. r=mchang
MozReview-Commit-ID: Hl2t9gxIdYI
2016-12-16 11:02:04 -05:00
Lee Salzman
a3ecdc5084 Bug 1322729 - fix DrawTargetTiled to forward SetPermitSubpixelAA. r=mchang
MozReview-Commit-ID: 7aicn9Crru9
2016-12-16 11:02:04 -05:00
Lee Salzman
a55eee6d3f Bug 1322729 - fix DrawTargetTiled::PushLayer to properly handle clipping. r=mchang
MozReview-Commit-ID: 2otVOl9J4pZ
2016-12-16 11:02:04 -05:00
Carsten "Tomcat" Book
a244c7fb4a merge mozilla-inbound to mozilla-central a=merge 2016-12-16 16:04:50 +01:00
Cameron McCormack
366f6eb24d Bug 1323892 - Disable currently crashing stylo crashtests. r=xidorn
MozReview-Commit-ID: 2BNjdBWdT5V
2016-12-16 18:54:41 +08:00
Ting-Yu Chou
4f285bd583 Bug 1322458 - Fix kungFuDeathGrip errors that clang plugin reports on Windows. r=aklotz,Ehsan
MozReview-Commit-ID: FLTLZSg2yh9

--HG--
extra : rebase_source : e8aad8f35cffb3312e043a4fcec6296371baf432
2016-12-14 16:34:12 +08:00
Lee Salzman
b79dc7d5f9 Bug 1323284 - don't enable GL compositor by default on Linux nightly. r=milan
MozReview-Commit-ID: GbX38FNiBn5
2016-12-15 11:44:19 -05: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
Carsten "Tomcat" Book
4a9a623faf Merge mozilla-central to mozilla-inbound 2016-12-15 14:24:41 +01:00
Bob Owen
ca714c62ab Bug 1321522: Add null check and logging on fontResource in RecordedScaledFontCreation::PlayEvent. r=milan
MozReview-Commit-ID: 3nM28xgGLPO
2016-12-15 10:55:10 +00:00
Botond Ballo
2e3caa982c Bug 1321412 - Add support for partial prerendering to ShouldPrerenderTransformedContent(). r=mattwoodrow
This is behind a pref and not enabled by default yet.

MozReview-Commit-ID: HKbP02PkdI9

--HG--
extra : rebase_source : 3f724f12d467dfb6e3ac1c44841e8e452a7d4b7e
2016-12-14 14:31:20 -05:00
Botond Ballo
d806f521fb Bug 1321412 - Allow controlling the size of the prerendered area via prefs. r=birtles,flod,mattwoodrow
Note that the default values of the prefs are chosen so as to preserve
existing behaviour.

The patch also updates a user-visible warning message, which was
already out of date as of bug 1274991.

MozReview-Commit-ID: AqBBoIucShT

--HG--
extra : rebase_source : 010aa55255d49e4875cb6870f309649a9ca762d5
2016-12-09 20:23:42 -05:00
Botond Ballo
315932fa35 Bug 1321412 - Add an operator<< to BaseSize. r=kats
MozReview-Commit-ID: 4zVkyafxtfG

--HG--
extra : rebase_source : 4a5a3f09ab0008d7e736cedb817505e6e45b054c
2016-11-25 20:46:58 -05:00
Botond Ballo
ea351be0c0 Bug 1321412 - Add Min() and Max() functions to BaseSize. r=kats
MozReview-Commit-ID: 6GTzkpwwDNu

--HG--
extra : rebase_source : 1d8e888649c10f8f044f475095cb592538992946
2016-11-23 19:27:27 -05:00
Botond Ballo
7a4cb0cf48 Bug 1321412 - Fix a bug in the definition of SizeTyped. r=kats
A second template parameter 'F' was previously added to SizeTyped, but was
not correspondingly added to the argument passed for the 'Sub' parameter
of BaseSize.

MozReview-Commit-ID: 2pRQXeWMJpP

--HG--
extra : rebase_source : c1e71b18fdb303f9684d0c9c26dca2462fa0f62d
2016-11-23 19:26:55 -05:00
Carsten "Tomcat" Book
fd4709f9c1 merge mozilla-inbound to mozilla-central a=merge 2016-12-14 16:41:28 +01:00
Jonathan Kew
8edf19e319 Bug 1320665 - Add support for 'cmap' subtable format 13. r=jrmuizel 2016-12-13 12:15:24 +00:00
Miko Mynttinen
c0b2cd5b45 Bug 1274673 - Use binary space partitioning for sorting/drawing layers - Part 3: Use BSPTree for layer sorting r=jrmuizel,mattwoodrow
MozReview-Commit-ID: 3Hy4IRDFgaP

--HG--
extra : rebase_source : ec31672ba66a81537cd21356466c8774023edd60
2016-12-06 13:39:01 -10:00
Miko Mynttinen
d8d0459a98 Bug 1274673 - Use binary space partitioning for sorting/drawing layers - Part 2: Rename Polygon3D to Polygon, and use 4D points for all calculations r=kip
MozReview-Commit-ID: I6DB8xldpjO

--HG--
extra : rebase_source : c881f68722404e0d749a00424eb17d284a7383d2
2016-12-04 17:49:32 +01:00
Miko Mynttinen
93c8550e72 Bug 1274673 - Use binary space partitioning for sorting/drawing layers - Part 1: Add Point4D construction/conversion from/to Point3D r=bas
MozReview-Commit-ID: 2zvXkYcVV1A

--HG--
extra : rebase_source : 1a2aab40bfb17573fd1290484d9463fe5bf43d1e
2016-11-21 19:50:33 +01:00
George Wright
424157b16b Bug 1318845 - Ensure we support DWrite fonts in the parent process when the GPU process is enabled r=Bas 2016-12-15 17:24:58 -05:00
Phil Ringnalda
cb73f8ea6a Merge m-c to m-i
MozReview-Commit-ID: EDvQhOpyRJu
2016-12-13 19:30:23 -08:00
Phil Ringnalda
36bfd0a8da Merge m-i to m-c, a=merge
MozReview-Commit-ID: ODjsKqdMLM
2016-12-13 19:25:01 -08:00