Commit Graph

63 Commits

Author SHA1 Message Date
Nicholas Nethercote
93954c03fe Bug 1237448 - Moz2Dify two functions in gfxSurfaceDrawable. r=roc. 2016-01-06 18:26:33 -08:00
Mason Chang
7fca435ce0 Bug 1221840. Support repeating images in 1 axis. r=seth 2015-11-23 08:17:35 -08:00
Nathan Froyd
9c5965b035 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
2015-10-18 01:24:48 -04:00
Nathan Froyd
e504437747 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
Nicholas Nethercote
71be650c3b Bug 1211324 (part 5) - Remove GraphicsFilter and gfxGraphicsFilter. r=mattwoodrow. 2015-10-05 17:18:10 -07:00
Nicholas Nethercote
ef8c04357d Bug 1211324 (part 4) - Replace GraphicsFilter constants with gfx::Filter equivalents. r=mattwoodrow.
The conversion is as follows:

- GraphicsFilter::FILTER_NEAREST == gfx::Filter::POINT
- GraphicsFilter::FILTER_GOOD    == gfx::Filter::GOOD
- GraphicsFilter::FILTER_BEST    == gfx::Filter::LINEAR

Also typedef GraphicsFilter to gfx::Filter; this will be removed in the next
patch.

These changes mean ToFilter() and ThebesFilter() are no longer needed.
2015-10-05 17:12:46 -07:00
Nicholas Nethercote
61bcd9b78c Bug 1208300 (part 4) - Remove gfxRGBA and some related things. r=jwatt.
Hooray!
2015-09-24 19:24:16 -07:00
Nicholas Nethercote
c472f85396 Bug 1208345 - Remove gfxContext::GraphicsOperator. r=jwatt.
Also...

- Rename various "operator" identifiers as "op" to match |CompositionOp|.

- Rename |nsBackgroundLayerState::mCompositingOp| as |mCompositionOp| to match
  |CompositionOp|.

