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

189 Коммитов

Автор SHA1 Сообщение Дата
Bas Schouten d4041dbed1 Bug 1210560 - Part 2: Convert some simple users to use PushGroupForBlendBack. r=jrmuizel 2015-11-11 16:15:39 +01:00
Nathan Froyd e763192040 Bug 1216611 - add mozilla::MakeUniqueFallible and convert uses throughout the tree; r=Waldo 2015-11-05 16:24:24 -05:00
Milan Sreckovic 33b10a1074 Bug 1214802 - gfxEnv - consolidate environment variables used by the graphics code in one place. r=botond 2015-10-28 14:31:00 +01:00
Nicholas Nethercote a34d272e2b Bug 1209812 (part 3) - Rename SurfaceFormat::R5G6B5 as R5G6B5_UINT16. r=Bas.
--HG--
extra : rebase_source : 1efcfb2522e823e55b5c7b77531a9d2c42c49c8b
2015-10-22 23:01:31 -07:00
Nathan Froyd ce836868f3 Bug 1218488 - clarify buffer ownership for nsICanvasRenderingContextInternal::GetBuffer; r=Bas,baku
This patch started life as making ImageEncoder.cpp:EncodingRunnable not
use nsAutoArrayPtr, but the API effects rippled out from there.  On the
whole, I think using UniquePtr throughout has made the code clearer.
2015-10-26 14:31:12 -04: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
Morris Tseng a8eab58fba Bug 709490 - Part 7: If layer is not available, fallback to BasicCanvasLayer. r=roc
--HG--
extra : rebase_source : cc7761567d60d652b8d0bc9cab04cf310ef100e3
2015-10-12 11:21:03 +08:00
Morris Tseng d5147a9b2a Bug 709490 - Part 2: Introduce OffscreenCanvas and let WebGL context work on workers. r=nical, r=jgilbert, r=jrmuizel, sr=ehsan
Thanks Jon Morton [:jmorton] (jonanin@gmail.com) for polishing patches.

--HG--
extra : rebase_source : ce16acdc340cbe67102da651552f574eee897ca9
2015-10-12 11:21:03 +08:00
Nicholas Nethercote 0f5722f4da Bug 1211324 (part 5) - Remove GraphicsFilter and gfxGraphicsFilter. r=mattwoodrow. 2015-10-05 17:18:10 -07:00
Nicholas Nethercote 4fc2610c3c 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 b06269a38d Bug 1211324 (part 3) - Remove GraphicsFilter::FILTER_FAST and replace it with FILTER_BEST. r=mattwoodrow.
This may sound like an odd change but it's what the current code effectively
already does due to the way ToFilter() and ThebesFilter() are defined.
2015-10-05 16:59:32 -07:00
Wes Kocher c1750b75c7 Backed out 11 changesets (bug 709490) for webgl-color-test.html failures a=backout
Backed out changeset fc04c5d43550 (bug 709490)
Backed out changeset cd8f9410d335 (bug 709490)
Backed out changeset 6e687c9143c1 (bug 709490)
Backed out changeset 9b20f2c833c4 (bug 709490)
Backed out changeset f9d130aea88e (bug 709490)
Backed out changeset fc513b410949 (bug 709490)
Backed out changeset acf6220b431a (bug 709490)
Backed out changeset 9bceaf913791 (bug 709490)
Backed out changeset 37fba20111e2 (bug 709490)
Backed out changeset 2285ce1596b8 (bug 709490)
Backed out changeset fb4e09920569 (bug 709490)
2015-10-05 08:28:25 -07:00
Morris Tseng 861bb61b91 Bug 709490 - Part 7: If layer is not available, fallback to BasicCanvasLayer. r=roc
--HG--
extra : rebase_source : bfdf6a97f372a3a5a2ecdd4a3c216ec64ec98e84
2015-10-05 10:50:16 +08:00
Morris Tseng 2d11e76151 Bug 709490 - Part 2: Introduce OffscreenCanvas and let WebGL context work on workers. r=nical, r=jgilbert, r=jrmuizel, sr=ehsan
Thanks Jon Morton [:jmorton] (jonanin@gmail.com) for polishing patches.

