Граф коммитов

112 Коммитов

Автор SHA1 Сообщение Дата
Sylvestre Ledru 265e672179 Bug 1511181 - Reformat everything to the Google coding style r=ehsan a=clang-format
# ignore-this-changeset

--HG--
extra : amend_source : 4d301d3b0b8711c4692392aa76088ba7fd7d1022
2018-11-30 11:46:48 +01:00
Daniel Holbert 126bd9e1a4 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

--HG--
extra : rebase_source : c6162fa3cf539a07177a19838324bf368faa162b
2017-10-27 16:10:06 -07:00
Morris Tseng f3d4ff499f Bug 1379920 - Introduce CanvasRenderer and its derived classes. r=nical,jrmuizel
This patch move common canvas interfaces out of layer. So I create a
base class CanvasRenderer which move interfaces from CanvasLayer.
CopyableCanvasRenderer from CopyableCanvasLayer, ClientCanvasRenderer
from ClientCanvasLayer and WebRenderCanvasRenderer from
WebRenderCanvasLayer. And finally, WebRenderCanvasRendererSync for the
non layers free mode and WebRenderCanvasRendererAsync for the layers
free mode.

Summary all changes in this patch.
* Move class CanvasLayer::Data to CanvasRenderer.h and rename it to
CanvasInitializeData. Because this class not only use by layer but also
* Move BasicCanvasLayer::UpdateSurface to
CopyableCanvasRenderer::ReadbackSurface.
* CanvasClient::Update now accepts ShareableCanvasRenderer as parameter.
not CanvasLayer.
use by layers-free mode. Move it out of layer's class makes more sense.
* Add InitializeCanvasRenderer in the canvas related classes to
initialize CanvasRenderer without involved layer.
* All canvas layer has function "CreateCanvasRendererInternal" that
initialize corresponding CanvasRenderer.

* Description of all CanvasRenderer classes:
** CanvasRenderer: Based classes.
** CopyableCanvasRenderer: Can readback canvas content to a
SourceSurface. Use by BasicCanvasLayer.
** ShareableCanvasRenderer: Provide IPC capabilities that allow sending
canvas content over IPC. This is pure virtual class because the IPC handling is
different in different LayerManager.
** ClientCanvasRenderer: Implement IPC handling for ClientLayerManager.
Use by ClientCanvasLayer.
** WebRenderCanvasRenderer: Implement IPC handling for
WebRenderLayerManager.
** WebRenderCanvasRendererSync: Use by WebRenderCanvasLayer.
** WebRenderCanvasRendererAsync: Use by layers-free mode in WebRender.

class diagram shows below:

                      +--------------+
                      |CanvasRenderer|
                      +-------+------+
                              ^
                              |
                  +----------------------+
                  |CopyableCanvasRenderer|
                  +----------------------+
                              ^
                              |
                  +-----------+-----------+
                  |ShareableCanvasRenderer|
                  +-----+-----------------+
                        ^      ^
          +-------------+      +-------+
          |                            |
+--------------------+       +---------+-------------+
|ClientCanvasRenderer|       |WebRenderCanvasRenderer|
+--------------------+       +--------+--+-----------+
                                      ^  ^
              +-----------------------+  +----+
              |                               |
+-------------+-------------+   +-------------+--------------+
|WebRenderCanvasRendererSync|   |WebRenderCanvasRendererAsync|
+---------------------------+   +----------------------------+

MozReview-Commit-ID: 5hqQ19W169r
2017-08-03 13:55:14 +08:00
Nicholas Nethercote 58786e1ea7 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.

--HG--
extra : rebase_source : 318d1bc6fc1425a94aacbf489dd46e4f83211de4
2017-06-22 17:08:53 +10:00
Morris Tseng 51a0af30f0 Bug 1322500 - Introducing ShareableCanvasLayer. r=sotaro
MozReview-Commit-ID: 1zVJ3HVQV9W

