☠☠ backed out by 8f8cb62a8749 ☠ ☠ | |
author | Cameron McCormack <cam@mcc.id.au> |
Sun, 30 Apr 2017 14:47:22 +0800 | |
changeset 356466 | 31a0881cfb4714a43c725d114775f1b9061d81f4 |
parent 356465 | 529d037f9c3361be19480d26054b4a790c2aafdd |
child 356467 | 34280baeaabe27be2c7d587b6e1875d260bdbcdf |
push id | 31767 |
push user | cbook@mozilla.com |
push date | Fri, 05 May 2017 13:15:58 +0000 |
treeherder | mozilla-central@8872ad4d52b6 [default view] [failures only] |
perfherder | [talos] [build metrics] [platform microbench] (compared to previous push) |
reviewers | lsalzman |
bugs | 1356103 |
milestone | 55.0a1 |
first release with | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
last release without | nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
|
gfx/2d/2D.h | file | annotate | diff | comparison | revisions |
--- a/gfx/2d/2D.h +++ b/gfx/2d/2D.h @@ -21,16 +21,17 @@ // to be able to hold on to a GLContext. #include "mozilla/GenericRefCounted.h" #include "mozilla/MemoryReporting.h" // This RefPtr class isn't ideal for usage in Azure, as it doesn't allow T** // outparams using the &-operator. But it will have to do as there's no easy // solution. #include "mozilla/RefPtr.h" +#include "mozilla/ServoUtils.h" #include "mozilla/WeakPtr.h" #include "mozilla/DebugOnly.h" #ifdef MOZ_ENABLE_FREETYPE #include <string> #endif @@ -58,16 +59,33 @@ class SkCanvas; struct gfxFontStyle; struct CGContext; typedef struct CGContext *CGContextRef; namespace mozilla { namespace gfx { +class UnscaledFont; +} + +template<> +struct WeakPtrTraits<gfx::UnscaledFont> +{ + static void AssertSafeToAccessFromNonOwningThread() + { + // We want to allow UnscaledFont objects that were created on the main + // thread to be accessed from other threads if the Servo font metrics + // mutex is locked, and for objects created on Servo style worker threads + // to be accessed later back on the main thread. + AssertIsMainThreadOrServoFontMetricsLocked(); + } +}; + +namespace gfx { class ScaledFont; class SourceSurface; class DataSourceSurface; class DrawTarget; class DrawEventRecorder; class FilterNode; class LogForwarder;