Граф коммитов

54 Коммитов

Автор SHA1 Сообщение Дата
Lee Salzman 1a23b6eab1 Bug 1400384 - support text writing modes with WebRender. r=gankro 2018-01-17 07:51:20 -05:00
Lee Salzman 7755d675bb Bug 1394568 - plumb synthetic italics flag through thebes and Moz2D into WebRender. r=gankro 2018-01-09 10:37:49 -05:00
Daniel Holbert 126bd9e1a4 Bug 1412427 part 8: (automated patch) Switch a bunch of C++ files in gfx to use our standard mode lines. r=jrmuizel
This patch was generated automatically by the "modeline.py" script, available
here: https://github.com/amccreight/moz-source-tools/blob/master/modeline.py

For every file that is modified in this patch, the changes are as follows:
 (1) The patch changes the file to use the exact C++ mode lines from the
     Mozilla coding style guide, available here:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Mode_Line

 (2) The patch deletes any blank lines between the mode line & the MPL
     boilerplate comment.

 (3) If the file previously had the mode lines and MPL boilerplate in a
     single contiguous C++ comment, then the patch splits them into
     separate C++ comments, to match the boilerplate in the coding style.

MozReview-Commit-ID: 77D61xpSmIl

--HG--
extra : rebase_source : c6162fa3cf539a07177a19838324bf368faa162b
2017-10-27 16:10:06 -07:00
Lee Salzman 892650be6c Bug 1405790 - supply FontInstancePlatformOptions to WebRender. r=jrmuizel
Patch originally developed in bug 1406138, but landed in bug 1405790 since it
needs to land together with the upstream WR changes in PR 1816.

MozReview-Commit-ID: IHVoKhVncd5

--HG--
extra : rebase_source : 912e3d903d71c1b664817457e67aa6d81be3f4dd
2017-10-05 15:26:01 -04:00
Lee Salzman b0af7fe549 Bug 1376026 - follow-up - fix ScaledFontDWrite construct parameter order. r=me 2017-07-23 21:07:50 -04:00
Lee Salzman 2d696d5c34 Bug 1376026 - fix plumbing of DWrite parameters for Skia fonts to not depend on gfxPlatform. r=jrmuizel
MozReview-Commit-ID: 5K9201eCSv
2017-06-30 14:09:05 -04:00
Sebastian Hengst 522fc18c93 Backed out changeset 24421d72ba08 (bug 1376026) 2017-07-07 21:42:09 +02:00
Lee Salzman ab6885d706 Bug 1376026 - fix plumbing of DWrite parameters for Skia fonts to not depend on gfxPlatform. r=jrmuizel
MozReview-Commit-ID: 5K9201eCSv
2017-06-30 14:09:05 -04:00
Carsten "Tomcat" Book fbc9f302f1 Backed out changeset d09fb3a5cedf (bug 1376026) 2017-07-06 08:11:48 +02:00
Carsten "Tomcat" Book 6969a898fd Backed out changeset af8c0e8089fc (bug 1376026) 2017-07-06 08:11:45 +02:00
Lee Salzman 4a11a3a52d Bug 1376026 - fix ScaledFontDWrite::InstanceData constructor to be explicit. r=me 2017-07-06 00:28:07 -04:00
Lee Salzman edc6db4195 Bug 1376026 - fix plumbing of DWrite parameters for Skia fonts to not depend on gfxPlatform. r=jrmuizel 2017-06-30 14:09:05 -04:00
Lee Salzman 28471864af Bug 1355931 - move font serialization from ScaledFont to UnscaledFont. r=jrmuizel
MozReview-Commit-ID: 3d1XMoe2BKj
2017-04-14 14:11:00 -04:00
Lee Salzman a168dcdbf3 Bug 1348980 - implement UnscaledFont API for Moz2D and thebes. r=jfkthame 2017-04-06 17:41:02 -04:00
Mason Chang 5e1c34af71 Bug 1329314 - Add support for nsDisplayText webrender display item. r=jrmuizel? 2017-01-06 11:50:53 -08:00
Ting-Yu Chou 3b76c1d27b Bug 1322465 part 5 - Use explicit/MOZ_IMPLICIT for the unary constructors in gfx/. r=Ehsan
MozReview-Commit-ID: 5sdclirTQCV