--HG--
rename : gfx/layers/client/ClientCanvasLayer.cpp => gfx/layers/ShareableCanvasLayer.cpp
rename : gfx/layers/client/ClientCanvasLayer.h => gfx/layers/ShareableCanvasLayer.h
2016-12-28 10:16:43 +08:00
Matt Woodrow 71a5f6f9cb Bug 1319626 - Part 6: Fix a few unified build include problems. r=mstange
--HG--
extra : rebase_source : a8db3fa549dada3925ad3b9c7ab81f4aaa280ffa
2016-11-24 18:11:31 +13:00
Carsten "Tomcat" Book bd8c3fad15 Merge mozilla-central to mozilla-inbound on a CLOSED TREE
--HG--
extra : amend_source : cc55092faa1331377fa988014566b0df8227ea0f
2016-11-24 17:05:00 +01:00
Carsten "Tomcat" Book 6b19be2eab Backed out changeset f4f8dc2931aa (bug 1319626) 2016-11-24 17:02:22 +01:00
Matt Woodrow 3f4d5385f0 Bug 1319626 - Part 6: Fix a few unified build include problems. r=mstange 2016-11-24 18:11:31 +13:00
Nicolas Silva 36605f9e7b Bug 1300121 - Make PersistentBufferProviderShared::BorrowDrawTarget more robust agaist bad edge cases and if all fails, fallback to the basic provider. r=Bas 2016-10-11 13:23:11 +02:00
Matt Woodrow a0aad01631 Bug 1305897 - Move ActiveResourceTracker onto ShadowLayerForwarder, since it's not used anywhere else. r=nical 2016-10-03 21:20:13 +13:00
Nicolas Silva 36eabd3917 Bug 1291296 - Make it possible to change a PersistentBufferProvider's Forwarder without crashing. r=ethlin 2016-08-09 14:42:15 +02:00
Nicolas Silva 1fdb65d654 Bug 1289816 - Simplify CopyableCanvasLayer::UpdateTarget and remove unnecessary copies. r=jnicol 2016-07-29 20:19:28 +02:00
Nicolas Silva 63733308d3 Bug 1290081 - Make canvas layer transactions asynchronous. r=sotaro 2016-07-29 20:19:23 +02:00
Wes Kocher 9ed0f44087 Backed out changeset 67cb195b1b45 (bug 1290081) for canvas reftest failures 2016-07-28 13:09:07 -07:00
Nicolas Silva 521fea7499 Bug 1290081 - Make canvas layer transactions asynchronous. r=sotaro 2016-07-28 17:58:33 +02:00
kearwood 694ce1cf8d Bug 1284324 - Implement Canvas Layer mirrors r=bas
- When a canvas layer is set to mirror, it copies the
  texture from the canvas rather than changing the
  texture factory with Morph().
- This is useful when a canvas content will be sent to
  multiple devices simultaneously, such as a VR HMD
  and a 2d monitor mirror.
- This is used by the WebVR 1.0 API, in Bug 1250244

MozReview-Commit-ID: JfMSockO2uz

--HG--
extra : rebase_source : ba9633f7cb9a622efb8389d834b4232205c72755
2016-07-04 13:11:07 -07:00
Nicolas Silva 55982c743c Bug 1167235 - Part 1 - Render canvas2D into TextureClient directly. r=Bas 2016-07-01 10:58:06 +02:00
Sebastian Hengst 51e7f34222 Backed out changeset 14dfa550c783 (bug 1167235) 2016-06-28 20:28:23 +02:00
Nicolas Silva 9367516d33 Bug 1167235 - Part 1 - Render canvas2D into TextureClient directly. r=Bas 2016-06-28 14:06:51 +02: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
Morris Tseng acf60f0d3e Bug 709490 - Part 1: Let ImageBridge transfer CanvasClient async. r=nical
Thanks Jon Morton [:jmorton] (jonanin@gmail.com) for polishing patches.

--HG--
extra : rebase_source : f4ec56dc106357e30660343166ff51e7d9dc0c62
2015-10-12 11:21:02 +08: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 298e6642c3 Bug 709490 - Part 1: Let ImageBridge transfer CanvasClient async. r=nical
Thanks Jon Morton [:jmorton] (jonanin@gmail.com) for polishing patches.

