Commit Graph

197 Commits

Author SHA1 Message Date
Botond Ballo
60a5318264 Bug 1222661 - Replace FromUntyped(obj) calls with FromUnknown*(obj). r=nical 2015-11-09 18:22:25 -05:00
Botond Ballo
db5d15db66 Bug 1222661 - Replace ToUntyped(obj) calls with obj.ToUnknown*(). r=nical 2015-11-06 22:13:40 -05:00
Milan Sreckovic
8feec0d950 Bug 1214802 - gfxEnv - consolidate environment variables used by the graphics code in one place. r=botond 2015-10-28 14:31:00 +01:00
Nathan Froyd
4e6d8f6705 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
bf7f6dda03 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
David Anderson
a59cdae5ec Treat mix-blend-mode layers as transparent for occlusion culling. (bug 1207041, r=mstange) 2015-09-30 00:02:00 -07:00
Botond Ballo
7bcef4b705 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.
2015-09-21 18:27:27 -04:00
Nicholas Nethercote
e98d68d03b Bug 1208283 (part 4) - Change FrameMetrics::mBackgroundColor from gfxRGBA to gfx::Color. r=jwatt.
This removes some ToColor() calls.
2015-09-24 18:17:45 -07:00
Thinker K.F. Li
af80f65bac Bug 1097464 - Part 6: Handle preserves-3d by compositor. r=roc
Remove WrapPreserve3DList() and replaced it by creating a
nsDisplayTransform item for each transformed frame.

 - Add an additional item for each top frame extending 3D context to
   separate consequence contexts.

 - Effective transform of a layer is the accumulation of ancestors in
   the same 3D context.

 - The layers creating new context and extended by children need a
   temporary buffer if it's effective transform is not 2D.

 - Clip rects are accumulated along the context chain.

 - Visible rects of items are computed from dirty regions of the frame
   creating the context and accumulated transforms.

 - Bounds of items are computed from accumulated transforms and
   accumulated bounds of the descent frames.

 - Backface hidden is handled by compositor and BasicLayerManager.
2015-09-17 03:31:00 +02:00
Carsten "Tomcat" Book
a47b1a13c4 Backed out 6 changesets (bug 1097464) for causing OS X 10.10 Reftest Errors
Backed out changeset fbf63ce1ba88 (bug 1097464)
Backed out changeset fdaf4cfa6707 (bug 1097464)
Backed out changeset 727ebd9f744a (bug 1097464)
Backed out changeset 03f03a776042 (bug 1097464)
Backed out changeset 5ec6364b87d7 (bug 1097464)
Backed out changeset 47d056b3af7f (bug 1097464)
2015-09-17 16:24:43 +02:00
Thinker K.F. Li
4ca462453f Bug 1097464 - Part 6 - Handle preserves-3d by compositor. r=roc
Remove WrapPreserve3DList() and replaced it by creating a
nsDisplayTransform item for each transformed frame.

 - Add an additional item for each top frame extending 3D context to
   separate consequence contexts.

 - Effective transform of a layer is the accumulation of ancestors in
   the same 3D context.

 - The layers creating new context and extended by children need a
   temporary buffer if it's effective transform is not 2D.

 - Clip rects are accumulated along the context chain.

 - Visible rects of items are computed from dirty regions of the frame
   creating the context and accumulated transforms.

 - Bounds of items are computed from accumulated transforms and
   accumulated bounds of the descent frames.

 - Backface hidden is handled by compositor and BasicLayerManager.
2015-09-17 03:31:00 +02:00
Kearwood (Kip) Gilbert
fa2c557e0a Bug 1196412 - Correctly scale canvas layers that have a transform applied to fill the screen, r=vlad 2015-08-24 15:58:50 -07:00
Botond Ballo
69688a8e9b Bug 1196462 - Add a pref to highlight checkerboarded areas for debugging. r=kats 2015-08-19 19:29:46 -04:00
Benoit Girard
bdfb7d3873 Bug 1189924 - Add a background color to the APZ minimap. r=kats 2015-07-31 16:47:52 -04:00
Benoit Girard
3e3ea9f0b1 Bug 1189611 - Improve the APZ minimap position and ignore trivial APZ. r=kats 2015-07-31 13:24:24 -04:00
Benoit Girard
88289633b0 Bug 1189473 - Don't paint the tiles in the APZ minimap. r=mstange 2015-07-30 15:26:39 -04:00
Vladimir Vukicevic
ce2c7def11 Bug 1188700, [webvr] Fix VR distortion compositing in d3d11/gl to take into account rendertarget size and transform; r=kip 2015-07-29 14:39:47 -04:00
Vladimir Vukicevic
5aa25befad Bug 1179944, [webvr] support Oculus 0.6.0 runtime and rendering; r=mstange
---
 gfx/2d/Quaternion.h                              |  10 +
 gfx/layers/Layers.h                              |   6 +-
 gfx/layers/composite/ContainerLayerComposite.cpp | 161 +++++++---
 gfx/layers/composite/ContainerLayerComposite.h   |   3 +
 gfx/thebes/gfxPrefs.h                            |   2 +
 gfx/vr/gfxVR.cpp                                 |  56 ++++
 gfx/vr/gfxVR.h                                   |  37 +++
 gfx/vr/gfxVRCardboard.cpp                        |  54 +---
 gfx/vr/gfxVROculus.cpp                           | 367 +++++++++++++++--------
 gfx/vr/gfxVROculus.h                             |  14 +-
 gfx/vr/moz.build                                 |  10 +
 gfx/vr/ovr_capi_dynamic.h                        | 261 +++++++++++-----
 modules/libpref/init/all.js                      |   3 +
 13 files changed, 694 insertions(+), 290 deletions(-)
