Commit Graph

70 Commits

Author SHA1 Message Date
Nicholas Nethercote
bab6d17ebf Bug 1293117 (part 4) - Change many NS_IMETHODIMP occurrences to NS_IMETHOD. r=froydnj.
This patch makes the following changes on many in-class methods.

- NS_IMETHODIMP F() override;      --> NS_IMETHOD F() override;
- NS_IMETHODIMP F() override {...} --> NS_IMETHOD F() override {...}
- NS_IMETHODIMP F() final;         --> NS_IMETHOD F() final;
- NS_IMETHODIMP F() final {...}    --> NS_IMETHOD F() final {...}

Using NS_IMETHOD is the preferred way of marking in-class virtual methods.
Although these transformations add an explicit |virtual|, they are safe --
there's an implicit |virtual| anyway because |override| and |final| only work
with virtual methods.

--HG--
extra : rebase_source : 386ee4e4ea2ecd8d5001efabc3ac87b4d6c0659f
2016-08-08 10:54:47 +10:00
Nicholas Nethercote
e7f10a07fd Bug 1293603 (part 2) - Make Run() declarations consistent. r=erahm.
This patch makes most Run() declarations in subclasses of nsIRunnable have the
same form: |NS_IMETHOD Run() override|.

As a result of these changes, I had to add |override| to a couple of other
functions to satisfy clang's -Winconsistent-missing-override warning.

--HG--
extra : rebase_source : 815d0018b0b13329bb5698c410f500dddcc3ee12
2016-08-08 12:18:10 +10:00
Thomas Zimmermann
3f7f4cfdd7 Bug 1278780: Use |TexturedEffect::mSamplingFilter| on b2g, r=bas
MozReview-Commit-ID: CEmY1zsBaRG
2016-06-10 09:19:37 +02:00
Nicholas Nethercote
ec7a660ceb Bug 1274148 (part 1, attempt 2) - Use MOZ_MUST_USE more in xpcom/io/Base64.h. r=erahm,bagder,mattwoodrow.
--HG--
extra : rebase_source : 3e4a861f4f9c4151ffbad110159ad541119278fa
2016-06-06 12:22:14 +10:00
Nicholas Nethercote
4f1d56df39 Backout 0ed86240bc77 for bustage. 2016-06-06 11:51:44 +10:00
Nicholas Nethercote
8bc7cd881e Bug 1274148 (part 1) - Use MOZ_MUST_USE more in xpcom/io/Base64.h. r=erahm,bagder,mattwoodrow.
--HG--
extra : rebase_source : b468df852789a22e3d50a9580515bb6aa46784d5
2016-06-06 09:21:00 +10:00
Jonathan Watt
03036022ec Bug 1277862, part 2 - Rename Moz2D's Filter to SamplingFilter in the rest of gfx/. r=Bas 2016-05-25 17:01:18 +01:00
Chris Peterson
11ef78ae89 Bug 1275016 - Rename Endian.h to EndianUtils.h to avoid #include confusion with Android's endian.h stdlib header. r=froydnj
--HG--
rename : mfbt/Endian.h => mfbt/EndianUtils.h
2016-05-22 13:31:11 -07:00
David Anderson
800882adb1 Move CompositorBridgeParent::IsInCompositorThread to CompositorThreadHolder. (bug 1273017 part 3, r=mattwoodrow) 2016-05-15 23:40:13 -07:00
Kyle Huey
c73656947b Bug 1265927: Move nsRunnable to mozilla::Runnable, CancelableRunnable to mozilla::CancelableRunnable. r=froydnj 2016-04-25 17:23:21 -07:00
Nicolas Silva
2662119963 Bug 1258768 - Remove the remaining unsafe compositor casts. r=dvander 2016-04-14 12:38:42 +02:00
David Anderson
f3dc22db8d Rename PCompositor to PCompositorBridge. (bug 1258479 part 2, r=mattwoodrow)
--HG--
rename : gfx/layers/ipc/CompositorChild.cpp => gfx/layers/ipc/CompositorBridgeChild.cpp
rename : gfx/layers/ipc/CompositorChild.h => gfx/layers/ipc/CompositorBridgeChild.h
rename : gfx/layers/ipc/CompositorParent.cpp => gfx/layers/ipc/CompositorBridgeParent.cpp
rename : gfx/layers/ipc/CompositorParent.h => gfx/layers/ipc/CompositorBridgeParent.h
2016-03-22 14:08:38 -04:00
Matt Woodrow
b95fd6e721 Bug 1223736 - Part 3: Remove the distinction between 2d and 3d masks since it only adds complexity. r=Bas 2016-03-22 09:10:37 +13:00
Jeremy Chen
1665f755fd Bug 1205521 - Part3: (v3) Dump texture/mask attributes on layerscope viewer. r=dglastonbury 2015-10-20 02:05:00 +02:00
Carsten "Tomcat" Book
65d8ab26f0 Backed out 4 changesets (bug 1205521) for bustage
Backed out changeset 2a3c00d122c5 (bug 1205521)
Backed out changeset e8769c3e5d4f (bug 1205521)
Backed out changeset 1ff444636fbd (bug 1205521)
Backed out changeset 4ae51f091661 (bug 1205521)

