Commit Graph

468 Commits

Author SHA1 Message Date
Nicholas Nethercote
15a95be5b4 Bug 1208283 (part 2) - Change ColorLayer::mColor, ColorLayerProperties::mColor, ReadbackLayer::mBackgroundColor from gfxRBGA to gfx::Color. r=jwatt.
This avoids some gfxRGBA-to-Color conversions.
2015-09-24 18:16:45 -07:00
Nicholas Nethercote
bcd2fb7111 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
Thinker K.F. Li
c4820d6fca 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
Thinker K.F. Li
96df61630e Bug 1097464 - Part 4: Fix preserve3d wording for layer flags. r=roc 2015-09-17 03:31:00 +02:00
Thinker K.F. Li
7cb7713946 Bug 1097464 - Part 2 - Snap translation for 3d transforms. r=roc 2015-09-17 03:31:00 +02:00
Carsten "Tomcat" Book
42aa14ed8e 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
Jamie Nicol
709cbe92db Bug 1200729 - Recompute FrameLayerBuilder item visibility if dirty region changes. r=mwoodrow
Make the FrameLayerBuilder remember for what region it has calculated
display item visibility, then recompute the visibility whenever the
dirty region it is passed to DrawPaintedLayer changes.

This means that the caller does not have to know the entire dirty region
that will be drawn for the transaction, but we can still optimise cases
where it knows some of the dirty region in advance.

This fixes a regression where MultiTiledContentClient's low-res display
port would not be painted if a smaller region of its high-res buffer had
already been painted that transaction, since the FrameLayerBuilder
had decided that most of the larger low-res region was invisible.
2015-09-15 14:41:42 +01:00
Thinker K.F. Li
0238a11403 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
Thinker K.F. Li
bc6f3228bb Bug 1097464 - Part 4 - Fix preserve3d wording for layer flags. r=roc 2015-09-17 03:31:00 +02:00
Thinker K.F. Li
81bccd393b Bug 1097464 - Part 2 - Snap translation for 3d transforms. r=roc 2015-09-17 03:31:00 +02:00
Botond Ballo
a5a6088b91 Bug 1166301 - Store a flag on Layer to tell fixed background layers apart from fixed position layers. r=mattwoodrow 2015-09-04 17:26:33 -04:00
Kartikaya Gupta
7d25074ea7 Bug 1180295 - Rip out call to setContentDocumentFixedPositionMargins. r=rbarker 2015-08-18 14:27:18 -04:00
Markus Stange
e1bbfb0cc3 Bug 1187804 - Annotate fixed-position layers with the scroll id of the scroll frame that they are fixed with respect to. r=mattwoodrow 2015-08-17 19:44:42 -04:00
CJ Ku
0c07d120c9 Bug 1061393 - Export display list info to layer scope viewer. r=kamidphish 2015-08-03 02:11:00 -04:00
Jamie Nicol
2ab13a5399 Bug 1187619 - Only optmimize FrameLayerBuilder visibility calculations if correct. r=mattwoodrow
Bug 1176077 introduced the parameter aDirtyRegion to
DrawPaintedLayerCallback, which allows the callback to recompute the
visibility of all items to be painted in that transaction in a single
go. However, this parameter can not always be determined correctly
when using RotatedBuffer, and using an incorrect value was causing
graphical glitches.

Make the parameter optional, and on null values do not perform the
optimisation. Pass null from ClientPaintedLayer, which uses
RotatedBuffer and was causing problems, but continue to pass the
correct value from other Layer implementations. This optimisation was
most important for tiled layers using progressive paint, so this is
okay.
2015-08-03 04:07:00 -04:00
Vladimir Vukicevic
8c69e75150 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
Vladimir Vukicevic
9385fcca70 Bug 1179933, add Layer::ReplaceEffectiveTransform for temporary transform changes; r=mstange
---
 gfx/layers/Layers.h | 29 +++++++++++++++++++++++++++++
 1 file changed, 29 insertions(+)
