Commit Graph
59 Commits
Author SHA1 Message Date
Mason Chang df6089fba6 Bug 1399692 - Backed out changeset 46f0b004bdd2 for not cleaning up content client on the right thread. r=bas
MozReview-Commit-ID: 2eocRWGxjzA
2017-09-20 08:38:30 -07:00
Mason Chang 2151daf353 Bug 1399692 - Copy the front buffer to the back buffer on the paint thread with OMTP enabled. r=bas 2017-09-14 15:09:53 -04:00
Ryan Hunt 5259fbfebb Bug 1390755 - Rename PaintThread and CompositorBridgeChild methods to be more unified. r=mchang
MozReview-Commit-ID: FpwIqEmmvbg
2017-08-16 16:02:13 -05:00
Mason Chang 6e4aeb2658 Bug 1387639 Sync Textures once all async OMTP paints are done. r=mattwoodrow 2017-08-10 21:41:31 -07:00
Mason Chang e2bfd654b3 Bug 1386966. Coalesce OMTP drawtarget flushes until finished painting a layer. r=dvander 2017-08-09 08:24:15 -07:00
Mason Chang 7da3711635 Bug 1386965 - Support async painting component-alpha layers. r=dvander 2017-08-09 09:39:07 -07:00
David Anderson efc531e81d Bug 1385101 Part 1 - Create CapturedPaintState in ContentClient rather than ClientPaintedLayer. r=mchang 2017-08-05 11:25:45 -07:00
Mason Chang c500b6cf1a Bug 1386849 - Always force CompositorBridgeChild::NotifyFinishedAsyncPaint. r=dvander 2017-08-03 22:55:44 -07:00
Mason Chang 18bfb9400e Bug 1386073 Don't set RotatedBuffer's returned DrawTarget transform with omtp. r=dvander 2017-08-03 20:51:30 -07:00
Mason Chang c749bb558e Bug 1383916 Prep a DrawTarget to be drawn to on the paint thread. r=dvander 2017-08-03 08:50:32 -07:00
Phil Ringnalda 4a6328e2b5 Backed out changeset 525c6c747a7a (bug 1383916) for Windows 8 reftest failures
CLOSED TREE

MozReview-Commit-ID: LvxYj7DmsGX
2017-08-01 23:07:18 -07:00
Mason Chang 3e6ff44ae2 Bug 1383916. Prep and flush draw targets on the paint thread with OMTP. r=dvander 2017-07-31 20:56:01 -07:00
Mason Chang 176ef378d6 Bug 1384756 - Don't support component alpha layers with OMTP. r=dvander 2017-07-31 16:48:56 -07:00
Mason Chang 178af9710d Bug 1381973 - Lazily create the reference DT in DrawTargetCapture. r=dvander 2017-07-26 15:43:00 -07:00
David Anderson 41bfb10f56 Don't assert about borrowed DT refcounts when async painting. (bug 1381393, r=mattwoodrow) 2017-07-25 22:38:33 -07:00
Mason Chang ee4fb14057 Bug 1380483 - Properly set AA, transform and use rotated buffers with OMTP capturing. r=dvander 2017-07-14 08:01:45 -07:00
Mason Chang 9e3d4293a8 Bug 1379322 Don't clear rect when init DrawTargetCapture with OMTP. r=jrmuizel 2017-07-07 18:08:12 -07:00
Nicholas Nethercote a58025002f Bug 1375392 - Tweak the PROFILER_LABEL* macros. r=mstange.
This patch makes the following changes to the macros.

- Removes PROFILER_LABEL_FUNC. It's only suitable for use in functions outside
  classes, due to PROFILER_FUNCTION_NAME not getting class names, and it was
  mostly misused.

- Removes PROFILER_FUNCTION_NAME. It's no longer used, and __func__ is
  universally available now anyway.

- Combines the first two string literal arguments of PROFILER_LABEL and
  PROFILER_LABEL_DYNAMIC into a single argument. There was no good reason for
  them to be separate, and it forced a '::' in the label, which isn't always
  appropriate. Also, the meaning of the "name_space" argument was interpreted
  in an interesting variety of ways.

- Adds an "AUTO_" prefix to PROFILER_LABEL and PROFILER_LABEL_DYNAMIC, to make
  it clearer they construct RAII objects rather than just being function calls.
  (I myself have screwed up the scoping because of this in the past.)

- Fills in the 'js::ProfileEntry::Category::' qualifier within the macro, so
  the caller doesn't need to. This makes a *lot* more of the uses fit onto a
  single line.

The patch also makes the following changes to the macro uses (beyond those
required by the changes described above).

- Fixes a bunch of labels that had gotten out of sync with the name of the
  class and/or function that encloses them.

- Removes a useless PROFILER_LABEL use within a trivial scope in
  EventStateManager::DispatchMouseOrPointerEvent(). It clearly wasn't serving
  any useful purpose. It also serves as extra evidence that the AUTO_ prefix is
  a good idea.

- Tweaks DecodePool::SyncRunIf{Preferred,Possible} so that the labelling is
  done within them, instead of at their callsites, because that's a more
  standard way of doing things.