--HG--
extra : rebase_source : 9833dd57592081737ce74ad5b6ba8441a243ca0b
2015-10-05 10:50:15 +08: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 6c605d106d Bug 709490 - Part 1: Let ImageBridge transfer CanvasClient async, r=nical 2015-09-29 11:51:23 +01:00
Andrew Comminos b2668b2662 Bug 1193015 - Require MOZ_GLX_USE_SURFACE_SHARING to enable WebGL surface sharing on GLX. r=jgilbert 2015-09-24 15:21:36 -07:00
David Anderson a976b3be5c Don't create a D3D11 compositor device on content processes. (bug 1183910 part 8, r=bas,mattwoodrow) 2015-08-05 02:45:06 -07:00
Andrew Comminos f8f6b355a9 Bug 1187440 - Implement GLX shared surfaces on the OpenGL compositor. r=jgilbert,nical 2015-07-30 12:40:56 -04:00
Kyle 08faa7ea9f Bug 1167651 - Made EGL initialize its ANGLE display using WARP if the system is blacklisted from using HW acceleration for WebGL ANGLE or if WebGL WARP is forced through a pref. ClientCanvasLayer is changed so that it will use shared surfaces only if the compositing device and the WebGL device are both WARP or both not WARP. Added a mIsWARP field to GLLibraryEGL so that this condition can be checked. r=jgilbert 2015-07-23 13:11:04 -04:00
Birunthan Mohanathas a8939590de 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
Robert O'Callahan f194f6dade Bug 1143575. Remove unused CompositableClient::OnTransaction. r=nical
--HG--
extra : commitid : 8rysjAMnzTJ
extra : rebase_source : 36fa30fb31e95eeeee418779acb010fd137e0991
2015-03-25 21:30:25 +13:00
Juan Gomez 258ad59e3f Bug 1171931 - Refactor duplicated code using XRE_IsParent/ContentProcess. r=froydnj 2015-07-03 18:29:00 -07:00
David Anderson 55a0f8ee25 Bug 1148582 - Add mask layers to FrameMetrics for ancestor scroll frame clips. r=mattwoodrow
--HG--
extra : rebase_source : 9bf7a73b14e40972b3a5824b2f1344b7770ab789
extra : source : 745366787bcae737c0aec908554db2a3ec288908
2015-06-21 12:27:31 -04:00
Markus Stange f1b62506d9 Back out bug 1148582 for static analysis bustage. 2015-07-01 01:20:59 -04:00
David Anderson c29b4c6dfa Bug 1148582 - Add mask layers to FrameMetrics for ancestor scroll frame clips. r=mattwoodrow 2015-06-21 12:27:31 -04:00
Matt Woodrow 072df12846 Bug 1176506 - Don't test texture sharing on WARP devices since it never works and can be detected as a driver reset. r=Bas 2015-06-26 14:06:49 -07:00
Ryan VanderMeulen 5f5c327690 Backed out changeset 8b4e4083639e (bug 1171931) for B2G debug emulator bustage. 2015-06-25 19:48:42 -04:00
Juan Gomez 702a59d135 Bug 1171931 - Refactor duplicated code using XRE_IsParent/ContentProcess. r=froydnj
--HG--
extra : rebase_source : 2ecbe6c1dd8a7ad8dc529b53349ad431cf1116c9
2015-06-24 14:11:00 -04:00
Jeff Gilbert ee12c03986 Bug 1144906 - Add accel E10S backend for WebGL compositing. - r=jrmuizel,mattwoodrow,nical,sotaro 2015-06-04 17:15:38 -07:00
Wes Kocher 77bc735a23 Backed out changeset c4d1692d88ee (bug 1144906) for OSX m(gl) permaorange 2015-06-04 16:50:59 -07:00
Jeff Gilbert 891a5c7f86 Bug 1144906 - Add accel E10S backend for WebGL compositing. - r=jrmuizel,mattwoodrow,nical,sotaro 2015-06-04 14:21:32 -07:00
Wes Kocher 5ee1a8327e Backed out changeset 29bd04fc57f0 (bug 1144906) for b2g m12 orange
--HG--
extra : amend_source : 79faafb4230715cf6af79b452d121d1e7b58e665
2015-05-28 17:08:53 -07:00
Jeff Gilbert ec631286de Bug 1144906 - Fast WebGL compositing on E10S. - r=jrmuizel,mattwoodrow,nical 2015-05-28 14:51:39 -07:00
Matt Woodrow 7724ed31a5 Bug 1158089 - Remove LAYERS_D3D10 enum value since it's unused. r=Bas 2015-05-11 16:22:51 +12:00
Thibaud Backenstrass 05de9cdb1b Bug 1158122 - Remove all occurences of nsIntRect in gfx/layers/client. r=nical 2015-05-07 11:07:47 +02:00
Phil Ringnalda 24bb7f3b9f Back out dc2fed1aa0af (bug 1144906) for ASan, Android debug, and OS X 10.10 mochitest-gl bustage
CLOSED TREE
2015-05-06 19:55:40 -07:00
Jeff Gilbert b0077b976e Bug 1144906 - Fast WebGL on E10S. - r=mattwoodrow,nical 2015-05-06 16:35:29 -07:00
Wes Kocher b6f7abf05b Backed out changeset 93af6e2a390d (bug 1144906) for build bustage 2015-05-06 16:01:47 -07:00
Jeff Gilbert 587246e6fd Bug 1144906 - Support fast WebGL on E10S. - r=mattwoodrow,nical 2015-05-06 13:48:28 -07:00