Commit Graph

710 Commits

Author SHA1 Message Date
Nathan Froyd
735e488da3 Bug 1217662 - part 2 - move mozilla::layers::LayerUserData to a separate header; r=mattwoodrow
Having to include all of Layers.h just to get at the definition of
LayerUserData is inconvenient, especially as most of the interesting
things in Layers.h can be forward-declared.  Let's move LayerUserData to
its own header, so clients can include a small header for that,
forward-declare anything else they need from Layers.h, and reduce header
bloat.
2015-10-22 16:04:35 -04:00
Dan Glastonbury
e9661201b6 Bug 1215414 - Fix ClearBuffer taking TypedArrays. r=jgilbert 2015-10-23 15:35:09 +10:00
Sotaro Ikeda
10f1bcce89 Bug 1206763 - Enable SkiaGL canvas on gonk r=mattwoodrow 2015-10-20 01:35:00 -07:00
Dan Glastonbury
66e4dad1c7 Bug 1193070 - Implement GetFramebufferAttachmentParameter. r=jgilbert 2015-10-20 12:46:28 +10:00
Ehsan Akhgari
ecda739d3e Bug 1216177 - Remove the remaining nsRefPtr forward declarations; r=froydnj 2015-10-19 12:02:14 -04:00
Dan Glastonbury
9a3278a626 Bug 1209384 - Check active query has same type as target. r=jgilbert 2015-10-19 10:05:54 +10:00
Olli Pettay
fee6bc69e2 Bug 1215072 - throw in case dictionary initialization fails in canvas.getContext, r=baku 2015-10-18 14:14:22 +03: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
Phil Ringnalda
dc7a4cc45e Back out changeset 09e059daabae (bug 1215072) for adding a permaorange-on-b2g test
CLOSED TREE
2015-10-16 18:42:41 -07:00
Olli Pettay
2b21892477 Bug 1215072 - throw in case dictionary initialization fails in canvas.getContext, r=baku
--HG--
extra : rebase_source : 006bfed7cfec46e6150ee15135de08941283dbb7
2015-10-16 22:52:11 +03:00
Lee Salzman
eaa82aedc8 Bug 1161277 - verify SkPath is finite before doing ContainsPoint queries. r=jmuizelaar 2015-10-09 16:07:59 -04:00
Jeff Muizelaar
a6d47e79d5 Bug 1207288. Enable the ANGLE shader validator for WebGL 2. r=jgilbert
ANGLE's shader parser has much better support for ES3 now. Let's
no longer disable it by default.
2015-10-13 14:40:26 -04:00
Jed Davis
b36bf70608 Bug 1213491 - Change CanvasRenderingContext2D::ContextState::clipsPushed to an nsTArray. r=nical 2015-10-09 16:20:00 +02:00
Jukka Jylanki
ba964b1f9c Bug 1147441 - Add SharedArrayBuffer support to WebGL and WebGL 2. r=jgilbert, r=bzbarsky
--HG--
extra : histedit_source : 141390e44859f0cdb1692979f08f873ad3480754
2015-10-14 11:18:19 +05:30
Phil Ringnalda
228ec2a1e4 Back out changeset d34a1af95066 (bug 1207288) for Windows mochitest-gl not being that into being validated
CLOSED TREE
2015-10-13 20:00:38 -07:00
Jeff Muizelaar
1bfe7be8a1 Bug 1207288. Enable the ANGLE shader validator for WebGL 2. r=jgilbert
ANGLE's shader parser has much better support for ES3 now. Let's
no longer disable it by default.

--HG--
extra : rebase_source : 1292347863eb3ea960d9a8f470bbceb6601d0ce1
2015-10-13 14:40:26 -04:00
Morris Tseng
748ad8a873 Bug 709490 - Part 11: Diabled test_offscreencanvas_many.html on gonk, android, windows and linux. r=jgilbert
--HG--
extra : rebase_source : 66fdb5079e1c6c458c93438e85f02b5b55d9f985
2015-10-12 11:21:04 +08:00
Morris Tseng
d1d37e3f9b Bug 709490 - Part 10: Using mechanism in RuntimeService to get pref in worker thread instead of gfxPref. r=baku
--HG--
extra : rebase_source : 55ae1e1fc1f88bffd43800eefaed4506789e608c
2015-10-12 11:21:04 +08: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
c6d0549064 Bug 709490 - Part 4: Mochitests for offscreencanvas. r=baku, r=jgilbert
Thanks Jon Morton [:jmorton] (jonanin@gmail.com) for polishing patches.

--HG--
extra : rebase_source : f27c737653d7844a17530d7c8a0cc38d02bedf59
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
jdashg
7d1bbd8f2d Bug 1188010 - Use MOZ_RELEASE_ASSERT. r=dglastonbury
Use MOZ_RELEASE_ASSERT when failure means overflows.
From b9fe1e06f63a785f309e1ce7e5053cb57e21e634 Mon Sep 17 00:00:00 2001
---
 dom/canvas/WebGLTexture.cpp | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--HG--
