Commit Graph

458 Commits

Author SHA1 Message Date
Ryan Hunt
d96026ce41 Replay buffer commands on paint thread when OMTP is enabled (bug 1399692 part 7, r=bas)
This commit does the work of actually dispatching the recorded buffer operations
to the paint thread, and removing some main thread asserts from TextureClient.

MozReview-Commit-ID: CN3RoQPz9fP
2017-10-26 00:47:17 -04:00
Jamie Nicol
5376706d27 Bug 1092294 - Use SurfaceTextures for painted content on android (preffed off). r=nical,snorp
Add a new TextureClientData type, AndroidNativeWindowTextureData,
backed by a SurfaceTexture in single-buffer mode. It uses the
NativeWindow API, which provides producer-side access to the buffer.
This provides a DrawTarget which can be used to paint directly in to
the SurfaceTexture, which can then be composited using a SurfaceTextureHost.

Due to API restrictions it is not possible to read from a NativeWindow
while the corresponding SurfaceTexture has ownership of the
buffer. TiledContentClient now handles that by painting the additional
region that it cannot copy from the front buffer, if required.

MozReview-Commit-ID: 1NZq6MQqwFq
2017-10-28 11:59:58 +01:00
Daniel Holbert
bb0a8b6602 Bug 1412427 part 8: (automated patch) Switch a bunch of C++ files in gfx to use our standard mode lines. r=jrmuizel
This patch was generated automatically by the "modeline.py" script, available
here: https://github.com/amccreight/moz-source-tools/blob/master/modeline.py

For every file that is modified in this patch, the changes are as follows:
 (1) The patch changes the file to use the exact C++ mode lines from the
     Mozilla coding style guide, available here:
https://developer.mozilla.org/en-US/docs/Mozilla/Developer_guide/Coding_Style#Mode_Line

 (2) The patch deletes any blank lines between the mode line & the MPL
     boilerplate comment.

 (3) If the file previously had the mode lines and MPL boilerplate in a
     single contiguous C++ comment, then the patch splits them into
     separate C++ comments, to match the boilerplate in the coding style.

MozReview-Commit-ID: 77D61xpSmIl
2017-10-27 16:10:06 -07:00
Nicholas Nethercote
920671fff1 Bug 1406296 (part 2) - Remove the profiler's "layersdump" feature. r=mstange.
Because it just doesn't control any behaviour within the profiler, and it just
duplicates gfxPrefs::LayersDumpTexture().