2015-07-02 11:58:24 -04:00
Bobby Holley
710865df63 Bug 1188696 - Hoist nsRefPtr.h into MFBT. r=froydnj 2015-07-29 10:44:59 -07:00
Benoit Girard
1fa8d9718d Bug 1186159 - Add an APZ minimap. r=kats 2015-07-23 11:29:22 -04:00
Kearwood (Kip) Gilbert
d3ad55b783 Bug 1181240 - Part 3: Replace gfx3DMatrix with Matrix4x4 in gfx,r=vlad
- Refactored code to use Matrix4x4 instead of gfx3DMatrix.
- There is not expected to be any functional effect.
2015-07-10 17:06:35 -07:00
Birunthan Mohanathas
a29151dc87 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
Markus Stange
9219f35eb7 Bug 1148582 - Support multiple mask layers per layer in LayerManagerComposite. 2015-07-01 17:32:19 -04:00
Markus Stange
3000f6c8eb Back out bug 1148582 for static analysis bustage. 2015-07-01 01:20:59 -04:00
Markus Stange
8caddbedcf Bug 1148582 - Don't capture refcounted LayerManager in the lambda; capture the compositor instead. 2015-07-01 01:01:50 -04:00
Markus Stange
1757913bd9 Bug 1148582 - Support multiple mask layers per layer in LayerManagerComposite. 2015-07-01 00:52:09 -04:00
Kartikaya Gupta
cb5c22758d Bug 1160566 - Make FrameMetrics.mCompositionBounds private and add a getter/setter for it. r=botond 2015-05-07 14:44:03 -04:00
Kartikaya Gupta
39621f1e0a Bug 1157327 follow-up to add a comment. r=me and DONTBUILD 2015-04-23 15:18:22 -04:00
Kartikaya Gupta
b469e94285 Bug 1157327 - Don't cull out container layers, because their prepared data might be null and cause crashes. r=nical 2015-04-23 15:15:11 -04:00
Nicolas Silva
d73f54cb00 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
Markus Stange
6a18db2a2b Bug 1148871 - Only apply checkerboarding background color to opaque layers. r=botond 2015-03-29 01:26:08 -04:00
Jeff Muizelaar
6cbfabbc4c Bug 1141864. Replace a bunch nsAutoPtr.h includes with nsRefPtr.h 2015-03-10 20:48:09 -04:00
Botond Ballo
541eb1b8e9 Bug 1136971 - Draw layer borders correctly in the presence of multi-FrameMetrics. r=kats 2015-02-25 18:25:19 -05:00
Ethan Lin
1eed8bdc69 Bug 1103258 - Prevent an empty container from creating a render target. r=BenWa, r=jmuizelaar 2014-12-23 05:48:00 -05:00
Vladimir Vukicevic
fd5bc411b9 Bug 1036602 - add generic gfx/layers functionality for VR rendering; r=nical 2014-07-09 12:26:18 -07:00
Benoit Girard
c7311885a6 Bug 1098495 - Retain a container's intermediate surface's content. r=mattwoodrow 2014-11-18 17:33:36 -05:00
Benoit Girard
6f6cda359f Bug 1087530 - Retain container's intermediate surfaces for up to one frame. r=jmuizelaar 2014-11-03 17:27:32 -05:00
Carsten "Tomcat" Book
45e1979ee5 Backed out changeset 48667a14f94d (bug 1092360) for test bustage / crashes on a CLOSED TREE 2014-11-14 08:14:22 +01:00
Benoit Girard
b53c7a7ac8 Bug 1092360 - Avoid redundant framebuffer switches. r=jrmuizel 2014-11-12 17:39:17 -05:00
Benoit Girard
d85a68ba81 Bug 1089380 - Remove ClipRectInLayersCoordinates. r=mattwoodrow 2014-10-31 16:34:30 -04:00
Benoit Girard
00fbd63ee2 Backout 60fe2b1ab1ba for split-opacity-layers-1.html reftest failure. 2014-11-03 13:37:54 -05:00
Benoit Girard
7bc61c962d Bug 1089380 - Remove ClipRectInLayersCoordinates. r=mattwoodrow 2014-10-31 16:34:30 -04:00
Matt Woodrow
bf67cdb0a7 Bug 1085223 - Add an occlusion culling pass to compositor layers. r=BenWa 2014-10-20 17:04:39 +13:00
Daniel Holbert
6b0550b4b2 Backout fa9c6845338e (bug 1085223) for causing bug 1087257. 2014-10-22 13:03:18 -07:00
Matt Woodrow
1cd26fde8e Bug 1085223 - Add an occlusion culling pass to compositor layers. r=BenWa 2014-10-20 17:04:39 +13:00
Phil Ringnalda
f048fcc994 Back out 820188e039a0 (bug 1067748) for Android reftest-2 failures 2014-10-19 13:50:29 -07:00
Robert O'Callahan
fcc905ad59 Bug 1067748. When a solid-color display item covers everything else in its layer, make it a ColorLayer. r=tn 2014-09-16 16:27:14 +12:00
Kartikaya Gupta
f6083d562d Bug 1013612 - Remove APZ-internal headers from being exported to non-layers code. r=botond 2014-10-16 09:23:52 -04:00
Markus Stange
a15e939a69 Bug 1073103 - Rename ThebesLayer to PaintedLayer. r=roc 2014-09-26 13:06:08 -04:00
Kartikaya Gupta
7e8bbfa0f5 Bug 1013385 - Add the layer bounds to the layers API and use it for checkerboarding. r=mattwoodrow,BenWa 2014-09-15 16:09:52 -04:00