--HG--
extra : rebase_source : cf4f338aa3043706c9fec37d2194b967d65ecaff
2015-10-20 10:45:31 +02:00
Jeremy Chen
0c5e2a9391 Bug 1205521 - Part3: (v3) Dump texture/mask attributes on layerscope viewer. r=dglastonbury
--HG--
extra : rebase_source : b89af8a8a1386b39ef872cbd0c4e2e9ef41e507a
2015-10-18 20:36:00 +02:00
JerryShih
66c7ddec13 Bug 1215050 - Make layerscope support TiledPaintedLayer when using HWC. r=mattwoodrow, r=cjku
--HG--
extra : rebase_source : 3a606457d9c7cd630b6c9ab38941e2619b03943e
2015-10-15 06:03:00 -04: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
Nathan Froyd
583afa0965 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
Jeremy Chen
988dfc2cc6 Bug 1195653 - Part1.5: Send isMask info to LayerScope viewer by TexturePacket. r=dglastonbury (v3) 2015-09-29 23:32:00 +02:00
Jeremy Chen
16750fede1 Bug 1195653 - Part1.2: Use sSentTextureIds instead of sTextureIdList and move HasTextureIdBeenSent into SendTextureSource. r=dglastonbury (v3, carry r+) 2015-09-29 23:21:00 +02:00
Jeremy Chen
454f308775 Bug 1195653 - Part1.1: Dump SecondaryEffects (EffectTypes::MASK) on Layerscope viewer. r=dglastonbury (v2, carry r+) 2015-09-29 23:19:00 +02:00
Nicholas Nethercote
d0c4a9db1b Bug 1208300 (part 4) - Remove gfxRGBA and some related things. r=jwatt.
Hooray!

--HG--
extra : rebase_source : d691b55eef5a8655aa98b81b5398452a5ebe860d
2015-09-24 19:24:16 -07:00
Nicholas Nethercote
0b89111ec3 Bug 1208300 (part 3) - Convert gfxRGBA uses to gfx::Color in LayerScope.cpp. r=jwatt.
--HG--
extra : rebase_source : 8393efea38fb7df8138c0ec2f894eff2808c5a81
2015-09-24 19:18:03 -07:00
Nathan Froyd
0ecb01460a Bug 1196682 - fixup static analysis build bustage on a CLOSED TREE; r=me 2015-08-24 17:49:28 -04:00
CJKu
3bd33f9441 Bug 1196682 - DebugDataSender is not thread safe. r=kamidphish 2015-08-24 02:00:00 -04:00
CJKu
47ef1eb36a Bug 1190176 - Make LayerScopeWebSocketManager thread safe. r=:djg
--HG--
extra : rebase_source : 8ec753a1c645d1043cc903ef7f014ba49dcf4b4d
2015-08-03 22:22:00 +02:00
CJ Ku
009a82453e Bug 1061393 - Export display list info to layer scope viewer. r=kamidphish 2015-08-03 02:11:00 -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
Amanda Sambath
376d6d03c3 Bug 1158120 - Replace nsIntSize by mozilla::gfx::IntSize in gfx/layers. r=nical 2015-06-03 13:45:24 +02:00
Nathan Froyd
a249b3f100 Bug 1133007 - followup - make CreateServerSocketRunnable's constructor explicit; r=bustage 2015-06-02 12:59:53 -04:00
CJKu
258c0473bf Bug 1133007 - Send the content of a texture only if its was altered since previous transmission. r=kamidphish, r=boris
--HG--
extra : rebase_source : 194e34332b84a984d4f6d7132e6807856952bbbe
2015-06-02 06:21:00 -04:00
CJKu
ea94c63322 Bug 1168015 - Dump source image from graphic buffer directly on B2G. r=kamidphish, r=hshih
--HG--
extra : rebase_source : e511b3caa7c904e0e0bd274f8dcf0e54274f66e8
extra : histedit_source : 81d22bf1ccbbabfe4868f9e889e3ce82b7d86107
2015-05-28 02:30:00 -04:00
CJKu
1b6a5e265d Bug 1163908 - Export GL draw data to layerscope for drawing heat-map view. r=:djg 2015-05-22 11:36:00 +02:00
Vincent Liu
be4b3328fc Bug 1162395 - [LayerScope]: No need to read and send the texture when the same texture id contains in a frame. r=cku
--HG--
extra : rebase_source : 2c4c6c4b7e76f261b66fad29fd146961dc65cc96
2015-05-07 15:26:26 +08:00
Vincent Liu
f6abe8c8d0 Bug 1150381 - [LayerScope]: Don't showing the same texture in the same frame on LayerScope. r=chiajung
--HG--
extra : rebase_source : e08ee8eba2d2905f7194269b7425c8f0856830ae
2015-04-14 14:57:42 +08:00
Ehsan Akhgari
883849ee32 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
Boris Chiou
71a5472876 Bug 1121804 - Add websocket message listener. r=dglastonbury
1. Fix websocket listener, and implement a light-wight parser.
2. Handle the messages from clients by protobuf
3. Handle disconnection while receiving the close message.
2015-01-29 20:02:00 +01:00
Boris Chiou
bd33b9af2e Bug 1079755 - Send composer info to Layerscope viewer. r=kamidphish
Add a composition info, composedByHwc, in META packet to
notify users whether this frame is composed by Hardware composer.