--HG--
extra : rebase_source : 16b8b4eaa5f4c649c02cbae6425e895134d4ae41
2015-10-05 10:50:16 +08:00
Wes Kocher 8631de9c2b Backed out 13 changesets (bug 709490) for android webgl-color-test.html failures
Backed out changeset 5be7514914b6 (bug 709490)
Backed out changeset 04b6f94fbe8a (bug 709490)
Backed out changeset 00c0e85dd8cd (bug 709490)
Backed out changeset 221385b7b81a (bug 709490)
Backed out changeset ecc38c18734f (bug 709490)
Backed out changeset 22878c936384 (bug 709490)
Backed out changeset 0edcbb60eee3 (bug 709490)
Backed out changeset 5feceec2014b (bug 709490)
Backed out changeset 835b655cb873 (bug 709490)
Backed out changeset 6fbb4a3f8cf7 (bug 709490)
Backed out changeset a5f8646fa156 (bug 709490)
Backed out changeset 2ae1386916b3 (bug 709490)
Backed out changeset 6b29a2a0a8fb (bug 709490)
2015-09-29 08:57:36 -07:00
Morris Tseng c5927f2dae Bug 709490 - Part 7: If layer is not available, fallback to BasicCanvasLayer, r=roc 2015-09-29 11:51:25 +01:00
Morris Tseng 1d4157900a Bug 709490 - Part 2: Introduce OffscreenCanvas and let WebGL context work on workers., r=ehsan, r=jgilbert, r=nical 2015-09-29 11:51:24 +01:00
Nicholas Nethercote 461e2332ff Bug 1208300 (part 1) - Remove unused default arguments from ClearThebesSurface. r=jwatt.
--HG--
extra : rebase_source : 8d91060e8ac1458b858bf961b608bb4b68eff6dc
2015-09-24 19:09:04 -07:00
Botond Ballo 1ebccfe52b Bug 1206915 - Move dumping of compositor textures under its own environment variable. r=mattwoodrow
The rationale is that it's broken at least on some platforms (e.g.
TextureHost::GetAsSurface() is not implemented), and moving it under its own
environment variable allows us to use the client-side parts of paint dumping
without crashing while attempting to do the compositor-side parts.

--HG--
extra : source : 5b2f6ad05b647f3ef499074014522339f6c08efa
2015-09-21 18:27:27 -04:00
Nicholas Nethercote 62d71c049e Bug 1208283 (part 3) - Remove the ToDeviceColor() that takes a gfxRGBA. r=jwatt.
--HG--
extra : rebase_source : afb31c9e9bb3367a165c079b06dc63ff9f87f468
2015-09-24 18:16:51 -07:00
Nicholas Nethercote 342466f878 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.

--HG--
extra : rebase_source : 74e9b6eecf6f442e27cc18fd4ae6f668a45188aa
2015-09-24 22:38:58 -07:00
Nicholas Nethercote 842dd1cf5a Bug 1207741 - Remove gfxIntSize. r=nical.
gfxIntSize is just a typedef of gfx::IntSize, so this is very mechanical. The
only tricky part is deciding for each occurrence whether to replace it with
IntSize, gfx::IntSize or mozilla::gfx::IntSize; in all cases I went with the
shortest one that worked given the existing "using namespace" declarations.

