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

40 Коммитов

Автор SHA1 Сообщение Дата
Milan Sreckovic bf9a6ffcc5 Bug 1219494 - Part 2. gfx/2d and gfxCrash. r=milan
* * *
Bug 1219494: Part 3. gfx/thebes, gfx/src and gfxCrash
2015-11-26 08:38:00 +01:00
Ted Mielczarek fc136257e3 bug 1170987 - Fix gfx/2d to build on iOS. r=jrmuizel 2015-10-28 14:10:24 -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 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
Birunthan Mohanathas a8939590de Bug 1182996 - Fix and add missing namespace comments. rs=ehsan
The bulk of this commit was generated by running:

  run-clang-tidy.py \
    -checks='-*,llvm-namespace-comment' \
    -header-filter=^/.../mozilla-central/.* \
    -fix
2015-07-13 08:25:42 -07: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
Nathan Froyd c24f5f4e7c Bug 1116905 - part 3 - remove dependence on implicit conversion from T* to TemporaryRef<T>, gfx changes; r=jrmuizel 2015-04-30 15:20:30 -04:00
Markus Stange 9d0fbfa02c Bug 1074842 - Let SourceSurfaceCGBitmapContext take ownership of the data when DrawTargetCG is destroyed. r=jrmuizel 2014-10-24 18:32:22 +02:00
Matt Woodrow afc9ab44bc Bug 1057216 - Make DrawTargetCG hold a reference to DataSourceSurface when we're wrapping their data. r=jrmuizel
--HG--
extra : rebase_source : ad610592f69294caedcbca5d61c1644120cbec66
2014-08-27 10:20:18 +12:00
Jonathan Watt 5aec590cc0 Bug 1023336, part 2 - Use the new BufferSizeFromStrideAndHeight helper where appropriate in Moz2D code. r=Bas 2014-06-13 22:03:52 +01:00
Jonathan Watt c90e727466 Bug 1024983 - Stop addrefing and releasing excessively in the Moz2D code in functions that return a TemporaryRef. r=mstange 2014-06-13 17:09:23 +01:00
Benoit Jacob ccaa35314d Bug 958375 - 6/9 - Make BackendType and NativeSurfaceType typed enums - 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
Benoit Jacob a1e7c32630 Bug 958375 - 4/9 - Make SurfaceFormat a typed enum - 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
Benoit Jacob 80ebacd7e6 Bug 958375 - 1/9 - Make SurfaceType a typed enum - 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 13:55:24 -05:00
Markus Stange 976a163b61 Bug 930956 - Make DrawTargetCG::DrawSurface support painting a DataSourceSurface that is not a DataSourceSurfaceCG. r=jrmuizel, r=Bas 2013-11-27 12:21:43 +01:00
Markus Stange aa00fefb46 Bug 943614 - Make sure that SourceSurfaceCG::GetDataSurface always returns a surface that has GetType() == SURFACE_DATA. r=Bas 2013-11-27 12:21:34 +01:00
Steven Michaud a87ba6b69f Bug 925448 - Stop CGImageRef external data being deleted prematurely. r=bgirard,bas 2013-11-26 12:41:32 -06:00
Jeff Muizelaar e78ed5364f Bug 929471. Make DrawTargetCG independent from QuartzSupport.mm. r=bgirard 2013-11-07 22:53:54 -05:00
Matt Woodrow 015b0221be Bug 920571 - Followup to copy all the pixel on the last line. r=bustage 2013-09-30 17:14:30 +13:00
Matt Woodrow 67946c1e49 Bug 920571 - Don't read from the trailing stride on the last row of pixels when copying image data in SourceSurfaceCG. r=jrmuizel 2013-09-30 14:42:45 +13:00
Markus Stange 2af6757ee1 Bug 912944 - Handle different surface formats in Azure CG source surfaces. r=jrmuizel 2013-09-27 17:19:33 +02:00
David Zbarsky 335b06601b [Bug 914955] Fix build warnings in Moz2D r=bas 2013-09-15 14:23:51 -04:00
Matt Woodrow a6db83ee6b Bug 893824 - Don't allow 0 sized SourceSurfaces with Moz2D. r=jrmuizel
--HG--
extra : rebase_source : dc5e18fe96966a86cbb3b2fbaa508247cbe73142
2013-07-15 13:28:04 -04:00
Nathan Froyd d50ff6f7f0 Bug 839383 - part 3 - inline AssignSurfaceParametersFromFormat into its only caller; r=jrmuizel 2013-03-12 17:02:19 -04:00
Nathan Froyd 4611459772 Bug 839383 - part 2 - factor out CGImageRef creation code in SourceSurfaceCG.cpp; r=jrmuizel 2013-03-12 16:59:26 -04:00
Nathan Froyd 2b6086db25 Bug 839383 - part 1 - fix unhandled enumeration values in SourceSurfaceCG.cpp; r=jrmuizel 2013-03-06 11:11:18 -05:00
Joe Drew f034089eec Bug 782416 - Switch from NULL to nullptr in gfx::2d. r=Bas
--HG--
extra : rebase_source : cfa9fc8ae592880e22e1f14cee42539b4f911668
2012-08-14 14:06:12 -04:00
Joe Drew 0a6f454a9d Back out 98d2c24ce932 for failing to build r=moron 2012-08-15 12:51:33 -04:00
Joe Drew bd561fcfea Bug 782416 - Switch from NULL to nullptr in gfx::2d. r=Bas
--HG--
extra : rebase_source : 9b12a2af4c55f4dc383e8075b400e7a1fbe1ac23
2012-08-14 14:06:12 -04:00
Benoit Girard 1f69b9e7d3 Bug 724666 - Part 2: Add CGIOSurfaceContext to azure. r=jmuizelaar 2012-07-31 11:17:43 -04:00
Jeff Muizelaar 7c8858f874 Bug 763120. Avoid using vm_copy when snapshoting. r=bgirard
CGBitmapContextCreateImage uses vm_copy which ends up being
slower than memcpy if we actually need to make a copy. Further,
since it does the copy by pagefaulting, it's shows up poorly
on profiles. Since, we already manually track modification we
don't really have need for the copy-on-write semantics. This
change ensures that we'll only use memcpy when we need to make
a copy.