--HG--
extra : rebase_source : 65b8fe4357ee19e858d3ee406495a1c2c3046c90
2016-12-16 15:54:32 +08:00
Ethan Lin 68f7c140b8 Bug 1308394 - In CopyGlyphsToBuilder, use PathBuilder's backend instead of DrawTarget's. r=bas
--HG--
extra : rebase_source : 27d283fe8fecf613bdc4cc7c0492a0d3e97a3253
2016-10-26 19:46:00 +02: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
Mason Chang 196df029f8 Bug 1299903. Force GDI Classic rendering for specific fonts with skia on windows. r=lsalzman 2016-09-16 12:25:42 -07:00
Mason Chang b4407fab22 Bug 1300025. Use embedded bitmaps in CJK fonts with skia on Windows. r=lsalzman 2016-09-08 09:34:10 -07:00
Mason Chang e6c63d0931 Bug 1298484. Use cleartype and convert to grayscale AA for skia windows fonts if cleartype is disabled system wide. r=lsalzman 2016-09-02 15:00:29 -07:00
Bas Schouten e0031c0160 Bug 943626 - Part 2: Implement GetGlyphMetrics API for DirectWrite r=jrmuizel 2016-08-11 15:47:32 -04:00
Bas Schouten 3547be617f Bug 943626 - Part 1: Add GetGlyphDesign/RasterizationMetric API to Moz2D r=jrmuizel 2016-08-11 15:47:32 -04:00
Mason Chang bd43ebe418 Bug 1249600. Fallback to arial fonts or draw nothing if typeface is unavailable. r=bas 2016-05-20 09:16:29 -07:00
Mason Chang c89157b9ea Bug 1249600. Lookup font and font family from font face when requesting SkTypeface. r=bas 2016-03-08 07:37:16 -08:00
Mason Chang 2e3ff601d6 Bug 842894 - Support DirectWrite using the Skia backend. r=bas 2016-01-06 11:35:04 -08:00
Bob Owen 1fe62dee68 Bug 1156742 Part 24: Add new Recorded event to record font data. r=bas
We create and destroy ScaledFonts for every piece of text we write.
That causes a huge amount of duplicated data within the recording.
This splits out the recording of the font data itself from the ScaledFont.
The key generated to determine uniqueness could probably be fairly easily faked, but for our purposes that doesn't matter.
2016-01-05 10:08:58 +00:00
Bob Owen 3b91f57af4 Bug 1156742 Part 17: Add virtual destructor to RecorededEvent and fix subsequent crash with DWrite playback fonts. r=bas 2016-01-05 10:08:57 +00:00
Bob Owen 9536340a3a Bug 1156742 Part 3: Add support for FontType::CAIRO to CreateScaledFontForTrueTypeData on Windows. r=bas
Parts of this change and related code get moved around in Part 24.
2016-01-05 10:08:56 +00:00
Wes Kocher a5249b6201 Backed out 25 changesets (bug 1156742) for build bustage in SkOSLibrary_win.cpp CLOSED TREE
Backed out changeset 31c0aadae8e7 (bug 1156742)
Backed out changeset f08df57ff700 (bug 1156742)
Backed out changeset 90c026d5dcb1 (bug 1156742)
Backed out changeset 8c6d14d80238 (bug 1156742)
Backed out changeset 72d86b0471c9 (bug 1156742)
Backed out changeset 363829accc09 (bug 1156742)
Backed out changeset 16360fe94d54 (bug 1156742)
Backed out changeset 5355c636a81a (bug 1156742)
Backed out changeset 18844d26b873 (bug 1156742)
Backed out changeset 99df86591613 (bug 1156742)
Backed out changeset 7ac1c7e15a11 (bug 1156742)
Backed out changeset de352000aae1 (bug 1156742)
Backed out changeset 4dd34ea230c6 (bug 1156742)
Backed out changeset 48c6ce65a5c2 (bug 1156742)
Backed out changeset dd52947f73c6 (bug 1156742)
Backed out changeset 5fe429ee880c (bug 1156742)
Backed out changeset dedca8fb19b0 (bug 1156742)
Backed out changeset d748b1354f92 (bug 1156742)
Backed out changeset 7f8e59588518 (bug 1156742)
Backed out changeset b90d302c57f6 (bug 1156742)
Backed out changeset 7a4da453572c (bug 1156742)
Backed out changeset a40eea914519 (bug 1156742)
Backed out changeset 99a8859afcdb (bug 1156742)
Backed out changeset 4934e88b2d7a (bug 1156742)
Backed out changeset 79733166f05e (bug 1156742) for build bustage in SkOSLibrary_win.cpp CLOSED TREE