2017-06-22 17:08:53 +10:00
Mason Chang ecbb8b3573 Bug 1372739 - Use DrawTargetCapture instead of DrawTargetRecording for omtp. r=dvander 2017-06-22 08:36:14 -07:00
Mason Chang f56c0edea1 Bug 1372441 - Enable replay of ClientPaintedLayers off the main thread. r=dvander 2017-06-20 13:35:39 -07:00
Mason Chang 85105f73ce Bug 1371037 - Support for record and replay of ClientPaintedLayers on the main thread. r=dvander 2017-06-15 16:32:59 -07:00
Sebastian Hengst e29a94e425 Backed out changeset 03e899794f41 (bug 1371037) for merge conflict with bug 1368386, v2. r=backout a=backout
MozReview-Commit-ID: De78lCy88sD
2017-06-17 22:49:14 +02:00
Sebastian Hengst 62ee3296aa Backed out changeset 03e899794f41 (bug 1371037) for merge conflict with bug 1368386. r=backout a=backout
MozReview-Commit-ID: GPp2Knh4JQt
2017-06-17 22:10:05 +02:00
Markus Stange 56fdc91c14 Bug 1368386 - Make PaintedLayer::mValidRegion private so that its access can be tightly controlled. r=mattwoodrow
MozReview-Commit-ID: LdtH3hrXT5v
2017-06-15 18:20:53 -04:00
Nicolas Silva 0a9f90823a Bug 1348291 - Call EndPaint when painting is skipped if BeginPaint was called. r=mattwoodrow 2017-03-28 14:28:45 +02:00
Matt Woodrow 60d071a832 Bug 1340076 - Force tiling to always be enabled on OSX. r=nical 2017-02-17 15:30:17 +13:00
Matt Woodrow 53e1d350fc Bug 1325227 - Part 1: Remove synchronous transaction replies since they don't return any data we didn't already have. r=nical
MozReview-Commit-ID: 2HIbk65L7zR
2016-12-06 13:34:54 -10:00
David Anderson b1ad9c7a26 Link Compositables via IDs instead of actors. (bug 1323957 part 4, r=mattwoodrow) 2017-01-17 18:47:06 -08:00
JerryShih eb4af342ed Bug 1160157 - remove the painting aborting for ClientPaintedLayer in device-remove/reset status. r=dvander
Since we already have the device-remove checking in ClientLayerManager, this checking is redundant.
2016-09-24 01:40:00 +02:00
Jonathan Watt 9c5b8de022 Bug 1279451 - Remove a lot of unnecessary includes of nsAutoPtr.h. rs=sparky 2016-06-07 21:10:18 +01:00
Nicholas Nethercote a41e57a9b1 Bug 1276824 (part 1) - Rename gfxContext::ForDrawTarget{,WithTransform}(). r=milan.
The new names Create{,PreservingTransform}OrNull() better communicate that
these functions (a) do object creation, and (b) are fallible.
2016-06-07 09:39:56 +10:00
Sotaro Ikeda e3741094a9 Bug 1263053 - Enable tiling on BasicCompositor r=nical 2016-05-08 18:29:35 -07:00
Sotaro Ikeda 7d33c8de5f Bug 1263053 - Backout until bug 1265873 fix 2016-04-24 20:30:05 -07:00
Sotaro Ikeda e1ca31bb25 Bug 1263053 - Enable tiling on BasicCompositor r=nical 2016-04-14 20:08:05 -07:00
Milan Sreckovic dd0830c93c Bug 1259513: Make gfxContext constructor private, use a utility function that can return nullptr. r=bas,lsalzman
MozReview-Commit-ID: rHhLEDZEQt
2016-04-12 15:18:11 -04:00
Michelangelo De Simone 3c44cb010c Bug 1247445 - Rename Layer::GetEffectiveVisibleRegion GetLocalVisibleRegion. r=botond 2016-02-13 16:50:51 -08:00
Milan Sreckovic 586b5906ea Bug 1200021 - Part 3: Add DrawTarget::IsValid and don't let Cairo version snapshot invalid surface. r=bas 2015-12-04 13:43:00 -05:00
Sunny Sidhu 2ba69faae0 Bug 1220873 - Make Layer::mVisibleRegion a LayerIntRegion. r=botond 2015-11-29 02:07:55 -05: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
Jamie Nicol 45bdc72d64 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
Jamie Nicol 6e0e1d166c 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
Matt Woodrow 919c77b56d Backout 104b0bbd714f (Bug 1189399) and re-enable single tiling for B2G since the issues should be resolved now. 2015-07-31 17:06:04 -04:00
Matt Woodrow 69296939cb Bug 1189399 - Disable single tile painting for b2g because of regressions. r=jrmuizel 2015-07-30 17:44:03 -04:00
Matt Woodrow a20bd93cc8 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 a1feb12475 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
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
David Anderson 2511c6ca59 Bug 1148582 - Add mask layers to FrameMetrics for ancestor scroll frame clips. r=mattwoodrow 2015-06-21 12:27:31 -04:00
Markus Stange 3000f6c8eb Back out bug 1148582 for static analysis bustage. 2015-07-01 01:20:59 -04:00
David Anderson 38a60e1411 Bug 1148582 - Add mask layers to FrameMetrics for ancestor scroll frame clips. r=mattwoodrow 2015-06-21 12:27:31 -04:00
Bas Schouten 3df0bb3e9a Bug 1162587 - Part 2: Abort painting a painted layer when a device reset has ocurred. r=jrmuizel 2015-05-08 23:12:32 +02:00