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

57 Коммитов

Автор SHA1 Сообщение Дата
Jonathan Kew 4b5525bbf7 Bug 1362167 - Use strongly-typed enum classes instead of generic uint16_t fields for the gfxShapedText and gfxTextRun flags. r=jrmuizel 2017-05-04 22:27:05 +01:00
Lee Salzman a168dcdbf3 Bug 1348980 - implement UnscaledFont API for Moz2D and thebes. r=jfkthame 2017-04-06 17:41:02 -04:00
Daniel Holbert eb14ae51cf Bug 1329670: Change gfxFont::CopyWithAntialiasOption to return UniquePtr instead of raw pointer. r=jfkthame
MozReview-Commit-ID: B5UNazyXPL2
2017-01-09 09:41:35 -08:00
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
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
Jonathan Kew 993ba1a742 Bug 1296742 - Initialize gfxGDIFont's metrics at construction time, like other platform font subclasses, and remove its no-longer-needed support for init-on-first-use pattern. r=jrmuizel 2016-08-22 21:39:19 +01:00
Jonathan Kew 48c59f0c3d Bug 1282248 - Declare a bunch of gfxTextRun measurement/drawing methods and related helpers as const. r=m_kato 2016-06-27 17:41:55 +01:00
Jonathan Kew 28a9e2cf14 Bug 1265452 - Remove use of nsAutoPtr from gfx/thebes. r=jrmuizel 2016-04-15 20:45:37 +01:00
Mason Chang 2e3ff601d6 Bug 842894 - Support DirectWrite using the Skia backend. r=bas 2016-01-06 11:35:04 -08:00
Nicholas Nethercote 06e901cb9f Bug 1231550 - Use DrawTarget instead of gfxContext and/or nsRenderingContext in many places in font/text code. r=jfkthame.
AutoTextRun now only needs a DrawTarget instead of an nsRenderingContext, and
similar nsRenderingContext/gfxContext-to-DrawTarget replacements can be
propagated a long way up the call graph. This patch replaces 93 occurrences of
nsRenderingContext and 135 occurrences of gfxContext with DrawTarget; that's
13% of them.

The patch is mostly plumbing changes. A couple of not-entirely-plumbing
changes:

- It adds a comment about the null check in
  gfxGlyphExtents::GetTightGlyphExtentsAppUnits().

- A couple of functions simply had an unused gfxContext or nsRenderingContext
  parameter removed, e.g. SetLineBreaks().

--HG--
extra : rebase_source : 8f56994bb4d254a86788b17ab2864ebc758a7e6b
2015-12-15 13:56:41 -08:00
Nicholas Nethercote 2a8e0225ac Bug 1232822 (part 1) - Moz2Dify SetupCairoFont(). r=jfkthame.
This is now trivial.
2015-12-15 13:56:40 -08:00
Nathan Froyd 4094e18ff5 Bug 1233069 - add override declarations to Windows graphics headers; r=Bas
This change silences a number of -Winconsistent-missing-override
warnings on clang-cl.
2015-12-16 10:41:21 -05: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 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
Robert O'Callahan 6630278821 Bug 1099977. Part 1: Make gfxDwriteFont cache GetSpaceGlyph. r=jfkthame
--HG--
extra : rebase_source : b658f532dfef60d68c2d3f4aeae08de9966033ed
2014-11-18 23:19:54 +13:00
Jonathan Kew 43167d1667 Bug 1097615 - Add MOZ_OVERRIDE annotations to subclasses of gfxFont. r=jdaggett 2014-11-17 09:59:50 +00:00
Jonathan Watt d6d15a2f78 Bug 1093811 - Convert the gfxFont::GetGlyphWidth() virtual method to take a Moz2D DrawTarget instead of a Thebes gfxContext. r=jfkthame 2014-11-10 21:41:41 +00:00
Markus Stange defd3c048d Bug 1055634 - Propagate font smoothing background colors to layers. r=roc 2014-10-24 18:32:23 +02:00
Jonathan Kew 0e773b6fc0 Bug 1081867 - Convert textrun metrics to physical coordinates before merging with visual-overflow region. r=smontagu 2014-10-16 09:40:19 +01:00
Jonathan Kew 55f3a61af3 Bug 1065002 pt 1.1 - Rename gfxFont::GetMetrics to GetHorizontalMetrics, and add a GetMetrics wrapper to access it. r=jdaggett 2014-09-30 07:37:40 +01:00
Jonathan Kew 68d2010cfd bug 1018551 - clean up redundancy in the font/shaper code. r=jdaggett 2014-05-31 08:12:40 +01:00
Jonathan Kew 088699795b bug 985220 - remove the old GDI, Uniscribe and DWrite text-shaping code paths, as we now use HarfBuzz or Graphite for all shaping on Windows. r=jdaggett 2014-06-09 15:47:31 +01:00
Jonathan Kew fbe8c6fe21 backout changeset 59b2dd6b5048 (bug 985220) due to MS Sans Serif regression with Thai system locale (see bug 1020826). 2014-06-06 22:41:09 +01:00
Jonathan Kew f3e4b38e26 backout changeset 3e9d9aa535c7 (bug 1018551) due to MS Sans Serif regression with Thai system locale (see bug 1020826). 2014-06-06 22:41:04 +01:00
Jonathan Kew 38068abbd8 bug 1018551 - clean up redundancy in the font/shaper code. r=jdaggett on a CLOSED TREE 2014-05-31 08:12:40 +01:00
Carsten "Tomcat" Book 82f1d58585 Backed out changeset fd9518344a23 (bug 1018551) for crashes 2014-06-02 10:40:57 +02:00
Jonathan Kew ed41d90a09 bug 1018551 - clean up redundancy in the font/shaper code. r=jdaggett 2014-06-02 07:51:34 +01:00
Jonathan Kew 0d94ebb7d2 bug 985220: remove the old GDI, Uniscribe and DWrite text-shaping code paths, as we now use HarfBuzz or Graphite for all shaping on Windows. r=jdaggett 2014-03-19 12:27:44 +00:00
Nicholas Nethercote 70723692af Bug 921923 (part 4) - Make multi-output sizeOfFoo() functions more consistent in gfx/thebes/. r=jkew.
--HG--
extra : rebase_source : 02ddce0e34ec6619fcaf92aa30addc77bdd8b80f
2013-10-14 19:19:47 -07:00
Robert O'Callahan 03e7828db2 Bug 910989. Remove nsTHashtable::Init, fallible allocation, and MT hashtables. r=ehsan,bsmedberg
--HG--
extra : rebase_source : 0787130b1814c74bfb38dc178de94022f0b2e64e
2013-09-02 20:41:57 +12:00
Catalin Iacob 6f4758d23e Bug 798914 (part 5) - Use newly introduced mozilla::MallocSizeOf instead of nsMallocSizeOfFun. r=njn.
--HG--
extra : rebase_source : fc472490dd978d165f02f77ed37f07aed6e5bb61
2013-06-23 14:03:39 +02:00
Jonathan Kew 3eb1fdd857 bug 847344 - refactor gfxFont/gfxFontEntry and associated classes for more efficient use of HarfBuzz and Graphite shaper APIs. r=roc 2013-05-16 17:29:20 +01:00
Brendan Dahl e3eb98c915 Bug 791466 - Fix direct write cairo scaled font. r=Bas 2012-11-12 11:35:49 -08:00
Bas Schouten a1cb82c019 Bug 792207 - Part 1: Retain ScaledFont objects for gfxFonts. r=jrmuizel 2012-09-24 15:02:49 +00:00
Ehsan Akhgari e368dc9c85 Bug 579517 - Part 1: Automated conversion of NSPR numeric types to stdint types in Gecko; r=bsmedberg
This patch was generated by a script.  Here's the source of the script for
future reference:

function convert() {
echo "Converting $1 to $2..."
find . ! -wholename "*nsprpub*" \
       ! -wholename "*security/nss*" \
       ! -wholename "*/.hg*" \
       ! -wholename "obj-ff-dbg*" \
       ! -name nsXPCOMCID.h \
       ! -name prtypes.h \
         -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 PRInt8 int8_t
convert PRUint8 uint8_t
convert PRInt16 int16_t
convert PRUint16 uint16_t
convert PRInt32 int32_t
convert PRUint32 uint32_t
convert PRInt64 int64_t
convert PRUint64 uint64_t

convert PRIntn int
convert PRUintn unsigned

convert PRSize size_t

convert PROffset32 int32_t
convert PROffset64 int64_t

convert PRPtrdiff ptrdiff_t

convert PRFloat64 double
2012-08-22 11:56:38 -04:00
Bas Schouten 5934a62347 Bug 758120: Block attempts to do manual subpixel-AA on bitmap fonts. r=jfkthame 2012-05-24 17:43:55 +02:00
Gervase Markham 82ff7027aa Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Bas Schouten cf4dd68f30 Bug 743593: Properly cast gfxFont based on type. r=jfkthame 2012-04-11 16:55:31 +02:00
Jonathan Kew 4358625535 bug 688125 - part 2 - add memory reporting for fonts in the gfxFontCache. r=njn 2012-03-23 12:14:16 +00:00
Bas Schouten 0e7b846268 Bug 736134 - Part 3: Use GlyphRenderingOptions API when drawing Azure fonts. r=jrmuizel 2012-03-19 19:20:18 +00:00
Bas Schouten c2d1a88783 Bug 702851: Move mScaledFont into gfxFont superclass. r=jdaggett 2011-12-15 17:12:40 +01:00
Michael Wu d2b70213ac Bug 675553 - Switch from PRBool to bool on a CLOSED TREE , r=bsmedberg,khuey,bz,cjones
--HG--
rename : tools/trace-malloc/bloatblame.c => tools/trace-malloc/bloatblame.cpp
2011-09-28 23:19:26 -07:00
Jonathan Kew 53962f854b bug 666893 - add padding pixels to DWrite text bounds because of ClearType bleed when using GDI Classic mode. r=roc 2011-07-01 07:38:17 +01:00
Robert O'Callahan e6a174ce46 Bug 661471. Part 2: Add a pref to limit the forcing of 'GDI Classic' to a maximum font size. r=jdaggett,jfkthame 2011-06-03 16:31:08 +12:00
Robert O'Callahan 3cb40b372b Bug 661471. Part 1: Create preference to force particular font families to use 'GDI Classic' rendering with DirectWrite. r=jdaggett,jfkthame 2011-06-03 16:31:07 +12:00
Jonathan Kew b9cfb5f205 bug 642589 - expose prefs for tweaking DirectWrite/D2D antialiasing behavior. r=jdaggett 2011-04-21 07:29:50 +01:00
Zack Weinberg 97e0f97e09 Bug 648385: Remove gfxFont::GetUniqueName, r=jdaggett
--HG--
extra : rebase_source : 41f923803127440ab903e91c7f24e020b97b83f5
2011-04-11 17:59:42 -07:00
Jonathan Kew ffc044d7a3 bug 635640 - force font metrics of Arial Black to match the main Arial family; r=Bas 2011-03-23 23:01:14 -04:00
Jonathan Kew c5ab669823 bug 633342 - allow subpixel AA but not the manual show_glyphs path when Asian font has embedded bitmaps. r=bas a=joe 2011-02-15 20:55:01 +00:00