- Remove some deprecated functions that are no longer needed.
2015-09-24 22:38:58 -07:00
Amanda Sambath
5f4fdda30e Bug 1158120 - Replace gfxIntSize by mozilla::gfx::IntSize in gfx/thebes part 1. r=nical 2015-06-01 10:26:19 +02:00
Milan Sreckovic
e5a47567bb Bug 1154003 - More protection for failed surface drawable creation. r=bas 2015-04-15 15:04:38 -04:00
Nicolas Silva
eae4d10b4d Bug 1132854 - Make nsIntSize a typedef of gfx::IntSize. r=Bas, roc 2015-03-29 16:59:08 +02:00
Jonathan Watt
b752905714 Bug 1107414 - Get rid of gfxContext::FillWithOpacity. r=mattwoodrow
--HG--
extra : rebase_source : d64412c46d72a4d08be8edf1913c83bb12387b49
2014-12-02 14:29:44 -08:00
Jonathan Watt
15d307f095 Bug 1103621 - Get rid of GraphicsOperator::OPERATOR_CLEAR. r=mattwoodrow 2014-11-20 10:40:04 +00:00
Matt Woodrow
c22a53a4ed Bug 1067311 - Don't crash if a gfxSurfaceDrawable failed to allocate a SourceSurface. r=Bas 2014-09-22 16:49:40 -04:00
Jonathan Watt
7f41dd89c9 Bug 1067093 - Get rid of gfxContext::AntialiasMode in favor of Moz2D AntialiasMode. r=Bas 2014-09-15 12:10:30 +01:00
Matt Woodrow
b981b9db8d Bug 1044702 - Use Moz2D source clipping when we can. r=Bas
--HG--
extra : rebase_source : 24eb333909db5278ff1a8babf9b4b907650695fa
2014-09-12 17:18:21 +12:00
James Kolb
ea2c2a5c07 Bug 1028288 Add canvas global transparency support to svgs. r=seth 2014-08-29 23:04:34 +09:00
Ehsan Akhgari
7ef2679c79 Bug 1050610 - Fix more bad implicit constructors in gfx; r=roc
--HG--
extra : rebase_source : 5c6b62dbed81018370ce274e1913620ffb0ff7a2
2014-08-07 21:17:30 -04:00
Wes Kocher
6aadccefce Backed out changesets 950a3afc2b15 and dfb5303af6f9 (bug 1028288) for being incorrect 2014-08-06 15:43:25 -07:00
James Kolb
4cce70609b Bug 1028288 Add canvas global transparency support to svgs. r=roc 2014-08-02 16:14:53 +09:00
Matt Woodrow
9eef8fad9f Bug 1044702 - Part 2: Convert gfxSurfaceDrawable::Draw to use Moz2D directly. r=Bas
--HG--
extra : rebase_source : 364616efdf06d9fc26017e56f17885f1489c1720
2014-07-29 12:07:32 +12:00
Matt Woodrow
187476e419 Bug 1044702 - Part 1: Remove unnecessary gfxDrawable constructors. r=Bas,seth
--HG--
extra : rebase_source : faad3eded22c569bc9a32391dbdac16cd9db397d
2014-07-29 12:05:40 +12:00
Jonathan Watt
943031a49d Bug 1025553, part 6 - Remove gfxMatrix::Multiply(). r=Bas 2014-07-11 08:07:07 +01:00
Jonathan Watt
7645116817 Bug 1025553, part 3 - Give gfxMatrix::Invert() the same semantics as Moz2D's Matrix::Invert(). r=Bas 2014-07-11 08:06:39 +01:00
Jonathan Watt
5e4527446d Bug 933019, part 3 - Remove code for handling Thebes backed gfxContext in gfxDrawable.cpp. r=Bas 2014-07-10 10:58:06 +01:00
Jonathan Watt
0324bd5749 Bug 1025553, part 1 - Change the names of the members of gfxMatrix to match the names of the members of Moz2D's Matrix. r=Bas 2014-06-17 18:35:51 +01:00
Matt Woodrow
a61f03e9ff Bug 996378 - Use Moz2D for gfxCallbackDrawable. r=roc 2014-04-16 14:23:05 +12:00
Jonathan Watt
0a0470e24e Bug 996901 - Remove lots of gfxASurface.h and gfxImageSurface.h includes and forward declarations that are no longer needed. r=mattwoodrow 2014-04-16 01:41:40 +01:00
Ms2ger
479e9f45c5 Bug 952033 - Part b: Use IntSize in CreateOffscreenSurface; r=roc 2014-02-09 09:04:38 +01:00
Benoit Jacob
93826fc6b0 Bug 959380 - 4/5 - Make gfxContentType a typed enum - r=jrmuizel
find . -type f | grep -v '\./obj' | grep -v '\.hg' | xargs sed -i 's/\(^\|[^A-Za-z0-9_]\)GFX_CONTENT_\(COLOR\|ALPHA\|COLOR_ALPHA\|SENTINEL\)\($\|[^A-Za-z0-9_]\)/\1gfxContentType::\2\3/g'
2014-01-23 13:26:40 -05:00
Benoit Jacob
3846defaec Bug 959380 - 3/5 - Make gfxSurfaceType a typed enum - r=jrmuizel
find . -type f | grep -v '\./obj' | grep -v '\.hg' | xargs sed -i 's/\(^\|[^A-Za-z0-9_]\)gfxSurfaceType\(Image\|PDF\|PS\|Xlib\|Xcb\|Glitz\|Quartz\|Win32\|BeOS\|DirectFB\|SVG\|OS2\|Win32Printing\|QuartzImage\|Script\|QPainter\|Recording\|VG\|GL\|DRM\|Tee\|XML\|Skia\|Subsurface\|D2D\|Max\)\($\|[^A-Za-z0-9_]\)/\1gfxSurfaceType::\2\3/g'
2014-01-23 13:26:40 -05:00
Jeff Muizelaar
4fa43a6bda Bug 951216. Avoid unnecessary Snapshot() copies by clearing the pattern. r=Bas
gfxSurfaceDrawable::Draw() sets a gfxPattern(Snapshot()) to the gfxContext's
pattern. If the gfxSurfaceDrawable is created by
CreateSamplingRestrictedDrawable it will be destroyed before the Snapshot().
This causes the Snapshot to be copied unnecessarily.

If we set the pattern to something else we'll destroy the snapshot before the
gfxSurfaceDrawable and save a copy.

--HG--
extra : rebase_source : 03864e8a0fe021940747cf691df30ec51e4d8b2d
2013-12-17 13:33:34 -05:00
Matt Woodrow
0cfc75c3ec Bug 948221 - Part 4: Add a gfxSurfaceDrawable constructor that takes a SourceSurface. r=roc 2013-11-27 14:05:03 +13:00
Matt Woodrow
441ac6af40 Bug 923341 - Part 1: Add a gfxSurfaceDrawable constructor for a DrawTarget. r=seth 2013-11-13 17:31:12 +13:00
Ehsan Akhgari
5acc07ee15 Bug 921753 - Part 6: Define gfxPatternDrawable's destructor out of line; r=seth 2013-10-15 18:00:28 -04:00
Gian-Carlo Pascutto
4338131444 Bug 923170 - Require GCC 4.6.x before enabling strong enum support. r=Waldo 2013-10-08 15:25:13 -04:00
Ehsan Akhgari
b6bef348c1 Bug 924221 - Minimize the #includes in gfx/thebes; r=bjacob
--HG--
extra : rebase_source : af198eb9b9739ce718ba0d16c385624a722cde51
2013-10-07 19:15:59 -04:00
Ehsan Akhgari
6c364e9615 Bug 921753 - Part 2: Move GraphicsFilters outside of gfxPattern.h so that we won't need to #include that header everywhere GraphicsFilter is needed; r=roc
This patch reduces the number of files that transitively #include
gfx/2d.h from 1582 to 1362.
2013-10-01 17:01:19 -04:00
Benoit Jacob
c1d7f88886 Bug 913872 - Take nested enums out of gfxASurface - 1/3 : automatic changes - r=jrmuizel
Generated by these regexes:

find . -name '*.h' -o -name '*.cpp' -o -name '*.mm' | grep -v '\.hg' | grep -v '^\.\/obj' | xargs sed -i 's/gfx[A-Za-z0-9_]*Surface\:\:[a-z]*\(\(ImageFormat\|SurfaceType\|ContentType\|MemoryLocation\)[0-9A-Za-z_]*\)/gfx\1/g'

find . -name '*.h' -o -name '*.cpp' -o -name '*.mm' | grep -v '\.hg' | grep -v '^\.\/obj' | xargs sed -i 's/gfx[A-Za-z0-9_]*Surface\:\:[a-z]*\(\(CONTENT_\|MEMORY_\)[0-9A-Za-z_]*\)/GFX_\1/g'

find . -name '*.h' -o -name '*.cpp' -o -name '*.mm' | grep -v '\.hg' | grep -v '^\.\/obj' | xargs sed -i 's/\(^\|[^A-Za-z0-9_]\)\(CONTENT_COLOR\|CONTENT_ALPHA\|CONTENT_COLOR_ALPHA\|CONTENT_SENTINEL\|MEMORY_IN_PROCESS_HEAP\|MEMORY_IN_PROCESS_NONHEAP\|MEMORY_OUT_OF_PROCESS\)\($\|[^A-Za-z0-9_]\)/\1GFX_\2\3/g'

find . -name '*.h' -o -name '*.cpp' -o -name '*.mm' | grep -v '\.hg' | grep -v '^\.\/obj' | xargs sed -i 's/\(^\|[^A-Za-z0-9_]\)\(ImageFormatARGB32\|ImageFormatRGB24\|ImageFormatA8\|ImageFormatA1\|ImageFormatRGB16_565\|ImageFormatUnknown\|SurfaceTypeImage\|SurfaceTypePDF\|SurfaceTypePS\|SurfaceTypeXlib\|SurfaceTypeXcb\|SurfaceTypeGlitz\|SurfaceTypeQuartz\|SurfaceTypeWin32\|SurfaceTypeBeOS\|SurfaceTypeDirectFB\|SurfaceTypeSVG\|SurfaceTypeOS2\|SurfaceTypeWin32Printing\|SurfaceTypeQuartzImage\|SurfaceTypeScript\|SurfaceTypeQPainter\|SurfaceTypeRecording\|SurfaceTypeVG\|SurfaceTypeGL\|SurfaceTypeDRM\|SurfaceTypeTee\|SurfaceTypeXML\|SurfaceTypeSkia\|SurfaceTypeSubsurface\|SurfaceTypeD2D\|SurfaceTypeMax\)\($\|[^A-Za-z0-9_]\)/\1gfx\2\3/g'
2013-09-24 16:45:13 -04:00
Matt Woodrow
ca7201f9f8 Bug 917703 - Avoid copying to a sub image in CreateSamplingRestrictedDrawable if possible. r=roc 2013-09-19 17:23:31 +12:00
Wes Kocher
158158f87e Backed out 5 changesets (bug 907926, bug 911393, bug 917703) due to OSX reftest bustage during an unrelated CLOSED TREE
Backed out changeset 94a6733b01dc (bug 907926)
Backed out changeset 44108fb6f7cc (bug 917703)
Backed out changeset f2dd2a27af69 (bug 911393)
Backed out changeset fdb0d1053128 (bug 907926)
Backed out changeset b3616b786e8f (bug 907926)
2013-09-19 17:56:18 -07:00
Matt Woodrow
ca3643fb38 Bug 917703 - Avoid copying to a sub image in CreateSamplingRestrictedDrawable if possible. r=roc 2013-09-19 17:23:31 +12:00
Karl Tomlinson
afb8943655 b=782185 provide a gfxXlibSurface method to indicate when cairo's extend_pad will be slow r=joe
--HG--
extra : transplant_source : M%D2%05%3A%C1%18W%BD.%BA8%18%BD%F9%F9%AEu%EEX%CE
2012-08-14 23:47:49 +12:00
Aryeh Gregor
e806eeab4f Bug 777292 part 2 - Change all nsnull to nullptr 2012-07-30 17:20:58 +03:00
Gervase Markham
ca171eec44 Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Mark Finkle
deb2c9ce8e Backing out e481b6ffc60b (bug 691061) because it breaks 'save as pdf' in Fennec (bug 704185) 2012-04-13 12:30:33 -04:00
Bas Schouten
0c431d68e7 Bug 711063 - Part 9: Adjust gfxDrawable to be compatible with the Azure Wrapper. r=jrmuizel 2012-01-05 08:17:52 +01:00
Adrian Johnson
992a5d330a Bug 691061 - Don't use EXTEND_PAD on printing surfaces. r=jmuizelaar 2011-10-29 19:36:19 +10:30
Ehsan Akhgari
2a602a5685 Bug 690892 - Replace PR_TRUE/PR_FALSE with true/false on mozilla-central; rs=dbaron
Landing on a CLOSED TREE
2011-10-17 10:59:28 -04:00
Michael Wu
d8e503c38b 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