--HG--
extra : rebase_source : b3883178f41acb92fa91b0cab5905d22fcf38553
2015-01-16 15:00:25 +08:00
Benoit Girard
9b8c2dc37d Bug 1068190 - Part 1: Add foundation for compositor unit tests. r=mstange 2015-01-14 17:24:09 -05:00
Ehsan Akhgari
b447c92ece Bug 1117263 - Mark virtual overridden functions as MOZ_OVERRIDE in graphics layers code; r=roc 2015-01-03 12:21:23 -05:00
Boris Chiou
fe464f5aa9 Bug 1096139 - Create websocket dynamically after we enable Layerscope. r=dglastonbury
We have to create the websocket if it doesn't exist after enabling
Layerscope. Therefore, we don't have to reboot the device anymore.

1. Remove the Init and DeInit in CreateCompositor and DestroyCompositor
   to prevent some unwanted deInits on the browser. (Our browser often
   calls DestroyCompositor)
2. Initize websocket only when we need it.
2014-11-20 02:00:00 +01:00
Markus Stange
3efef60534 Bug 1073103 - SReplace 'Thebes' with 'Painted' in some more places. r=roc 2014-09-26 13:07:06 -04:00
Ehsan Akhgari
015ce11986 Bug 1050609 - Fix more bad implicit constructors in gfx/layers; r=roc 2014-08-20 00:55:14 -04:00
Boris Chiou
1188a41eb3 Bug 959118 - Dump layer tree with layer scope on the viewer. r=dglastonbury
We also want to dump layer tree on the viewer, so we
can check the layer tree and layerscope together
in the viewer. This can help us resolve more gfx bugs.

In this patch, I only add a part of the layer data to
the protocol buffer packet, and you can check the
.proto file for more information if you want to add
more layer data.

By the way, as Jeff's suggestion, use auto & MakeUnique<>()
to make the UniquePtr initialization more concise.
2014-07-27 22:32:00 +02:00
Boris Chiou
9759efe0fb Bug 1030922 - Replace nsAuto(Array)Ptr with UniquePtr in LayerScope.cpp. r=dglastonbury 2014-07-21 21:12:00 +02:00
Boris Chiou
ddb90bc78f Bug 1035045 - Handle packets by the protocol buffer. r=kamidphish
Use google protocol buffer to handle our package in LayerScope.
Note: LayerScopePacket.pb.h and LayerScopePacket.pb.cc were
generated by version 2.4.1.
2014-07-09 23:16:00 -04:00
Nicholas Nethercote
2a0942be41 Bug 1036789 - Convert the third quarter of MFBT to Gecko style. r=Ms2ger.
--HG--
extra : rebase_source : 668cd394806203ddfa34bd4f226335ff26c846b5
2014-07-10 19:10:17 -07:00
Boris Chiou
c6426f2d97 Bug 991227 - Replace std::auto_ptr with nsAuto(Array)Ptr in LayerScope. r=dglastonbury
std::auto_ptr causes clang 3.5 build warnings because we shouldn't use
std::auto_ptr in C++ 11 anymore. auto_ptr is deprecated in clang 3.5.
Therefore I replaced all the std::auto_ptrs in LayerScope.cpp.
Note: nsAuto(Array)Ptr should use "new" operator in C++, instead of
moz_malloc() because the destructor of nsAuto(Array)Ptr will call
delete(delete []).
2014-07-05 11:34:00 +02:00
Boris Chiou
b86e69633f Bug 975346 - Part 2: Support LayerScope for HwcComposer2D. r=dglastonbury
1. Retrieve buffer from GPU.
2. Refactor - use SenderHelper class to manage the Sender
   static function structure.
2014-07-03 01:17:00 +02:00