2015-05-19 13:56:31 -04:00
Matt Woodrow
85b38d5101 Bug 1180326 - Part 6: Use SingleTiledContentClient for non-scrollable layers on b2g and OSX. r=jrmuizel 2015-07-29 12:03:01 -04:00
Jamie Nicol
b2e2b6eebb Bug 1176077 - Only recompute PaintedLayer item visibility when display list has changed. r=mattwoodrow
FrameLayerManager::RecomputeItemsVisibility() was being called on every
call to FrameLayerBuilder::DrawPaintedLayer(), each time for the region
to be painted by that paint call. This is inefficient when progressive
paint is enabled. Change it so that we compute the visibility of all the
layer's items within the total region to be painted, but only on the
first paint after the display list has been modified.
2015-07-21 09:19:25 +01:00
Ting-Yu Lin
e5b64d7247 Bug 1183085 - Remove EndConstruction() from layer documentation; r=roc
EndConstruction() was removed in bug 564993.
2015-07-13 21:44:11 +08:00
Birunthan Mohanathas
47ed3a3675 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
David Anderson
374dcc7a0b Bug 1148582 - Apply async transforms to (ancestor) mask layers correctly. r=botond 2015-06-30 21:07:09 -04:00
David Anderson
fbc36ddf40 Bug 1148582 - Add mask layers to FrameMetrics for ancestor scroll frame clips. r=mattwoodrow 2015-06-21 12:27:31 -04:00
Markus Stange
375ab11d1c Back out bug 1148582 for static analysis bustage. 2015-07-01 01:20:59 -04:00
David Anderson
6c90f76817 Bug 1148582 - Apply async transforms to (ancestor) mask layers correctly. r=botond 2015-06-30 21:07:09 -04:00
David Anderson
5c1379c69a Bug 1148582 - Add mask layers to FrameMetrics for ancestor scroll frame clips. r=mattwoodrow 2015-06-21 12:27:31 -04:00
Nathan Froyd
8780083336 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
Lee Salzman
516de5b894 Bug 633097 - Fix jittering animated text by disallowing flattening into a container layer that has animated text. r=mwoodrow 2015-06-26 18:13:50 -04:00
Bas Schouten
4cc89e6bc2 Bug 1167235 - Part 4: Remove DrawTarget as a possible means of initializing Canvas layers. r=nical 2015-06-19 01:07:22 +02:00
Bas Schouten
8408f83f25 Bug 1167235 - Part 2: Add support for the basic buffer provider to CanvasLayer. r=nical 2015-06-19 01:07:21 +02:00
Bas Schouten
8de3e68281 Bug 1167235 - Part 1: Add code exposing a PersistentBufferProvider. r=nical 2015-06-19 01:07:21 +02:00
Daosheng Mu
47282536a0 Bug 987498 - Part 1 - Layers support OverlayImage. r=roc 2015-05-28 01:35:00 +02:00
Mason Chang
89a5b63555 Bug 1077651 Measure frame uniformity by synthesizing native events. r=kats,mrbkap 2015-06-08 09:53:41 -07:00
David Anderson
979c0fb922 Use widgets for APZ checks, rather than gfxPrefs. (bug 1162064, r=kats,mstange) 2015-06-04 16:51:10 -04:00
Amanda Sambath
1ec55c2ba1 Bug 1158120 - Replace nsIntSize by mozilla::gfx::IntSize in gfx/layers. r=nical 2015-06-03 13:45:24 +02:00
David Anderson
f3ef723198 Fix PostprocessRetainedLayers to not test occlusion with asynchronous clips. (bug 1148582 part 5, r=tn) 2015-06-02 16:34:28 -07:00
Amanda Sambath
707664d6bb Bug 1158120 - Edit include and comments that contained gfxIntSize and nsIntSize. r=nical 2015-05-29 17:01:46 +02:00
Eric Rahm
32b4ff6b18 Bug 1165518 - Part 2: Replace prlog.h with Logging.h. rs=froydnj 2015-05-19 11:15:34 -07:00
Phil Ringnalda
46bb542e23 Back out 530555a2d6d4 (bug 1162064) for debug b2g emulator assertions and failure to thrive
CLOSED TREE
2015-05-17 22:42:05 -07:00
David Anderson
d1e2fa0547 Use widgets for APZ checks, rather than gfxPrefs. (bug 1162064, r=kats,mstange) 2015-05-17 23:11:44 -04:00
David Anderson
ad7e67dd62 Backout changeset e5d045d49b40 for bustage on an a=CLOSED TREE 2015-05-17 21:46:30 -04:00
David Anderson
5d41109b11 Use widgets for APZ checks, rather than gfxPrefs. (bug 1162064, r=kats,mstange) 2015-05-17 20:44:43 -04:00
Thibaud Backenstrass
bd3978f99b Bug 1158122 - Remove the remaining occurences of nsIntRect in gfx/layers. r=nical 2015-05-07 11:07:53 +02:00
Kartikaya Gupta
b2d9e360ea Bug 1158933 - Prevent scrollbars from jumping while zoomed in the B2G browser. r=botond 2015-04-29 07:22:27 -04:00
Andrea Marchesini
e95d49e405 Bug 1156632 - Remove unused forward class declarations - patch 6 - the rest of the tree, r=ehsan 2015-04-22 08:29:24 +02:00
Ying-Ruei Liang (KK)
73bcc83422 Bug 1143522 - Convert Layer::mClipRect to ParentLayerIntRect. r=botond
Change interface of getter/setter for mClipRect,
also necessary modification for codes that use these resources.

* * *
Bundle mUseClipRect and mClipRect as Maybe<ParentLayerIntRect> mClipRect
2015-04-11 22:03:00 -04:00
David Anderson
5e8b4b8a59 Scrollbar thumbs can overlap scrollbar arrows during APZ scrolling. (bug 1152469, r=botond,mstange) 2015-04-12 23:03:02 -04:00
L. David Baron
e3cb739aae Bug 847287 patch 13 - Apply animations/transitions on the layer in the order that reflects how they override, rather than the opposite. r=birtles
This independently would have fixed some of the problems fixed in this
bug.  It would not have fixed them fully, though, since it would not
have prevented us from sending animations being covered up by !important
rules to the compositor.
2015-03-31 15:05:55 -07:00
Ehsan Akhgari
5cccea6f0f Bug 1145631 - Part 1: Replace MOZ_OVERRIDE and MOZ_FINAL with override and final in the tree; r=froydnj
This patch was automatically generated using the following script:

function convert() {
echo "Converting $1 to $2..."
find . \
       ! -wholename "*/.git*" \
       ! -wholename "obj-ff-dbg*" \
         -type f \
      \( -iname "*.cpp" \
         -o -iname "*.h" \
         -o -iname "*.c" \
         -o -iname "*.cc" \
         -o -iname "*.idl" \
         -o -iname "*.ipdl" \
         -o -iname "*.ipdlh" \
         -o -iname "*.mm" \) | \
    xargs -n 1 sed -i -e "s/\b$1\b/$2/g"
}

convert MOZ_OVERRIDE override
convert MOZ_FINAL final
2015-03-21 12:28:04 -04:00
Kartikaya Gupta
d4a0fa17c9 Bug 1137203 - Ignore the critical displayport when a layer is subject to OMTA relative to the scrolling ancestor. r=BenWa 2015-02-26 17:45:37 -05:00