--HG--
extra : rebase_source : 67fd15f87222b16defa70ef795c6d77dfacf1c36
2015-09-23 11:49:05 -07:00
Mason Chang [:mchang] f83fc0b5b6 Bug 1073209 - Eliminate usage of CreateSamplingRestrictedDrawable on d2d backends. r=jrmuizel 2015-08-04 08:13:00 +02:00
Mason Chang 132cd2c47b Bug 1155249 - Prescale image with an intermediate surface if repeated often on OS X. r=mstange 2015-07-30 08:14:00 -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
Mason Chang 1ab5797256 Bug 1169956. Backout bug 1073209 for tiled image regressions on OS X. r=jrmuizel 2015-06-04 15:59:11 -07:00
Amanda Sambath c023bf2139 Bug 1158120 - Replace gfxIntSize by mozilla::gfx::IntSize in gfx/thebes part 1. r=nical 2015-06-01 10:26:19 +02:00
Birunthan Mohanathas 1c20df74c6 Bug 1166840 - Remove document argument from nsIClipboardHelper.copyString{,ToClipboard}. r=ehsan 2015-05-21 21:50:09 +01:00
Nathan Froyd db188ea282 Bug 1160485 - remove implicit conversion from RefPtr<T> to TemporaryRef<T>; r=ehsan
Having this implicit conversion means that we can silently do extra
refcounting when it's completely unnecessary.  It's also an obstacle to
making RefPtr more nsRefPtr-like, so let's get rid of it.
2015-05-01 09:14:16 -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
Kartikaya Gupta bdb998b9d4 Bug 1022080 - Split out the paint item dumping from the rest of the paint dumping. r=mattwoodrow 2015-05-12 09:16:54 -04:00
Kartikaya Gupta af44ca2147 Bug 1022080 - Don't force intermediate surfaces when dumping textures, unless explicitly specified. r=nical 2015-05-12 09:16:53 -04:00
Daniel Holbert 3899eae2cc Bug 1161731: Remove newline characters from the ends of NS_WARNING messages in /gfx and /layout. r=mstange 2015-05-05 13:57:47 -07:00
Nicolas Silva cfff5e52c5 Bug 1155621 - Make nsIntRect and nsIntPoint typedefs of mozilla::gfx::IntRect and mozilla::gfx::IntPoint. r=Bas 2015-04-21 17:04:57 +02:00
Mason Chang 30c8ca5402 Bug 1073209 - Eliminate usage of CreateSamplingRestrictedDrawable on OS X. r=jrmuizel 2015-04-20 08:38:43 -07:00
Nicolas Silva 0b1f75bea0 Bug 1132854 - Remove the gfx::ToIntSize conversion helper. r=Bas 2015-04-07 16:08:57 +02:00
Milan Sreckovic 76dd5cd892 Bug 1140113 - Catch direct (and some indirect) callers of CreateDrawTarget* and deal with failure. r=mstange 2015-03-09 15:48:20 -04:00
Benoit Girard 98b7cc0e56 Bug 1113837 - Build display-list dumping without MOZ_DUMP_PAINTING. r=mstange 2014-12-31 15:17:39 -05:00
Benoit Girard 22355f0c17 Bug 1112756 - Pass display list and layers data directly to the profiler. r=mstange
--HG--
extra : rebase_source : 5c7295e80105b0db43651553c1b901836571cbbb
2014-12-18 13:32:53 -05:00
Benoit Girard e144df0092 Bug 1111258 - Let the profiler turn on layout.display-list.dump. r=mstange 2014-12-13 15:40:18 -05:00
Benoit Girard f7b7607e1f Bug 1105834 - Part 3: Add lz4 support to layers.dump-texture. r=jrmuizel 2014-12-08 14:42:33 -05:00
Benoit Girard a8501f4185 Bug 1105834 - Part 2: Add layers.dump-texture feature. r=mstange 2014-11-28 17:41:47 -05:00
Wes Kocher 99f09b4b90 Backed out 3 changesets (bug 1105834) for non-unified bustage
Backed out changeset 33592fd41f1f (bug 1105834)
Backed out changeset c3e505887e9f (bug 1105834)
Backed out changeset 6aad17f431d1 (bug 1105834)
2014-12-08 17:15:46 -08:00
Benoit Girard 993c64ba00 Bug 1105834 - Part 3: Add lz4 support. r=jrmuizel 2014-12-08 14:42:33 -05:00
Benoit Girard 0deff0ecd6 Bug 1105834 - Part 2: Add layers.dump-texture feature. r=mstange 2014-11-28 17:41:47 -05:00
Markus Stange 10ca30f002 Bug 1101195 - Update imgData vector length after reading into it. r=jwatt 2014-11-19 11:51:47 -05:00
Jeff Muizelaar d3ebc563b8 Bug 1098389. Remove ClipToRegionSnapped. r=roc
We don't use this anymore.

--HG--
extra : rebase_source : 918eaa73f653962dccbfe6efdad69203ba041ef3
2014-11-14 10:46:02 -05:00
Chris Jones 1dc260137a Bug 1082902 - Add mozilla_dump_image() helper exported from libxul. r=jrmuizel 2014-11-07 13:55:01 +01:00
Jonathan Watt 30f03ce29a Bug 1076910 - Add some error checks to gfxUtils::EncodeSourceSurface. r=Bas 2014-10-31 11:16:45 +00:00