With this gone, PROFILER_FEATURE_ACTIVE can also be removed.
2017-10-06 17:34:22 +11:00
Nicholas Nethercote
a35e82f193 Bug 1403868 (part 4) - Reduce tools/profiler/public/*.h to almost nothing in non-MOZ_GECKO_PROFILER builds. r=mstange.
Currently the Gecko Profiler defines a moderate amount of stuff when
MOZ_GECKO_PROFILER is undefined. It also #includes various headers, including
JS ones. This is making it difficult to separate Gecko's media stack for
inclusion in Servo.

This patch greatly simplifies how things are exposed. The starting point is:

- GeckoProfiler.h can be #included unconditionally;

- everything else from the profiler must be guarded by MOZ_GECKO_PROFILER.

In practice this introduces way too many #ifdefs, so the patch loosens it by
adding no-op macros for a number of the most common operations.

The net result is that #ifdefs and macros are used a bit more, but almost
nothing is exposed in non-MOZ_GECKO_PROFILER builds (including
ProfilerMarkerPayload.h and GeckoProfiler.h), and understanding what is exposed
is much simpler than before.

Note also that in BHR, ThreadStackHelper is now entirely absent in
non-MOZ_GECKO_PROFILER builds.
2017-10-04 09:11:18 +11:00
Jean-Yves Avenard
6ff3a163d6 Bug 1215089 - P7: Add support for 10/12 bits YUV surface with basic compositor. r=mattwoodrow
MozReview-Commit-ID: Ej4MbvHnSk9
2017-09-29 16:37:56 +02:00
Sebastian Hengst
f008772ce9 Backed out changeset 248c73a2c3b1 (bug 1215089) 2017-10-04 16:25:46 +02:00
Jean-Yves Avenard
8c1bb6e03a Bug 1215089 - P6: Add support for 10/12 bits YUV surface with basic compositor. r=mattwoodrow
MozReview-Commit-ID: Ej4MbvHnSk9
2017-09-29 16:37:56 +02:00
Jeff Gilbert
d8ff34a94a Bug 1322746 - Expose DXGI HANDLEs for GPU_VIDEO. - r=mattwoodrow
MozReview-Commit-ID: Aea0xGesaQi
2017-09-02 21:52:10 -07:00
sotaro
b6bd39f8ee Bug 1380979 - Enable DXGITextureHostD3D11 usage with WebRender r=nical 2017-08-09 14:28:15 +09:00
David Anderson
23d88a6fec Bug 1385101 Part 2 Hold TextureClients alive during async painting. r=mattwoodrow,mchang 2017-08-05 11:54:11 -07:00
JerryShih
d58d4bf3e1 Bug 1357299 - P9: Do the refactoring for SyncObject. v2. r=mattwoodrow,dvander
The MLGDeviceD3D11, CompositorD3D11 and TextureClient use the same synchronization mechanism.
Create the new SyncObjectClient/Host types for reusing code.

Add SyncObject.cpp/h and create two new data types: SyncObjectClient and SyncObjectHost.
The SyncObjectClient is used for the TextureClient synchronization at client side.
The SyncObjectHost is used for the TextureHost synchronization in renderers such
as MLGDeviceD3D11 and CompositorD3D11.

MozReview-Commit-ID: 3l56WK1aZ15
2017-08-07 18:15:23 +08:00
David Anderson
8b7939ac95 Don't flush async paints on the main thread. (bug 1386517, r=mattwoodrow) 2017-08-02 11:37:31 -07:00
Bevis Tseng
2ecbda13e2 Bug 1378930 - Part 2: Remove the aName parameter from SchedulerGroup/DocGroup/DispatcherTrait. r=billm 2017-07-26 16:13:35 +08: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
Bevis Tseng
72756a00bc Bug 1378476 - Label layers::DestroyTextureData. r=nical 2017-07-19 14:23:19 +08:00
Bill McCloskey
ce42826bdf Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-26 14:19:58 -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
Carsten "Tomcat" Book
238bf154d5 Backed out changeset 4f6302a98ae4 (bug 1372405) 2017-06-21 13:59:26 +02:00
Bill McCloskey
67e8af4720 Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-20 21:44:11 -07:00
Carsten "Tomcat" Book
bbe9441993 Backed out changeset 9846de3bd954 (bug 1372405) 2017-06-20 08:27:02 +02:00
Bill McCloskey
f69608368b Bug 1372405 - Provide names for all runnables in the tree (r=froydnj)
MozReview-Commit-ID: DKR6ROiHRS7
2017-06-19 22:25:47 -07:00
Andrew Osmond
bcaa5e62ac Bug 1368730 - TextureChild::ActorDestroy should indicate IPC is now impossible, not TextureChild::ReleaseIPDLReference. r=nical 2017-05-31 10:18:13 -04:00
Carsten "Tomcat" Book
31f9a8236d merge mozilla-inbound to mozilla-central a=merge 2017-05-05 15:17:26 +02:00
Nicholas Nethercote
a7e5660c91 Bug 1360471 (part 4) - Use a bitfield to represent profiler features. r=mstange.
Currently the profiler mostly uses an array of strings to represent which
features are available and in use. This patch changes the profiler core to use
a uint32_t bitfield, which is a much simpler and faster representation.
(nsProfiler and the profiler add-on still use the array of strings, alas.) The
new ProfilerFeature type defines the values in the bitfield.

One side-effect of this change is that profiler_feature_active() now can be
used to query all features. Previously it was just a subset.

Another side-effect is that profiler_get_available_features() no longer incorrectly
indicates support for Java and stack-walking when they aren't supported. (The
handling of task tracer support is unchanged, because the old code handled it
correctly.)
2017-05-01 14:23:34 +10:00
Kartikaya Gupta
73f3f83950 Merge m-c to graphics
MozReview-Commit-ID: 3l2zmVoMgdl
2017-04-20 08:47:24 -04:00
sotaro
8305f0b97e Bug 1356944 - Fix external image id allocation of WebRenderTextureHost r=nical 2017-04-20 10:24:13 +09:00
Matt Woodrow
7aec0e6f43 Bug 1341496 - Part 3: Make CrossProcessSemaphore allocation fallible. r=billm 2017-04-19 15:39:11 +12:00
Matt Woodrow
9ab38738a5 Bug 1341496 - Part 1: Don't try to serialize read locks that aren't valid. r=nical 2017-04-19 15:15:42 +12:00
Kevin Chen
007f189a47 Bug 1343754 - Add a function for replacing event target for actor and label PTexture; r=bevistseng,billm,nical
MozReview-Commit-ID: KGVBWsexkqC
2017-03-21 03:57:56 +00:00
Sebastian Hengst
0b131f5c2a Backed out changeset 25f2e9e2068d (bug 1343754) for crashing e.g. in dom/workers/test/serviceworkers/test_fetch_integrity.html. r=backout 2017-05-03 12:59:36 +02:00
Kevin Chen
d08e1cb76d Bug 1343754 - Add a function for replacing event target for actor and label PTexture; r=bevistseng,billm,nical
MozReview-Commit-ID: KGVBWsexkqC
2017-03-21 03:57:56 +00:00
David Anderson
80fa3494e1 Remove references to the Direct3D9 compositor. (bug 1318558 part 1, r=mattwoodrow) 2017-03-08 00:17:36 -08:00
Bas Schouten
463073445c Bug 1340398 - Part 1: Allow SyncObject usage for different devices. r=mattwoodrow
MozReview-Commit-ID: GkEpe4BY9Tl
2017-03-07 20:55:19 +00:00
Wes Kocher
3ad6b8eadd Backed out 3 changesets (bug 1340398) for static build bustage a=backout
Backed out changeset 7d0a9bb0a642 (bug 1340398)
Backed out changeset a8af64e23154 (bug 1340398)
Backed out changeset 588942cf8807 (bug 1340398)

MozReview-Commit-ID: BZveA35jLBL
2017-03-07 13:39:49 -08:00
Bas Schouten
e8a0615abd Bug 1340398 - Part 1: Allow SyncObject usage for different devices. r=mattwoodrow
MozReview-Commit-ID: GkEpe4BY9Tl
2017-03-07 20:55:19 +00:00
Matt Woodrow
f8409228f1 Bug 1340117 - Batch ReadLock intializer into a separate IDPL message to avoid hitting the file descriptor limit. r=dvander 2017-02-27 16:12:12 +13:00
David Anderson
8c46867f03 Fix a content canvas crash caused by losing IPC during a GPU process restart. (bug 1339852, r=mattwoodrow) 2017-02-15 19:09:18 -08:00
Matt Woodrow
491e9420ca Bug 1328797 - Part 1: Don't use a sync transaction for RemoveTexture. r=nical 2017-02-16 11:28:24 +13:00
Matt Woodrow
9ebc2a8154 Bug 1325227 - Part 9: Implement a blocking TextureReadLock using CrossProcessSemaphore. r=nical 2017-02-14 21:10:36 +13:00
Matt Woodrow
7b0c65b3d8 Bug 1325227 - Part 5: Hold the read lock while the TextureClient is locked. r=nical 2017-02-04 23:19:22 +13:00
Matt Woodrow
d18378def9 Bug 1325227 - Part 4: Split out the parts of TextureReadLock that are specific to the 'non-blocking' usage needed by tiling/texture pools. r=nical 2017-02-04 23:19:11 +13:00
Kartikaya Gupta
a7e98c6c90 Bug 1333122 - Remove some uses of gfxPrefs::WebRenderEnabled from gfx code. r=sotaro
MozReview-Commit-ID: FNiSGVC5B0e
2017-01-24 08:03:08 -05:00
sotaro
62880ccf58 Bug 1331565 - Disable DIBTextureData when WebRender is enabled r=gfx? 2017-01-17 16:50:51 +09:00
Carsten "Tomcat" Book
b2903208c2 Merge mozilla-central to inbound 2016-11-16 14:53:15 +01:00
Kan-Ru Chen
1b9dd22e2d Bug 1314254 - Add mozilla::ipc::IPCResult type and convert IPDL handlers to use new return type. r=billm
We will use the new type for the generated IPDL message handler
prototype to make sure correct error handling method is called.

MozReview-Commit-ID: AzVbApxFGZ0
2016-11-15 04:26:00 +01:00
Sotaro Ikeda
babd939cf1 Bug 1317656 - Cleanup more gonk/b2g dependent code r=nical 2016-11-15 22:01:30 -08:00
David Anderson
af9c206edd Fix canvas crashing when the GPU process aborts. (bug 1314427, r=nical) 2016-11-15 13:04:59 -08:00
David Anderson
138cd6e975 Remove assertions in TextureClient that IPC is open. (bug 1316599, r=mattwoodrow) 2016-11-14 11:46:34 -08:00
Carsten "Tomcat" Book
cd6ad0efcd merge mozilla-inbound to mozilla-central a=merge 2016-11-10 16:59:38 +01:00