--HG--
extra : rebase_source : 93afb1423605a13cb4c76a6c389e1989aa814ae0
2012-06-11 16:21:55 -07:00
Gervase Markham 82ff7027aa Bug 716478 - update licence to MPL 2. 2012-05-21 12:12:37 +01:00
Jeff Muizelaar b17cef0f85 Bug 720482. Make CG snapshots work more like the other backends. r=joe,mattwoodrow,bas
This has big improvement in the performance of GetImageData() because
we make the snapshot lazily instead of using the vm_copy() method
of CGBitmapContextCreateImage()
2012-01-31 01:46:54 -05:00
Jeff Muizelaar 3036b1473f Bug 692879. Implement CoreGraphics Azure backend. r=mwoodrow 2012-01-09 13:54:44 -05:00
Matt Brubeck 4b1bdf5b96 Back out efd165428f08 to 4a79fefefa28 (bug 580786, bug 716639, bug 692879, bug 717921) because of reftest error 2012-01-17 10:08:38 -08:00
Jeff Muizelaar 0ac4c9201a Bug 692879. Implement CoreGraphics Azure backend. r=mwoodrow
--HG--
extra : rebase_source : 94f8c205e16e961b5407396c0d0d3b41067222dc
2012-01-09 13:54:44 -05:00
Ms2ger 7535aaa04a Backout bug 580786 / bug 716639 / bug 692879 / bug 717921 / bug 692879 (2dc5909e63b0:ced751d32df6); a=philor 2012-01-17 10:48:19 +01:00
Jeff Muizelaar ad79c1ab36 Bug 692879. Implement CoreGraphics Azure backend. r=mwoodrow 2012-01-09 13:54:44 -05:00
Atul Aggarwal d578a40f89 Bug 679618 - Uninitialized memory in gfx/2d/SourceSurfaceCG.cpp; r=jmuizelaar 2011-08-31 13:16:12 +01:00
Bas Schouten 189472e8c9 Bug 651858 - Part 1: Add the Azure API and Direct2D backend. r=jrmuizel sr=roc
--HG--
rename : gfx/src/BaseMargin.h => gfx/2d/BaseMargin.h
rename : gfx/src/BasePoint.h => gfx/2d/BasePoint.h
rename : gfx/src/BaseRect.h => gfx/2d/BaseRect.h
rename : gfx/src/BaseSize.h => gfx/2d/BaseSize.h
2011-06-24 19:41:16 +02:00