--HG--
extra : amend_source : beeb6abbcc724b79ac166e828efa78dc4c5301da
2015-12-21 13:47:33 -08:00
Bob Owen fb35888c83 Bug 1156742 Part 24: Add new Recorded event to record font data. r=bas
We create and destroy ScaledFonts for every piece of text we write.
That causes a huge amount of duplicated data within the recording.
This splits out the recording of the font data itself from the ScaledFont.
The key generated to determine uniqueness could probably be fairly easily faked, but for our purposes that doesn't matter.
2015-12-21 20:33:14 +00:00
Bob Owen f8497152ba Bug 1156742 Part 17: Add virtual destructor to RecorededEvent and fix subsequent crash with DWrite playback fonts. r=bas 2015-12-21 20:33:14 +00:00
Bob Owen 2ce74bca79 Bug 1156742 Part 3: Add support for FontType::CAIRO to CreateScaledFontForTrueTypeData on Windows. r=bas
Parts of this change and related code get moved around in Part 24.
2015-12-21 20:33:13 +00:00
Nathan Froyd 6f23e9f332 Bug 1222175 - initialize base of ScaledFontDWrite before its members; r=Bas
Initializing things in the other order causes warnings on clang-cl.
2015-11-05 15:19:33 -05:00
Mason Chang 9e9747858c Backout bug 842894 for lack of skia documentation. r=me 2015-10-28 15:17:04 -07:00
Mason Chang f9083bce99 Bug 842894 - Support DirectWrite using the Skia backend. r=bas 2015-10-28 14:54:54 -07:00
Nathan Froyd 01583602a9 Bug 1207245 - part 6 - rename nsRefPtr<T> to RefPtr<T>; r=ehsan; a=Tomcat
The bulk of this commit was generated with a script, executed at the top
level of a typical source code checkout.  The only non-machine-generated
part was modifying MFBT's moz.build to reflect the new naming.

CLOSED TREE makes big refactorings like this a piece of cake.

 # The main substitution.
find . -name '*.cpp' -o -name '*.cc' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    xargs perl -p -i -e '
 s/nsRefPtr\.h/RefPtr\.h/g; # handle includes
 s/nsRefPtr ?</RefPtr</g;   # handle declarations and variables
'

 # Handle a special friend declaration in gfx/layers/AtomicRefCountedWithFinalize.h.
perl -p -i -e 's/::nsRefPtr;/::RefPtr;/' gfx/layers/AtomicRefCountedWithFinalize.h

 # Handle nsRefPtr.h itself, a couple places that define constructors
 # from nsRefPtr, and code generators specially.  We do this here, rather
 # than indiscriminantly s/nsRefPtr/RefPtr/, because that would rename
 # things like nsRefPtrHashtable.
perl -p -i -e 's/nsRefPtr/RefPtr/g' \
     mfbt/nsRefPtr.h \
     xpcom/glue/nsCOMPtr.h \
     xpcom/base/OwningNonNull.h \
     ipc/ipdl/ipdl/lower.py \
     ipc/ipdl/ipdl/builtin.py \
     dom/bindings/Codegen.py \
     python/lldbutils/lldbutils/utils.py

 # In our indiscriminate substitution above, we renamed
 # nsRefPtrGetterAddRefs, the class behind getter_AddRefs.  Fix that up.
find . -name '*.cpp' -o -name '*.h' -o -name '*.idl' | \
    xargs perl -p -i -e 's/nsRefPtrGetterAddRefs/RefPtrGetterAddRefs/g'

if [ -d .git ]; then
    git mv mfbt/nsRefPtr.h mfbt/RefPtr.h
else
    hg mv mfbt/nsRefPtr.h mfbt/RefPtr.h
fi

--HG--
rename : mfbt/nsRefPtr.h => mfbt/RefPtr.h
2015-10-18 01:24:48 -04:00
Nathan Froyd 583afa0965 Bug 1207245 - part 3 - switch all uses of mozilla::RefPtr<T> to nsRefPtr<T>; r=ehsan
This commit was generated using the following script, executed at the
top level of a typical source code checkout.

 # Don't modify select files in mfbt/ because it's not worth trying to
 # tease out the dependencies currently.
 #
 # Don't modify anything in media/gmp-clearkey/0.1/ because those files
 # use their own RefPtr, defined in their own RefCounted.h.
find . -name '*.cpp' -o -name '*.h' -o -name '*.mm' -o -name '*.idl'| \
    grep -v 'mfbt/RefPtr.h' | \
    grep -v 'mfbt/nsRefPtr.h' | \
    grep -v 'mfbt/RefCounted.h' | \
    grep -v 'media/gmp-clearkey/0.1/' | \
    xargs perl -p -i -e '
 s/mozilla::RefPtr/nsRefPtr/g; # handle declarations in headers
 s/\bRefPtr</nsRefPtr</g; # handle local variables in functions
 s#mozilla/RefPtr.h#mozilla/nsRefPtr.h#; # handle #includes
 s#mfbt/RefPtr.h#mfbt/nsRefPtr.h#;       # handle strange #includes