extra : rebase_source : 81b89bbd224d6f77f62c5fa5f2ac8b14a8373128
2015-07-29 14:37:54 -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
167e962979 Bug 709490 - Part 11: Diabled test_offscreencanvas_many.html on gonk, android, windows and linux. r=jgilbert
--HG--
extra : rebase_source : d6be9dc85ffee9cda6b57735bd8892ca427aa5d7
2015-10-05 10:50:17 +08:00
Morris Tseng
f5a52e7dea Bug 709490 - Part 10: Using mechanism in RuntimeService to get pref in worker thread instead of gfxPref. r=baku
--HG--
extra : rebase_source : 07b470b9a8865b7d833932c5425e796b852ab466
2015-10-05 10:50:17 +08: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
6b999f3d6f Bug 709490 - Part 4: Mochitests for offscreencanvas. r=baku, r=jgilbert
Thanks Jon Morton [:jmorton] (jonanin@gmail.com) for polishing patches.

--HG--
extra : rebase_source : 08ff521b2ada4eb7f28ad1f5a2557b6d2ea670cb
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
Tooru Fujisawa
c8e5588008 Bug 1207494 - Part 4: Remove use of expression closure from dom/canvas/. r=gw280
--HG--
extra : commitid : AV7ENw6thCF
extra : rebase_source : 268370aa377bc398f0ca51aada382ad451df34aa
2015-09-23 18:39:13 +09:00
Milan Sreckovic
d781f5c2bd Bug 1205900 - Compare context and canvas element sizes before extracting the data. r=gwright 2015-10-02 09:18:26 +02:00
Nicholas Nethercote
7b70ebccdf Bug 1209206 (part 1) - Remove mgfx namespace synonym.
CanvasRenderingContext2D.cpp has a |namespace mgfx = mozilla::gfx;| synonym.
Since the entire file is within the |mozilla| namespace we can use |gfx::Foo|
anyway, which is shorter than |mgfx::Foo|.

--HG--
extra : rebase_source : abd76713f1741b1b4f078e21d89a0708b7bd65fb
2015-09-28 12:37:18 -07:00
Bas Schouten
1369a96bd4 Bug 1208465 - Part 1: Fix some reftest annotations. r=jrmuizel 2015-10-01 04:45:26 +02: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
6912bd6a09 Bug 709490 - Part 11: Diabled test_offscreencanvas_many.html on gonk, android, windows and linux, r=jgilbert 2015-09-29 11:51:26 +01:00
Morris Tseng
d99c93a009 Bug 709490 - Part 10: Using mechanism in RuntimeService to get pref in worker thread instead of gfxPref, r=baku 2015-09-29 11:51:25 +01: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
90b7efb407 Bug 709490 - Part 4: Mochitests for offscreencanvas, r=baku, r=jgilbert 2015-09-29 11:51:24 +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
Kathy Brade
61c6a3b383 Bug 232227 - Do not expose system colors to CSS or canvas. r=jmuizelaar r=enndeakin tor-r=arthuredelstein
--HG--
extra : rebase_source : 54498135a11fb7d7e9f4154ad5d5bfbf87a927bd
2015-09-25 00:59:00 +02: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
Jeff Gilbert
187dfafc29 Bug 1191042 - Use CreateOffscreen for WebGL instead of CreateHeadless. - r=jrmuizel 2015-09-24 12:21:05 -07:00
Matt Woodrow
469ca70375 Bug 1206161 - Make sure the DrawTarget is available when creating a CanvasLayer so that we can check for SkiaGL. r=Bas
--HG--
extra : rebase_source : 2d011ee3dbceecfa11a27fc1e1a65d7ec5080f85
2015-09-23 20:30:06 -04:00
Matt Woodrow
2597afb776 Bug 1150944 - Fuzz some reftests with SkiaGL. r=jrmuizel
--HG--
extra : rebase_source : 79e398d4c78f02d14582e1662e312c6c2cece40f
2015-09-23 20:28:23 -04:00
Phil Ringnalda
449e9119b4 Back out f84aedf7a62d (bug 1191042) for b2g emulator test failures
CLOSED TREE
2015-09-22 19:26:13 -07:00
Jeff Gilbert
8d443901df Bug 1191042 - Use CreateOffscreen for WebGL instead of CreateHeadless. - r=jrmuizel 2015-09-22 16:49:25 -07:00
Jeff Gilbert
0b43ed5707 Bug 1206907 - GenerateWarning should output to Web Console, not Browser Console. - r=bholley 2015-09-22 15:51:01 -07:00
Jeff Gilbert
8e1b61b7aa Bug 1192989 - Simplify handling by ifdefing in all.js. - r=kamidphish 2015-08-10 14:57:15 -07:00