'

 # |using mozilla::RefPtr;| is OK; |using nsRefPtr;| is invalid syntax.
find . -name '*.cpp' -o -name '*.mm' | xargs sed -i -e '/using nsRefPtr/d'

 # RefPtr.h used |byRef| for dealing with COM-style outparams.
 # nsRefPtr.h uses |getter_AddRefs|.
 # Fixup that mismatch.
find . -name '*.cpp' -o -name '*.h'| \
    xargs perl -p -i -e 's/byRef/getter_AddRefs/g'
2015-10-18 00:40:10 -04:00
Nathan Froyd 974d8120f2 Bug 1161627 - part 2 - machine-convert TemporaryRef<T> to already_AddRefed<T>; r=ehsan
This conversion was done with the script:

  find . -name '*.cpp' -o -name '*.h' -o -name '*.mm' -o -name '*.idl' | \
    egrep -v 'cairo-win32-refptr.h|RefPtr.h|TestRefPtr.cpp' | \
    xargs sed -i -e 's/mozilla::TemporaryRef</already_AddRefed</g' \
                 -e 's/TemporaryRef</already_AddRefed</g'

Manual fixups were performed in the following instances:

- We handled mfbt/RefPtr.h manually so as to not convert TemporaryRef itself
  into already_AddRefed.

- The following files had explicit Move() calls added to make up for the lack
  of a copy constructor on already_AddRefed:

  dom/base/ImageEncoder.cpp
  dom/media/MediaTaskQueue.{h,cpp}
  dom/media/webaudio/PannerNode.cpp

- A redundant overload for MediaTaskQueue::Dispatch was deleted.

- A few manual fixups were required in mfbt/tests/TestRefPtr.cpp.

- Comments, using declarations, and forward declarations relating to
  TemporaryRef in dom/canvas/ and gfx/layers/ were changed to refer to
  already_AddRefed.
2015-06-17 10:00:52 -04:00
Ehsan Akhgari 883849ee32 Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00
Ehsan Akhgari e1b60f2947 Bug 935778 - Part 0.6: Add support for MOZ_DECLARE_REFCOUNTED_VIRTUAL_TYPENAME and use it in moz2d
X-Git-Commit-ID: bc256ac44cbba52b04f8f0390965632ec4507608
2014-02-24 08:23:37 -05:00
Benoit Jacob 6660086ef4 Bug 958375 - 7/9 - Make Font-related enums typed - r=Bas
Specifically:
  r=Bas for manual changes
  f=Bas for automatic changes
See attachments on the bug for the specific breakdown.
2014-01-10 14:06:16 -05:00
Kevin Simons f09656d765 Bug 944646 - Check the DrawTarget type before downcasting PathBuilders. r=mattwoodrow
Previously the ScaledFontBase::CopyGlyphsToBuilder methods in the
various ScaledFont subclasses static_cast-ed the passed in PathBuilder
objects without checking which sort of DrawSurface they were created by.
2013-12-12 17:37:00 -05:00
Bas Schouten 6e12ca6e4b Bug 918613: Convert cairo path code to use cairo_path_t. r=jrmuizel 2013-09-28 16:20:24 +02:00
Bas Schouten a3c970c2dd Bug 883004 - Part 3: Add Direct2D 1.1 backend to Moz2D. r=jrmuizel 2013-07-17 14:12:22 +02:00
Trevor Saunders cd9ce5e64f no bug - mark several classes final to avoid warnings about deleting objects of polymorphic type 2013-01-11 04:43:29 -05:00
Bas Schouten b084ef8c84 Bug 814101: Respect system-wide cleartype setting. r=jrmuizel,jfkthame 2012-11-23 02:53:12 +01:00
Bas Schouten 43ba37b366 Bug 792207 - Part 2: Add method to store and create from TrueType data. r=jrmuizel 2012-09-24 15:02:49 +00:00
Nicholas Cameron ebac508850 Bug 780392; Make ScaledFontDWrite inherit from ScaledFontBase. r=bas
--HG--
extra : rebase_source : 83ffee7d64f1ecdfa15b8cf96024c27fdf00c29b
2012-08-09 08:17:04 +12:00
Gervase Markham 82ff7027aa Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00