Merged with Appearance-Misc tip

--HG--
branch : .RLVa
master
Kitty Barnett 2013-02-20 14:26:21 +01:00
commit e1526c4048
290 changed files with 11714 additions and 6490 deletions

View File

@ -1 +1 @@
3dc93871abf9684a136736abce64f3c1f990fb18
033229d48fcb4b8e62f23369b3cbb7821905c691

View File

@ -1 +1 @@
bd1162cb6fbe7dc5a65d0de8fa56b9958b40b45d
87a6fc812214b9f4c52fdf6337c202e084e3af91

305
.hgtags
View File

@ -72,35 +72,35 @@ b53a0576eec80614d7767ed72b40ed67aeff27c9 DRTVWR-38_2.5.2-release
461c8c65b5c799ddfe365422f9be9c0095d91e7d 2.6.0-beta1-tip
9e4641f4a7870c0f565a25a2971368d5a29516a1 2.6.0-beta2
9e4641f4a7870c0f565a25a2971368d5a29516a1 DRTVWR-41_2.6.0-beta2
42f32494bac475d0737799346f6831558ae8bf5d 2.6.0-release
42f32494bac475d0737799346f6831558ae8bf5d DRTVWR-39_2.6.0-release
c5bdef3aaa2744626aef3c217ce29e1900d357b3 2.6.1-beta1
c5bdef3aaa2744626aef3c217ce29e1900d357b3 2.6.1-start
c5bdef3aaa2744626aef3c217ce29e1900d357b3 DRTVWR-43_2.6.1-beta1
c9182ed77d427c759cfacf49a7b71a2e20d522aa 2.6.1-release
c9182ed77d427c759cfacf49a7b71a2e20d522aa DRTVWR-42_2.6.1-release
56b2778c743c2a964d82e1caf11084d76a87de2c 2.6.2-start
d1203046bb653b763f835b04d184646949d8dd5c 2.6.2-beta1
d1203046bb653b763f835b04d184646949d8dd5c DRTVWR-45_2.6.2-beta1
214180ad5714ce8392b82bbebcc92f4babd98300 2.6.2-release
214180ad5714ce8392b82bbebcc92f4babd98300 DRTVWR-44_2.6.2-release
42f32494bac475d0737799346f6831558ae8bf5d 2.6.0-release
42f32494bac475d0737799346f6831558ae8bf5d DRTVWR-39_2.6.0-release
c9182ed77d427c759cfacf49a7b71a2e20d522aa 2.6.1-release
c9182ed77d427c759cfacf49a7b71a2e20d522aa DRTVWR-42_2.6.1-release
52b2263ab28f0976c689fd0b76c55a9eb027cdbf end-of-develop.py
ec32f1045e7c2644015245df3a9933620aa194b8 2.6.3-start
d7fcefabdf32bb61a9ea6d6037c1bb26190a85bc 2.6.3-beta1
d7fcefabdf32bb61a9ea6d6037c1bb26190a85bc DRTVWR-47_2.6.3-beta1
0630e977504af5ea320c58d33cae4e1ddee793e9 2.6.3-beta2
0630e977504af5ea320c58d33cae4e1ddee793e9 DRTVWR-48_2.6.3-beta2
8f2da1701c81a62352df2b8d413d27fb2cade9a6 2.6.3-release
8f2da1701c81a62352df2b8d413d27fb2cade9a6 DRTVWR-46_2.6.3-release
3178e311da3a8739a85363665006ea3c4610cad4 dons-headless-hackathon-work
214180ad5714ce8392b82bbebcc92f4babd98300 2.6.2-release
214180ad5714ce8392b82bbebcc92f4babd98300 DRTVWR-44_2.6.2-release
7db558aaa7c176f2022b3e9cfe38ac72f6d1fccd 2.6.5-beta1
7db558aaa7c176f2022b3e9cfe38ac72f6d1fccd DRTVWR-50_2.6.5-beta1
8f2da1701c81a62352df2b8d413d27fb2cade9a6 2.6.3-release
8f2da1701c81a62352df2b8d413d27fb2cade9a6 DRTVWR-46_2.6.3-release
800cefce8d364ffdd2f383cbecb91294da3ea424 2.6.6-start
bb1075286b3b147b1dae2e3d6b2d56f04ff03f35 2.6.6-beta1
bb1075286b3b147b1dae2e3d6b2d56f04ff03f35 DRTVWR-52_2.6.6-beta1
5e349dbe9cc84ea5795af8aeb6d473a0af9d4953 2.6.8-start
dac76a711da5f1489a01c1fa62ec97d99c25736d 2.6.6-release
dac76a711da5f1489a01c1fa62ec97d99c25736d DRTVWR-51_2.6.6-release
5e349dbe9cc84ea5795af8aeb6d473a0af9d4953 2.6.8-start
beafa8a9bd1d1b670b7523d865204dc4a4b38eef 2.6.8-beta1
beafa8a9bd1d1b670b7523d865204dc4a4b38eef DRTVWR-55_2.6.8-beta1
be2000b946f8cb3de5f44b2d419287d4c48ec4eb 2.6.8-release
@ -119,50 +119,50 @@ e67da2c6e3125966dd49eef98b36317afac1fcfe 2.6.9-start
9f79a6ed8fdcd2f3dac33ea6b3236eeb278dccfe 2.7.2-start
e0dc8b741eaa27dcdfbc9e956bb2579b954d15eb 2.7.2-beta1
e0dc8b741eaa27dcdfbc9e956bb2579b954d15eb DRTVWR-63_2.7.2-beta1
6a3e7e403bd19e45fdfc2fcc716867af3ab80861 2.7.3-start
fe3a8e7973072ea62043c08b19b66626c1a720eb 2.7.1-release
fe3a8e7973072ea62043c08b19b66626c1a720eb 2.7.2-release
fe3a8e7973072ea62043c08b19b66626c1a720eb DRTVWR-60_2.7.1-release
fe3a8e7973072ea62043c08b19b66626c1a720eb DRTVWR-62_2.7.2-release
6a3e7e403bd19e45fdfc2fcc716867af3ab80861 2.7.3-start
6af10678de4736222b2c3f7e010e984fb5b327de 2.7.4-start
be963a4eef635542f9617d7f5fd22ba48fb71958 2.7.4-beta1
be963a4eef635542f9617d7f5fd22ba48fb71958 DRTVWR-67_2.7.4-beta1
057f319dd8eccdf63a54d99686c68cdcb31b6abc 2.7.4-release
057f319dd8eccdf63a54d99686c68cdcb31b6abc DRTVWR-66_2.7.4-release
19a498fa62570f352d7d246f17e3c81cc1d82d8b 2.7.5-start
09984bfa6cae17e0f72d02b75c1b7393c65eecfc 2.7.5-beta1
09984bfa6cae17e0f72d02b75c1b7393c65eecfc DRTVWR-69_2.7.5-beta1
6866d9df6efbd441c66451debd376d21211de39c 2.7.5-release
6866d9df6efbd441c66451debd376d21211de39c DRTVWR-68_2.7.5-release
e1ed60913230dd64269a7f7fc52cbc6004f6d52c 2.8.0-beta1
e1ed60913230dd64269a7f7fc52cbc6004f6d52c 2.8.0-start
e1ed60913230dd64269a7f7fc52cbc6004f6d52c DRTVWR-71_2.8.0-beta1
493d9127ee50e84ba08a736a65a23ca86f7a5b01 2.8.0-release
493d9127ee50e84ba08a736a65a23ca86f7a5b01 DRTVWR-70_2.8.0-release
057f319dd8eccdf63a54d99686c68cdcb31b6abc 2.7.4-release
057f319dd8eccdf63a54d99686c68cdcb31b6abc DRTVWR-66_2.7.4-release
6866d9df6efbd441c66451debd376d21211de39c 2.7.5-release
6866d9df6efbd441c66451debd376d21211de39c DRTVWR-68_2.7.5-release
502f6a5deca9365ddae57db4f1e30172668e171e 2.8.1-start
2c7e459e0c883f8e406b932e41e60097e9ee077e 2.8.1-beta1
2c7e459e0c883f8e406b932e41e60097e9ee077e DRTVWR-73_2.8.1-beta1
493d9127ee50e84ba08a736a65a23ca86f7a5b01 2.8.0-release
493d9127ee50e84ba08a736a65a23ca86f7a5b01 DRTVWR-70_2.8.0-release
54bc7823ad4e3a436fef79710f685a7372bbf795 2.8.2-start
ac0f1a132d35c02a58861d37cca75b0429ac9137 2.8.3-start
29e93d7e19991011bd12b5748142b11a5dcb4370 2.8.1-release
29e93d7e19991011bd12b5748142b11a5dcb4370 DRTVWR-72_2.8.1-release
4780e3bd2b3042f91be3426151f28c30d199bb3b 2.8.1-hotfix
4780e3bd2b3042f91be3426151f28c30d199bb3b DRTVWR-76_2.8.1-hotfix
54bc7823ad4e3a436fef79710f685a7372bbf795 2.8.2-start
ac0f1a132d35c02a58861d37cca75b0429ac9137 2.8.3-start
599677276b227357140dda35bea4a2c18e2e67b5 2.8.3-beta1
599677276b227357140dda35bea4a2c18e2e67b5 DRTVWR-75_2.8.3-beta1
fb85792b84bf28428889c4cc966469d92e5dac4c 2.8.3-release
fb85792b84bf28428889c4cc966469d92e5dac4c DRTVWR-74_2.8.3-release
6b678ea52f90d5c14181661dcd2546e25bde483e 3.0.0-start
b0be6ce3adfef3a014a2389d360539f8a86c5439 3.0.0-beta1
b0be6ce3adfef3a014a2389d360539f8a86c5439 DRTVWR-78_3.0.0-beta1
1778f26b6d0ae762dec3ca37140f66620f2485d9 3.0.0-release
1778f26b6d0ae762dec3ca37140f66620f2485d9 DRTVWR-77_3.0.0-release
fb85792b84bf28428889c4cc966469d92e5dac4c 2.8.3-release
fb85792b84bf28428889c4cc966469d92e5dac4c DRTVWR-74_2.8.3-release
82a2079ffcb57ecb1b3849cb41376b443e1eb912 3.0.1-start
364fd63517fbacbbcb9129d096187171ba8c9e48 3.0.1-beta1
364fd63517fbacbbcb9129d096187171ba8c9e48 DRTVWR-81_3.0.1-beta1
f2412ecd6740803ea9452f1d17fd872e263a0df7 3.0.2-start
42784bf50fa01974bada2a1af3892ee09c93fcda 3.0.2-beta1
42784bf50fa01974bada2a1af3892ee09c93fcda DRTVWR-83_3.0.2-beta1
1778f26b6d0ae762dec3ca37140f66620f2485d9 3.0.0-release
1778f26b6d0ae762dec3ca37140f66620f2485d9 DRTVWR-77_3.0.0-release
e5c9af2d7980a99a71650be3a0cf7b2b3c3b897e 3.0.2-beta2
e5c9af2d7980a99a71650be3a0cf7b2b3c3b897e DRTVWR-86_3.0.2-beta2
b95ddac176ac944efdc85cbee94ac2e1eab44c79 3.0.3-start
@ -170,9 +170,9 @@ b95ddac176ac944efdc85cbee94ac2e1eab44c79 3.0.3-start
6694f3f062aa45f64ab391d25a3eb3d5eb1b0871 DRTVWR-85_3.0.3-beta1
61aa7974df089e8621fe9a4c69bcdefdb3cc208a 3.0.3-beta2
61aa7974df089e8621fe9a4c69bcdefdb3cc208a DRTVWR-89_3.0.3-beta2
586907287be581817b2422b5137971b22d54ea48 3.0.4-start
0496d2f74043cf4e6058e76ac3db03d44cff42ce 3.0.3-release
0496d2f74043cf4e6058e76ac3db03d44cff42ce DRTVWR-84_3.0.3-release
586907287be581817b2422b5137971b22d54ea48 3.0.4-start
92a3aa04775438226399b19deee12ac3b5a62838 3.0.5-start
c7282e59f374ee904bd793c3c444455e3399b0c5 3.1.0-start
2657fa785bbfac115852c41bd0adaff74c2ad5da 3.1.0-beta1
@ -193,11 +193,11 @@ e440cd1dfbd128d7d5467019e497f7f803640ad6 DRTVWR-95_3.2.0-beta1
c4911ec8cd81e676dfd2af438b3e065407a94a7a 3.2.1-start
9e390d76807fa70d356b8716fb83b8ce42a629ef 3.2.1-beta1
9e390d76807fa70d356b8716fb83b8ce42a629ef DRTVWR-100_3.2.1-beta1
a8c7030d6845186fac7c188be4323a0e887b4184 3.2.1-release
a8c7030d6845186fac7c188be4323a0e887b4184 DRTVWR-99_3.2.1-release
40b46edba007d15d0059c80864b708b99c1da368 3.2.2-start
523df3e67378541498d516d52af4402176a26bac 3.2.2-beta1
523df3e67378541498d516d52af4402176a26bac DRTVWR-102_3.2.2-beta1
a8c7030d6845186fac7c188be4323a0e887b4184 3.2.1-release
a8c7030d6845186fac7c188be4323a0e887b4184 DRTVWR-99_3.2.1-release
80f3e30d8aa4d8f674a48bd742aaa6d8e9eae0b5 3.2.3-start
3fe994349fae64fc40874bb59db387131eb35a41 3.2.4-beta1
3fe994349fae64fc40874bb59db387131eb35a41 3.2.4-start
@ -248,67 +248,57 @@ bb9932a7a5fd00edf52d95f354e3b37ae6a942db DRTVWR-156
6414ecdabc5d89515b08d1f872cf923ed3a5523a DRTVWR-148
2a3965b3ad202df7ea25d2be689291bb14a1280e DRTVWR-155
24a7281bef42bd4430ceb25db8b195449c2c7de3 DRTVWR-153
a716684aa7c07c440b1de5815b8a1f3dd3fd8bfb DRTVWR-159
9a78ac13f047056f788c4734dd91aebfe30970e3 DRTVWR-157
5910f8063a7e1ddddf504c2f35ca831cc5e8f469 DRTVWR-160
f0a174c2adb4bc39b16722a61d7eeb4f2a1d4843 3.3.3-beta1
f0a174c2adb4bc39b16722a61d7eeb4f2a1d4843 DRTVWR-144
089e5c84b2dece68f2b016c842ef9b5de4786842 DRTVWR-161
600f3b3920d94de805ac6dc8bb6def9c069dd360 DRTVWR-162
c08e2ac17a99973b2a94477659220b99b8847ae2 DRTVWR-163
2d6c0634b11e6f3df11002b8510a72a0433da00a DRTVWR-164
600f3b3920d94de805ac6dc8bb6def9c069dd360 DRTVWR-162
80b5e5e9775966d3839331ffa7a16a60f9d7c930 DRTVWR-165
fdcc08a4f20ae9bb060f4693c8980d216534efdf 3.3.3-beta2
af5f3e43e6e4424b1da19d9e16f6b853a7b822ed DRTVWR-169
4b3c68199a86cabaa5d9466d7b0f7e141e901d7a 3.3.3-beta3
6428242e124b523813bfaf4c45b3d422f0298c81 3.3.3-release
a716684aa7c07c440b1de5815b8a1f3dd3fd8bfb DRTVWR-159
9a78ac13f047056f788c4734dd91aebfe30970e3 DRTVWR-157
089e5c84b2dece68f2b016c842ef9b5de4786842 DRTVWR-161
c08e2ac17a99973b2a94477659220b99b8847ae2 DRTVWR-163
b9d0170b62eb1c7c3adaa37a0b13a833e5e659f9 DRTVWR-171
050e48759337249130f684b4a21080b683f61732 DRTVWR-168
09ef7fd1b0781f33b8a3a9af6236b7bcb4831910 DRTVWR-170
f87bfbe0b62d26f451d02a47c80ebef6b9168fc2 DRTVWR-158
f91d003091a61937a044652c4c674447f7dcbb7a 3.3.4-beta1
005dfe5c4c377207d065fb27858d2eb0b53b143a DRTVWR-167
bce218b2b45b730b22cc51e4807aa8b571cadef3 DRTVWR-173
cbea6356ce9cb0c313b6777f10c5c14783264fcc DRTVWR-174
82b5330bc8b17d0d4b598832e9c5a92e90075682 3.3.4-beta2
57d221de3df94f90b55204313c2cef044a3c0ae2 DRTVWR-176
eb539c65e6ee26eea2bf373af2d0f4b52dc91289 DRTVWR-177
a8057e1b9a1246b434a27405be35e030f7d28b0c 3.3.4-beta3
888768f162d2c0a8de1dcc5fb9a08bd8bd120a6b DRTVWR-175
4281aa899fb2cedb7a9ca7ce91c5c29d4aa69594 DRTVWR-180
5c08e1d8edd871807153603b690e3ee9dbb548aa DRTVWR-183
6c75f220b103db1420919c8b635fe53e2177f318 3.3.4-beta4
9cd174d3a54d93d409a7c346a15b8bfb40fc58f4 DRTVWR-184
ab2ffc547c8a8950ff187c4f6c95e5334fab597b 3.3.4-beta5
28e100d0379a2b0710c57647a28fc5239d3d7b99 3.3.4-release
005dfe5c4c377207d065fb27858d2eb0b53b143a DRTVWR-167
888768f162d2c0a8de1dcc5fb9a08bd8bd120a6b DRTVWR-175
a8b3eca451a9eaab59987efb0ab1c4217e3f2dcc DRTVWR-182
1f27cdfdc54246484f8afbbe42ce48e954175cbd 3.4.0-beta1
81f6b745ef27f5915fd07f988fdec9944f2bb73e DRTVWR-186
47f0d08ba7ade0a3905074009067c6d3df7e16ae DRTVWR-190
cc953f00956be52cc64c30637bbeec310eea603f DRTVWR-181
c04e68e1b0034fd0a20815ae24c77e5f8428e822 DRTVWR-188
9ee9387789701d597130f879d9011a4958753862 DRTVWR-189
47f0d08ba7ade0a3905074009067c6d3df7e16ae DRTVWR-190
421126293dcbde918e0da027ca0ab9deb5b4fbf2 DRTVWR-192
4b2c52aecb7a75de31dbb12d9f5b9a251d8707be DRTVWR-191
33a2fc7a910ae29ff8b4850316ed7fbff9f64d33 DRTVWR-195
e9732c739c8a72a590216951505ea9c76a526a84 DRTVWR-193
78ca0bbf43a92e8914d4cfa87d69a6717ef7d4cf DRTVWR-194
7602f61c804a512764e349c034c02ddabeefebc4 DRTVWR-196
ae5c83dd61d2d37c45f1d5b8bf2b036d87599f1b DRTVWR-198
507bdfbd6bf844a511c1ffeda4baa80016ed1346 DRTVWR-197
b1dbb1a83f48f93f6f878cff9e52d2cb635e145c 3.4.0-beta2
37402e2b19af970d51b0a814d79892cc5647532b DRTVWR-200
182a9bf30e81070361bb020a78003b1cf398e79c 3.4.0-beta3
248f4acd92a706c79e842bc83d80baa7369c0c2e DRTVWR-203
6dfb0fba782c9233dd95f24ec48146db0d3f210b DRTVWR-199
7c9102fb998885621919f2474a002c35b583539b 3.3.4-release2
7649a3dff5ec22d3727377e5f02efd0f421e4cb5 DRTVWR-201
84fb70dfe3444e75a44fb4bee43e2fc8221cebdd 3.4.0-beta4
de3be913f68813a9bac7d1c671fef96d1159bcd6 DRTVWR-202
573e863be2f26d3687161def4b9fea9b7038dda8 3.4.0-beta5
34dbbe2b00afe90352d3acf8290eb10ab90d1c8b oz-build-test-tag
6ee71714935ffcd159db3d4f5800c1929aac54e1 DRTVWR-205
7b22c612fc756e0ea63b10b163e81d107f85dbf8 DRTVWR-206
8c9085066c78ed5f6c9379dc054c82a6fcdb1851 DRTVWR-207
351eea5f9dc192fc5ddea3b02958de97677a0a12 3.3.4-release3
af7b28e75bd5a629cd9e0dc46fb3f1757626f493 DRTVWR-212
@ -319,7 +309,6 @@ ceed0b65a69f1eac20d523e0203320a32f9a3f3c DRTVWR-215
97977c67245f52db20eb15f1918cc0f24778cabc 3.4.0-release
5adb2b8f96c3cac88ad7c7d996d707f1b29df336 3.4.1-beta1
b3f74858a1c8720c82d0978f3877a3fc8ba459ec 3.4.1-beta1a
b61afe175b829c149d369524a4e974dfda99facf DRTVWR-219
2b779f233ee6f38c89cb921650c773a96e63da92 DRTVWR-220
0b9d95f4bfb6867cbf56eaec51633b0da2f1262d DRTVWR-221
e6e553761829dc0270eaaa712b7cb0622535b076 3.4.1-beta3
@ -344,31 +333,36 @@ baf97f06ae17223614c5e31aa42e71d87cff07fe DRTVWR-236
b2f21e3442542283a80e7eaebae9f833e5a927b6 DRTVWR-237
3f9be82de642d468c5fc272cb9d96b46b5498402 3.4.1-beta12
e59ffd3fe0838ae6b09b242a6e9df71761b88f41 3.4.1-release
81f6b745ef27f5915fd07f988fdec9944f2bb73e DRTVWR-186
cc953f00956be52cc64c30637bbeec310eea603f DRTVWR-181
c04e68e1b0034fd0a20815ae24c77e5f8428e822 DRTVWR-188
4b2c52aecb7a75de31dbb12d9f5b9a251d8707be DRTVWR-191
78ca0bbf43a92e8914d4cfa87d69a6717ef7d4cf DRTVWR-194
248f4acd92a706c79e842bc83d80baa7369c0c2e DRTVWR-203
de3be913f68813a9bac7d1c671fef96d1159bcd6 DRTVWR-202
34dbbe2b00afe90352d3acf8290eb10ab90d1c8b oz-build-test-tag
6ee71714935ffcd159db3d4f5800c1929aac54e1 DRTVWR-205
7b22c612fc756e0ea63b10b163e81d107f85dbf8 DRTVWR-206
b61afe175b829c149d369524a4e974dfda99facf DRTVWR-219
32896d5e920ca9a29256ff3b747c2e99752aa5ae DRTVWR-217
704bbae7b182a1f2811a47a054e680522966f54a 3.4.2-beta1
d799593b53ed733862e9a13871e318e886469377 DRTVWR-208
e497dcde7a3653e384eb223a8a460030e89c294c DRTVWR-223
288539fc0408ed4b69a99665de33bbbc2c3c08fe DRTVWR-216
e664473c16df1d82ffaff382e7b3e023da202d52 3.4.2-beta2
93ab02d83f51e30a3cabad98aff89601befd9413 DRTVWR-240
0891d7a773a31397dcad48be3fa66531d567a821 DRTVWR-242
710785535362b3cb801b6a3dc4703be3373bd0cd 3.4.2-beta3
2aa72e3372a83dece4df9cf72fb1e7c34f90b5e3 DRTVWR-209
f7bedce18ad52283e6072814db23318907261487 DRTVWR-238
7b64c96fbcadf360bd2feaae19d330166b70877c DRTVWR-210
e9a5886052433d5db9e504ffaca10890f9932979 DRTVWR-243
73b84b9864dc650fe7c8fc9f52361450f0849004 3.4.2-beta4
16310aabccf315870f7cc9bf966926c0ad6954fa 3.4.2-release
d799593b53ed733862e9a13871e318e886469377 DRTVWR-208
e497dcde7a3653e384eb223a8a460030e89c294c DRTVWR-223
93ab02d83f51e30a3cabad98aff89601befd9413 DRTVWR-240
2aa72e3372a83dece4df9cf72fb1e7c34f90b5e3 DRTVWR-209
f7bedce18ad52283e6072814db23318907261487 DRTVWR-238
7b64c96fbcadf360bd2feaae19d330166b70877c DRTVWR-210
5e4e4128b256525bafc07a62e35ae8527aaa9c9d DRTVWR-241
f1d3b3fcab28ed9ea532bf50db0ba96f5c8cc8e9 DRTVWR-232
4918b150e75df6b516fb6c2616d32043fa6b4cac DRTVWR-245
94ab2b49458ab372a95d2d6949fdf574f413068d 3.4.3-beta1
4c3460cb1fb7c6da9965e09c734d282a8e9c81f0 DRTVWR-229
f4481df42f9a4a92bf475a80f0c51d1a4bbdfd59 DRTVWR-246
39c5204b6e800983a41ccac8ad6dc993120197c6 DRTVWR-247
7c7d57d393e8ae7b61623279de06eb4a62ccae6a DRTVWR-249
f72b50ef168c159d6e79e97aa2bcafaf8577ab99 DRTVWR-230
b418be80903520c492e1173f3afbc4021cad5d07 DRTVWR-255
965b9a35e260c0f53be1a25f0db7abc8a67eaf47 DRTVWR-252
bb10adc4f76cf0067fca7075146f00cdc0740e9d DRTVWR-251
ab0aa2f6ba22b52fed30a2337197f589156edc75 DRTVWR-253
@ -377,8 +371,51 @@ ab0aa2f6ba22b52fed30a2337197f589156edc75 DRTVWR-253
44e764a6ac9e672a4f3bce821a4b6a218590c374 DRTVWR-258
c23d734065ed593b2413385aecd8366d8e0ee96b DRTVWR-257
452ce96d4046dc05a3ecaecc203e2cc8ddd72e76 DRTVWR-259
5cba5f39d0a81d659f24ebc4b5efd025a39e3db1 3.4.3-release
daca610d840625b5bebb966a57cb49581852c417 DRTVWR-265
9afbdc4e24cc04feacfb2b7a10b78a64f780901a DRTVWR-266
73280db02501f5ad041fc18b1eba68e73a81996c DRTVWR-267
870e2d79e0063fda87187f17bbc2747766733194 3.4.3-beta3
0a2ca6546b499239afeb66d17b2fadbcdbe36ab1 3.4.3-release
4c3460cb1fb7c6da9965e09c734d282a8e9c81f0 DRTVWR-229
f4481df42f9a4a92bf475a80f0c51d1a4bbdfd59 DRTVWR-246
39c5204b6e800983a41ccac8ad6dc993120197c6 DRTVWR-247
7c7d57d393e8ae7b61623279de06eb4a62ccae6a DRTVWR-249
f72b50ef168c159d6e79e97aa2bcafaf8577ab99 DRTVWR-230
b418be80903520c492e1173f3afbc4021cad5d07 DRTVWR-255
9aa1aa9f1fe13c194695a0b8f0af298296241dc2 DRTVWR-260
84fbaf2d4141bd161731430e760949dc787ca206 DRTVWR-244
083d2d36b5bb1c54fc3dd7caac0e7ac381a9cef0 3.4.4-beta1
b634dec987c16e8c9c938e11e52591d9ead8fa9b DRTVWR-270
cd39255bd23330fd30c04105f2811e941d8524fe 3.4.4-beta2
2c4011bbc2b15b82198fd8b51f3a9fe765a08c4d DRTVWR-271
2f8a3ef687bc55828abcb17ac1ad7cde70536d7e 3.4.4-beta3
35cfd4cf5b895fa776592f2e630e330be7f0604e DRTVWR-273
c374035d459af3c03dea2dd90880dfc25de64706 DRTVWR-275
05d9f1dd7a954069af2a33abedb7713fa36a04cb 3.4.4-beta4
e1bb1ae7d8b12faeb37933a737c199cc9b9f89cc 3.4.4-release
391a8c74cec7275c5d26c85ad108d4782a3e3dd9 DRTVWR-268
a36f1f354b02aa6e448ca13685de167d0a0a3d03 DRTVWR-272
37dba00ad820de3a808d4039396b162a9c275b3e DRTVWR-269
7c6dfdc1b7a2ce0d8e3a8f3ce3058547ea065c0f DRTVWR-250
b9ff9730daa53a541925300cbd02bb14575a5705 DRTVWR-277
af6b711a97073431953b55ee808aaa09900c27e5 DRTVWR-276
8302fefde6c8f4a64bfc7f04929f8bc85f5c6c7b DRTVWR-279
c296133849d1f103c0e2abc41e6599daed00b67b DRTVWR-280
40a2265058abc9fde4914c10185f916435818621 3.4.5-beta1
5df4802bec93c8d0a509946d826bb4c50c5442ec DRTVWR-281
7c1c33ba4cfd2d15ca51cc1ac440eca551331a4a DRTVWR-283
6b9c7dbebef793230d64e1b452577c8b142d4143 3.4.5-beta2
ccf991e02dc2f63fb646324230d54832683f4a9b DRTVWR-286
2d849850558a5a0324b398d1c102d30bcbdfb88f DRTVWR-287
e06898df8644fe567bee94f817d03abc1c380993 3.4.5-beta3
a676b4d6c037b39fe5b8e42cf8839a9303936089 DRTVWR-289
28fa8b944a0c1869636ab00cc400f5aa71f6fa3c DRTVWR-290
7f09bbc28c297f14b67961be7b6575445fa160e8 DRTVWR-291
b23419a2748483c98f3b84b630468a21c88feba5 DRTVWR-292
1567de5700c273b583dac41b64275c223287306e 3.4.5-beta4
1cce8447f8f574673e3f47d6fe584262e6964fe2 DRTVWR-296
0a5d409161ef2a89b28c9a741051dd2dedc707d6 DRTVWR-297
852b69ef0b5fe6b13b69cc2217282cc64de6afab 3.4.5-beta5
0000000000000000000000000000000000000000 v2start
0000000000000000000000000000000000000000 alpha-3
0000000000000000000000000000000000000000 fork to viewer-2-0
@ -453,35 +490,35 @@ c23d734065ed593b2413385aecd8366d8e0ee96b DRTVWR-257
0000000000000000000000000000000000000000 2.6.0-beta1-tip
0000000000000000000000000000000000000000 2.6.0-beta2
0000000000000000000000000000000000000000 DRTVWR-41_2.6.0-beta2
0000000000000000000000000000000000000000 2.6.0-release
0000000000000000000000000000000000000000 DRTVWR-39_2.6.0-release
0000000000000000000000000000000000000000 2.6.1-beta1
0000000000000000000000000000000000000000 2.6.1-start
0000000000000000000000000000000000000000 DRTVWR-43_2.6.1-beta1
0000000000000000000000000000000000000000 2.6.1-release
0000000000000000000000000000000000000000 DRTVWR-42_2.6.1-release
0000000000000000000000000000000000000000 2.6.2-start
0000000000000000000000000000000000000000 2.6.2-beta1
0000000000000000000000000000000000000000 DRTVWR-45_2.6.2-beta1
0000000000000000000000000000000000000000 2.6.2-release
0000000000000000000000000000000000000000 DRTVWR-44_2.6.2-release
0000000000000000000000000000000000000000 2.6.0-release
0000000000000000000000000000000000000000 DRTVWR-39_2.6.0-release
0000000000000000000000000000000000000000 2.6.1-release
0000000000000000000000000000000000000000 DRTVWR-42_2.6.1-release
0000000000000000000000000000000000000000 end-of-develop.py
0000000000000000000000000000000000000000 2.6.3-start
0000000000000000000000000000000000000000 2.6.3-beta1
0000000000000000000000000000000000000000 DRTVWR-47_2.6.3-beta1
0000000000000000000000000000000000000000 2.6.3-beta2
0000000000000000000000000000000000000000 DRTVWR-48_2.6.3-beta2
0000000000000000000000000000000000000000 2.6.3-release
0000000000000000000000000000000000000000 DRTVWR-46_2.6.3-release
0000000000000000000000000000000000000000 dons-headless-hackathon-work
0000000000000000000000000000000000000000 2.6.2-release
0000000000000000000000000000000000000000 DRTVWR-44_2.6.2-release
0000000000000000000000000000000000000000 2.6.5-beta1
0000000000000000000000000000000000000000 DRTVWR-50_2.6.5-beta1
0000000000000000000000000000000000000000 2.6.3-release
0000000000000000000000000000000000000000 DRTVWR-46_2.6.3-release
0000000000000000000000000000000000000000 2.6.6-start
0000000000000000000000000000000000000000 2.6.6-beta1
0000000000000000000000000000000000000000 DRTVWR-52_2.6.6-beta1
0000000000000000000000000000000000000000 2.6.8-start
0000000000000000000000000000000000000000 2.6.6-release
0000000000000000000000000000000000000000 DRTVWR-51_2.6.6-release
0000000000000000000000000000000000000000 2.6.8-start
0000000000000000000000000000000000000000 2.6.8-beta1
0000000000000000000000000000000000000000 DRTVWR-55_2.6.8-beta1
0000000000000000000000000000000000000000 2.6.8-release
@ -500,50 +537,50 @@ c23d734065ed593b2413385aecd8366d8e0ee96b DRTVWR-257
0000000000000000000000000000000000000000 2.7.2-start
0000000000000000000000000000000000000000 2.7.2-beta1
0000000000000000000000000000000000000000 DRTVWR-63_2.7.2-beta1
0000000000000000000000000000000000000000 2.7.3-start
0000000000000000000000000000000000000000 2.7.1-release
0000000000000000000000000000000000000000 2.7.2-release
0000000000000000000000000000000000000000 DRTVWR-60_2.7.1-release
0000000000000000000000000000000000000000 DRTVWR-62_2.7.2-release
0000000000000000000000000000000000000000 2.7.3-start
0000000000000000000000000000000000000000 2.7.4-start
0000000000000000000000000000000000000000 2.7.4-beta1
0000000000000000000000000000000000000000 DRTVWR-67_2.7.4-beta1
0000000000000000000000000000000000000000 2.7.4-release
0000000000000000000000000000000000000000 DRTVWR-66_2.7.4-release
0000000000000000000000000000000000000000 2.7.5-start
0000000000000000000000000000000000000000 2.7.5-beta1
0000000000000000000000000000000000000000 DRTVWR-69_2.7.5-beta1
0000000000000000000000000000000000000000 2.7.5-release
0000000000000000000000000000000000000000 DRTVWR-68_2.7.5-release
0000000000000000000000000000000000000000 2.8.0-beta1
0000000000000000000000000000000000000000 2.8.0-start
0000000000000000000000000000000000000000 DRTVWR-71_2.8.0-beta1
0000000000000000000000000000000000000000 2.8.0-release
0000000000000000000000000000000000000000 DRTVWR-70_2.8.0-release
0000000000000000000000000000000000000000 2.7.4-release
0000000000000000000000000000000000000000 DRTVWR-66_2.7.4-release
0000000000000000000000000000000000000000 2.7.5-release
0000000000000000000000000000000000000000 DRTVWR-68_2.7.5-release
0000000000000000000000000000000000000000 2.8.1-start
0000000000000000000000000000000000000000 2.8.1-beta1
0000000000000000000000000000000000000000 DRTVWR-73_2.8.1-beta1
0000000000000000000000000000000000000000 2.8.0-release
0000000000000000000000000000000000000000 DRTVWR-70_2.8.0-release
0000000000000000000000000000000000000000 2.8.2-start
0000000000000000000000000000000000000000 2.8.3-start
0000000000000000000000000000000000000000 2.8.1-release
0000000000000000000000000000000000000000 DRTVWR-72_2.8.1-release
0000000000000000000000000000000000000000 2.8.1-hotfix
0000000000000000000000000000000000000000 DRTVWR-76_2.8.1-hotfix
0000000000000000000000000000000000000000 2.8.2-start
0000000000000000000000000000000000000000 2.8.3-start
0000000000000000000000000000000000000000 2.8.3-beta1
0000000000000000000000000000000000000000 DRTVWR-75_2.8.3-beta1
0000000000000000000000000000000000000000 2.8.3-release
0000000000000000000000000000000000000000 DRTVWR-74_2.8.3-release
0000000000000000000000000000000000000000 3.0.0-start
0000000000000000000000000000000000000000 3.0.0-beta1
0000000000000000000000000000000000000000 DRTVWR-78_3.0.0-beta1
0000000000000000000000000000000000000000 3.0.0-release
0000000000000000000000000000000000000000 DRTVWR-77_3.0.0-release
0000000000000000000000000000000000000000 2.8.3-release
0000000000000000000000000000000000000000 DRTVWR-74_2.8.3-release
0000000000000000000000000000000000000000 3.0.1-start
0000000000000000000000000000000000000000 3.0.1-beta1
0000000000000000000000000000000000000000 DRTVWR-81_3.0.1-beta1
0000000000000000000000000000000000000000 3.0.2-start
0000000000000000000000000000000000000000 3.0.2-beta1
0000000000000000000000000000000000000000 DRTVWR-83_3.0.2-beta1
0000000000000000000000000000000000000000 3.0.0-release
0000000000000000000000000000000000000000 DRTVWR-77_3.0.0-release
0000000000000000000000000000000000000000 3.0.2-beta2
0000000000000000000000000000000000000000 DRTVWR-86_3.0.2-beta2
0000000000000000000000000000000000000000 3.0.3-start
@ -551,9 +588,9 @@ c23d734065ed593b2413385aecd8366d8e0ee96b DRTVWR-257
0000000000000000000000000000000000000000 DRTVWR-85_3.0.3-beta1
0000000000000000000000000000000000000000 3.0.3-beta2
0000000000000000000000000000000000000000 DRTVWR-89_3.0.3-beta2
0000000000000000000000000000000000000000 3.0.4-start
0000000000000000000000000000000000000000 3.0.3-release
0000000000000000000000000000000000000000 DRTVWR-84_3.0.3-release
0000000000000000000000000000000000000000 3.0.4-start
0000000000000000000000000000000000000000 3.0.5-start
0000000000000000000000000000000000000000 3.1.0-start
0000000000000000000000000000000000000000 3.1.0-beta1
@ -574,11 +611,11 @@ c23d734065ed593b2413385aecd8366d8e0ee96b DRTVWR-257
0000000000000000000000000000000000000000 3.2.1-start
0000000000000000000000000000000000000000 3.2.1-beta1
0000000000000000000000000000000000000000 DRTVWR-100_3.2.1-beta1
0000000000000000000000000000000000000000 3.2.1-release
0000000000000000000000000000000000000000 DRTVWR-99_3.2.1-release
0000000000000000000000000000000000000000 3.2.2-start
0000000000000000000000000000000000000000 3.2.2-beta1
0000000000000000000000000000000000000000 DRTVWR-102_3.2.2-beta1
0000000000000000000000000000000000000000 3.2.1-release
0000000000000000000000000000000000000000 DRTVWR-99_3.2.1-release
0000000000000000000000000000000000000000 3.2.3-start
0000000000000000000000000000000000000000 3.2.4-beta1
0000000000000000000000000000000000000000 3.2.4-start
@ -629,67 +666,57 @@ c23d734065ed593b2413385aecd8366d8e0ee96b DRTVWR-257
0000000000000000000000000000000000000000 DRTVWR-148
0000000000000000000000000000000000000000 DRTVWR-155
0000000000000000000000000000000000000000 DRTVWR-153
0000000000000000000000000000000000000000 DRTVWR-159
0000000000000000000000000000000000000000 DRTVWR-157
0000000000000000000000000000000000000000 DRTVWR-160
0000000000000000000000000000000000000000 3.3.3-beta1
0000000000000000000000000000000000000000 DRTVWR-144
0000000000000000000000000000000000000000 DRTVWR-161
0000000000000000000000000000000000000000 DRTVWR-162
0000000000000000000000000000000000000000 DRTVWR-163
0000000000000000000000000000000000000000 DRTVWR-164
0000000000000000000000000000000000000000 DRTVWR-162
0000000000000000000000000000000000000000 DRTVWR-165
0000000000000000000000000000000000000000 3.3.3-beta2
0000000000000000000000000000000000000000 DRTVWR-169
0000000000000000000000000000000000000000 3.3.3-beta3
0000000000000000000000000000000000000000 3.3.3-release
0000000000000000000000000000000000000000 DRTVWR-159
0000000000000000000000000000000000000000 DRTVWR-157
0000000000000000000000000000000000000000 DRTVWR-161
0000000000000000000000000000000000000000 DRTVWR-163
0000000000000000000000000000000000000000 DRTVWR-171
0000000000000000000000000000000000000000 DRTVWR-168
0000000000000000000000000000000000000000 DRTVWR-170
0000000000000000000000000000000000000000 DRTVWR-158
0000000000000000000000000000000000000000 3.3.4-beta1
0000000000000000000000000000000000000000 DRTVWR-167
0000000000000000000000000000000000000000 DRTVWR-173
0000000000000000000000000000000000000000 DRTVWR-174
0000000000000000000000000000000000000000 3.3.4-beta2
0000000000000000000000000000000000000000 DRTVWR-176
0000000000000000000000000000000000000000 DRTVWR-177
0000000000000000000000000000000000000000 3.3.4-beta3
0000000000000000000000000000000000000000 DRTVWR-175
0000000000000000000000000000000000000000 DRTVWR-180
0000000000000000000000000000000000000000 DRTVWR-183
0000000000000000000000000000000000000000 3.3.4-beta4
0000000000000000000000000000000000000000 DRTVWR-184
0000000000000000000000000000000000000000 3.3.4-beta5
0000000000000000000000000000000000000000 3.3.4-release
0000000000000000000000000000000000000000 DRTVWR-167
0000000000000000000000000000000000000000 DRTVWR-175
0000000000000000000000000000000000000000 DRTVWR-182
0000000000000000000000000000000000000000 3.4.0-beta1
0000000000000000000000000000000000000000 DRTVWR-186
0000000000000000000000000000000000000000 DRTVWR-190
0000000000000000000000000000000000000000 DRTVWR-181
0000000000000000000000000000000000000000 DRTVWR-188
0000000000000000000000000000000000000000 DRTVWR-189
0000000000000000000000000000000000000000 DRTVWR-190
0000000000000000000000000000000000000000 DRTVWR-192
0000000000000000000000000000000000000000 DRTVWR-191
0000000000000000000000000000000000000000 DRTVWR-195
0000000000000000000000000000000000000000 DRTVWR-193
0000000000000000000000000000000000000000 DRTVWR-194
0000000000000000000000000000000000000000 DRTVWR-196
0000000000000000000000000000000000000000 DRTVWR-198
0000000000000000000000000000000000000000 DRTVWR-197
0000000000000000000000000000000000000000 3.4.0-beta2
0000000000000000000000000000000000000000 DRTVWR-200
0000000000000000000000000000000000000000 3.4.0-beta3
0000000000000000000000000000000000000000 DRTVWR-203
0000000000000000000000000000000000000000 DRTVWR-199
0000000000000000000000000000000000000000 3.3.4-release2
0000000000000000000000000000000000000000 DRTVWR-201
0000000000000000000000000000000000000000 3.4.0-beta4
0000000000000000000000000000000000000000 DRTVWR-202
0000000000000000000000000000000000000000 3.4.0-beta5
0000000000000000000000000000000000000000 oz-build-test-tag
0000000000000000000000000000000000000000 DRTVWR-205
0000000000000000000000000000000000000000 DRTVWR-206
0000000000000000000000000000000000000000 DRTVWR-207
0000000000000000000000000000000000000000 3.3.4-release3
0000000000000000000000000000000000000000 DRTVWR-212
@ -700,7 +727,6 @@ c23d734065ed593b2413385aecd8366d8e0ee96b DRTVWR-257
0000000000000000000000000000000000000000 3.4.0-release
0000000000000000000000000000000000000000 3.4.1-beta1
0000000000000000000000000000000000000000 3.4.1-beta1a
0000000000000000000000000000000000000000 DRTVWR-219
0000000000000000000000000000000000000000 DRTVWR-220
0000000000000000000000000000000000000000 DRTVWR-221
0000000000000000000000000000000000000000 3.4.1-beta3
@ -725,24 +751,89 @@ c23d734065ed593b2413385aecd8366d8e0ee96b DRTVWR-257
0000000000000000000000000000000000000000 DRTVWR-237
0000000000000000000000000000000000000000 3.4.1-beta12
0000000000000000000000000000000000000000 3.4.1-release
0000000000000000000000000000000000000000 DRTVWR-186
0000000000000000000000000000000000000000 DRTVWR-181
0000000000000000000000000000000000000000 DRTVWR-188
0000000000000000000000000000000000000000 DRTVWR-191
0000000000000000000000000000000000000000 DRTVWR-194
0000000000000000000000000000000000000000 DRTVWR-203
0000000000000000000000000000000000000000 DRTVWR-202
0000000000000000000000000000000000000000 oz-build-test-tag
0000000000000000000000000000000000000000 DRTVWR-205
0000000000000000000000000000000000000000 DRTVWR-206
0000000000000000000000000000000000000000 DRTVWR-219
0000000000000000000000000000000000000000 DRTVWR-217
0000000000000000000000000000000000000000 3.4.2-beta1
0000000000000000000000000000000000000000 DRTVWR-208
0000000000000000000000000000000000000000 DRTVWR-223
0000000000000000000000000000000000000000 DRTVWR-216
0000000000000000000000000000000000000000 3.4.2-beta2
0000000000000000000000000000000000000000 DRTVWR-240
0000000000000000000000000000000000000000 DRTVWR-242
0000000000000000000000000000000000000000 3.4.2-beta3
0000000000000000000000000000000000000000 DRTVWR-243
0000000000000000000000000000000000000000 3.4.2-beta4
0000000000000000000000000000000000000000 3.4.2-release
0000000000000000000000000000000000000000 DRTVWR-208
0000000000000000000000000000000000000000 DRTVWR-223
0000000000000000000000000000000000000000 DRTVWR-240
0000000000000000000000000000000000000000 DRTVWR-209
0000000000000000000000000000000000000000 DRTVWR-238
0000000000000000000000000000000000000000 DRTVWR-210
0000000000000000000000000000000000000000 DRTVWR-243
0000000000000000000000000000000000000000 3.4.2-beta4
0000000000000000000000000000000000000000 DRTVWR-241
0000000000000000000000000000000000000000 DRTVWR-232
0000000000000000000000000000000000000000 DRTVWR-245
0000000000000000000000000000000000000000 3.4.3-beta1
0000000000000000000000000000000000000000 DRTVWR-252
0000000000000000000000000000000000000000 DRTVWR-251
0000000000000000000000000000000000000000 DRTVWR-253
0000000000000000000000000000000000000000 DRTVWR-254
0000000000000000000000000000000000000000 DRTVWR-256
0000000000000000000000000000000000000000 DRTVWR-258
0000000000000000000000000000000000000000 DRTVWR-257
0000000000000000000000000000000000000000 DRTVWR-259
0000000000000000000000000000000000000000 DRTVWR-265
0000000000000000000000000000000000000000 DRTVWR-266
0000000000000000000000000000000000000000 DRTVWR-267
0000000000000000000000000000000000000000 3.4.3-beta3
0000000000000000000000000000000000000000 3.4.3-release
0000000000000000000000000000000000000000 DRTVWR-229
0000000000000000000000000000000000000000 DRTVWR-246
0000000000000000000000000000000000000000 DRTVWR-247
0000000000000000000000000000000000000000 DRTVWR-249
0000000000000000000000000000000000000000 DRTVWR-230
0000000000000000000000000000000000000000 DRTVWR-255
0000000000000000000000000000000000000000 DRTVWR-260
0000000000000000000000000000000000000000 DRTVWR-244
0000000000000000000000000000000000000000 3.4.4-beta1
0000000000000000000000000000000000000000 DRTVWR-270
0000000000000000000000000000000000000000 3.4.4-beta2
0000000000000000000000000000000000000000 DRTVWR-271
0000000000000000000000000000000000000000 3.4.4-beta3
0000000000000000000000000000000000000000 DRTVWR-273
0000000000000000000000000000000000000000 DRTVWR-275
0000000000000000000000000000000000000000 3.4.4-beta4
0000000000000000000000000000000000000000 3.4.4-release
0000000000000000000000000000000000000000 DRTVWR-268
0000000000000000000000000000000000000000 DRTVWR-272
0000000000000000000000000000000000000000 DRTVWR-269
0000000000000000000000000000000000000000 DRTVWR-250
0000000000000000000000000000000000000000 DRTVWR-277
0000000000000000000000000000000000000000 DRTVWR-276
0000000000000000000000000000000000000000 DRTVWR-279
0000000000000000000000000000000000000000 DRTVWR-280
0000000000000000000000000000000000000000 3.4.5-beta1
0000000000000000000000000000000000000000 DRTVWR-281
0000000000000000000000000000000000000000 DRTVWR-283
0000000000000000000000000000000000000000 3.4.5-beta2
0000000000000000000000000000000000000000 DRTVWR-286
0000000000000000000000000000000000000000 DRTVWR-287
0000000000000000000000000000000000000000 3.4.5-beta3
0000000000000000000000000000000000000000 DRTVWR-289
0000000000000000000000000000000000000000 DRTVWR-290
0000000000000000000000000000000000000000 DRTVWR-291
0000000000000000000000000000000000000000 DRTVWR-292
0000000000000000000000000000000000000000 3.4.5-beta4
0000000000000000000000000000000000000000 DRTVWR-296
0000000000000000000000000000000000000000 DRTVWR-297
0000000000000000000000000000000000000000 3.4.5-beta5
4f777ffb99fefdc6497c61385c22688ff149c659 SL-2.0.0
668851b2ef0f8cf8df07a0fba429e4a6c1e70abb SL-2.0.1
b03065d018b8a2e28b7de85b293a4c992cb4c12d SL-2.1.0
@ -783,3 +874,5 @@ c623bbc854b6f7ee1b33a3718f76715046aa2937 SL-3.3.1
97977c67245f52db20eb15f1918cc0f24778cabc SL-3.4.0
e59ffd3fe0838ae6b09b242a6e9df71761b88f41 SL-3.4.1
16310aabccf315870f7cc9bf966926c0ad6954fa SL-3.4.2
0a2ca6546b499239afeb66d17b2fadbcdbe36ab1 SL-3.4.3
e1bb1ae7d8b12faeb37933a737c199cc9b9f89cc SL-3.4.4

View File

@ -186,9 +186,9 @@
<key>archive</key>
<map>
<key>hash</key>
<string>610d3c3790b39d44b45ed1e471f7b34d</string>
<string>ac37d0038c91b0672fa31a02731f0eac</string>
<key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-boost/rev/267115/arch/Darwin/installer/boost-1.52.0-darwin-20121117.tar.bz2</string>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-boost/rev/268347/arch/Darwin/installer/boost-1.52.0-darwin-20121218.tar.bz2</string>
</map>
<key>name</key>
<string>darwin</string>
@ -198,9 +198,9 @@
<key>archive</key>
<map>
<key>hash</key>
<string>86b9108ab71bd6551365d1706e2fb178</string>
<string>146ed8a8c2ef8ab3f0a6c4f214fc5c22</string>
<key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-boost/rev/267115/arch/Linux/installer/boost-1.52.0-linux-20121117.tar.bz2</string>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-boost/rev/268347/arch/Linux/installer/boost-1.52.0-linux-20121218.tar.bz2</string>
</map>
<key>name</key>
<string>linux</string>
@ -210,9 +210,9 @@
<key>archive</key>
<map>
<key>hash</key>
<string>a3bf306ebd14036a93f7894f898a862c</string>
<string>3ea60f17d986b7e8a3351298734bdca4</string>
<key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-boost/rev/267115/arch/CYGWIN/installer/boost-1.52.0-windows-20121117.tar.bz2</string>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-boost/rev/268347/arch/CYGWIN/installer/boost-1.52.0-windows-20121218.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
@ -954,9 +954,9 @@
<key>archive</key>
<map>
<key>hash</key>
<string>efaf5cb3e861d44518eb03f4c406f03c</string>
<string>e6feee3b452c2f70ce8558e30d6bc10a</string>
<key>url</key>
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/falcon_3p-havok-source/rev/261536/arch/Darwin/installer/havok_source-2012.1-darwin-20120710.tar.bz2</string>
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/lindenlab_3p-havok-source/rev/268409/arch/Darwin/installer/havok_source-2012.1-darwin-20121219.tar.bz2</string>
</map>
<key>name</key>
<string>darwin</string>
@ -966,9 +966,9 @@
<key>archive</key>
<map>
<key>hash</key>
<string>50037fff3fd3356a073cdae88348c9ab</string>
<string>0c0d2058ba48446e274d6595d1d8063e</string>
<key>url</key>
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/falcon_3p-havok-source/rev/261536/arch/Linux/installer/havok_source-2012.1-linux-20120711.tar.bz2</string>
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/lindenlab_3p-havok-source/rev/268409/arch/Linux/installer/havok_source-2012.1-linux-20121219.tar.bz2</string>
</map>
<key>name</key>
<string>linux</string>
@ -978,9 +978,9 @@
<key>archive</key>
<map>
<key>hash</key>
<string>cd6638f5a03469654615730c16889a60</string>
<string>88391b6e08d473506d406ca6f3e88cfb</string>
<key>url</key>
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/falcon_3p-havok-source/rev/261536/arch/CYGWIN/installer/havok_source-2012.1-windows-20120710.tar.bz2</string>
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/lindenlab_3p-havok-source/rev/268409/arch/CYGWIN/installer/havok_source-2012.1-windows-20121219.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
@ -1290,9 +1290,9 @@
<key>archive</key>
<map>
<key>hash</key>
<string>8180c6f8d96a76c0c4b7746eb9e98964</string>
<string>e0dbab27a77d6a864658da4526d7a9c8</string>
<key>url</key>
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/llappearanceutility-source/rev/268052/arch/Linux/installer/llappearanceutility_source-0.1-linux-20121212.tar.bz2</string>
<string>http://s3-proxy.lindenlab.com/private-builds-secondlife-com/hg/repo/llappearanceutility-source/rev/270227/arch/Linux/installer/llappearanceutility_source-0.1-linux-20130211.tar.bz2</string>
</map>
<key>name</key>
<string>linux</string>
@ -1525,6 +1525,30 @@
</map>
</map>
</map>
<key>nvapi</key>
<map>
<key>license</key>
<string>NVAPI</string>
<key>license_file</key>
<string>LICENSES/NVAPI_SDK_License_Agreement.pdf</string>
<key>name</key>
<string>nvapi</string>
<key>platforms</key>
<map>
<key>windows</key>
<map>
<key>archive</key>
<map>
<key>hash</key>
<string>baf519d36dffe4e4a59471450e391d01</string>
<key>url</key>
<string>http://automated-builds-secondlife-com.s3.amazonaws.com/hg/repo/3p-nvapi/rev/267102/arch/CYGWIN/installer/nvapi-304-windows-20121116.tar.bz2</string>
</map>
<key>name</key>
<string>windows</string>
</map>
</map>
</map>
<key>ogg-vorbis</key>
<map>
<key>license</key>

View File

@ -312,6 +312,7 @@ then
if $build_viewer_deb && [ "$last_built_variant" == "Release" ]
then
begin_section "Build Viewer Debian Package"
local have_private_repo=false
# mangle the changelog
dch --force-bad-version \
--distribution unstable \
@ -334,51 +335,38 @@ then
done
fi
# Move any .deb results.
mv ${build_dir}/packages/*.deb ../ 2>/dev/null || true
mkdir -p ../packages_public
mkdir -p ../packages_private
mv ${build_dir}/packages/*.deb ../packages_public 2>/dev/null || true
mv ${build_dir}/packages/packages_private/*.deb ../packages_private 2>/dev/null || true
# upload debian package and create repository
begin_section "Upload Debian Repository"
for deb_file in ../*.deb; do
for deb_file in `/bin/ls ../packages_public/*.deb ../*.deb 2>/dev/null`; do
upload_item debian $deb_file binary/octet-stream
done
if [ -d "$build_log_dir/debian_repo" ]
then
pushd "$build_log_dir/debian_repo"
cat > Release <<EOF
Archive: stable
Component: main
Origin: Teamcity
Label: Teamcity built .debs
Architecture: i386 amd64 any
EOF
if dpkg-scanpackages . /dev/null | gzip -9c > Packages.gz \
&& dpkg-scansources . /dev/null | gzip -9c > Sources.gz
then
begin_section Packages.gz
gunzip --stdout Packages.gz
for file in *.deb
do
stat "$file" | sed 2q
md5sum "$file"
done
end_section Packages.gz
for deb_file in `/bin/ls ../packages_private/*.deb 2>/dev/null`; do
upload_item debian_private $deb_file binary/octet-stream
have_private_repo=true
done
for file in *
do
upload_item debian_repo "$file" binary/octet-stream
done
else
record_failure 'Unable to generate Packages.gz or Sources.gz'
create_deb_repo
# Rename the local debian_repo* directories so that the master buildscript
# doesn't make a remote repo again.
for debian_repo_type in debian_repo debian_repo_private; do
if [ -d "$build_log_dir/$debian_repo_type" ]; then
mv $build_log_dir/$debian_repo_type $build_log_dir/${debian_repo_type}_pushed
fi
popd
done
process_pending_uploads
# Rename the local debian_repo directory so that the master buildscript
# doesn't make a remote repo again.
mv $build_log_dir/debian_repo $build_log_dir/debian_repo_pushed
if [ $have_private_repo = true ]; then
eval "$python_command \"$redirect\" '\${private_S3PROXY_URL}${S3PREFIX}repo/$repo/rev/$revision/index.html'"\
>"$build_log_dir/private.html" || fatal generating redirect
upload_item global_redirect "$build_log_dir/private.html" text/html
fi
end_section "Upload Debian Repository"
else

View File

@ -321,6 +321,7 @@ Dale Glass
VWR-1358
VWR-2041
Darien Caldwell
SH-3055
Dartagan Shepherd
Debs Regent
Decro Schmooz
@ -890,8 +891,11 @@ Nicholaz Beresford
VWR-2682
VWR-2684
Nick Rhodes
NickyD
MAINT-873
Nicky Dasmijn
VWR-29228
MAINT-873
Nicky Perian
OPEN-1
STORM-1087
@ -1059,9 +1063,12 @@ Shawn Kaufmat
SNOW-240
Sheet Spotter
Shnurui Troughton
Shyotl Kuhr
MAINT-1138
Siana Gearz
STORM-960
STORM-1088
MAINT-1138
sicarius Thorne
Sicarius Toxx
SignpostMarv Martin
@ -1243,6 +1250,8 @@ Westley Streeter
Whimsy Winx
Whirly Fizzle
STORM-1895
MAINT-873
STORM-1930
Whoops Babii
VWR-631
VWR-1640

View File

@ -211,7 +211,7 @@ FUNCTION(LL_ADD_INTEGRATION_TEST
if (WINDOWS)
SET_TARGET_PROPERTIES(INTEGRATION_TEST_${testname}
PROPERTIES
LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS ${TCMALLOC_LINK_FLAGS}"
LINK_FLAGS "/debug /NODEFAULTLIB:LIBCMT /SUBSYSTEM:WINDOWS"
LINK_FLAGS_DEBUG "/NODEFAULTLIB:\"LIBCMT;LIBCMTD;MSVCRT\" /INCREMENTAL:NO"
LINK_FLAGS_RELEASE ""
)

View File

@ -24,7 +24,7 @@ else (LINUX)
set(LLCOMMON_LIBRARIES llcommon)
endif (LINUX)
add_definitions(${TCMALLOC_FLAG})
# add_definitions(${TCMALLOC_FLAG})
set(LLCOMMON_LINK_SHARED OFF CACHE BOOL "Build the llcommon target as a static library.")
if(LLCOMMON_LINK_SHARED)

16
indra/cmake/NVAPI.cmake Normal file
View File

@ -0,0 +1,16 @@
# -*- cmake -*-
include(Prebuilt)
set(NVAPI ON CACHE BOOL "Use NVAPI.")
if (NVAPI)
if (WINDOWS)
use_prebuilt_binary(nvapi)
set(NVAPI_LIBRARY nvapi)
else (WINDOWS)
set(NVAPI_LIBRARY "")
endif (WINDOWS)
else (NVAPI)
set(NVAPI_LIBRARY "")
endif (NVAPI)

View File

@ -118,10 +118,10 @@ if (${CMAKE_SYSTEM_NAME} MATCHES "Linux")
if (INSTALL_PROPRIETARY)
# Only turn on headless if we can find osmesa libraries.
include(FindPkgConfig)
pkg_check_modules(OSMESA osmesa)
if (OSMESA_FOUND)
set(BUILD_HEADLESS ON CACHE BOOL "Build headless libraries.")
endif (OSMESA_FOUND)
#pkg_check_modules(OSMESA osmesa)
#if (OSMESA_FOUND)
# set(BUILD_HEADLESS ON CACHE BOOL "Build headless libraries.")
#endif (OSMESA_FOUND)
endif (INSTALL_PROPRIETARY)
endif (${CMAKE_SYSTEM_NAME} MATCHES "Linux")

View File

@ -169,8 +169,6 @@ LLAvatarAppearance::LLAvatarAppearance(LLWearableData* wearable_data) :
mRoot(NULL),
mWearableData(wearable_data)
{
LLMemType mt(LLMemType::MTYPE_AVATAR);
llassert_always(mWearableData);
mBakedTextureDatas.resize(LLAvatarAppearanceDefines::BAKED_NUM_INDICES);
for (U32 i = 0; i < mBakedTextureDatas.size(); i++ )
@ -495,8 +493,6 @@ void LLAvatarAppearance::computeBodySize()
//-----------------------------------------------------------------------------
BOOL LLAvatarAppearance::parseSkeletonFile(const std::string& filename)
{
LLMemType mt(LLMemType::MTYPE_AVATAR);
//-------------------------------------------------------------------------
// parse the file
//-------------------------------------------------------------------------
@ -538,8 +534,6 @@ BOOL LLAvatarAppearance::parseSkeletonFile(const std::string& filename)
//-----------------------------------------------------------------------------
BOOL LLAvatarAppearance::setupBone(const LLAvatarBoneInfo* info, LLJoint* parent, S32 &volume_num, S32 &joint_num)
{
LLMemType mt(LLMemType::MTYPE_AVATAR);
LLJoint* joint = NULL;
if (info->mIsJoint)
@ -621,8 +615,6 @@ BOOL LLAvatarAppearance::allocateCharacterJoints( U32 num )
//-----------------------------------------------------------------------------
BOOL LLAvatarAppearance::buildSkeleton(const LLAvatarSkeletonInfo *info)
{
LLMemType mt(LLMemType::MTYPE_AVATAR);
//-------------------------------------------------------------------------
// allocate joints
//-------------------------------------------------------------------------
@ -675,8 +667,6 @@ void LLAvatarAppearance::clearSkeleton()
//-----------------------------------------------------------------------------
void LLAvatarAppearance::buildCharacter()
{
LLMemType mt(LLMemType::MTYPE_AVATAR);
//-------------------------------------------------------------------------
// remove all references to our existing skeleton
// so we can rebuild it

View File

@ -76,6 +76,7 @@ protected:
//-----------------------------------------------------------------------------
LL_ALIGN_PREFIX(16)
class LLDriverParam : public LLViewerVisualParam
{
private:
@ -131,13 +132,13 @@ protected:
void setDrivenWeight(LLDrivenEntry *driven, F32 driven_weight, bool upload_bake);
LLVector4a mDefaultVec; // temp holder
LL_ALIGN_16(LLVector4a mDefaultVec); // temp holder
typedef std::vector<LLDrivenEntry> entry_list_t;
entry_list_t mDriven;
LLViewerVisualParam* mCurrentDistortionParam;
// Backlink only; don't make this an LLPointer.
LLAvatarAppearance* mAvatarAppearance;
LLWearable* mWearablep;
};
} LL_ALIGN_POSTFIX(16);
#endif // LL_LLDRIVERPARAM_H

View File

@ -749,8 +749,6 @@ const LLVector2 &LLPolyMeshSharedData::getUVs(U32 index)
//-----------------------------------------------------------------------------
LLPolyMesh::LLPolyMesh(LLPolyMeshSharedData *shared_data, LLPolyMesh *reference_mesh)
{
LLMemType mt(LLMemType::MTYPE_AVATAR_MESH);
llassert(shared_data);
mSharedData = shared_data;

View File

@ -74,9 +74,11 @@ LLPolyMorphData::LLPolyMorphData(const LLPolyMorphData &rhs) :
{
const S32 numVertices = mNumIndices;
mCoords = static_cast<LLVector4a*>(ll_aligned_malloc_16(numVertices * sizeof(LLVector4a)));
mNormals = static_cast<LLVector4a*>(ll_aligned_malloc_16(numVertices * sizeof(LLVector4a)));
mBinormals = static_cast<LLVector4a*>(ll_aligned_malloc_16(numVertices * sizeof(LLVector4a)));
U32 size = sizeof(LLVector4a)*numVertices;
mCoords = static_cast<LLVector4a*>( ll_aligned_malloc_16(size) );
mNormals = static_cast<LLVector4a*>( ll_aligned_malloc_16(size) );
mBinormals = static_cast<LLVector4a*>( ll_aligned_malloc_16(size) );
mTexCoords = new LLVector2[numVertices];
mVertexIndices = new U32[numVertices];
@ -122,9 +124,13 @@ BOOL LLPolyMorphData::loadBinary(LLFILE *fp, LLPolyMeshSharedData *mesh)
//-------------------------------------------------------------------------
// allocate vertices
//-------------------------------------------------------------------------
mCoords = static_cast<LLVector4a*>(ll_aligned_malloc_16(numVertices * sizeof(LLVector4a)));
mNormals = static_cast<LLVector4a*>(ll_aligned_malloc_16(numVertices * sizeof(LLVector4a)));
mBinormals = static_cast<LLVector4a*>(ll_aligned_malloc_16(numVertices * sizeof(LLVector4a)));
U32 size = sizeof(LLVector4a)*numVertices;
mCoords = static_cast<LLVector4a*>(ll_aligned_malloc_16(size));
mNormals = static_cast<LLVector4a*>(ll_aligned_malloc_16(size));
mBinormals = static_cast<LLVector4a*>(ll_aligned_malloc_16(size));
mTexCoords = new LLVector2[numVertices];
// Actually, we are allocating more space than we need for the skiplist
mVertexIndices = new U32[numVertices];

View File

@ -41,6 +41,7 @@ class LLWearable;
//-----------------------------------------------------------------------------
// LLPolyMorphData()
//-----------------------------------------------------------------------------
LL_ALIGN_PREFIX(16)
class LLPolyMorphData
{
public:
@ -75,12 +76,13 @@ public:
F32 mTotalDistortion; // vertex distortion summed over entire morph
F32 mMaxDistortion; // maximum single vertex distortion in a given morph
LLVector4a mAvgDistortion; // average vertex distortion, to infer directionality of the morph
LL_ALIGN_16(LLVector4a mAvgDistortion); // average vertex distortion, to infer directionality of the morph
LLPolyMeshSharedData* mMesh;
private:
void freeData();
};
} LL_ALIGN_POSTFIX(16);
//-----------------------------------------------------------------------------
// LLPolyVertexMask()

View File

@ -63,6 +63,7 @@ struct LLPolySkeletalBoneInfo
BOOL mHasPositionDeformation;
};
LL_ALIGN_PREFIX(16)
class LLPolySkeletalDistortionInfo : public LLViewerVisualParamInfo
{
friend class LLPolySkeletalDistortion;
@ -118,13 +119,13 @@ public:
/*virtual*/ const LLVector4a* getNextDistortion(U32 *index, LLPolyMesh **poly_mesh){index = 0; poly_mesh = NULL; return NULL;};
protected:
LL_ALIGN_16(LLVector4a mDefaultVec);
typedef std::map<LLJoint*, LLVector3> joint_vec_map_t;
joint_vec_map_t mJointScales;
joint_vec_map_t mJointOffsets;
LLVector4a mDefaultVec;
// Backlink only; don't make this an LLPointer.
LLAvatarAppearance *mAvatar;
};
} LL_ALIGN_POSTFIX(16);
#endif // LL_LLPOLYSKELETALDISTORTION_H

View File

@ -150,6 +150,10 @@ BOOL LLTexLayerSetBuffer::renderTexLayerSet()
gAlphaMaskProgram.bind();
gAlphaMaskProgram.setMinimumAlpha(0.004f);
}
else
{
gGL.setAlphaRejectSettings(LLRender::CF_GREATER, 0.00f);
}
LLVertexBuffer::unbind();
@ -928,7 +932,45 @@ LLWearableType::EType LLTexLayerInterface::getWearableType() const
ETextureIndex te = getLocalTextureIndex();
if (TEX_INVALID == te)
{
return LLWearableType::WT_INVALID;
LLWearableType::EType type = LLWearableType::WT_INVALID;
param_color_list_t::const_iterator color_iter = mParamColorList.begin();
param_alpha_list_t::const_iterator alpha_iter = mParamAlphaList.begin();
for (; color_iter != mParamColorList.end(); color_iter++)
{
LLTexLayerParamColor* param = *color_iter;
if (param)
{
LLWearableType::EType new_type = (LLWearableType::EType)param->getWearableType();
if (new_type != LLWearableType::WT_INVALID && new_type != type)
{
if (type != LLWearableType::WT_INVALID)
{
return LLWearableType::WT_INVALID;
}
type = new_type;
}
}
}
for (; alpha_iter != mParamAlphaList.end(); alpha_iter++)
{
LLTexLayerParamAlpha* param = *alpha_iter;
if (param)
{
LLWearableType::EType new_type = (LLWearableType::EType)param->getWearableType();
if (new_type != LLWearableType::WT_INVALID && new_type != type)
{
if (type != LLWearableType::WT_INVALID)
{
return LLWearableType::WT_INVALID;
}
type = new_type;
}
}
}
return type;
}
return LLAvatarAppearanceDictionary::getTEWearableType(te);
}
@ -1132,7 +1174,8 @@ BOOL LLTexLayer::render(S32 x, S32 y, S32 width, S32 height)
}
}//*/
renderMorphMasks(x, y, width, height, net_color);
const bool force_render = true;
renderMorphMasks(x, y, width, height, net_color, force_render);
alpha_mask_specified = TRUE;
gGL.flush();
gGL.blendFunc(LLRender::BF_DEST_ALPHA, LLRender::BF_ONE_MINUS_DEST_ALPHA);
@ -1381,8 +1424,13 @@ BOOL LLTexLayer::blendAlphaTexture(S32 x, S32 y, S32 width, S32 height)
}
static LLFastTimer::DeclareTimer FTM_RENDER_MORPH_MASKS("renderMorphMasks");
BOOL LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLColor4 &layer_color)
void LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLColor4 &layer_color, bool force_render)
{
if (!force_render && !hasMorph())
{
lldebugs << "skipping renderMorphMasks for " << getUUID() << llendl;
return;
}
LLFastTimer t(FTM_RENDER_MORPH_MASKS);
BOOL success = TRUE;
@ -1419,6 +1467,11 @@ BOOL LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
{
LLTexLayerParamAlpha* param = *iter;
success &= param->render( x, y, width, height );
if (!success && !force_render)
{
lldebugs << "Failed to render param " << param->getID() << " ; skipping morph mask." << llendl;
return;
}
}
// Approximates a min() function
@ -1444,25 +1497,29 @@ BOOL LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
}
}
if( !getInfo()->mStaticImageFileName.empty() )
if( !getInfo()->mStaticImageFileName.empty() && getInfo()->mStaticImageIsMask )
{
LLGLTexture* tex = LLTexLayerStaticImageList::getInstance()->getTexture(getInfo()->mStaticImageFileName, getInfo()->mStaticImageIsMask);
if( tex )
{
if( (tex->getComponents() == 4) ||
( (tex->getComponents() == 1) && getInfo()->mStaticImageIsMask ) )
if( (tex->getComponents() == 4) || (tex->getComponents() == 1) )
{
LLGLSNoAlphaTest gls_no_alpha_test;
gGL.getTexUnit(0)->bind(tex, TRUE);
gl_rect_2d_simple_tex( width, height );
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
}
else
{
llwarns << "Skipping rendering of " << getInfo()->mStaticImageFileName
<< "; expected 1 or 4 components." << llendl;
}
}
}
// Draw a rectangle with the layer color to multiply the alpha by that color's alpha.
// Note: we're still using gGL.blendFunc( GL_DST_ALPHA, GL_ZERO );
if (layer_color.mV[VW] != 1.f)
if ( !is_approx_equal(layer_color.mV[VW], 1.f) )
{
LLGLDisable no_alpha(GL_ALPHA_TEST);
gGL.getTexUnit(0)->unbind(LLTexUnit::TT_TEXTURE);
@ -1515,8 +1572,6 @@ BOOL LLTexLayer::renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLC
mMorphMasksValid = TRUE;
getTexLayerSet()->applyMorphMask(alpha_data, width, height, 1);
}
return success;
}
static LLFastTimer::DeclareTimer FTM_ADD_ALPHA_MASK("addAlphaMask");
@ -1531,7 +1586,8 @@ void LLTexLayer::addAlphaMask(U8 *data, S32 originX, S32 originY, S32 width, S32
findNetColor( &net_color );
// TODO: eliminate need for layer morph mask valid flag
invalidateMorphMasks();
renderMorphMasks(originX, originY, width, height, net_color);
const bool force_render = false;
renderMorphMasks(originX, originY, width, height, net_color, force_render);
alphaData = getAlphaData();
}
if (alphaData)
@ -1540,7 +1596,7 @@ void LLTexLayer::addAlphaMask(U8 *data, S32 originX, S32 originY, S32 width, S32
{
U8 curAlpha = data[i];
U16 resultAlpha = curAlpha;
resultAlpha *= (alphaData[i] + 1);
resultAlpha *= ( ((U16)alphaData[i]) + 1);
resultAlpha = resultAlpha >> 8;
data[i] = (U8)resultAlpha;
}
@ -1915,9 +1971,15 @@ LLGLTexture* LLTexLayerStaticImageList::getTexture(const std::string& file_name,
{
if( (image_raw->getComponents() == 1) && is_mask )
{
// Note: these are static, unchanging images so it's ok to assume
// that once an image is a mask it's always a mask.
tex->setExplicitFormat( GL_ALPHA8, GL_ALPHA );
// Convert grayscale alpha masks from single channel into RGBA.
// Fill RGB with black to allow fixed function gl calls
// to match shader implementation.
LLPointer<LLImageRaw> alpha_image_raw = image_raw;
image_raw = new LLImageRaw(image_raw->getWidth(),
image_raw->getHeight(),
4);
image_raw->copyUnscaledAlphaMask(alpha_image_raw, LLColor4U::black);
}
tex->createGLTexture(0, image_raw, 0, TRUE, LLGLTexture::LOCAL);

View File

@ -160,7 +160,7 @@ public:
BOOL findNetColor(LLColor4* color) const;
/*virtual*/ BOOL blendAlphaTexture(S32 x, S32 y, S32 width, S32 height); // Multiplies a single alpha texture against the frame buffer
/*virtual*/ void gatherAlphaMasks(U8 *data, S32 originX, S32 originY, S32 width, S32 height);
BOOL renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLColor4 &layer_color);
void renderMorphMasks(S32 x, S32 y, S32 width, S32 height, const LLColor4 &layer_color, bool force_render);
void addAlphaMask(U8 *data, S32 originX, S32 originY, S32 width, S32 height);
/*virtual*/ BOOL isInvisibleAlphaMask() const;

View File

@ -60,6 +60,7 @@ protected:
// LLTexLayerParamAlpha
//
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LL_ALIGN_PREFIX(16)
class LLTexLayerParamAlpha : public LLTexLayerParam
{
public:
@ -67,8 +68,6 @@ public:
LLTexLayerParamAlpha( LLAvatarAppearance* appearance );
/*virtual*/ ~LLTexLayerParamAlpha();
/*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable = NULL) const;
void* operator new(size_t size)
{
return ll_aligned_malloc_16(size);
@ -79,6 +78,8 @@ public:
ll_aligned_free_16(ptr);
}
/*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable = NULL) const;
// LLVisualParam Virtual functions
///*virtual*/ BOOL parseData(LLXmlTreeNode* node);
/*virtual*/ void apply( ESex avatar_sex ) {}
@ -106,7 +107,7 @@ private:
LLPointer<LLImageRaw> mStaticImageRaw;
BOOL mNeedsCreateTexture;
BOOL mStaticImageInvalid;
LLVector4a mAvgDistortionVec;
LL_ALIGN_16(LLVector4a mAvgDistortionVec);
F32 mCachedEffectiveWeight;
public:
@ -116,7 +117,7 @@ public:
typedef std::list< LLTexLayerParamAlpha* > param_alpha_ptr_list_t;
static param_alpha_ptr_list_t sInstances;
};
} LL_ALIGN_POSTFIX(16);
class LLTexLayerParamAlphaInfo : public LLViewerVisualParamInfo
{
friend class LLTexLayerParamAlpha;
@ -140,6 +141,8 @@ private:
// LLTexLayerParamColor
//
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
LL_ALIGN_PREFIX(16)
class LLTexLayerParamColor : public LLTexLayerParam
{
public:
@ -153,7 +156,6 @@ public:
LLTexLayerParamColor( LLTexLayerInterface* layer );
LLTexLayerParamColor( LLAvatarAppearance* appearance );
/* virtual */ ~LLTexLayerParamColor();
void* operator new(size_t size)
{
@ -165,6 +167,8 @@ public:
ll_aligned_free_16(ptr);
}
/* virtual */ ~LLTexLayerParamColor();
/*virtual*/ LLViewerVisualParam* cloneParam(LLWearable* wearable = NULL) const;
// LLVisualParam Virtual functions
@ -188,8 +192,8 @@ public:
protected:
virtual void onGlobalColorChanged(bool upload_bake) {}
private:
LLVector4a mAvgDistortionVec;
};
LL_ALIGN_16(LLVector4a mAvgDistortionVec);
} LL_ALIGN_POSTFIX(16);
class LLTexLayerParamColorInfo : public LLViewerVisualParamInfo
{

View File

@ -65,6 +65,7 @@ protected:
// VIRTUAL CLASS
// a viewer side interface class for a generalized parametric modification of the avatar mesh
//-----------------------------------------------------------------------------
LL_ALIGN_PREFIX(16)
class LLViewerVisualParam : public LLVisualParam
{
public:
@ -104,6 +105,6 @@ public:
BOOL getCrossWearable() const { return getInfo()->mCrossWearable; }
};
} LL_ALIGN_POSTFIX(16);
#endif // LL_LLViewerVisualParam_H

View File

@ -191,7 +191,7 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream,
// We are using a local max buffer size here to avoid issues
// if MAX_STRING size changes.
const U32 PARSE_BUFFER_SIZE = 2048;
char buffer[2048]; /* Flawfinder: ignore */
char buffer[PARSE_BUFFER_SIZE]; /* Flawfinder: ignore */
char uuid_buffer[37]; /* Flawfinder: ignore */
// This data is being generated on the viewer.
@ -205,12 +205,11 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream,
}
// read header and version
if (!input_stream.good())
if (!getNextPopulatedLine(input_stream, buffer, PARSE_BUFFER_SIZE))
{
llwarns << "Failed to read wearable asset input stream." << llendl;
return LLWearable::FAILURE;
}
input_stream.getline(buffer, PARSE_BUFFER_SIZE);
if ( 1 != sscanf( /* Flawfinder: ignore */
buffer,
"LLWearable version %d\n",
@ -230,8 +229,8 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream,
return LLWearable::FAILURE;
}
// name
if (!input_stream.good())
// name may be empty
if (!input_stream.good())
{
llwarns << "Bad Wearable asset: early end of input stream "
<< "while reading name" << llendl;
@ -240,7 +239,7 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream,
input_stream.getline(buffer, PARSE_BUFFER_SIZE);
mName = buffer;
// description
// description may be empty
if (!input_stream.good())
{
llwarns << "Bad Wearable asset: early end of input stream "
@ -250,14 +249,13 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream,
input_stream.getline(buffer, PARSE_BUFFER_SIZE);
mDescription = buffer;
// permissions
if (!input_stream.good())
// permissions may have extra empty lines before the correct line
if (!getNextPopulatedLine(input_stream, buffer, PARSE_BUFFER_SIZE))
{
llwarns << "Bad Wearable asset: early end of input stream "
<< "while reading permissions" << llendl;
return LLWearable::FAILURE;
}
input_stream.getline(buffer, PARSE_BUFFER_SIZE);
S32 perm_version = -1;
if ( 1 != sscanf( buffer, " permissions %d\n", &perm_version ) ||
perm_version != 0 )
@ -271,13 +269,12 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream,
}
// sale info
if (!input_stream.good())
if (!getNextPopulatedLine(input_stream, buffer, PARSE_BUFFER_SIZE))
{
llwarns << "Bad Wearable asset: early end of input stream "
<< "while reading sale info" << llendl;
return LLWearable::FAILURE;
}
input_stream.getline(buffer, PARSE_BUFFER_SIZE);
S32 sale_info_version = -1;
if ( 1 != sscanf( buffer, " sale_info %d\n", &sale_info_version ) ||
sale_info_version != 0 )
@ -306,13 +303,12 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream,
}
// wearable type
if (!input_stream.good())
if (!getNextPopulatedLine(input_stream, buffer, PARSE_BUFFER_SIZE))
{
llwarns << "Bad Wearable asset: early end of input stream "
<< "while reading type" << llendl;
return LLWearable::FAILURE;
}
input_stream.getline(buffer, PARSE_BUFFER_SIZE);
S32 type = -1;
if ( 1 != sscanf( buffer, "type %d\n", &type ) )
{
@ -331,13 +327,12 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream,
}
// parameters header
if (!input_stream.good())
if (!getNextPopulatedLine(input_stream, buffer, PARSE_BUFFER_SIZE))
{
llwarns << "Bad Wearable asset: early end of input stream "
<< "while reading parameters header" << llendl;
return LLWearable::FAILURE;
}
input_stream.getline(buffer, PARSE_BUFFER_SIZE);
S32 num_parameters = -1;
if ( 1 != sscanf( buffer, "parameters %d\n", &num_parameters ) )
{
@ -363,13 +358,12 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream,
S32 i;
for( i = 0; i < num_parameters; i++ )
{
if (!input_stream.good())
if (!getNextPopulatedLine(input_stream, buffer, PARSE_BUFFER_SIZE))
{
llwarns << "Bad Wearable asset: early end of input stream "
<< "while reading parameter #" << i << llendl;
return LLWearable::FAILURE;
}
input_stream.getline(buffer, PARSE_BUFFER_SIZE);
S32 param_id = 0;
F32 param_weight = 0.f;
if ( 2 != sscanf( buffer, "%d %f\n", &param_id, &param_weight ) )
@ -381,13 +375,12 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream,
}
// textures header
if (!input_stream.good())
if (!getNextPopulatedLine(input_stream, buffer, PARSE_BUFFER_SIZE))
{
llwarns << "Bad Wearable asset: early end of input stream "
<< "while reading textures header" << i << llendl;
return LLWearable::FAILURE;
}
input_stream.getline(buffer, PARSE_BUFFER_SIZE);
S32 num_textures = -1;
if ( 1 != sscanf( buffer, "textures %d\n", &num_textures) )
{
@ -404,13 +397,12 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream,
// textures
for( i = 0; i < num_textures; i++ )
{
if (!input_stream.good())
if (!getNextPopulatedLine(input_stream, buffer, PARSE_BUFFER_SIZE))
{
llwarns << "Bad Wearable asset: early end of input stream "
<< "while reading textures #" << i << llendl;
return LLWearable::FAILURE;
}
input_stream.getline(buffer, PARSE_BUFFER_SIZE);
S32 te = 0;
if ( 2 != sscanf( /* Flawfinder: ignore */
buffer,
@ -450,6 +442,22 @@ LLWearable::EImportResult LLWearable::importStream( std::istream& input_stream,
return LLWearable::SUCCESS;
}
BOOL LLWearable::getNextPopulatedLine(std::istream& input_stream, char* buffer, U32 buffer_size)
{
if (!input_stream.good())
{
return FALSE;
}
do
{
input_stream.getline(buffer, buffer_size);
}
while (input_stream.good() && buffer[0]=='\0');
return input_stream.good();
}
void LLWearable::setType(LLWearableType::EType type, LLAvatarAppearance *avatarp)
{

View File

@ -119,6 +119,7 @@ protected:
void destroyTextures();
void createVisualParams(LLAvatarAppearance *avatarp);
void createLayers(S32 te, LLAvatarAppearance *avatarp);
BOOL getNextPopulatedLine(std::istream& input_stream, char* buffer, U32 buffer_size);
static S32 sCurrentDefinitionVersion; // Depends on the current state of the avatar_lad.xml.
S32 mDefinitionVersion; // Depends on the state of the avatar_lad.xml when this asset was created.

View File

@ -27,7 +27,7 @@
#ifndef LL_LLBVHCONSTS_H
#define LL_LLBVHCONSTS_H
const F32 MAX_ANIM_DURATION = 30.f;
const F32 MAX_ANIM_DURATION = 60.f;
typedef enum e_constraint_type
{

View File

@ -29,8 +29,6 @@
//-----------------------------------------------------------------------------
#include "linden_common.h"
#include "llmemtype.h"
#include "llmotioncontroller.h"
#include "llkeyframemotion.h"
#include "llmath.h"
@ -44,6 +42,7 @@ const U32 MAX_MOTION_INSTANCES = 32;
//-----------------------------------------------------------------------------
// Constants and statics
//-----------------------------------------------------------------------------
F32 LLMotionController::sCurrentTimeFactor = 1.f;
LLMotionRegistry LLMotionController::sRegistry;
//-----------------------------------------------------------------------------
@ -127,7 +126,7 @@ LLMotion *LLMotionRegistry::createMotion( const LLUUID &id )
// Class Constructor
//-----------------------------------------------------------------------------
LLMotionController::LLMotionController()
: mTimeFactor(1.f),
: mTimeFactor(sCurrentTimeFactor),
mCharacter(NULL),
mAnimTime(0.f),
mPrevTimerElapsed(0.f),
@ -335,7 +334,6 @@ void LLMotionController::removeMotionInstance(LLMotion* motionp)
//-----------------------------------------------------------------------------
LLMotion* LLMotionController::createMotion( const LLUUID &id )
{
LLMemType mt(LLMemType::MTYPE_ANIMATION);
// do we have an instance of this motion for this character?
LLMotion *motion = findMotion(id);

View File

@ -168,6 +168,9 @@ public:
const LLFrameTimer& getFrameTimer() { return mTimer; }
static F32 getCurrentTimeFactor() { return sCurrentTimeFactor; };
static void setCurrentTimeFactor(F32 factor) { sCurrentTimeFactor = factor; };
protected:
// internal operations act on motion instances directly
// as there can be duplicate motions per id during blending overlap
@ -187,7 +190,8 @@ protected:
void deactivateStoppedMotions();
protected:
F32 mTimeFactor;
F32 mTimeFactor; // 1.f for normal speed
static F32 sCurrentTimeFactor; // Value to use for initialization
static LLMotionRegistry sRegistry;
LLPoseBlender mPoseBlender;

View File

@ -99,6 +99,7 @@ protected:
// An interface class for a generalized parametric modification of the avatar mesh
// Contains data that is specific to each Avatar
//-----------------------------------------------------------------------------
LL_ALIGN_PREFIX(16)
class LLVisualParam
{
public:
@ -174,6 +175,6 @@ protected:
S32 mID; // id for storing weight/morphtarget compares compactly
LLVisualParamInfo *mInfo;
EParamLocation mParamLocation; // where does this visual param live?
};
} LL_ALIGN_POSTFIX(16);
#endif // LL_LLVisualParam_H

View File

@ -53,7 +53,7 @@ set(llcommon_SOURCE_FILES
lleventfilter.cpp
llevents.cpp
lleventtimer.cpp
llfasttimer_class.cpp
llfasttimer.cpp
llfile.cpp
llfindlocale.cpp
llfixedbuffer.cpp
@ -71,7 +71,6 @@ set(llcommon_SOURCE_FILES
llmd5.cpp
llmemory.cpp
llmemorystream.cpp
llmemtype.cpp
llmetrics.cpp
llmetricperformancetester.cpp
llmortician.cpp
@ -168,7 +167,6 @@ set(llcommon_HEADER_FILES
lleventemitter.h
llextendedstatus.h
llfasttimer.h
llfasttimer_class.h
llfile.h
llfindlocale.h
llfixedbuffer.h
@ -197,7 +195,6 @@ set(llcommon_HEADER_FILES
llmd5.h
llmemory.h
llmemorystream.h
llmemtype.h
llmetrics.h
llmetricperformancetester.h
llmortician.h

View File

@ -35,28 +35,6 @@
DECLARE_bool(heap_profile_use_stack_trace);
//DECLARE_double(tcmalloc_release_rate);
// static
void LLAllocator::pushMemType(S32 type)
{
if(isProfiling())
{
PushMemType(type);
}
}
// static
S32 LLAllocator::popMemType()
{
if (isProfiling())
{
return PopMemType();
}
else
{
return -1;
}
}
void LLAllocator::setProfilingEnabled(bool should_enable)
{
// NULL disables dumping to disk
@ -94,17 +72,6 @@ std::string LLAllocator::getRawProfile()
// stub implementations for when tcmalloc is disabled
//
// static
void LLAllocator::pushMemType(S32 type)
{
}
// static
S32 LLAllocator::popMemType()
{
return -1;
}
void LLAllocator::setProfilingEnabled(bool should_enable)
{
}

View File

@ -29,16 +29,10 @@
#include <string>
#include "llmemtype.h"
#include "llallocator_heap_profile.h"
class LL_COMMON_API LLAllocator {
friend class LLMemoryView;
friend class LLMemType;
private:
static void pushMemType(S32 type);
static S32 popMemType();
public:
void setProfilingEnabled(bool should_enable);

View File

@ -1,5 +1,5 @@
/**
* @file llfasttimer_class.cpp
* @file llfasttimer.cpp
* @brief Implementation of the fast timer.
*
* $LicenseInfo:firstyear=2004&license=viewerlgpl$
@ -64,19 +64,12 @@ BOOL LLFastTimer::sMetricLog = FALSE;
LLMutex* LLFastTimer::sLogLock = NULL;
std::queue<LLSD> LLFastTimer::sLogQueue;
#define USE_RDTSC 0
#if LL_LINUX || LL_SOLARIS
U64 LLFastTimer::sClockResolution = 1000000000; // Nanosecond resolution
#else
U64 LLFastTimer::sClockResolution = 1000000; // Microsecond resolution
#endif
std::vector<LLFastTimer::FrameState>* LLFastTimer::sTimerInfos = NULL;
U64 LLFastTimer::sTimerCycles = 0;
U32 LLFastTimer::sTimerCalls = 0;
// FIXME: move these declarations to the relevant modules
// helper functions
@ -109,52 +102,35 @@ static timer_tree_dfs_iterator_t end_timer_tree()
return timer_tree_dfs_iterator_t();
}
// factory class that creates NamedTimers via static DeclareTimer objects
class NamedTimerFactory : public LLSingleton<NamedTimerFactory>
{
public:
NamedTimerFactory()
: mActiveTimerRoot(NULL),
mTimerRoot(NULL),
mAppTimer(NULL),
mRootFrameState(NULL)
: mTimerRoot(NULL)
{}
/*virtual */ void initSingleton()
{
mTimerRoot = new LLFastTimer::NamedTimer("root");
mActiveTimerRoot = new LLFastTimer::NamedTimer("Frame");
mActiveTimerRoot->setCollapsed(false);
mRootFrameState = new LLFastTimer::FrameState(mActiveTimerRoot);
mRootFrameState->mParent = &mTimerRoot->getFrameState();
mActiveTimerRoot->setParent(mTimerRoot);
mAppTimer = new LLFastTimer(mRootFrameState);
mRootFrameState.setNamedTimer(mTimerRoot);
mTimerRoot->setFrameState(&mRootFrameState);
mTimerRoot->mParent = mTimerRoot;
mTimerRoot->setCollapsed(false);
mRootFrameState.mParent = &mRootFrameState;
}
~NamedTimerFactory()
{
std::for_each(mTimers.begin(), mTimers.end(), DeletePairedPointer());
delete mAppTimer;
delete mActiveTimerRoot;
delete mTimerRoot;
delete mRootFrameState;
}
LLFastTimer::NamedTimer& createNamedTimer(const std::string& name)
LLFastTimer::NamedTimer& createNamedTimer(const std::string& name, LLFastTimer::FrameState* state)
{
timer_map_t::iterator found_it = mTimers.find(name);
if (found_it != mTimers.end())
{
return *found_it->second;
}
LLFastTimer::NamedTimer* timer = new LLFastTimer::NamedTimer(name);
timer->setFrameState(state);
timer->setParent(mTimerRoot);
mTimers.insert(std::make_pair(name, timer));
@ -171,12 +147,9 @@ public:
return NULL;
}
LLFastTimer::NamedTimer* getActiveRootTimer() { return mActiveTimerRoot; }
LLFastTimer::NamedTimer* getRootTimer() { return mTimerRoot; }
const LLFastTimer* getAppTimer() { return mAppTimer; }
LLFastTimer::FrameState& getRootFrameState() { return *mRootFrameState; }
typedef std::map<std::string, LLFastTimer::NamedTimer*> timer_map_t;
typedef std::multimap<std::string, LLFastTimer::NamedTimer*> timer_map_t;
timer_map_t::iterator beginTimers() { return mTimers.begin(); }
timer_map_t::iterator endTimers() { return mTimers.end(); }
S32 timerCount() { return mTimers.size(); }
@ -184,55 +157,19 @@ public:
private:
timer_map_t mTimers;
LLFastTimer::NamedTimer* mActiveTimerRoot;
LLFastTimer::NamedTimer* mTimerRoot;
LLFastTimer* mAppTimer;
LLFastTimer::FrameState* mRootFrameState;
LLFastTimer::FrameState mRootFrameState;
};
void update_cached_pointers_if_changed()
{
// detect when elements have moved and update cached pointers
static LLFastTimer::FrameState* sFirstTimerAddress = NULL;
if (&*(LLFastTimer::getFrameStateList().begin()) != sFirstTimerAddress)
{
LLFastTimer::DeclareTimer::updateCachedPointers();
}
sFirstTimerAddress = &*(LLFastTimer::getFrameStateList().begin());
}
LLFastTimer::DeclareTimer::DeclareTimer(const std::string& name, bool open )
: mTimer(NamedTimerFactory::instance().createNamedTimer(name))
: mTimer(NamedTimerFactory::instance().createNamedTimer(name, &mFrameState))
{
mTimer.setCollapsed(!open);
mFrameState = &mTimer.getFrameState();
update_cached_pointers_if_changed();
}
LLFastTimer::DeclareTimer::DeclareTimer(const std::string& name)
: mTimer(NamedTimerFactory::instance().createNamedTimer(name))
: mTimer(NamedTimerFactory::instance().createNamedTimer(name, &mFrameState))
{
mFrameState = &mTimer.getFrameState();
update_cached_pointers_if_changed();
}
// static
void LLFastTimer::DeclareTimer::updateCachedPointers()
{
// propagate frame state pointers to timer declarations
for (instance_iter it = beginInstances(); it != endInstances(); ++it)
{
// update cached pointer
it->mFrameState = &it->mTimer.getFrameState();
}
// also update frame states of timers on stack
LLFastTimer* cur_timerp = LLFastTimer::sCurTimerData.mCurTimer;
while(cur_timerp->mLastTimerData.mCurTimer != cur_timerp)
{
cur_timerp->mFrameState = &cur_timerp->mFrameState->mTimer->getFrameState();
cur_timerp = cur_timerp->mLastTimerData.mCurTimer;
}
}
//static
@ -244,7 +181,7 @@ U64 LLFastTimer::countsPerSecond() // counts per second for the *32-bit* timer
#else // windows or x86-mac or x86-linux or x86-solaris
U64 LLFastTimer::countsPerSecond() // counts per second for the *32-bit* timer
{
#if USE_RDTSC || !LL_WINDOWS
#if LL_FASTTIMER_USE_RDTSC || !LL_WINDOWS
//getCPUFrequency returns MHz and sCPUClockFrequency wants to be in Hz
static U64 sCPUClockFrequency = U64(LLProcessorInfo().getCPUFrequency()*1000000.0);
@ -265,14 +202,13 @@ U64 LLFastTimer::countsPerSecond() // counts per second for the *32-bit* timer
}
#endif
LLFastTimer::FrameState::FrameState(LLFastTimer::NamedTimer* timerp)
LLFastTimer::FrameState::FrameState()
: mActiveCount(0),
mCalls(0),
mSelfTimeCounter(0),
mParent(NULL),
mLastCaller(NULL),
mMoveUpTree(false),
mTimer(timerp)
mMoveUpTree(false)
{}
@ -283,12 +219,9 @@ LLFastTimer::NamedTimer::NamedTimer(const std::string& name)
mTotalTimeCounter(0),
mCountAverage(0),
mCallAverage(0),
mNeedsSorting(false)
mNeedsSorting(false),
mFrameState(NULL)
{
info_list_t& frame_state_list = getFrameStateList();
mFrameStateIndex = frame_state_list.size();
getFrameStateList().push_back(FrameState(this));
mCountHistory = new U32[HISTORY_NUM];
memset(mCountHistory, 0, sizeof(U32) * HISTORY_NUM);
mCallHistory = new U32[HISTORY_NUM];
@ -355,6 +288,7 @@ S32 LLFastTimer::NamedTimer::getDepth()
while(timerp)
{
depth++;
if (timerp->getParent() == timerp) break;
timerp = timerp->mParent;
}
return depth;
@ -369,15 +303,6 @@ void LLFastTimer::NamedTimer::processTimes()
accumulateTimings();
}
// sort timer info structs by depth first traversal order
struct SortTimersDFS
{
bool operator()(const LLFastTimer::FrameState& i1, const LLFastTimer::FrameState& i2)
{
return i1.mTimer->getFrameStateIndex() < i2.mTimer->getFrameStateIndex();
}
};
// sort child timers by name
struct SortTimerByName
{
@ -425,8 +350,8 @@ void LLFastTimer::NamedTimer::buildHierarchy()
{
// since ancestors have already been visited, reparenting won't affect tree traversal
//step up tree, bringing our descendants with us
//llinfos << "Moving " << timerp->getName() << " from child of " << timerp->getParent()->getName() <<
// " to child of " << timerp->getParent()->getParent()->getName() << llendl;
LL_DEBUGS("FastTimers") << "Moving " << timerp->getName() << " from child of " << timerp->getParent()->getName() <<
" to child of " << timerp->getParent()->getParent()->getName() << LL_ENDL;
timerp->setParent(timerp->getParent()->getParent());
timerp->getFrameState().mMoveUpTree = false;
@ -458,7 +383,7 @@ void LLFastTimer::NamedTimer::accumulateTimings()
LLFastTimer* cur_timer = sCurTimerData.mCurTimer;
// root defined by parent pointing to self
CurTimerData* cur_data = &sCurTimerData;
while(cur_timer->mLastTimerData.mCurTimer != cur_timer)
while(cur_timer && cur_timer->mLastTimerData.mCurTimer != cur_timer)
{
U32 cumulative_time_delta = cur_time - cur_timer->mStartTime;
U32 self_time_delta = cumulative_time_delta - cur_data->mChildTime;
@ -473,7 +398,7 @@ void LLFastTimer::NamedTimer::accumulateTimings()
}
// traverse tree in DFS post order, or bottom up
for(timer_tree_bottom_up_iterator_t it = begin_timer_tree_bottom_up(*NamedTimerFactory::instance().getActiveRootTimer());
for(timer_tree_bottom_up_iterator_t it = begin_timer_tree_bottom_up(*NamedTimerFactory::instance().getRootTimer());
it != end_timer_tree_bottom_up();
++it)
{
@ -507,12 +432,12 @@ void LLFastTimer::NamedTimer::resetFrame()
static S32 call_count = 0;
if (call_count % 100 == 0)
{
llinfos << "countsPerSecond (32 bit): " << countsPerSecond() << llendl;
llinfos << "get_clock_count (64 bit): " << get_clock_count() << llendl;
llinfos << "LLProcessorInfo().getCPUFrequency() " << LLProcessorInfo().getCPUFrequency() << llendl;
llinfos << "getCPUClockCount32() " << getCPUClockCount32() << llendl;
llinfos << "getCPUClockCount64() " << getCPUClockCount64() << llendl;
llinfos << "elapsed sec " << ((F64)getCPUClockCount64())/((F64)LLProcessorInfo().getCPUFrequency()*1000000.0) << llendl;
LL_DEBUGS("FastTimers") << "countsPerSecond (32 bit): " << countsPerSecond() << LL_ENDL;
LL_DEBUGS("FastTimers") << "get_clock_count (64 bit): " << get_clock_count() << llendl;
LL_DEBUGS("FastTimers") << "LLProcessorInfo().getCPUFrequency() " << LLProcessorInfo().getCPUFrequency() << LL_ENDL;
LL_DEBUGS("FastTimers") << "getCPUClockCount32() " << getCPUClockCount32() << LL_ENDL;
LL_DEBUGS("FastTimers") << "getCPUClockCount64() " << getCPUClockCount64() << LL_ENDL;
LL_DEBUGS("FastTimers") << "elapsed sec " << ((F64)getCPUClockCount64())/((F64)LLProcessorInfo().getCPUFrequency()*1000000.0) << LL_ENDL;
}
call_count++;
@ -544,48 +469,22 @@ void LLFastTimer::NamedTimer::resetFrame()
}
}
// tag timers by position in depth first traversal of tree
S32 index = 0;
for(timer_tree_dfs_iterator_t it = begin_timer_tree(*NamedTimerFactory::instance().getRootTimer());
it != end_timer_tree();
++it)
{
NamedTimer* timerp = (*it);
timerp->mFrameStateIndex = index;
index++;
llassert_always(timerp->mFrameStateIndex < (S32)getFrameStateList().size());
}
// sort timers by DFS traversal order to improve cache coherency
std::sort(getFrameStateList().begin(), getFrameStateList().end(), SortTimersDFS());
// update pointers into framestatelist now that we've sorted it
DeclareTimer::updateCachedPointers();
// reset for next frame
for (instance_iter it = beginInstances(); it != endInstances(); ++it)
{
for (instance_iter it = beginInstances(); it != endInstances(); ++it)
{
NamedTimer& timer = *it;
NamedTimer& timer = *it;
FrameState& info = timer.getFrameState();
info.mSelfTimeCounter = 0;
info.mCalls = 0;
info.mLastCaller = NULL;
info.mMoveUpTree = false;
// update parent pointer in timer state struct
if (timer.mParent)
{
info.mParent = &timer.mParent->getFrameState();
}
FrameState& info = timer.getFrameState();
info.mSelfTimeCounter = 0;
info.mCalls = 0;
info.mLastCaller = NULL;
info.mMoveUpTree = false;
// update parent pointer in timer state struct
if (timer.mParent)
{
info.mParent = &timer.mParent->getFrameState();
}
}
//sTimerCycles = 0;
//sTimerCalls = 0;
}
//static
@ -600,7 +499,7 @@ void LLFastTimer::NamedTimer::reset()
// root defined by parent pointing to self
CurTimerData* cur_data = &sCurTimerData;
LLFastTimer* cur_timer = cur_data->mCurTimer;
while(cur_timer->mLastTimerData.mCurTimer != cur_timer)
while(cur_timer && cur_timer->mLastTimerData.mCurTimer != cur_timer)
{
cur_timer->mStartTime = cur_time;
cur_data->mChildTime = 0;
@ -630,17 +529,6 @@ void LLFastTimer::NamedTimer::reset()
sCurFrameIndex = 0;
}
//static
LLFastTimer::info_list_t& LLFastTimer::getFrameStateList()
{
if (!sTimerInfos)
{
sTimerInfos = new info_list_t();
}
return *sTimerInfos;
}
U32 LLFastTimer::NamedTimer::getHistoricalCount(S32 history_index) const
{
S32 history_idx = (getLastFrameIndex() + history_index) % LLFastTimer::NamedTimer::HISTORY_NUM;
@ -655,18 +543,7 @@ U32 LLFastTimer::NamedTimer::getHistoricalCalls(S32 history_index ) const
LLFastTimer::FrameState& LLFastTimer::NamedTimer::getFrameState() const
{
llassert_always(mFrameStateIndex >= 0);
if (this == NamedTimerFactory::instance().getActiveRootTimer())
{
return NamedTimerFactory::instance().getRootFrameState();
}
return getFrameStateList()[mFrameStateIndex];
}
// static
LLFastTimer::NamedTimer& LLFastTimer::NamedTimer::getRootNamedTimer()
{
return *NamedTimerFactory::instance().getActiveRootTimer();
return *mFrameState;
}
std::vector<LLFastTimer::NamedTimer*>::const_iterator LLFastTimer::NamedTimer::beginChildren()
@ -684,6 +561,12 @@ std::vector<LLFastTimer::NamedTimer*>& LLFastTimer::NamedTimer::getChildren()
return mChildren;
}
// static
LLFastTimer::NamedTimer& LLFastTimer::NamedTimer::getRootNamedTimer()
{
return *NamedTimerFactory::instance().getRootTimer();
}
//static
void LLFastTimer::nextFrame()
{
@ -777,145 +660,3 @@ LLFastTimer::LLFastTimer(LLFastTimer::FrameState* state)
}
//////////////////////////////////////////////////////////////////////////////
//
// Important note: These implementations must be FAST!
//
#if LL_WINDOWS
//
// Windows implementation of CPU clock
//
//
// NOTE: put back in when we aren't using platform sdk anymore
//
// because MS has different signatures for these functions in winnt.h
// need to rename them to avoid conflicts
//#define _interlockedbittestandset _renamed_interlockedbittestandset
//#define _interlockedbittestandreset _renamed_interlockedbittestandreset
//#include <intrin.h>
//#undef _interlockedbittestandset
//#undef _interlockedbittestandreset
//inline U32 LLFastTimer::getCPUClockCount32()
//{
// U64 time_stamp = __rdtsc();
// return (U32)(time_stamp >> 8);
//}
//
//// return full timer value, *not* shifted by 8 bits
//inline U64 LLFastTimer::getCPUClockCount64()
//{
// return __rdtsc();
//}
// shift off lower 8 bits for lower resolution but longer term timing
// on 1Ghz machine, a 32-bit word will hold ~1000 seconds of timing
#if USE_RDTSC
U32 LLFastTimer::getCPUClockCount32()
{
U32 ret_val;
__asm
{
_emit 0x0f
_emit 0x31
shr eax,8
shl edx,24
or eax, edx
mov dword ptr [ret_val], eax
}
return ret_val;
}
// return full timer value, *not* shifted by 8 bits
U64 LLFastTimer::getCPUClockCount64()
{
U64 ret_val;
__asm
{
_emit 0x0f
_emit 0x31
mov eax,eax
mov edx,edx
mov dword ptr [ret_val+4], edx
mov dword ptr [ret_val], eax
}
return ret_val;
}
std::string LLFastTimer::sClockType = "rdtsc";
#else
//LL_COMMON_API U64 get_clock_count(); // in lltimer.cpp
// These use QueryPerformanceCounter, which is arguably fine and also works on AMD architectures.
U32 LLFastTimer::getCPUClockCount32()
{
return (U32)(get_clock_count()>>8);
}
U64 LLFastTimer::getCPUClockCount64()
{
return get_clock_count();
}
std::string LLFastTimer::sClockType = "QueryPerformanceCounter";
#endif
#endif
#if (LL_LINUX || LL_SOLARIS) && !(defined(__i386__) || defined(__amd64__))
//
// Linux and Solaris implementation of CPU clock - non-x86.
// This is accurate but SLOW! Only use out of desperation.
//
// Try to use the MONOTONIC clock if available, this is a constant time counter
// with nanosecond resolution (but not necessarily accuracy) and attempts are
// made to synchronize this value between cores at kernel start. It should not
// be affected by CPU frequency. If not available use the REALTIME clock, but
// this may be affected by NTP adjustments or other user activity affecting
// the system time.
U64 LLFastTimer::getCPUClockCount64()
{
struct timespec tp;
#ifdef CLOCK_MONOTONIC // MONOTONIC supported at build-time?
if (-1 == clock_gettime(CLOCK_MONOTONIC,&tp)) // if MONOTONIC isn't supported at runtime then ouch, try REALTIME
#endif
clock_gettime(CLOCK_REALTIME,&tp);
return (tp.tv_sec*LLFastTimer::sClockResolution)+tp.tv_nsec;
}
U32 LLFastTimer::getCPUClockCount32()
{
return (U32)(LLFastTimer::getCPUClockCount64() >> 8);
}
std::string LLFastTimer::sClockType = "clock_gettime";
#endif // (LL_LINUX || LL_SOLARIS) && !(defined(__i386__) || defined(__amd64__))
#if (LL_LINUX || LL_SOLARIS || LL_DARWIN) && (defined(__i386__) || defined(__amd64__))
//
// Mac+Linux+Solaris FAST x86 implementation of CPU clock
U32 LLFastTimer::getCPUClockCount32()
{
U64 x;
__asm__ volatile (".byte 0x0f, 0x31": "=A"(x));
return (U32)(x >> 8);
}
U64 LLFastTimer::getCPUClockCount64()
{
U64 x;
__asm__ volatile (".byte 0x0f, 0x31": "=A"(x));
return x;
}
std::string LLFastTimer::sClockType = "rdtsc";
#endif

View File

@ -1,6 +1,6 @@
/**
* @file llfasttimer.h
* @brief Inline implementations of fast timers.
* @brief Declaration of a fast timer.
*
* $LicenseInfo:firstyear=2004&license=viewerlgpl$
* Second Life Viewer Source Code
@ -27,9 +27,365 @@
#ifndef LL_FASTTIMER_H
#define LL_FASTTIMER_H
// Implementation of getCPUClockCount32() and getCPUClockCount64 are now in llfastertimer_class.cpp.
#include "llinstancetracker.h"
// pull in the actual class definition
#include "llfasttimer_class.h"
#define FAST_TIMER_ON 1
#define DEBUG_FAST_TIMER_THREADS 1
class LLMutex;
#include <queue>
#include "llsd.h"
#define LL_FASTTIMER_USE_RDTSC 1
LL_COMMON_API void assert_main_thread();
class LL_COMMON_API LLFastTimer
{
public:
class NamedTimer;
struct LL_COMMON_API FrameState
{
FrameState();
void setNamedTimer(NamedTimer* timerp) { mTimer = timerp; }
U32 mSelfTimeCounter;
U32 mCalls;
FrameState* mParent; // info for caller timer
FrameState* mLastCaller; // used to bootstrap tree construction
NamedTimer* mTimer;
U16 mActiveCount; // number of timers with this ID active on stack
bool mMoveUpTree; // needs to be moved up the tree of timers at the end of frame
};
// stores a "named" timer instance to be reused via multiple LLFastTimer stack instances
class LL_COMMON_API NamedTimer
: public LLInstanceTracker<NamedTimer>
{
friend class DeclareTimer;
public:
~NamedTimer();
enum { HISTORY_NUM = 300 };
const std::string& getName() const { return mName; }
NamedTimer* getParent() const { return mParent; }
void setParent(NamedTimer* parent);
S32 getDepth();
std::string getToolTip(S32 history_index = -1);
typedef std::vector<NamedTimer*>::const_iterator child_const_iter;
child_const_iter beginChildren();
child_const_iter endChildren();
std::vector<NamedTimer*>& getChildren();
void setCollapsed(bool collapsed) { mCollapsed = collapsed; }
bool getCollapsed() const { return mCollapsed; }
U32 getCountAverage() const { return mCountAverage; }
U32 getCallAverage() const { return mCallAverage; }
U32 getHistoricalCount(S32 history_index = 0) const;
U32 getHistoricalCalls(S32 history_index = 0) const;
static NamedTimer& getRootNamedTimer();
void setFrameState(FrameState* state) { mFrameState = state; state->setNamedTimer(this); }
FrameState& getFrameState() const;
private:
friend class LLFastTimer;
friend class NamedTimerFactory;
//
// methods
//
NamedTimer(const std::string& name);
// recursive call to gather total time from children
static void accumulateTimings();
// updates cumulative times and hierarchy,
// can be called multiple times in a frame, at any point
static void processTimes();
static void buildHierarchy();
static void resetFrame();
static void reset();
//
// members
//
FrameState* mFrameState;
std::string mName;
U32 mTotalTimeCounter;
U32 mCountAverage;
U32 mCallAverage;
U32* mCountHistory;
U32* mCallHistory;
// tree structure
NamedTimer* mParent; // NamedTimer of caller(parent)
std::vector<NamedTimer*> mChildren;
bool mCollapsed; // don't show children
bool mNeedsSorting; // sort children whenever child added
};
// used to statically declare a new named timer
class LL_COMMON_API DeclareTimer
: public LLInstanceTracker<DeclareTimer>
{
friend class LLFastTimer;
public:
DeclareTimer(const std::string& name, bool open);
DeclareTimer(const std::string& name);
NamedTimer& getNamedTimer() { return mTimer; }
private:
FrameState mFrameState;
NamedTimer& mTimer;
};
public:
LLFastTimer(LLFastTimer::FrameState* state);
LL_FORCE_INLINE LLFastTimer(LLFastTimer::DeclareTimer& timer)
: mFrameState(&timer.mFrameState)
{
#if FAST_TIMER_ON
LLFastTimer::FrameState* frame_state = mFrameState;
mStartTime = getCPUClockCount32();
frame_state->mActiveCount++;
frame_state->mCalls++;
// keep current parent as long as it is active when we are
frame_state->mMoveUpTree |= (frame_state->mParent->mActiveCount == 0);
LLFastTimer::CurTimerData* cur_timer_data = &LLFastTimer::sCurTimerData;
mLastTimerData = *cur_timer_data;
cur_timer_data->mCurTimer = this;
cur_timer_data->mFrameState = frame_state;
cur_timer_data->mChildTime = 0;
#endif
#if DEBUG_FAST_TIMER_THREADS
#if !LL_RELEASE
assert_main_thread();
#endif
#endif
}
LL_FORCE_INLINE ~LLFastTimer()
{
#if FAST_TIMER_ON
LLFastTimer::FrameState* frame_state = mFrameState;
U32 total_time = getCPUClockCount32() - mStartTime;
frame_state->mSelfTimeCounter += total_time - LLFastTimer::sCurTimerData.mChildTime;
frame_state->mActiveCount--;
// store last caller to bootstrap tree creation
// do this in the destructor in case of recursion to get topmost caller
frame_state->mLastCaller = mLastTimerData.mFrameState;
// we are only tracking self time, so subtract our total time delta from parents
mLastTimerData.mChildTime += total_time;
LLFastTimer::sCurTimerData = mLastTimerData;
#endif
}
public:
static LLMutex* sLogLock;
static std::queue<LLSD> sLogQueue;
static BOOL sLog;
static BOOL sMetricLog;
static std::string sLogName;
static bool sPauseHistory;
static bool sResetHistory;
// call this once a frame to reset timers
static void nextFrame();
// dumps current cumulative frame stats to log
// call nextFrame() to reset timers
static void dumpCurTimes();
// call this to reset timer hierarchy, averages, etc.
static void reset();
static U64 countsPerSecond();
static S32 getLastFrameIndex() { return sLastFrameIndex; }
static S32 getCurFrameIndex() { return sCurFrameIndex; }
static void writeLog(std::ostream& os);
static const NamedTimer* getTimerByName(const std::string& name);
struct CurTimerData
{
LLFastTimer* mCurTimer;
FrameState* mFrameState;
U32 mChildTime;
};
static CurTimerData sCurTimerData;
private:
//////////////////////////////////////////////////////////////////////////////
//
// Important note: These implementations must be FAST!
//
#if LL_WINDOWS
//
// Windows implementation of CPU clock
//
//
// NOTE: put back in when we aren't using platform sdk anymore
//
// because MS has different signatures for these functions in winnt.h
// need to rename them to avoid conflicts
//#define _interlockedbittestandset _renamed_interlockedbittestandset
//#define _interlockedbittestandreset _renamed_interlockedbittestandreset
//#include <intrin.h>
//#undef _interlockedbittestandset
//#undef _interlockedbittestandreset
//inline U32 LLFastTimer::getCPUClockCount32()
//{
// U64 time_stamp = __rdtsc();
// return (U32)(time_stamp >> 8);
//}
//
//// return full timer value, *not* shifted by 8 bits
//inline U64 LLFastTimer::getCPUClockCount64()
//{
// return __rdtsc();
//}
// shift off lower 8 bits for lower resolution but longer term timing
// on 1Ghz machine, a 32-bit word will hold ~1000 seconds of timing
#if LL_FASTTIMER_USE_RDTSC
static U32 getCPUClockCount32()
{
U32 ret_val;
__asm
{
_emit 0x0f
_emit 0x31
shr eax,8
shl edx,24
or eax, edx
mov dword ptr [ret_val], eax
}
return ret_val;
}
// return full timer value, *not* shifted by 8 bits
static U64 getCPUClockCount64()
{
U64 ret_val;
__asm
{
_emit 0x0f
_emit 0x31
mov eax,eax
mov edx,edx
mov dword ptr [ret_val+4], edx
mov dword ptr [ret_val], eax
}
return ret_val;
}
#else
//LL_COMMON_API U64 get_clock_count(); // in lltimer.cpp
// These use QueryPerformanceCounter, which is arguably fine and also works on AMD architectures.
static U32 getCPUClockCount32()
{
return (U32)(get_clock_count()>>8);
}
static U64 getCPUClockCount64()
{
return get_clock_count();
}
#endif
#endif
#if (LL_LINUX || LL_SOLARIS) && !(defined(__i386__) || defined(__amd64__))
//
// Linux and Solaris implementation of CPU clock - non-x86.
// This is accurate but SLOW! Only use out of desperation.
//
// Try to use the MONOTONIC clock if available, this is a constant time counter
// with nanosecond resolution (but not necessarily accuracy) and attempts are
// made to synchronize this value between cores at kernel start. It should not
// be affected by CPU frequency. If not available use the REALTIME clock, but
// this may be affected by NTP adjustments or other user activity affecting
// the system time.
static U64 getCPUClockCount64()
{
struct timespec tp;
#ifdef CLOCK_MONOTONIC // MONOTONIC supported at build-time?
if (-1 == clock_gettime(CLOCK_MONOTONIC,&tp)) // if MONOTONIC isn't supported at runtime then ouch, try REALTIME
#endif
clock_gettime(CLOCK_REALTIME,&tp);
return (tp.tv_sec*sClockResolution)+tp.tv_nsec;
}
static U32 getCPUClockCount32()
{
return (U32)(getCPUClockCount64() >> 8);
}
#endif // (LL_LINUX || LL_SOLARIS) && !(defined(__i386__) || defined(__amd64__))
#if (LL_LINUX || LL_SOLARIS || LL_DARWIN) && (defined(__i386__) || defined(__amd64__))
//
// Mac+Linux+Solaris FAST x86 implementation of CPU clock
static U32 getCPUClockCount32()
{
U64 x;
__asm__ volatile (".byte 0x0f, 0x31": "=A"(x));
return (U32)(x >> 8);
}
static U64 getCPUClockCount64()
{
U64 x;
__asm__ volatile (".byte 0x0f, 0x31": "=A"(x));
return x;
}
#endif
static U64 sClockResolution;
static S32 sCurFrameIndex;
static S32 sLastFrameIndex;
static U64 sLastFrameTime;
U32 mStartTime;
LLFastTimer::FrameState* mFrameState;
LLFastTimer::CurTimerData mLastTimerData;
};
typedef class LLFastTimer LLFastTimer;
#endif // LL_LLFASTTIMER_H

View File

@ -1,276 +0,0 @@
/**
* @file llfasttimer_class.h
* @brief Declaration of a fast timer.
*
* $LicenseInfo:firstyear=2004&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
#ifndef LL_FASTTIMER_CLASS_H
#define LL_FASTTIMER_CLASS_H
#include "llinstancetracker.h"
#define FAST_TIMER_ON 1
#define TIME_FAST_TIMERS 0
#define DEBUG_FAST_TIMER_THREADS 1
class LLMutex;
#include <queue>
#include "llsd.h"
LL_COMMON_API void assert_main_thread();
class LL_COMMON_API LLFastTimer
{
public:
class NamedTimer;
struct LL_COMMON_API FrameState
{
FrameState(NamedTimer* timerp);
U32 mSelfTimeCounter;
U32 mCalls;
FrameState* mParent; // info for caller timer
FrameState* mLastCaller; // used to bootstrap tree construction
NamedTimer* mTimer;
U16 mActiveCount; // number of timers with this ID active on stack
bool mMoveUpTree; // needs to be moved up the tree of timers at the end of frame
};
// stores a "named" timer instance to be reused via multiple LLFastTimer stack instances
class LL_COMMON_API NamedTimer
: public LLInstanceTracker<NamedTimer>
{
friend class DeclareTimer;
public:
~NamedTimer();
enum { HISTORY_NUM = 300 };
const std::string& getName() const { return mName; }
NamedTimer* getParent() const { return mParent; }
void setParent(NamedTimer* parent);
S32 getDepth();
std::string getToolTip(S32 history_index = -1);
typedef std::vector<NamedTimer*>::const_iterator child_const_iter;
child_const_iter beginChildren();
child_const_iter endChildren();
std::vector<NamedTimer*>& getChildren();
void setCollapsed(bool collapsed) { mCollapsed = collapsed; }
bool getCollapsed() const { return mCollapsed; }
U32 getCountAverage() const { return mCountAverage; }
U32 getCallAverage() const { return mCallAverage; }
U32 getHistoricalCount(S32 history_index = 0) const;
U32 getHistoricalCalls(S32 history_index = 0) const;
static NamedTimer& getRootNamedTimer();
S32 getFrameStateIndex() const { return mFrameStateIndex; }
FrameState& getFrameState() const;
private:
friend class LLFastTimer;
friend class NamedTimerFactory;
//
// methods
//
NamedTimer(const std::string& name);
// recursive call to gather total time from children
static void accumulateTimings();
// updates cumulative times and hierarchy,
// can be called multiple times in a frame, at any point
static void processTimes();
static void buildHierarchy();
static void resetFrame();
static void reset();
//
// members
//
S32 mFrameStateIndex;
std::string mName;
U32 mTotalTimeCounter;
U32 mCountAverage;
U32 mCallAverage;
U32* mCountHistory;
U32* mCallHistory;
// tree structure
NamedTimer* mParent; // NamedTimer of caller(parent)
std::vector<NamedTimer*> mChildren;
bool mCollapsed; // don't show children
bool mNeedsSorting; // sort children whenever child added
};
// used to statically declare a new named timer
class LL_COMMON_API DeclareTimer
: public LLInstanceTracker<DeclareTimer>
{
friend class LLFastTimer;
public:
DeclareTimer(const std::string& name, bool open);
DeclareTimer(const std::string& name);
static void updateCachedPointers();
private:
NamedTimer& mTimer;
FrameState* mFrameState;
};
public:
LLFastTimer(LLFastTimer::FrameState* state);
LL_FORCE_INLINE LLFastTimer(LLFastTimer::DeclareTimer& timer)
: mFrameState(timer.mFrameState)
{
#if TIME_FAST_TIMERS
U64 timer_start = getCPUClockCount64();
#endif
#if FAST_TIMER_ON
LLFastTimer::FrameState* frame_state = mFrameState;
mStartTime = getCPUClockCount32();
frame_state->mActiveCount++;
frame_state->mCalls++;
// keep current parent as long as it is active when we are
frame_state->mMoveUpTree |= (frame_state->mParent->mActiveCount == 0);
LLFastTimer::CurTimerData* cur_timer_data = &LLFastTimer::sCurTimerData;
mLastTimerData = *cur_timer_data;
cur_timer_data->mCurTimer = this;
cur_timer_data->mFrameState = frame_state;
cur_timer_data->mChildTime = 0;
#endif
#if TIME_FAST_TIMERS
U64 timer_end = getCPUClockCount64();
sTimerCycles += timer_end - timer_start;
#endif
#if DEBUG_FAST_TIMER_THREADS
#if !LL_RELEASE
assert_main_thread();
#endif
#endif
}
LL_FORCE_INLINE ~LLFastTimer()
{
#if TIME_FAST_TIMERS
U64 timer_start = getCPUClockCount64();
#endif
#if FAST_TIMER_ON
LLFastTimer::FrameState* frame_state = mFrameState;
U32 total_time = getCPUClockCount32() - mStartTime;
frame_state->mSelfTimeCounter += total_time - LLFastTimer::sCurTimerData.mChildTime;
frame_state->mActiveCount--;
// store last caller to bootstrap tree creation
// do this in the destructor in case of recursion to get topmost caller
frame_state->mLastCaller = mLastTimerData.mFrameState;
// we are only tracking self time, so subtract our total time delta from parents
mLastTimerData.mChildTime += total_time;
LLFastTimer::sCurTimerData = mLastTimerData;
#endif
#if TIME_FAST_TIMERS
U64 timer_end = getCPUClockCount64();
sTimerCycles += timer_end - timer_start;
sTimerCalls++;
#endif
}
public:
static LLMutex* sLogLock;
static std::queue<LLSD> sLogQueue;
static BOOL sLog;
static BOOL sMetricLog;
static std::string sLogName;
static bool sPauseHistory;
static bool sResetHistory;
static U64 sTimerCycles;
static U32 sTimerCalls;
typedef std::vector<FrameState> info_list_t;
static info_list_t& getFrameStateList();
// call this once a frame to reset timers
static void nextFrame();
// dumps current cumulative frame stats to log
// call nextFrame() to reset timers
static void dumpCurTimes();
// call this to reset timer hierarchy, averages, etc.
static void reset();
static U64 countsPerSecond();
static S32 getLastFrameIndex() { return sLastFrameIndex; }
static S32 getCurFrameIndex() { return sCurFrameIndex; }
static void writeLog(std::ostream& os);
static const NamedTimer* getTimerByName(const std::string& name);
struct CurTimerData
{
LLFastTimer* mCurTimer;
FrameState* mFrameState;
U32 mChildTime;
};
static CurTimerData sCurTimerData;
static std::string sClockType;
private:
static U32 getCPUClockCount32();
static U64 getCPUClockCount64();
static U64 sClockResolution;
static S32 sCurFrameIndex;
static S32 sLastFrameIndex;
static U64 sLastFrameTime;
static info_list_t* sTimerInfos;
U32 mStartTime;
LLFastTimer::FrameState* mFrameState;
LLFastTimer::CurTimerData mLastTimerData;
};
typedef class LLFastTimer LLFastTimer;
#endif // LL_LLFASTTIMER_CLASS_H

View File

@ -31,6 +31,7 @@
#include <vector>
#include <boost/function.hpp>
#include <boost/type_traits/is_convertible.hpp>
#include <boost/type_traits/is_enum.hpp>
#include <boost/unordered_map.hpp>
#include <boost/shared_ptr.hpp>
@ -209,9 +210,7 @@ namespace LLInitParam
class LL_COMMON_API Parser
{
LOG_CLASS(Parser);
public:
typedef std::vector<std::pair<std::string, bool> > name_stack_t;
typedef std::pair<name_stack_t::iterator, name_stack_t::iterator> name_stack_range_t;
typedef std::vector<std::string> possible_values_t;
@ -224,32 +223,81 @@ namespace LLInitParam
typedef std::map<const std::type_info*, parser_write_func_t> parser_write_func_map_t;
typedef std::map<const std::type_info*, parser_inspect_func_t> parser_inspect_func_map_t;
private:
template<typename T, bool is_enum = boost::is_enum<T>::value>
struct ReaderWriter
{
static bool read(T& param, Parser* parser)
{
parser_read_func_map_t::iterator found_it = parser->mParserReadFuncs->find(&typeid(T));
if (found_it != parser->mParserReadFuncs->end())
{
return found_it->second(*parser, (void*)&param);
}
return false;
}
static bool write(const T& param, Parser* parser, name_stack_t& name_stack)
{
parser_write_func_map_t::iterator found_it = parser->mParserWriteFuncs->find(&typeid(T));
if (found_it != parser->mParserWriteFuncs->end())
{
return found_it->second(*parser, (const void*)&param, name_stack);
}
return false;
}
};
// read enums as ints
template<typename T>
struct ReaderWriter<T, true>
{
static bool read(T& param, Parser* parser)
{
// read all enums as ints
parser_read_func_map_t::iterator found_it = parser->mParserReadFuncs->find(&typeid(S32));
if (found_it != parser->mParserReadFuncs->end())
{
S32 value;
if (found_it->second(*parser, (void*)&value))
{
param = (T)value;
return true;
}
}
return false;
}
static bool write(const T& param, Parser* parser, name_stack_t& name_stack)
{
parser_write_func_map_t::iterator found_it = parser->mParserWriteFuncs->find(&typeid(S32));
if (found_it != parser->mParserWriteFuncs->end())
{
return found_it->second(*parser, (const void*)&param, name_stack);
}
return false;
}
};
public:
Parser(parser_read_func_map_t& read_map, parser_write_func_map_t& write_map, parser_inspect_func_map_t& inspect_map)
: mParseSilently(false),
mParserReadFuncs(&read_map),
mParserWriteFuncs(&write_map),
mParserInspectFuncs(&inspect_map)
{}
virtual ~Parser();
template <typename T> bool readValue(T& param)
{
parser_read_func_map_t::iterator found_it = mParserReadFuncs->find(&typeid(T));
if (found_it != mParserReadFuncs->end())
{
return found_it->second(*this, (void*)&param);
}
return false;
return ReaderWriter<T>::read(param, this);
}
template <typename T> bool writeValue(const T& param, name_stack_t& name_stack)
{
parser_write_func_map_t::iterator found_it = mParserWriteFuncs->find(&typeid(T));
if (found_it != mParserWriteFuncs->end())
{
return found_it->second(*this, (const void*)&param, name_stack);
}
return false;
return ReaderWriter<T>::write(param, this, name_stack);
}
// dispatch inspection to registered inspection functions, for each parameter in a param block
@ -841,31 +889,25 @@ namespace LLInitParam
self_t& typed_param = static_cast<self_t&>(param);
// no further names in stack, attempt to parse value now
if (name_stack_range.first == name_stack_range.second)
{
if (parser.readValue(typed_param.getValue()))
{
std::string name;
// try to parse a known named value
if(name_value_lookup_t::valueNamesExist()
&& parser.readValue(name)
&& name_value_lookup_t::getValueFromName(name, typed_param.getValue()))
{
typed_param.setValueName(name);
typed_param.setProvided();
return true;
}
// try to read value directly
else if (parser.readValue(typed_param.getValue()))
{
typed_param.clearValueName();
typed_param.setProvided();
return true;
}
// try to parse a known named value
if(name_value_lookup_t::valueNamesExist())
{
// try to parse a known named value
std::string name;
if (parser.readValue(name))
{
// try to parse a per type named value
if (name_value_lookup_t::getValueFromName(name, typed_param.getValue()))
{
typed_param.setValueName(name);
typed_param.setProvided();
return true;
}
}
}
}
return false;
}
@ -987,30 +1029,29 @@ namespace LLInitParam
static bool deserializeParam(Param& param, Parser& parser, const Parser::name_stack_range_t& name_stack_range, bool new_name)
{
self_t& typed_param = static_cast<self_t&>(param);
// attempt to parse block...
if (name_stack_range.first == name_stack_range.second)
{ // try to parse a known named value
std::string name;
if(name_value_lookup_t::valueNamesExist()
&& parser.readValue(name)
&& name_value_lookup_t::getValueFromName(name, typed_param.getValue()))
{
typed_param.setValueName(name);
typed_param.setProvided();
return true;
}
}
if(typed_param.deserializeBlock(parser, name_stack_range, new_name))
{
{ // attempt to parse block...
typed_param.clearValueName();
typed_param.setProvided();
return true;
}
if(name_value_lookup_t::valueNamesExist())
{
// try to parse a known named value
std::string name;
if (parser.readValue(name))
{
// try to parse a per type named value
if (name_value_lookup_t::getValueFromName(name, typed_param.getValue()))
{
typed_param.setValueName(name);
typed_param.setProvided();
return true;
}
}
}
return false;
}
@ -1160,31 +1201,23 @@ namespace LLInitParam
value_t value;
// no further names in stack, attempt to parse value now
if (name_stack_range.first == name_stack_range.second)
{
// attempt to read value directly
if (parser.readValue(value))
{
std::string name;
// try to parse a known named value
if(name_value_lookup_t::valueNamesExist()
&& parser.readValue(name)
&& name_value_lookup_t::getValueFromName(name, value))
{
typed_param.add(value);
typed_param.mValues.back().setValueName(name);
return true;
}
else if (parser.readValue(value)) // attempt to read value directly
{
typed_param.add(value);
return true;
}
// try to parse a known named value
if(name_value_lookup_t::valueNamesExist())
{
// try to parse a known named value
std::string name;
if (parser.readValue(name))
{
// try to parse a per type named value
if (name_value_lookup_t::getValueFromName(name, value))
{
typed_param.add(value);
typed_param.mValues.back().setValueName(name);
return true;
}
}
}
}
return false;
}
@ -1362,28 +1395,27 @@ namespace LLInitParam
param_value_t& value = typed_param.mValues.back();
if (name_stack_range.first == name_stack_range.second)
{ // try to parse a known named value
std::string name;
if(name_value_lookup_t::valueNamesExist()
&& parser.readValue(name)
&& name_value_lookup_t::getValueFromName(name, value.getValue()))
{
typed_param.mValues.back().setValueName(name);
typed_param.setProvided();
return true;
}
}
// attempt to parse block...
if(value.deserializeBlock(parser, name_stack_range, new_name))
{
typed_param.setProvided();
return true;
}
else if(name_value_lookup_t::valueNamesExist())
{
// try to parse a known named value
std::string name;
if (parser.readValue(name))
{
// try to parse a per type named value
if (name_value_lookup_t::getValueFromName(name, value.getValue()))
{
typed_param.mValues.back().setValueName(name);
typed_param.setProvided();
return true;
}
}
}
if (new_value)
{ // failed to parse new value, pop it off

View File

@ -26,7 +26,9 @@
#ifndef LLMEMORY_H
#define LLMEMORY_H
#include "llmemtype.h"
#include "linden_common.h"
class LLMutex ;
#if LL_WINDOWS && LL_DEBUG
#define LL_CHECK_MEMORY llassert(_CrtCheckMemory());

View File

@ -1,232 +0,0 @@
/**
* @file llmemtype.cpp
* @brief Simple memory allocation/deallocation tracking stuff here
*
* $LicenseInfo:firstyear=2002&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
#include "llmemtype.h"
#include "llallocator.h"
std::vector<char const *> LLMemType::DeclareMemType::mNameList;
LLMemType::DeclareMemType LLMemType::MTYPE_INIT("Init");
LLMemType::DeclareMemType LLMemType::MTYPE_STARTUP("Startup");
LLMemType::DeclareMemType LLMemType::MTYPE_MAIN("Main");
LLMemType::DeclareMemType LLMemType::MTYPE_FRAME("Frame");
LLMemType::DeclareMemType LLMemType::MTYPE_GATHER_INPUT("GatherInput");
LLMemType::DeclareMemType LLMemType::MTYPE_JOY_KEY("JoyKey");
LLMemType::DeclareMemType LLMemType::MTYPE_IDLE("Idle");
LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_PUMP("IdlePump");
LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_NETWORK("IdleNetwork");
LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_UPDATE_REGIONS("IdleUpdateRegions");
LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_UPDATE_VIEWER_REGION("IdleUpdateViewerRegion");
LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_UPDATE_SURFACE("IdleUpdateSurface");
LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_UPDATE_PARCEL_OVERLAY("IdleUpdateParcelOverlay");
LLMemType::DeclareMemType LLMemType::MTYPE_IDLE_AUDIO("IdleAudio");
LLMemType::DeclareMemType LLMemType::MTYPE_CACHE_PROCESS_PENDING("CacheProcessPending");
LLMemType::DeclareMemType LLMemType::MTYPE_CACHE_PROCESS_PENDING_ASKS("CacheProcessPendingAsks");
LLMemType::DeclareMemType LLMemType::MTYPE_CACHE_PROCESS_PENDING_REPLIES("CacheProcessPendingReplies");
LLMemType::DeclareMemType LLMemType::MTYPE_MESSAGE_CHECK_ALL("MessageCheckAll");
LLMemType::DeclareMemType LLMemType::MTYPE_MESSAGE_PROCESS_ACKS("MessageProcessAcks");
LLMemType::DeclareMemType LLMemType::MTYPE_RENDER("Render");
LLMemType::DeclareMemType LLMemType::MTYPE_SLEEP("Sleep");
LLMemType::DeclareMemType LLMemType::MTYPE_NETWORK("Network");
LLMemType::DeclareMemType LLMemType::MTYPE_PHYSICS("Physics");
LLMemType::DeclareMemType LLMemType::MTYPE_INTERESTLIST("InterestList");
LLMemType::DeclareMemType LLMemType::MTYPE_IMAGEBASE("ImageBase");
LLMemType::DeclareMemType LLMemType::MTYPE_IMAGERAW("ImageRaw");
LLMemType::DeclareMemType LLMemType::MTYPE_IMAGEFORMATTED("ImageFormatted");
LLMemType::DeclareMemType LLMemType::MTYPE_APPFMTIMAGE("AppFmtImage");
LLMemType::DeclareMemType LLMemType::MTYPE_APPRAWIMAGE("AppRawImage");
LLMemType::DeclareMemType LLMemType::MTYPE_APPAUXRAWIMAGE("AppAuxRawImage");
LLMemType::DeclareMemType LLMemType::MTYPE_DRAWABLE("Drawable");
LLMemType::DeclareMemType LLMemType::MTYPE_OBJECT("Object");
LLMemType::DeclareMemType LLMemType::MTYPE_OBJECT_PROCESS_UPDATE("ObjectProcessUpdate");
LLMemType::DeclareMemType LLMemType::MTYPE_OBJECT_PROCESS_UPDATE_CORE("ObjectProcessUpdateCore");
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY("Display");
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_UPDATE("DisplayUpdate");
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_UPDATE_CAMERA("DisplayUpdateCam");
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_UPDATE_GEOM("DisplayUpdateGeom");
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_SWAP("DisplaySwap");
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_UPDATE_HUD("DisplayUpdateHud");
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_GEN_REFLECTION("DisplayGenRefl");
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_IMAGE_UPDATE("DisplayImageUpdate");
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_STATE_SORT("DisplayStateSort");
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_SKY("DisplaySky");
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_RENDER_GEOM("DisplayRenderGeom");
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_RENDER_FLUSH("DisplayRenderFlush");
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_RENDER_UI("DisplayRenderUI");
LLMemType::DeclareMemType LLMemType::MTYPE_DISPLAY_RENDER_ATTACHMENTS("DisplayRenderAttach");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_DATA("VertexData");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_CONSTRUCTOR("VertexConstr");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_DESTRUCTOR("VertexDestr");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_CREATE_VERTICES("VertexCreateVerts");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_CREATE_INDICES("VertexCreateIndices");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_DESTROY_BUFFER("VertexDestroyBuff");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_DESTROY_INDICES("VertexDestroyIndices");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_UPDATE_VERTS("VertexUpdateVerts");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_UPDATE_INDICES("VertexUpdateIndices");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_ALLOCATE_BUFFER("VertexAllocateBuffer");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_RESIZE_BUFFER("VertexResizeBuffer");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_MAP_BUFFER("VertexMapBuffer");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_MAP_BUFFER_VERTICES("VertexMapBufferVerts");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_MAP_BUFFER_INDICES("VertexMapBufferIndices");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_UNMAP_BUFFER("VertexUnmapBuffer");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_SET_STRIDE("VertexSetStride");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_SET_BUFFER("VertexSetBuffer");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_SETUP_VERTEX_BUFFER("VertexSetupVertBuff");
LLMemType::DeclareMemType LLMemType::MTYPE_VERTEX_CLEANUP_CLASS("VertexCleanupClass");
LLMemType::DeclareMemType LLMemType::MTYPE_SPACE_PARTITION("SpacePartition");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE("Pipeline");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_INIT("PipelineInit");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_CREATE_BUFFERS("PipelineCreateBuffs");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RESTORE_GL("PipelineRestroGL");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_UNLOAD_SHADERS("PipelineUnloadShaders");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_LIGHTING_DETAIL("PipelineLightingDetail");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_GET_POOL_TYPE("PipelineGetPoolType");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_ADD_POOL("PipelineAddPool");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_ALLOCATE_DRAWABLE("PipelineAllocDrawable");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_ADD_OBJECT("PipelineAddObj");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_CREATE_OBJECTS("PipelineCreateObjs");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_UPDATE_MOVE("PipelineUpdateMove");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_UPDATE_GEOM("PipelineUpdateGeom");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_MARK_VISIBLE("PipelineMarkVisible");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_MARK_MOVED("PipelineMarkMoved");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_MARK_SHIFT("PipelineMarkShift");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_SHIFT_OBJECTS("PipelineShiftObjs");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_MARK_TEXTURED("PipelineMarkTextured");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_MARK_REBUILD("PipelineMarkRebuild");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_UPDATE_CULL("PipelineUpdateCull");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_STATE_SORT("PipelineStateSort");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_POST_SORT("PipelinePostSort");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_HUD_ELS("PipelineHudEls");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_HL("PipelineRenderHL");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_GEOM("PipelineRenderGeom");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_GEOM_DEFFERRED("PipelineRenderGeomDef");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_GEOM_POST_DEF("PipelineRenderGeomPostDef");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_GEOM_SHADOW("PipelineRenderGeomShadow");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_SELECT("PipelineRenderSelect");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_REBUILD_POOLS("PipelineRebuildPools");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_QUICK_LOOKUP("PipelineQuickLookup");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_OBJECTS("PipelineRenderObjs");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_GENERATE_IMPOSTOR("PipelineGenImpostors");
LLMemType::DeclareMemType LLMemType::MTYPE_PIPELINE_RENDER_BLOOM("PipelineRenderBloom");
LLMemType::DeclareMemType LLMemType::MTYPE_UPKEEP_POOLS("UpkeepPools");
LLMemType::DeclareMemType LLMemType::MTYPE_AVATAR("Avatar");
LLMemType::DeclareMemType LLMemType::MTYPE_AVATAR_MESH("AvatarMesh");
LLMemType::DeclareMemType LLMemType::MTYPE_PARTICLES("Particles");
LLMemType::DeclareMemType LLMemType::MTYPE_REGIONS("Regions");
LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY("Inventory");
LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_DRAW("InventoryDraw");
LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_BUILD_NEW_VIEWS("InventoryBuildNewViews");
LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_DO_FOLDER("InventoryDoFolder");
LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_POST_BUILD("InventoryPostBuild");
LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_FROM_XML("InventoryFromXML");
LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_CREATE_NEW_ITEM("InventoryCreateNewItem");
LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_VIEW_INIT("InventoryViewInit");
LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_VIEW_SHOW("InventoryViewShow");
LLMemType::DeclareMemType LLMemType::MTYPE_INVENTORY_VIEW_TOGGLE("InventoryViewToggle");
LLMemType::DeclareMemType LLMemType::MTYPE_ANIMATION("Animation");
LLMemType::DeclareMemType LLMemType::MTYPE_VOLUME("Volume");
LLMemType::DeclareMemType LLMemType::MTYPE_PRIMITIVE("Primitive");
LLMemType::DeclareMemType LLMemType::MTYPE_SCRIPT("Script");
LLMemType::DeclareMemType LLMemType::MTYPE_SCRIPT_RUN("ScriptRun");
LLMemType::DeclareMemType LLMemType::MTYPE_SCRIPT_BYTECODE("ScriptByteCode");
LLMemType::DeclareMemType LLMemType::MTYPE_IO_PUMP("IoPump");
LLMemType::DeclareMemType LLMemType::MTYPE_IO_TCP("IoTCP");
LLMemType::DeclareMemType LLMemType::MTYPE_IO_BUFFER("IoBuffer");
LLMemType::DeclareMemType LLMemType::MTYPE_IO_HTTP_SERVER("IoHttpServer");
LLMemType::DeclareMemType LLMemType::MTYPE_IO_SD_SERVER("IoSDServer");
LLMemType::DeclareMemType LLMemType::MTYPE_IO_SD_CLIENT("IoSDClient");
LLMemType::DeclareMemType LLMemType::MTYPE_IO_URL_REQUEST("IOUrlRequest");
LLMemType::DeclareMemType LLMemType::MTYPE_DIRECTX_INIT("DirectXInit");
LLMemType::DeclareMemType LLMemType::MTYPE_TEMP1("Temp1");
LLMemType::DeclareMemType LLMemType::MTYPE_TEMP2("Temp2");
LLMemType::DeclareMemType LLMemType::MTYPE_TEMP3("Temp3");
LLMemType::DeclareMemType LLMemType::MTYPE_TEMP4("Temp4");
LLMemType::DeclareMemType LLMemType::MTYPE_TEMP5("Temp5");
LLMemType::DeclareMemType LLMemType::MTYPE_TEMP6("Temp6");
LLMemType::DeclareMemType LLMemType::MTYPE_TEMP7("Temp7");
LLMemType::DeclareMemType LLMemType::MTYPE_TEMP8("Temp8");
LLMemType::DeclareMemType LLMemType::MTYPE_TEMP9("Temp9");
LLMemType::DeclareMemType LLMemType::MTYPE_OTHER("Other");
LLMemType::DeclareMemType::DeclareMemType(char const * st)
{
mID = (S32)mNameList.size();
mName = st;
mNameList.push_back(mName);
}
LLMemType::DeclareMemType::~DeclareMemType()
{
}
LLMemType::LLMemType(LLMemType::DeclareMemType& dt)
{
mTypeIndex = dt.mID;
LLAllocator::pushMemType(dt.mID);
}
LLMemType::~LLMemType()
{
LLAllocator::popMemType();
}
char const * LLMemType::getNameFromID(S32 id)
{
if (id < 0 || id >= (S32)DeclareMemType::mNameList.size())
{
return "INVALID";
}
return DeclareMemType::mNameList[id];
}
//--------------------------------------------------------------------------------------------------

View File

@ -1,242 +0,0 @@
/**
* @file llmemtype.h
* @brief Runtime memory usage debugging utilities.
*
* $LicenseInfo:firstyear=2005&license=viewerlgpl$
* Second Life Viewer Source Code
* Copyright (C) 2010, Linden Research, Inc.
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation;
* version 2.1 of the License only.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
*
* Linden Research, Inc., 945 Battery Street, San Francisco, CA 94111 USA
* $/LicenseInfo$
*/
#ifndef LL_MEMTYPE_H
#define LL_MEMTYPE_H
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
//----------------------------------------------------------------------------
#include "linden_common.h"
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
// WARNING: Never commit with MEM_TRACK_MEM == 1
//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
#define MEM_TRACK_MEM (0 && LL_WINDOWS)
#include <vector>
#define MEM_TYPE_NEW(T)
class LL_COMMON_API LLMemType
{
public:
// class we'll initialize all instances of as
// static members of MemType. Then use
// to construct any new mem type.
class LL_COMMON_API DeclareMemType
{
public:
DeclareMemType(char const * st);
~DeclareMemType();
S32 mID;
char const * mName;
// array so we can map an index ID to Name
static std::vector<char const *> mNameList;
};
LLMemType(DeclareMemType& dt);
~LLMemType();
static char const * getNameFromID(S32 id);
static DeclareMemType MTYPE_INIT;
static DeclareMemType MTYPE_STARTUP;
static DeclareMemType MTYPE_MAIN;
static DeclareMemType MTYPE_FRAME;
static DeclareMemType MTYPE_GATHER_INPUT;
static DeclareMemType MTYPE_JOY_KEY;
static DeclareMemType MTYPE_IDLE;
static DeclareMemType MTYPE_IDLE_PUMP;
static DeclareMemType MTYPE_IDLE_NETWORK;
static DeclareMemType MTYPE_IDLE_UPDATE_REGIONS;
static DeclareMemType MTYPE_IDLE_UPDATE_VIEWER_REGION;
static DeclareMemType MTYPE_IDLE_UPDATE_SURFACE;
static DeclareMemType MTYPE_IDLE_UPDATE_PARCEL_OVERLAY;
static DeclareMemType MTYPE_IDLE_AUDIO;
static DeclareMemType MTYPE_CACHE_PROCESS_PENDING;
static DeclareMemType MTYPE_CACHE_PROCESS_PENDING_ASKS;
static DeclareMemType MTYPE_CACHE_PROCESS_PENDING_REPLIES;
static DeclareMemType MTYPE_MESSAGE_CHECK_ALL;
static DeclareMemType MTYPE_MESSAGE_PROCESS_ACKS;
static DeclareMemType MTYPE_RENDER;
static DeclareMemType MTYPE_SLEEP;
static DeclareMemType MTYPE_NETWORK;
static DeclareMemType MTYPE_PHYSICS;
static DeclareMemType MTYPE_INTERESTLIST;
static DeclareMemType MTYPE_IMAGEBASE;
static DeclareMemType MTYPE_IMAGERAW;
static DeclareMemType MTYPE_IMAGEFORMATTED;
static DeclareMemType MTYPE_APPFMTIMAGE;
static DeclareMemType MTYPE_APPRAWIMAGE;
static DeclareMemType MTYPE_APPAUXRAWIMAGE;
static DeclareMemType MTYPE_DRAWABLE;
static DeclareMemType MTYPE_OBJECT;
static DeclareMemType MTYPE_OBJECT_PROCESS_UPDATE;
static DeclareMemType MTYPE_OBJECT_PROCESS_UPDATE_CORE;
static DeclareMemType MTYPE_DISPLAY;
static DeclareMemType MTYPE_DISPLAY_UPDATE;
static DeclareMemType MTYPE_DISPLAY_UPDATE_CAMERA;
static DeclareMemType MTYPE_DISPLAY_UPDATE_GEOM;
static DeclareMemType MTYPE_DISPLAY_SWAP;
static DeclareMemType MTYPE_DISPLAY_UPDATE_HUD;
static DeclareMemType MTYPE_DISPLAY_GEN_REFLECTION;
static DeclareMemType MTYPE_DISPLAY_IMAGE_UPDATE;
static DeclareMemType MTYPE_DISPLAY_STATE_SORT;
static DeclareMemType MTYPE_DISPLAY_SKY;
static DeclareMemType MTYPE_DISPLAY_RENDER_GEOM;
static DeclareMemType MTYPE_DISPLAY_RENDER_FLUSH;
static DeclareMemType MTYPE_DISPLAY_RENDER_UI;
static DeclareMemType MTYPE_DISPLAY_RENDER_ATTACHMENTS;
static DeclareMemType MTYPE_VERTEX_DATA;
static DeclareMemType MTYPE_VERTEX_CONSTRUCTOR;
static DeclareMemType MTYPE_VERTEX_DESTRUCTOR;
static DeclareMemType MTYPE_VERTEX_CREATE_VERTICES;
static DeclareMemType MTYPE_VERTEX_CREATE_INDICES;
static DeclareMemType MTYPE_VERTEX_DESTROY_BUFFER;
static DeclareMemType MTYPE_VERTEX_DESTROY_INDICES;
static DeclareMemType MTYPE_VERTEX_UPDATE_VERTS;
static DeclareMemType MTYPE_VERTEX_UPDATE_INDICES;
static DeclareMemType MTYPE_VERTEX_ALLOCATE_BUFFER;
static DeclareMemType MTYPE_VERTEX_RESIZE_BUFFER;
static DeclareMemType MTYPE_VERTEX_MAP_BUFFER;
static DeclareMemType MTYPE_VERTEX_MAP_BUFFER_VERTICES;
static DeclareMemType MTYPE_VERTEX_MAP_BUFFER_INDICES;
static DeclareMemType MTYPE_VERTEX_UNMAP_BUFFER;
static DeclareMemType MTYPE_VERTEX_SET_STRIDE;
static DeclareMemType MTYPE_VERTEX_SET_BUFFER;
static DeclareMemType MTYPE_VERTEX_SETUP_VERTEX_BUFFER;
static DeclareMemType MTYPE_VERTEX_CLEANUP_CLASS;
static DeclareMemType MTYPE_SPACE_PARTITION;
static DeclareMemType MTYPE_PIPELINE;
static DeclareMemType MTYPE_PIPELINE_INIT;
static DeclareMemType MTYPE_PIPELINE_CREATE_BUFFERS;
static DeclareMemType MTYPE_PIPELINE_RESTORE_GL;
static DeclareMemType MTYPE_PIPELINE_UNLOAD_SHADERS;
static DeclareMemType MTYPE_PIPELINE_LIGHTING_DETAIL;
static DeclareMemType MTYPE_PIPELINE_GET_POOL_TYPE;
static DeclareMemType MTYPE_PIPELINE_ADD_POOL;
static DeclareMemType MTYPE_PIPELINE_ALLOCATE_DRAWABLE;
static DeclareMemType MTYPE_PIPELINE_ADD_OBJECT;
static DeclareMemType MTYPE_PIPELINE_CREATE_OBJECTS;
static DeclareMemType MTYPE_PIPELINE_UPDATE_MOVE;
static DeclareMemType MTYPE_PIPELINE_UPDATE_GEOM;
static DeclareMemType MTYPE_PIPELINE_MARK_VISIBLE;
static DeclareMemType MTYPE_PIPELINE_MARK_MOVED;
static DeclareMemType MTYPE_PIPELINE_MARK_SHIFT;
static DeclareMemType MTYPE_PIPELINE_SHIFT_OBJECTS;
static DeclareMemType MTYPE_PIPELINE_MARK_TEXTURED;
static DeclareMemType MTYPE_PIPELINE_MARK_REBUILD;
static DeclareMemType MTYPE_PIPELINE_UPDATE_CULL;
static DeclareMemType MTYPE_PIPELINE_STATE_SORT;
static DeclareMemType MTYPE_PIPELINE_POST_SORT;
static DeclareMemType MTYPE_PIPELINE_RENDER_HUD_ELS;
static DeclareMemType MTYPE_PIPELINE_RENDER_HL;
static DeclareMemType MTYPE_PIPELINE_RENDER_GEOM;
static DeclareMemType MTYPE_PIPELINE_RENDER_GEOM_DEFFERRED;
static DeclareMemType MTYPE_PIPELINE_RENDER_GEOM_POST_DEF;
static DeclareMemType MTYPE_PIPELINE_RENDER_GEOM_SHADOW;
static DeclareMemType MTYPE_PIPELINE_RENDER_SELECT;
static DeclareMemType MTYPE_PIPELINE_REBUILD_POOLS;
static DeclareMemType MTYPE_PIPELINE_QUICK_LOOKUP;
static DeclareMemType MTYPE_PIPELINE_RENDER_OBJECTS;
static DeclareMemType MTYPE_PIPELINE_GENERATE_IMPOSTOR;
static DeclareMemType MTYPE_PIPELINE_RENDER_BLOOM;
static DeclareMemType MTYPE_UPKEEP_POOLS;
static DeclareMemType MTYPE_AVATAR;
static DeclareMemType MTYPE_AVATAR_MESH;
static DeclareMemType MTYPE_PARTICLES;
static DeclareMemType MTYPE_REGIONS;
static DeclareMemType MTYPE_INVENTORY;
static DeclareMemType MTYPE_INVENTORY_DRAW;
static DeclareMemType MTYPE_INVENTORY_BUILD_NEW_VIEWS;
static DeclareMemType MTYPE_INVENTORY_DO_FOLDER;
static DeclareMemType MTYPE_INVENTORY_POST_BUILD;
static DeclareMemType MTYPE_INVENTORY_FROM_XML;
static DeclareMemType MTYPE_INVENTORY_CREATE_NEW_ITEM;
static DeclareMemType MTYPE_INVENTORY_VIEW_INIT;
static DeclareMemType MTYPE_INVENTORY_VIEW_SHOW;
static DeclareMemType MTYPE_INVENTORY_VIEW_TOGGLE;
static DeclareMemType MTYPE_ANIMATION;
static DeclareMemType MTYPE_VOLUME;
static DeclareMemType MTYPE_PRIMITIVE;
static DeclareMemType MTYPE_SCRIPT;
static DeclareMemType MTYPE_SCRIPT_RUN;
static DeclareMemType MTYPE_SCRIPT_BYTECODE;
static DeclareMemType MTYPE_IO_PUMP;
static DeclareMemType MTYPE_IO_TCP;
static DeclareMemType MTYPE_IO_BUFFER;
static DeclareMemType MTYPE_IO_HTTP_SERVER;
static DeclareMemType MTYPE_IO_SD_SERVER;
static DeclareMemType MTYPE_IO_SD_CLIENT;
static DeclareMemType MTYPE_IO_URL_REQUEST;
static DeclareMemType MTYPE_DIRECTX_INIT;
static DeclareMemType MTYPE_TEMP1;
static DeclareMemType MTYPE_TEMP2;
static DeclareMemType MTYPE_TEMP3;
static DeclareMemType MTYPE_TEMP4;
static DeclareMemType MTYPE_TEMP5;
static DeclareMemType MTYPE_TEMP6;
static DeclareMemType MTYPE_TEMP7;
static DeclareMemType MTYPE_TEMP8;
static DeclareMemType MTYPE_TEMP9;
static DeclareMemType MTYPE_OTHER; // Special; used by display code
S32 mTypeIndex;
};
//----------------------------------------------------------------------------
#endif

File diff suppressed because it is too large Load Diff

View File

@ -27,294 +27,46 @@
#ifndef LL_LLSTAT_H
#define LL_LLSTAT_H
#include <deque>
#include <map>
#include "lltimer.h"
#include "llframetimer.h"
#include "llfile.h"
class LLSD;
// Set this if longer stats are needed
#define ENABLE_LONG_TIME_STATS 0
//
// Accumulates statistics for an arbitrary length of time.
// Does this by maintaining a chain of accumulators, each one
// accumulation the results of the parent. Can scale to arbitrary
// amounts of time with very low memory cost.
//
class LL_COMMON_API LLStatAccum
{
protected:
LLStatAccum(bool use_frame_timer);
virtual ~LLStatAccum();
public:
enum TimeScale {
SCALE_100MS,
SCALE_SECOND,
SCALE_MINUTE,
#if ENABLE_LONG_TIME_STATS
SCALE_HOUR,
SCALE_DAY,
SCALE_WEEK,
#endif
NUM_SCALES, // Use to size storage arrays
SCALE_PER_FRAME // For latest frame information - should be after NUM_SCALES since this doesn't go into the time buckets
};
static U64 sScaleTimes[NUM_SCALES];
virtual F32 meanValue(TimeScale scale) const;
// see the subclasses for the specific meaning of value
F32 meanValueOverLast100ms() const { return meanValue(SCALE_100MS); }
F32 meanValueOverLastSecond() const { return meanValue(SCALE_SECOND); }
F32 meanValueOverLastMinute() const { return meanValue(SCALE_MINUTE); }
void reset(U64 when);
void sum(F64 value);
void sum(F64 value, U64 when);
U64 getCurrentUsecs() const;
// Get current microseconds based on timer type
BOOL mUseFrameTimer;
BOOL mRunning;
U64 mLastTime;
struct Bucket
{
Bucket() :
accum(0.0),
endTime(0),
lastValid(false),
lastAccum(0.0)
{}
F64 accum;
U64 endTime;
bool lastValid;
F64 lastAccum;
};
Bucket mBuckets[NUM_SCALES];
BOOL mLastSampleValid;
F64 mLastSampleValue;
};
class LL_COMMON_API LLStatMeasure : public LLStatAccum
// gathers statistics about things that are measured
// ex.: tempature, time dilation
{
public:
LLStatMeasure(bool use_frame_timer = true);
void sample(F64);
void sample(S32 v) { sample((F64)v); }
void sample(U32 v) { sample((F64)v); }
void sample(S64 v) { sample((F64)v); }
void sample(U64 v) { sample((F64)v); }
};
class LL_COMMON_API LLStatRate : public LLStatAccum
// gathers statistics about things that can be counted over time
// ex.: LSL instructions executed, messages sent, simulator frames completed
// renders it in terms of rate of thing per second
{
public:
LLStatRate(bool use_frame_timer = true);
void count(U32);
// used to note that n items have occured
void mark();
// used for counting the rate thorugh a point in the code
};
class LL_COMMON_API LLStatTime : public LLStatAccum
// gathers statistics about time spent in a block of code
// measure average duration per second in the block
{
public:
LLStatTime( const std::string & key = "undefined" );
U32 mFrameNumber; // Current frame number
U64 mTotalTimeInFrame; // Total time (microseconds) accumulated during the last frame
void setKey( const std::string & key ) { mKey = key; };
virtual F32 meanValue(TimeScale scale) const;
private:
void start(); // Start and stop measuring time block
void stop();
std::string mKey; // Tag representing this time block
#if LL_DEBUG
BOOL mRunning; // TRUE if start() has been called
#endif
friend class LLPerfBlock;
};
// ----------------------------------------------------------------------------
// Use this class on the stack to record statistics about an area of code
class LL_COMMON_API LLPerfBlock
{
public:
struct StatEntry
{
StatEntry(const std::string& key) : mStat(LLStatTime(key)), mCount(0) {}
LLStatTime mStat;
U32 mCount;
};
typedef std::map<std::string, StatEntry*> stat_map_t;
// Use this constructor for pre-defined LLStatTime objects
LLPerfBlock(LLStatTime* stat);
// Use this constructor for normal, optional LLPerfBlock time slices
LLPerfBlock( const char* key );
// Use this constructor for dynamically created LLPerfBlock time slices
// that are only enabled by specific control flags
LLPerfBlock( const char* key1, const char* key2, S32 flags = LLSTATS_BASIC_STATS );
~LLPerfBlock();
enum
{ // Stats bitfield flags
LLSTATS_NO_OPTIONAL_STATS = 0x00, // No optional stats gathering, just pre-defined LLStatTime objects
LLSTATS_BASIC_STATS = 0x01, // Gather basic optional runtime stats
LLSTATS_SCRIPT_FUNCTIONS = 0x02, // Include LSL function calls
};
static void setStatsFlags( S32 flags ) { sStatsFlags = flags; };
static S32 getStatsFlags() { return sStatsFlags; };
static void clearDynamicStats(); // Reset maps to clear out dynamic objects
static void addStatsToLLSDandReset( LLSD & stats, // Get current information and clear time bin
LLStatAccum::TimeScale scale );
private:
// Initialize dynamically created LLStatTime objects
void initDynamicStat(const std::string& key);
std::string mLastPath; // Save sCurrentStatPath when this is called
LLStatTime * mPredefinedStat; // LLStatTime object to get data
StatEntry * mDynamicStat; // StatEntryobject to get data
static S32 sStatsFlags; // Control what is being recorded
static stat_map_t sStatMap; // Map full path string to LLStatTime objects
static std::string sCurrentStatPath; // Something like "frame/physics/physics step"
};
// ----------------------------------------------------------------------------
class LL_COMMON_API LLPerfStats
{
public:
LLPerfStats(const std::string& process_name = "unknown", S32 process_pid = 0);
virtual ~LLPerfStats();
virtual void init(); // Reset and start all stat timers
virtual void updatePerFrameStats();
// Override these function to add process-specific information to the performance log header and per-frame logging.
virtual void addProcessHeaderInfo(LLSD& info) { /* not implemented */ }
virtual void addProcessFrameInfo(LLSD& info, LLStatAccum::TimeScale scale) { /* not implemented */ }
// High-resolution frame stats
BOOL frameStatsIsRunning() { return (mReportPerformanceStatEnd > 0.); };
F32 getReportPerformanceInterval() const { return mReportPerformanceStatInterval; };
void setReportPerformanceInterval( F32 interval ) { mReportPerformanceStatInterval = interval; };
void setReportPerformanceDuration( F32 seconds, S32 flags = LLPerfBlock::LLSTATS_NO_OPTIONAL_STATS );
void setProcessName(const std::string& process_name) { mProcessName = process_name; }
void setProcessPID(S32 process_pid) { mProcessPID = process_pid; }
protected:
void openPerfStatsFile(); // Open file for high resolution metrics logging
void dumpIntervalPerformanceStats();
llofstream mFrameStatsFile; // File for per-frame stats
BOOL mFrameStatsFileFailure; // Flag to prevent repeat opening attempts
BOOL mSkipFirstFrameStats; // Flag to skip one (partial) frame report
std::string mProcessName;
S32 mProcessPID;
private:
F32 mReportPerformanceStatInterval; // Seconds between performance stats
F64 mReportPerformanceStatEnd; // End time (seconds) for performance stats
};
// ----------------------------------------------------------------------------
class LL_COMMON_API LLStat
{
private:
typedef std::multimap<std::string, LLStat*> stat_map_t;
void init();
static stat_map_t& getStatList();
public:
LLStat(U32 num_bins = 32, BOOL use_frame_timer = FALSE);
LLStat(std::string name, U32 num_bins = 32, BOOL use_frame_timer = FALSE);
LLStat(std::string name = std::string(), S32 num_bins = 32, BOOL use_frame_timer = FALSE);
~LLStat();
void reset();
void start(); // Start the timer for the current "frame", otherwise uses the time tracked from
// the last addValue
void reset();
void addValue(const F32 value = 1.f); // Adds the current value being tracked, and tracks the DT.
void addValue(const S32 value) { addValue((F32)value); }
void addValue(const U32 value) { addValue((F32)value); }
void setBeginTime(const F64 time);
void addValueTime(const F64 time, const F32 value = 1.f);
S32 getCurBin() const;
S32 getNextBin() const;
F32 getCurrent() const;
F32 getCurrentPerSec() const;
F64 getCurrentBeginTime() const;
F64 getCurrentTime() const;
F32 getCurrentDuration() const;
F32 getPrev(S32 age) const; // Age is how many "addValues" previously - zero is current
F32 getPrevPerSec(S32 age) const; // Age is how many "addValues" previously - zero is current
F64 getPrevBeginTime(S32 age) const;
F64 getPrevTime(S32 age) const;
F32 getBin(S32 bin) const;
F32 getBinPerSec(S32 bin) const;
F64 getBinBeginTime(S32 bin) const;
F64 getBinTime(S32 bin) const;
F32 getMax() const;
F32 getMaxPerSec() const;
F32 getCurrent() const;
F32 getCurrentPerSec() const;
F32 getMin() const;
F32 getMinPerSec() const;
F32 getMean() const;
F32 getMeanPerSec() const;
F32 getMeanDuration() const;
F32 getMin() const;
F32 getMinPerSec() const;
F32 getMinDuration() const;
F32 getSum() const;
F32 getSumDuration() const;
F32 getMax() const;
F32 getMaxPerSec() const;
U32 getNumValues() const;
S32 getNumBins() const;
@ -326,10 +78,21 @@ private:
U32 mNumBins;
F32 mLastValue;
F64 mLastTime;
F32 *mBins;
F64 *mBeginTime;
F64 *mTime;
F32 *mDT;
struct ValueEntry
{
ValueEntry()
: mValue(0.f),
mBeginTime(0.0),
mTime(0.0),
mDT(0.f)
{}
F32 mValue;
F64 mBeginTime;
F64 mTime;
F32 mDT;
};
ValueEntry* mBins;
S32 mCurBin;
S32 mNextBin;

View File

@ -44,10 +44,16 @@
#include "llmd5.h"
#include "llstring.h"
#include "lltimer.h"
#include "llthread.h"
const LLUUID LLUUID::null;
const LLTransactionID LLTransactionID::tnull;
// static
LLMutex * LLUUID::mMutex = NULL;
/*
NOT DONE YET!!!
@ -734,6 +740,7 @@ void LLUUID::getCurrentTime(uuid_time_t *timestamp)
getSystemTime(&time_last);
uuids_this_tick = uuids_per_tick;
init = TRUE;
mMutex = new LLMutex(NULL);
}
uuid_time_t time_now = {0,0};
@ -785,6 +792,7 @@ void LLUUID::generate()
#endif
if (!has_init)
{
has_init = 1;
if (getNodeID(node_id) <= 0)
{
get_random_bytes(node_id, 6);
@ -806,18 +814,24 @@ void LLUUID::generate()
#else
clock_seq = (U16)ll_rand(65536);
#endif
has_init = 1;
}
// get current time
getCurrentTime(&timestamp);
U16 our_clock_seq = clock_seq;
// if clock went backward change clockseq
if (cmpTime(&timestamp, &time_last) == -1) {
// if clock hasn't changed or went backward, change clockseq
if (cmpTime(&timestamp, &time_last) != 1)
{
LLMutexLock lock(mMutex);
clock_seq = (clock_seq + 1) & 0x3FFF;
if (clock_seq == 0) clock_seq++;
if (clock_seq == 0)
clock_seq++;
our_clock_seq = clock_seq; // Ensure we're using a different clock_seq value from previous time
}
time_last = timestamp;
memcpy(mData+10, node_id, 6); /* Flawfinder: ignore */
U32 tmp;
tmp = timestamp.low;
@ -839,7 +853,8 @@ void LLUUID::generate()
tmp >>= 8;
mData[6] = (unsigned char) tmp;
tmp = clock_seq;
tmp = our_clock_seq;
mData[9] = (unsigned char) tmp;
tmp >>= 8;
mData[8] = (unsigned char) tmp;
@ -849,8 +864,6 @@ void LLUUID::generate()
md5_uuid.update(mData,16);
md5_uuid.finalize();
md5_uuid.raw_digest(mData);
time_last = timestamp;
}
void LLUUID::generate(const std::string& hash_string)
@ -864,8 +877,14 @@ U32 LLUUID::getRandomSeed()
static unsigned char seed[16]; /* Flawfinder: ignore */
getNodeID(&seed[0]);
seed[6]='\0';
seed[7]='\0';
// Incorporate the pid into the seed to prevent
// processes that start on the same host at the same
// time from generating the same seed.
pid_t pid = LLApp::getPid();
seed[6]=(unsigned char)(pid >> 8);
seed[7]=(unsigned char)(pid);
getSystemTime((uuid_time_t *)(&seed[8]));
LLMD5 md5_seed;

View File

@ -31,6 +31,8 @@
#include "stdtypes.h"
#include "llpreprocessor.h"
class LLMutex;
const S32 UUID_BYTES = 16;
const S32 UUID_WORDS = 4;
const S32 UUID_STR_LENGTH = 37; // actually wrong, should be 36 and use size below
@ -118,6 +120,7 @@ public:
static BOOL validate(const std::string& in_string); // Validate that the UUID string is legal.
static const LLUUID null;
static LLMutex * mMutex;
static U32 getRandomSeed();
static S32 getNodeID(unsigned char * node_id);

View File

@ -29,7 +29,7 @@
const S32 LL_VERSION_MAJOR = 3;
const S32 LL_VERSION_MINOR = 4;
const S32 LL_VERSION_PATCH = 4;
const S32 LL_VERSION_PATCH = 5;
const S32 LL_VERSION_BUILD = 264760;
const char * const LL_CHANNEL = "Second Life Developer";

View File

@ -366,7 +366,7 @@ bool LLCrashLogger::sendCrashLogs()
{
sent = runCrashLogPost(mAltCrashHost, post_data, std::string("Sending to alternate server"), 3, 5);
}
mSentCrashLogs = sent;
return true;

View File

@ -30,7 +30,6 @@
#include "llmath.h"
#include "v4coloru.h"
#include "llmemtype.h"
#include "llimagebmp.h"
#include "llimagetga.h"
@ -96,8 +95,7 @@ LLImageBase::LLImageBase()
mHeight(0),
mComponents(0),
mBadBufferAllocation(false),
mAllowOverSize(false),
mMemType(LLMemType::MTYPE_IMAGEBASE)
mAllowOverSize(false)
{
}
@ -167,8 +165,6 @@ void LLImageBase::deleteData()
// virtual
U8* LLImageBase::allocateData(S32 size)
{
LLMemType mt1(mMemType);
if (size < 0)
{
size = mWidth * mHeight * mComponents;
@ -213,7 +209,6 @@ U8* LLImageBase::allocateData(S32 size)
// virtual
U8* LLImageBase::reallocateData(S32 size)
{
LLMemType mt1(mMemType);
U8 *new_datap = (U8*)ALLOCATE_MEM(sPrivatePoolp, size);
if (!new_datap)
{
@ -279,14 +274,12 @@ S32 LLImageRaw::sRawImageCount = 0;
LLImageRaw::LLImageRaw()
: LLImageBase()
{
mMemType = LLMemType::MTYPE_IMAGERAW;
++sRawImageCount;
}
LLImageRaw::LLImageRaw(U16 width, U16 height, S8 components)
: LLImageBase()
{
mMemType = LLMemType::MTYPE_IMAGERAW;
//llassert( S32(width) * S32(height) * S32(components) <= MAX_IMAGE_DATA_SIZE );
allocateDataSize(width, height, components);
++sRawImageCount;
@ -295,7 +288,6 @@ LLImageRaw::LLImageRaw(U16 width, U16 height, S8 components)
LLImageRaw::LLImageRaw(U8 *data, U16 width, U16 height, S8 components, bool no_copy)
: LLImageBase()
{
mMemType = LLMemType::MTYPE_IMAGERAW;
if(no_copy)
{
@ -375,29 +367,6 @@ BOOL LLImageRaw::resize(U16 width, U16 height, S8 components)
return TRUE;
}
#if 0
U8 * LLImageRaw::getSubImage(U32 x_pos, U32 y_pos, U32 width, U32 height) const
{
LLMemType mt1(mMemType);
U8 *data = new U8[width*height*getComponents()];
// Should do some simple bounds checking
if (!data)
{
llerrs << "Out of memory in LLImageRaw::getSubImage" << llendl;
return NULL;
}
U32 i;
for (i = y_pos; i < y_pos+height; i++)
{
memcpy(data + i*width*getComponents(), /* Flawfinder: ignore */
getData() + ((y_pos + i)*getWidth() + x_pos)*getComponents(), getComponents()*width);
}
return data;
}
#endif
BOOL LLImageRaw::setSubImage(U32 x_pos, U32 y_pos, U32 width, U32 height,
const U8 *data, U32 stride, BOOL reverse_y)
{
@ -462,7 +431,6 @@ void LLImageRaw::clear(U8 r, U8 g, U8 b, U8 a)
// Reverses the order of the rows in the image
void LLImageRaw::verticalFlip()
{
LLMemType mt1(mMemType);
S32 row_bytes = getWidth() * getComponents();
llassert(row_bytes > 0);
std::vector<U8> line_buffer(row_bytes);
@ -595,7 +563,6 @@ void LLImageRaw::composite( LLImageRaw* src )
// Src and dst can be any size. Src has 4 components. Dst has 3 components.
void LLImageRaw::compositeScaled4onto3(LLImageRaw* src)
{
LLMemType mt1(mMemType);
llinfos << "compositeScaled4onto3" << llendl;
LLImageRaw* dst = this; // Just for clarity.
@ -673,6 +640,29 @@ void LLImageRaw::compositeUnscaled4onto3( LLImageRaw* src )
}
}
void LLImageRaw::copyUnscaledAlphaMask( LLImageRaw* src, const LLColor4U& fill)
{
LLImageRaw* dst = this; // Just for clarity.
llassert( 1 == src->getComponents() );
llassert( 4 == dst->getComponents() );
llassert( (src->getWidth() == dst->getWidth()) && (src->getHeight() == dst->getHeight()) );
S32 pixels = getWidth() * getHeight();
U8* src_data = src->getData();
U8* dst_data = dst->getData();
for ( S32 i = 0; i < pixels; i++ )
{
dst_data[0] = fill.mV[0];
dst_data[1] = fill.mV[1];
dst_data[2] = fill.mV[2];
dst_data[3] = src_data[0];
src_data += 1;
dst_data += 4;
}
}
// Fill the buffer with a constant color
void LLImageRaw::fill( const LLColor4U& color )
{
@ -837,7 +827,6 @@ void LLImageRaw::copyUnscaled3onto4( LLImageRaw* src )
// Src and dst can be any size. Src and dst have same number of components.
void LLImageRaw::copyScaled( LLImageRaw* src )
{
LLMemType mt1(mMemType);
LLImageRaw* dst = this; // Just for clarity.
llassert_always( (1 == src->getComponents()) || (3 == src->getComponents()) || (4 == src->getComponents()) );
@ -866,57 +855,9 @@ void LLImageRaw::copyScaled( LLImageRaw* src )
}
}
#if 0
//scale down image by not blending a pixel with its neighbors.
BOOL LLImageRaw::scaleDownWithoutBlending( S32 new_width, S32 new_height)
{
LLMemType mt1(mMemType);
S8 c = getComponents() ;
llassert((1 == c) || (3 == c) || (4 == c) );
S32 old_width = getWidth();
S32 old_height = getHeight();
S32 new_data_size = old_width * new_height * c ;
llassert_always(new_data_size > 0);
F32 ratio_x = (F32)old_width / new_width ;
F32 ratio_y = (F32)old_height / new_height ;
if( ratio_x < 1.0f || ratio_y < 1.0f )
{
return TRUE; // Nothing to do.
}
ratio_x -= 1.0f ;
ratio_y -= 1.0f ;
U8* new_data = allocateMemory(new_data_size) ;
llassert_always(new_data != NULL) ;
U8* old_data = getData() ;
S32 i, j, k, s, t;
for(i = 0, s = 0, t = 0 ; i < new_height ; i++)
{
for(j = 0 ; j < new_width ; j++)
{
for(k = 0 ; k < c ; k++)
{
new_data[s++] = old_data[t++] ;
}
t += (S32)(ratio_x * c + 0.1f) ;
}
t += (S32)(ratio_y * old_width * c + 0.1f) ;
}
setDataAndSize(new_data, new_width, new_height, c) ;
return TRUE ;
}
#endif
BOOL LLImageRaw::scale( S32 new_width, S32 new_height, BOOL scale_image_data )
{
LLMemType mt1(mMemType);
llassert((1 == getComponents()) || (3 == getComponents()) || (4 == getComponents()) );
S32 old_width = getWidth();
@ -1346,7 +1287,6 @@ LLImageFormatted::LLImageFormatted(S8 codec)
mDiscardLevel(-1),
mLevels(0)
{
mMemType = LLMemType::MTYPE_IMAGEFORMATTED;
}
// virtual

View File

@ -30,7 +30,6 @@
#include "lluuid.h"
#include "llstring.h"
#include "llthread.h"
#include "llmemtype.h"
const S32 MIN_IMAGE_MIP = 2; // 4x4, only used for expand/contract power of 2
const S32 MAX_IMAGE_MIP = 11; // 2048x2048
@ -176,8 +175,6 @@ private:
bool mAllowOverSize ;
static LLPrivateMemoryPool* sPrivatePoolp ;
public:
LLMemType::DeclareMemType& mMemType; // debug
};
// Raw representation of an image (used for textures, and other uncompressed formats
@ -211,8 +208,7 @@ public:
void contractToPowerOfTwo(S32 max_dim = MAX_IMAGE_SIZE, BOOL scale_image = TRUE);
void biasedScaleToPowerOfTwo(S32 max_dim = MAX_IMAGE_SIZE);
BOOL scale( S32 new_width, S32 new_height, BOOL scale_image = TRUE );
//BOOL scaleDownWithoutBlending( S32 new_width, S32 new_height) ;
// Fill the buffer with a constant color
void fill( const LLColor4U& color );
@ -230,6 +226,11 @@ public:
// Src and dst are same size. Src has 3 components. Dst has 4 components.
void copyUnscaled3onto4( LLImageRaw* src );
// Src and dst are same size. Src has 1 component. Dst has 4 components.
// Alpha component is set to source alpha mask component.
// RGB components are set to fill color.
void copyUnscaledAlphaMask( LLImageRaw* src, const LLColor4U& fill);
// Src and dst can be any size. Src and dst have same number of components.
void copyScaled( LLImageRaw* src );

View File

@ -26,7 +26,6 @@
#include "lldir.h"
#include "llimagej2c.h"
#include "llmemtype.h"
#include "lltimer.h"
#include "llmath.h"
#include "llmemory.h"
@ -161,7 +160,6 @@ BOOL LLImageJ2C::decode(LLImageRaw *raw_imagep, F32 decode_time)
BOOL LLImageJ2C::decodeChannels(LLImageRaw *raw_imagep, F32 decode_time, S32 first_channel, S32 max_channel_count )
{
LLTimer elapsed;
LLMemType mt1(mMemType);
BOOL res = TRUE;
@ -227,7 +225,6 @@ BOOL LLImageJ2C::encode(const LLImageRaw *raw_imagep, F32 encode_time)
BOOL LLImageJ2C::encode(const LLImageRaw *raw_imagep, const char* comment_text, F32 encode_time)
{
LLTimer elapsed;
LLMemType mt1(mMemType);
resetLastError();
BOOL res = mImpl->encodeImpl(*this, *raw_imagep, comment_text, encode_time, mReversible);
if (!mLastError.empty())
@ -404,7 +401,6 @@ BOOL LLImageJ2C::loadAndValidate(const std::string &filename)
BOOL LLImageJ2C::validate(U8 *data, U32 file_size)
{
LLMemType mt1(mMemType);
resetLastError();

View File

@ -49,8 +49,7 @@ mWidth(0),
mHeight(0),
mComponents(0),
mBadBufferAllocation(false),
mAllowOverSize(false),
mMemType(LLMemType::MTYPE_IMAGEBASE)
mAllowOverSize(false)
{
}
LLImageBase::~LLImageBase() {}

View File

@ -379,6 +379,11 @@ const std::string& LLInventoryItem::getDescription() const
return mDescription;
}
const std::string& LLInventoryItem::getActualDescription() const
{
return mDescription;
}
time_t LLInventoryItem::getCreationDate() const
{
return mCreationDate;

View File

@ -30,7 +30,6 @@
#include "lldarray.h"
#include "llfoldertype.h"
#include "llinventorytype.h"
#include "llmemtype.h"
#include "llpermissions.h"
#include "llrefcount.h"
#include "llsaleinfo.h"
@ -54,7 +53,6 @@ public:
// Initialization
//--------------------------------------------------------------------
public:
MEM_TYPE_NEW(LLMemType::MTYPE_INVENTORY);
LLInventoryObject();
LLInventoryObject(const LLUUID& uuid,
const LLUUID& parent_uuid,
@ -129,7 +127,6 @@ public:
// Initialization
//--------------------------------------------------------------------
public:
MEM_TYPE_NEW(LLMemType::MTYPE_INVENTORY);
LLInventoryItem(const LLUUID& uuid,
const LLUUID& parent_uuid,
const LLPermissions& permissions,
@ -160,6 +157,7 @@ public:
virtual const LLUUID& getCreatorUUID() const;
virtual const LLUUID& getAssetUUID() const;
virtual const std::string& getDescription() const;
virtual const std::string& getActualDescription() const; // Does not follow links
virtual const LLSaleInfo& getSaleInfo() const;
virtual LLInventoryType::EType getInventoryType() const;
virtual U32 getFlags() const;
@ -242,7 +240,6 @@ public:
// Initialization
//--------------------------------------------------------------------
public:
MEM_TYPE_NEW(LLMemType::MTYPE_INVENTORY);
LLInventoryCategory(const LLUUID& uuid, const LLUUID& parent_uuid,
LLFolderType::EType preferred_type,
const std::string& name);

View File

@ -205,7 +205,7 @@ void LLParcel::init(const LLUUID &owner_id,
mAABBMin.setVec(SOME_BIG_NUMBER, SOME_BIG_NUMBER, SOME_BIG_NUMBER);
mAABBMax.setVec(SOME_BIG_NEG_NUMBER, SOME_BIG_NEG_NUMBER, SOME_BIG_NEG_NUMBER);
mLocalID = 0;
mLocalID = INVALID_PARCEL_ID;
//mSimWidePrimCorrection = 0;
setMaxPrimCapacity((S32)(sim_object_limit * area / (F32)(REGION_WIDTH_METERS * REGION_WIDTH_METERS)));

View File

@ -97,6 +97,7 @@ const U32 RT_OTHER = 0x1 << 3;
const U32 RT_LIST = 0x1 << 4;
const U32 RT_SELL = 0x1 << 5;
const S32 INVALID_PARCEL_ID = -1;
// Timeouts for parcels
// default is 21 days * 24h/d * 60m/h * 60s/m *1000000 usec/s = 1814400000000

View File

@ -58,8 +58,7 @@ mWidth(0),
mHeight(0),
mComponents(0),
mBadBufferAllocation(false),
mAllowOverSize(false),
mMemType(LLMemType::MTYPE_IMAGEBASE)
mAllowOverSize(false)
{ }
LLImageBase::~LLImageBase() { }
U8* LLImageBase::allocateData(S32 ) { return NULL; }

View File

@ -78,7 +78,7 @@ public:
typedef LLOctreeTraveler<T> oct_traveler;
typedef LLTreeTraveler<T> tree_traveler;
typedef std::vector<LLPointer<T> > element_list;
typedef std::vector< LLPointer<T> > element_list; // note: don't remove the whitespace between "> >"
typedef LLPointer<T>* element_iter;
typedef const LLPointer<T>* const_element_iter;
typedef typename std::vector<LLTreeListener<T>*>::iterator tree_listener_iter;

View File

@ -35,7 +35,6 @@
#include <cmath>
#include "llerror.h"
#include "llmemtype.h"
#include "llvolumemgr.h"
#include "v2math.h"
@ -378,8 +377,6 @@ public:
LLProfile::Face* LLProfile::addCap(S16 faceID)
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
Face *face = vector_append(mFaces, 1);
face->mIndex = 0;
@ -392,8 +389,6 @@ LLProfile::Face* LLProfile::addCap(S16 faceID)
LLProfile::Face* LLProfile::addFace(S32 i, S32 count, F32 scaleU, S16 faceID, BOOL flat)
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
Face *face = vector_append(mFaces, 1);
face->mIndex = i;
@ -409,7 +404,6 @@ LLProfile::Face* LLProfile::addFace(S32 i, S32 count, F32 scaleU, S16 faceID, BO
//static
S32 LLProfile::getNumNGonPoints(const LLProfileParams& params, S32 sides, F32 offset, F32 bevel, F32 ang_scale, S32 split)
{ // this is basically LLProfile::genNGon stripped down to only the operations that influence the number of points
LLMemType m1(LLMemType::MTYPE_VOLUME);
S32 np = 0;
// Generate an n-sided "circular" path.
@ -475,8 +469,6 @@ S32 LLProfile::getNumNGonPoints(const LLProfileParams& params, S32 sides, F32 of
// filleted and chamfered corners
void LLProfile::genNGon(const LLProfileParams& params, S32 sides, F32 offset, F32 bevel, F32 ang_scale, S32 split)
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
// Generate an n-sided "circular" path.
// 0 is (1,0), and we go counter-clockwise along a circular path from there.
const F32 tableScale[] = { 1, 1, 1, 0.5f, 0.707107f, 0.53f, 0.525f, 0.5f };
@ -730,8 +722,6 @@ LLProfile::Face* LLProfile::addHole(const LLProfileParams& params, BOOL flat, F3
S32 LLProfile::getNumPoints(const LLProfileParams& params, BOOL path_open,F32 detail, S32 split,
BOOL is_sculpted, S32 sculpt_size)
{ // this is basically LLProfile::generate stripped down to only operations that influence the number of points
LLMemType m1(LLMemType::MTYPE_VOLUME);
if (detail < MIN_LOD)
{
detail = MIN_LOD;
@ -842,8 +832,6 @@ S32 LLProfile::getNumPoints(const LLProfileParams& params, BOOL path_open,F32 de
BOOL LLProfile::generate(const LLProfileParams& params, BOOL path_open,F32 detail, S32 split,
BOOL is_sculpted, S32 sculpt_size)
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
if ((!mDirty) && (!is_sculpted))
{
return FALSE;
@ -1116,8 +1104,6 @@ BOOL LLProfile::generate(const LLProfileParams& params, BOOL path_open,F32 detai
BOOL LLProfileParams::importFile(LLFILE *fp)
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
const S32 BUFSIZE = 16384;
char buffer[BUFSIZE]; /* Flawfinder: ignore */
// *NOTE: changing the size or type of these buffers will require
@ -1193,8 +1179,6 @@ BOOL LLProfileParams::exportFile(LLFILE *fp) const
BOOL LLProfileParams::importLegacyStream(std::istream& input_stream)
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
const S32 BUFSIZE = 16384;
char buffer[BUFSIZE]; /* Flawfinder: ignore */
// *NOTE: changing the size or type of these buffers will require
@ -1286,7 +1270,6 @@ bool LLProfileParams::fromLLSD(LLSD& sd)
void LLProfileParams::copyParams(const LLProfileParams &params)
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
setCurveType(params.getCurveType());
setBegin(params.getBegin());
setEnd(params.getEnd());
@ -1503,8 +1486,6 @@ const LLVector2 LLPathParams::getEndScale() const
S32 LLPath::getNumPoints(const LLPathParams& params, F32 detail)
{ // this is basically LLPath::generate stripped down to only the operations that influence the number of points
LLMemType m1(LLMemType::MTYPE_VOLUME);
if (detail < MIN_LOD)
{
detail = MIN_LOD;
@ -1554,8 +1535,6 @@ S32 LLPath::getNumPoints(const LLPathParams& params, F32 detail)
BOOL LLPath::generate(const LLPathParams& params, F32 detail, S32 split,
BOOL is_sculpted, S32 sculpt_size)
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
if ((!mDirty) && (!is_sculpted))
{
return FALSE;
@ -1683,8 +1662,6 @@ BOOL LLPath::generate(const LLPathParams& params, F32 detail, S32 split,
BOOL LLDynamicPath::generate(const LLPathParams& params, F32 detail, S32 split,
BOOL is_sculpted, S32 sculpt_size)
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
mOpen = TRUE; // Draw end caps
if (getPathLength() == 0)
{
@ -1706,8 +1683,6 @@ BOOL LLDynamicPath::generate(const LLPathParams& params, F32 detail, S32 split,
BOOL LLPathParams::importFile(LLFILE *fp)
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
const S32 BUFSIZE = 16384;
char buffer[BUFSIZE]; /* Flawfinder: ignore */
// *NOTE: changing the size or type of these buffers will require
@ -1852,8 +1827,6 @@ BOOL LLPathParams::exportFile(LLFILE *fp) const
BOOL LLPathParams::importLegacyStream(std::istream& input_stream)
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
const S32 BUFSIZE = 16384;
char buffer[BUFSIZE]; /* Flawfinder: ignore */
// *NOTE: changing the size or type of these buffers will require
@ -2061,8 +2034,6 @@ S32 LLVolume::sNumMeshPoints = 0;
LLVolume::LLVolume(const LLVolumeParams &params, const F32 detail, const BOOL generate_single_face, const BOOL is_unique)
: mParams(params)
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
mUnique = is_unique;
mFaceMask = 0x0;
mDetail = detail;
@ -2134,7 +2105,6 @@ LLVolume::~LLVolume()
BOOL LLVolume::generate()
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
llassert_always(mProfilep);
//Added 10.03.05 Dave Parks
@ -2730,8 +2700,6 @@ S32 LLVolume::getNumFaces() const
void LLVolume::createVolumeFaces()
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
if (mGenerateSingleFace)
{
// do nothing
@ -2903,8 +2871,6 @@ F32 LLVolume::sculptGetSurfaceArea()
// create placeholder shape
void LLVolume::sculptGeneratePlaceholder()
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
S32 sizeS = mPathp->mPath.size();
S32 sizeT = mProfilep->mProfile.size();
@ -2941,9 +2907,6 @@ void LLVolume::sculptGenerateMapVertices(U16 sculpt_width, U16 sculpt_height, S8
BOOL sculpt_mirror = sculpt_type & LL_SCULPT_FLAG_MIRROR;
BOOL reverse_horizontal = (sculpt_invert ? !sculpt_mirror : sculpt_mirror); // XOR
LLMemType m1(LLMemType::MTYPE_VOLUME);
S32 sizeS = mPathp->mPath.size();
S32 sizeT = mProfilep->mProfile.size();
@ -3092,7 +3055,6 @@ void sculpt_calc_mesh_resolution(U16 width, U16 height, U8 type, F32 detail, S32
// sculpt replaces generate() for sculpted surfaces
void LLVolume::sculpt(U16 sculpt_width, U16 sculpt_height, S8 sculpt_components, const U8* sculpt_data, S32 sculpt_level)
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
U8 sculpt_type = mParams.getSculptType();
BOOL data_is_empty = FALSE;
@ -3229,7 +3191,6 @@ bool LLVolumeParams::operator<(const LLVolumeParams &params) const
void LLVolumeParams::copyParams(const LLVolumeParams &params)
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
mProfileParams.copyParams(params.mProfileParams);
mPathParams.copyParams(params.mPathParams);
mSculptID = params.getSculptID();
@ -3601,8 +3562,6 @@ bool LLVolumeParams::validate(U8 prof_curve, F32 prof_begin, F32 prof_end, F32 h
S32 *LLVolume::getTriangleIndices(U32 &num_indices) const
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
S32 expected_num_triangle_indices = getNumTriangleIndices();
if (expected_num_triangle_indices > MAX_VOLUME_TRIANGLE_INDICES)
{
@ -4330,8 +4289,6 @@ void LLVolume::generateSilhouetteVertices(std::vector<LLVector3> &vertices,
const LLMatrix3& norm_mat_in,
S32 face_mask)
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
LLMatrix4a mat;
mat.loadu(mat_in);
@ -4793,241 +4750,8 @@ BOOL equalTriangle(const S32 *a, const S32 *b)
return FALSE;
}
BOOL LLVolume::cleanupTriangleData( const S32 num_input_vertices,
const std::vector<Point>& input_vertices,
const S32 num_input_triangles,
S32 *input_triangles,
S32 &num_output_vertices,
LLVector3 **output_vertices,
S32 &num_output_triangles,
S32 **output_triangles)
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
/* Testing: avoid any cleanup
static BOOL skip_cleanup = TRUE;
if ( skip_cleanup )
{
num_output_vertices = num_input_vertices;
num_output_triangles = num_input_triangles;
*output_vertices = new LLVector3[num_input_vertices];
for (S32 index = 0; index < num_input_vertices; index++)
{
(*output_vertices)[index] = input_vertices[index].mPos;
}
*output_triangles = new S32[num_input_triangles*3];
memcpy(*output_triangles, input_triangles, 3*num_input_triangles*sizeof(S32)); // Flawfinder: ignore
return TRUE;
}
*/
// Here's how we do this:
// Create a structure which contains the original vertex index and the
// LLVector3 data.
// "Sort" the data by the vectors
// Create an array the size of the old vertex list, with a mapping of
// old indices to new indices.
// Go through triangles, shift so the lowest index is first
// Sort triangles by first index
// Remove duplicate triangles
// Allocate and pack new triangle data.
//LLTimer cleanupTimer;
//llinfos << "In vertices: " << num_input_vertices << llendl;
//llinfos << "In triangles: " << num_input_triangles << llendl;
S32 i;
typedef std::multiset<LLVertexIndexPair*, lessVertex> vertex_set_t;
vertex_set_t vertex_list;
LLVertexIndexPair *pairp = NULL;
for (i = 0; i < num_input_vertices; i++)
{
LLVertexIndexPair *new_pairp = new LLVertexIndexPair(input_vertices[i].mPos, i);
vertex_list.insert(new_pairp);
}
// Generate the vertex mapping and the list of vertices without
// duplicates. This will crash if there are no vertices.
llassert(num_input_vertices > 0); // check for no vertices!
S32 *vertex_mapping = new S32[num_input_vertices];
LLVector3 *new_vertices = new LLVector3[num_input_vertices];
LLVertexIndexPair *prev_pairp = NULL;
S32 new_num_vertices;
new_num_vertices = 0;
for (vertex_set_t::iterator iter = vertex_list.begin(),
end = vertex_list.end();
iter != end; iter++)
{
pairp = *iter;
if (!prev_pairp || ((pairp->mVertex - prev_pairp->mVertex).magVecSquared() >= VERTEX_SLOP_SQRD))
{
new_vertices[new_num_vertices] = pairp->mVertex;
//llinfos << "Added vertex " << new_num_vertices << " : " << pairp->mVertex << llendl;
new_num_vertices++;
// Update the previous
prev_pairp = pairp;
}
else
{
//llinfos << "Removed duplicate vertex " << pairp->mVertex << ", distance magVecSquared() is " << (pairp->mVertex - prev_pairp->mVertex).magVecSquared() << llendl;
}
vertex_mapping[pairp->mIndex] = new_num_vertices - 1;
}
// Iterate through triangles and remove degenerates, re-ordering vertices
// along the way.
S32 *new_triangles = new S32[num_input_triangles * 3];
S32 new_num_triangles = 0;
for (i = 0; i < num_input_triangles; i++)
{
S32 v1 = i*3;
S32 v2 = v1 + 1;
S32 v3 = v1 + 2;
//llinfos << "Checking triangle " << input_triangles[v1] << ":" << input_triangles[v2] << ":" << input_triangles[v3] << llendl;
input_triangles[v1] = vertex_mapping[input_triangles[v1]];
input_triangles[v2] = vertex_mapping[input_triangles[v2]];
input_triangles[v3] = vertex_mapping[input_triangles[v3]];
if ((input_triangles[v1] == input_triangles[v2])
|| (input_triangles[v1] == input_triangles[v3])
|| (input_triangles[v2] == input_triangles[v3]))
{
//llinfos << "Removing degenerate triangle " << input_triangles[v1] << ":" << input_triangles[v2] << ":" << input_triangles[v3] << llendl;
// Degenerate triangle, skip
continue;
}
if (input_triangles[v1] < input_triangles[v2])
{
if (input_triangles[v1] < input_triangles[v3])
{
// (0 < 1) && (0 < 2)
new_triangles[new_num_triangles*3] = input_triangles[v1];
new_triangles[new_num_triangles*3+1] = input_triangles[v2];
new_triangles[new_num_triangles*3+2] = input_triangles[v3];
}
else
{
// (0 < 1) && (2 < 0)
new_triangles[new_num_triangles*3] = input_triangles[v3];
new_triangles[new_num_triangles*3+1] = input_triangles[v1];
new_triangles[new_num_triangles*3+2] = input_triangles[v2];
}
}
else if (input_triangles[v2] < input_triangles[v3])
{
// (1 < 0) && (1 < 2)
new_triangles[new_num_triangles*3] = input_triangles[v2];
new_triangles[new_num_triangles*3+1] = input_triangles[v3];
new_triangles[new_num_triangles*3+2] = input_triangles[v1];
}
else
{
// (1 < 0) && (2 < 1)
new_triangles[new_num_triangles*3] = input_triangles[v3];
new_triangles[new_num_triangles*3+1] = input_triangles[v1];
new_triangles[new_num_triangles*3+2] = input_triangles[v2];
}
new_num_triangles++;
}
if (new_num_triangles == 0)
{
llwarns << "Created volume object with 0 faces." << llendl;
delete[] new_triangles;
delete[] vertex_mapping;
delete[] new_vertices;
return FALSE;
}
typedef std::set<S32*, lessTriangle> triangle_set_t;
triangle_set_t triangle_list;
for (i = 0; i < new_num_triangles; i++)
{
triangle_list.insert(&new_triangles[i*3]);
}
// Sort through the triangle list, and delete duplicates
S32 *prevp = NULL;
S32 *curp = NULL;
S32 *sorted_tris = new S32[new_num_triangles*3];
S32 cur_tri = 0;
for (triangle_set_t::iterator iter = triangle_list.begin(),
end = triangle_list.end();
iter != end; iter++)
{
curp = *iter;
if (!prevp || !equalTriangle(prevp, curp))
{
//llinfos << "Added triangle " << *curp << ":" << *(curp+1) << ":" << *(curp+2) << llendl;
sorted_tris[cur_tri*3] = *curp;
sorted_tris[cur_tri*3+1] = *(curp+1);
sorted_tris[cur_tri*3+2] = *(curp+2);
cur_tri++;
prevp = curp;
}
else
{
//llinfos << "Skipped triangle " << *curp << ":" << *(curp+1) << ":" << *(curp+2) << llendl;
}
}
*output_vertices = new LLVector3[new_num_vertices];
num_output_vertices = new_num_vertices;
for (i = 0; i < new_num_vertices; i++)
{
(*output_vertices)[i] = new_vertices[i];
}
*output_triangles = new S32[cur_tri*3];
num_output_triangles = cur_tri;
memcpy(*output_triangles, sorted_tris, 3*cur_tri*sizeof(S32)); /* Flawfinder: ignore */
/*
llinfos << "Out vertices: " << num_output_vertices << llendl;
llinfos << "Out triangles: " << num_output_triangles << llendl;
for (i = 0; i < num_output_vertices; i++)
{
llinfos << i << ":" << (*output_vertices)[i] << llendl;
}
for (i = 0; i < num_output_triangles; i++)
{
llinfos << i << ":" << (*output_triangles)[i*3] << ":" << (*output_triangles)[i*3+1] << ":" << (*output_triangles)[i*3+2] << llendl;
}
*/
//llinfos << "Out vertices: " << num_output_vertices << llendl;
//llinfos << "Out triangles: " << num_output_triangles << llendl;
delete[] vertex_mapping;
vertex_mapping = NULL;
delete[] new_vertices;
new_vertices = NULL;
delete[] new_triangles;
new_triangles = NULL;
delete[] sorted_tris;
sorted_tris = NULL;
triangle_list.clear();
std::for_each(vertex_list.begin(), vertex_list.end(), DeletePointer());
vertex_list.clear();
return TRUE;
}
BOOL LLVolumeParams::importFile(LLFILE *fp)
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
//llinfos << "importing volume" << llendl;
const S32 BUFSIZE = 16384;
char buffer[BUFSIZE]; /* Flawfinder: ignore */
@ -5082,8 +4806,6 @@ BOOL LLVolumeParams::exportFile(LLFILE *fp) const
BOOL LLVolumeParams::importLegacyStream(std::istream& input_stream)
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
//llinfos << "importing volume" << llendl;
const S32 BUFSIZE = 16384;
// *NOTE: changing the size or type of this buffer will require
@ -5123,8 +4845,6 @@ BOOL LLVolumeParams::importLegacyStream(std::istream& input_stream)
BOOL LLVolumeParams::exportLegacyStream(std::ostream& output_stream) const
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
output_stream <<"\tshape 0\n";
output_stream <<"\t{\n";
mPathParams.exportLegacyStream(output_stream);
@ -6340,8 +6060,6 @@ void LerpPlanarVertex(LLVolumeFace::VertexData& v0,
BOOL LLVolumeFace::createUnCutCubeCap(LLVolume* volume, BOOL partial_build)
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
const std::vector<LLVolume::Point>& mesh = volume->getMesh();
const std::vector<LLVector3>& profile = volume->getProfile().mProfile;
S32 max_s = volume->getProfile().getTotal();
@ -6487,8 +6205,6 @@ BOOL LLVolumeFace::createUnCutCubeCap(LLVolume* volume, BOOL partial_build)
BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build)
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
if (!(mTypeMask & HOLLOW_MASK) &&
!(mTypeMask & OPEN_MASK) &&
((volume->getParams().getPathParams().getBegin()==0.0f)&&
@ -6875,8 +6591,6 @@ BOOL LLVolumeFace::createCap(LLVolume* volume, BOOL partial_build)
void LLVolumeFace::createBinormals()
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
if (!mBinormals)
{
allocateBinormals(mNumVertices);
@ -7148,8 +6862,6 @@ void LLVolumeFace::appendFace(const LLVolumeFace& face, LLMatrix4& mat_in, LLMat
BOOL LLVolumeFace::createSide(LLVolume* volume, BOOL partial_build)
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
BOOL flat = mTypeMask & FLAT_MASK;
U8 sculpt_type = volume->getParams().getSculptType();

View File

@ -1023,17 +1023,6 @@ public:
LLVector3* normal = NULL,
LLVector3* bi_normal = NULL);
// The following cleans up vertices and triangles,
// getting rid of degenerate triangles and duplicate vertices,
// and allocates new arrays with the clean data.
static BOOL cleanupTriangleData( const S32 num_input_vertices,
const std::vector<Point> &input_vertices,
const S32 num_input_triangles,
S32 *input_triangles,
S32 &num_output_vertices,
LLVector3 **output_vertices,
S32 &num_output_triangles,
S32 **output_triangles);
LLFaceID generateFaceMask();
BOOL isFaceMaskValid(LLFaceID face_mask);

View File

@ -26,7 +26,6 @@
#include "linden_common.h"
#include "llvolumemgr.h"
#include "llmemtype.h"
#include "llvolume.h"
@ -182,7 +181,6 @@ void LLVolumeMgr::insertGroup(LLVolumeLODGroup* volgroup)
// protected
LLVolumeLODGroup* LLVolumeMgr::createNewGroup(const LLVolumeParams& volume_params)
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
LLVolumeLODGroup* volgroup = new LLVolumeLODGroup(volume_params);
insertGroup(volgroup);
return volgroup;
@ -297,7 +295,6 @@ LLVolume* LLVolumeLODGroup::refLOD(const S32 detail)
mRefs++;
if (mVolumeLODs[detail].isNull())
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
mVolumeLODs[detail] = new LLVolume(mVolumeParams, mDetailScales[detail]);
}
mLODRefs[detail]++;

View File

@ -79,7 +79,7 @@ template<> template<>
void alignment_test_object_t::test<1>()
{
# ifdef LL_DEBUG
skip("This test fails on Windows when compiled in debug mode.");
// skip("This test fails on Windows when compiled in debug mode.");
# endif
const int num_tests = 7;
@ -116,7 +116,7 @@ template<> template<>
void alignment_test_object_t::test<3>()
{
# ifdef LL_DEBUG
skip("This test fails on Windows when compiled in debug mode.");
// skip("This test fails on Windows when compiled in debug mode.");
# endif
const int ARR_SIZE = 7;
@ -128,12 +128,14 @@ void alignment_test_object_t::test<3>()
}
MyVector4a *veca = new MyVector4a[ARR_SIZE];
//std::cout << "veca base is " << (S32) veca << std::endl;
ensure("LLAligment veca base", is_aligned(veca,16));
for(int i=0; i<ARR_SIZE; i++)
{
std::cout << "veca[" << i << "]" << std::endl;
ensure("LLAlignment veca member unaligned", is_aligned(&veca[i],16));
}
delete [] veca;
}
}

View File

@ -348,7 +348,7 @@ void LLAvatarNameCache::requestNamesViaCapability()
while(!sAskQueue.empty())
{
it = sAskQueue.begin();
const LLUUID& agent_id = *it;
LLUUID agent_id = *it;
sAskQueue.erase(it);
if (url.empty())
@ -416,7 +416,7 @@ void LLAvatarNameCache::requestNamesViaLegacy()
for (S32 requests = 0; !sAskQueue.empty() && requests < MAX_REQUESTS; ++requests)
{
it = sAskQueue.begin();
const LLUUID& agent_id = *it;
LLUUID agent_id = *it;
sAskQueue.erase(it);
// Mark as pending first, just in case the callback is immediately
@ -563,8 +563,7 @@ void LLAvatarNameCache::eraseUnrefreshed()
const LLAvatarName& av_name = it->second;
if (av_name.mExpires < max_unrefreshed)
{
const LLUUID& agent_id = it->first;
LL_DEBUGS("AvNameCache") << agent_id
LL_DEBUGS("AvNameCache") << it->first
<< " user '" << av_name.mUsername << "' "
<< "expired " << now - av_name.mExpires << " secs ago"
<< LL_ENDL;

View File

@ -30,7 +30,6 @@
#include "llbuffer.h"
#include "llmath.h"
#include "llmemtype.h"
#include "llstl.h"
#include "llthread.h"
@ -44,7 +43,6 @@ LLSegment::LLSegment() :
mData(NULL),
mSize(0)
{
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
}
LLSegment::LLSegment(S32 channel, U8* data, S32 data_len) :
@ -52,12 +50,10 @@ LLSegment::LLSegment(S32 channel, U8* data, S32 data_len) :
mData(data),
mSize(data_len)
{
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
}
LLSegment::~LLSegment()
{
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
}
bool LLSegment::isOnChannel(S32 channel) const
@ -104,7 +100,6 @@ LLHeapBuffer::LLHeapBuffer() :
mNextFree(NULL),
mReclaimedBytes(0)
{
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
const S32 DEFAULT_HEAP_BUFFER_SIZE = 16384;
allocate(DEFAULT_HEAP_BUFFER_SIZE);
}
@ -115,7 +110,6 @@ LLHeapBuffer::LLHeapBuffer(S32 size) :
mNextFree(NULL),
mReclaimedBytes(0)
{
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
allocate(size);
}
@ -125,7 +119,6 @@ LLHeapBuffer::LLHeapBuffer(const U8* src, S32 len) :
mNextFree(NULL),
mReclaimedBytes(0)
{
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
if((len > 0) && src)
{
allocate(len);
@ -139,7 +132,6 @@ LLHeapBuffer::LLHeapBuffer(const U8* src, S32 len) :
// virtual
LLHeapBuffer::~LLHeapBuffer()
{
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
delete[] mBuffer;
mBuffer = NULL;
mSize = 0;
@ -157,7 +149,6 @@ bool LLHeapBuffer::createSegment(
S32 size,
LLSegment& segment)
{
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
// get actual size of the segment.
S32 actual_size = llmin(size, (mSize - S32(mNextFree - mBuffer)));
@ -212,7 +203,6 @@ bool LLHeapBuffer::containsSegment(const LLSegment& segment) const
void LLHeapBuffer::allocate(S32 size)
{
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
mReclaimedBytes = 0;
mBuffer = new U8[size];
if(mBuffer)
@ -230,12 +220,10 @@ LLBufferArray::LLBufferArray() :
mNextBaseChannel(0),
mMutexp(NULL)
{
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
}
LLBufferArray::~LLBufferArray()
{
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
std::for_each(mBuffers.begin(), mBuffers.end(), DeletePointer());
delete mMutexp;
@ -314,7 +302,6 @@ bool LLBufferArray::append(S32 channel, const U8* src, S32 len)
{
LLMutexLock lock(mMutexp) ;
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
std::vector<LLSegment> segments;
if(copyIntoBuffers(channel, src, len, segments))
{
@ -329,7 +316,6 @@ bool LLBufferArray::prepend(S32 channel, const U8* src, S32 len)
{
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
std::vector<LLSegment> segments;
if(copyIntoBuffers(channel, src, len, segments))
{
@ -345,7 +331,6 @@ bool LLBufferArray::insertAfter(
const U8* src,
S32 len)
{
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
std::vector<LLSegment> segments;
LLMutexLock lock(mMutexp) ;
@ -366,7 +351,6 @@ LLBufferArray::segment_iterator_t LLBufferArray::splitAfter(U8* address)
{
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
segment_iterator_t end = mSegments.end();
segment_iterator_t it = getSegment(address);
if(it == end)
@ -414,7 +398,6 @@ LLBufferArray::segment_iterator_t LLBufferArray::constructSegmentAfter(
LLSegment& segment)
{
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
segment_iterator_t rv = mSegments.begin();
segment_iterator_t end = mSegments.end();
if(!address)
@ -578,7 +561,6 @@ U8* LLBufferArray::readAfter(
U8* dest,
S32& len) const
{
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
U8* rv = start;
if(!dest || len <= 0)
{
@ -642,7 +624,6 @@ U8* LLBufferArray::seek(
S32 delta) const
{
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
const_segment_iterator_t it;
const_segment_iterator_t end = mSegments.end();
U8* rv = start;
@ -786,8 +767,6 @@ U8* LLBufferArray::seek(
//test use only
bool LLBufferArray::takeContents(LLBufferArray& source)
{
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
LLMutexLock lock(mMutexp);
source.lock();
@ -813,7 +792,6 @@ LLBufferArray::segment_iterator_t LLBufferArray::makeSegment(
S32 len)
{
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
// start at the end of the buffers, because it is the most likely
// to have free space.
LLSegment segment;
@ -852,7 +830,6 @@ LLBufferArray::segment_iterator_t LLBufferArray::makeSegment(
bool LLBufferArray::eraseSegment(const segment_iterator_t& erase_iter)
{
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
// Find out which buffer contains the segment, and if it is found,
// ask it to reclaim the memory.
@ -885,7 +862,6 @@ bool LLBufferArray::copyIntoBuffers(
std::vector<LLSegment>& segments)
{
ASSERT_LLBUFFERARRAY_MUTEX_LOCKED
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
if(!src || !len) return false;
S32 copied = 0;
LLSegment segment;

View File

@ -30,7 +30,6 @@
#include "llbufferstream.h"
#include "llbuffer.h"
#include "llmemtype.h"
#include "llthread.h"
static const S32 DEFAULT_OUTPUT_SEGMENT_SIZE = 1024 * 4;
@ -44,19 +43,16 @@ LLBufferStreamBuf::LLBufferStreamBuf(
mChannels(channels),
mBuffer(buffer)
{
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
}
LLBufferStreamBuf::~LLBufferStreamBuf()
{
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
sync();
}
// virtual
int LLBufferStreamBuf::underflow()
{
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
//lldebugs << "LLBufferStreamBuf::underflow()" << llendl;
if(!mBuffer)
{
@ -129,7 +125,6 @@ int LLBufferStreamBuf::underflow()
// virtual
int LLBufferStreamBuf::overflow(int c)
{
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
if(!mBuffer)
{
return EOF;
@ -169,7 +164,6 @@ int LLBufferStreamBuf::overflow(int c)
// virtual
int LLBufferStreamBuf::sync()
{
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
int return_value = -1;
if(!mBuffer)
{
@ -251,7 +245,6 @@ streampos LLBufferStreamBuf::seekoff(
std::ios::openmode which)
#endif
{
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
if(!mBuffer
|| ((way == std::ios::beg) && (off < 0))
|| ((way == std::ios::end) && (off > 0)))
@ -343,10 +336,8 @@ LLBufferStream::LLBufferStream(
std::iostream(&mStreamBuf),
mStreamBuf(channels, buffer)
{
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
}
LLBufferStream::~LLBufferStream()
{
LLMemType m1(LLMemType::MTYPE_IO_BUFFER);
}

View File

@ -36,7 +36,6 @@
#include "llsdserialize.h"
#include "lluuid.h"
#include "message.h"
#include "llmemtype.h"
#include <boost/regex.hpp>
@ -663,7 +662,6 @@ boost::signals2::connection LLCacheName::get(const LLUUID& id, bool is_group, ol
void LLCacheName::processPending()
{
LLMemType mt_pp(LLMemType::MTYPE_CACHE_PROCESS_PENDING);
const F32 SECS_BETWEEN_PROCESS = 0.1f;
if(!impl.mProcessTimer.checkExpirationAndReset(SECS_BETWEEN_PROCESS))
{
@ -769,7 +767,6 @@ std::string LLCacheName::getDefaultLastName()
void LLCacheName::Impl::processPendingAsks()
{
LLMemType mt_ppa(LLMemType::MTYPE_CACHE_PROCESS_PENDING_ASKS);
sendRequest(_PREHASH_UUIDNameRequest, mAskNameQueue);
sendRequest(_PREHASH_UUIDGroupNameRequest, mAskGroupQueue);
mAskNameQueue.clear();
@ -778,7 +775,6 @@ void LLCacheName::Impl::processPendingAsks()
void LLCacheName::Impl::processPendingReplies()
{
LLMemType mt_ppr(LLMemType::MTYPE_CACHE_PROCESS_PENDING_REPLIES);
// First call all the callbacks, because they might send messages.
for(ReplyQueue::iterator it = mReplyQueue.begin(); it != mReplyQueue.end(); ++it)
{

View File

@ -679,7 +679,6 @@ void LLCircuitData::checkPacketInID(TPACKETID id, BOOL receive_resent)
setPacketInID((id + 1) % LL_MAX_OUT_PACKET_ID);
mLastPacketGap = 0;
mOutOfOrderRate.count(0);
return;
}
@ -775,7 +774,6 @@ void LLCircuitData::checkPacketInID(TPACKETID id, BOOL receive_resent)
}
}
mOutOfOrderRate.count(gap);
mLastPacketGap = gap;
}

View File

@ -40,7 +40,6 @@
#include "llpacketack.h"
#include "lluuid.h"
#include "llthrottle.h"
#include "llstat.h"
//
// Constants
@ -126,8 +125,6 @@ public:
S32 getUnackedPacketCount() const { return mUnackedPacketCount; }
S32 getUnackedPacketBytes() const { return mUnackedPacketBytes; }
F64 getNextPingSendTime() const { return mNextPingSendTime; }
F32 getOutOfOrderRate(LLStatAccum::TimeScale scale = LLStatAccum::SCALE_MINUTE)
{ return mOutOfOrderRate.meanValue(scale); }
U32 getLastPacketGap() const { return mLastPacketGap; }
LLHost getHost() const { return mHost; }
F64 getLastPacketInTime() const { return mLastPacketInTime; }
@ -275,7 +272,6 @@ protected:
LLTimer mExistenceTimer; // initialized when circuit created, used to track bandwidth numbers
S32 mCurrentResendCount; // Number of resent packets since last spam
LLStatRate mOutOfOrderRate; // Rate of out of order packets coming in.
U32 mLastPacketGap; // Gap in sequence number of last packet.
const F32 mHeartbeatInterval;

View File

@ -37,12 +37,10 @@
#include "lliopipe.h"
#include "lliosocket.h"
#include "llioutil.h"
#include "llmemtype.h"
#include "llmemorystream.h"
#include "llpumpio.h"
#include "llsd.h"
#include "llsdserialize_xml.h"
#include "llstat.h"
#include "llstl.h"
#include "lltimer.h"
@ -141,6 +139,11 @@ private:
};
static LLFastTimer::DeclareTimer FTM_PROCESS_HTTP_PIPE("HTTP Pipe");
static LLFastTimer::DeclareTimer FTM_PROCESS_HTTP_GET("HTTP Get");
static LLFastTimer::DeclareTimer FTM_PROCESS_HTTP_PUT("HTTP Put");
static LLFastTimer::DeclareTimer FTM_PROCESS_HTTP_POST("HTTP Post");
static LLFastTimer::DeclareTimer FTM_PROCESS_HTTP_DELETE("HTTP Delete");
LLIOPipe::EStatus LLHTTPPipe::process_impl(
const LLChannelDescriptors& channels,
buffer_ptr_t& buffer,
@ -177,12 +180,12 @@ LLIOPipe::EStatus LLHTTPPipe::process_impl(
std::string verb = context[CONTEXT_REQUEST][CONTEXT_VERB];
if(verb == HTTP_VERB_GET)
{
LLPerfBlock getblock("http_get");
LLFastTimer _(FTM_PROCESS_HTTP_GET);
mNode.get(LLHTTPNode::ResponsePtr(mResponse), context);
}
else if(verb == HTTP_VERB_PUT)
{
LLPerfBlock putblock("http_put");
LLFastTimer _(FTM_PROCESS_HTTP_PUT);
LLSD input;
if (mNode.getContentType() == LLHTTPNode::CONTENT_TYPE_LLSD)
{
@ -198,7 +201,7 @@ LLIOPipe::EStatus LLHTTPPipe::process_impl(
}
else if(verb == HTTP_VERB_POST)
{
LLPerfBlock postblock("http_post");
LLFastTimer _(FTM_PROCESS_HTTP_POST);
LLSD input;
if (mNode.getContentType() == LLHTTPNode::CONTENT_TYPE_LLSD)
{
@ -214,7 +217,7 @@ LLIOPipe::EStatus LLHTTPPipe::process_impl(
}
else if(verb == HTTP_VERB_DELETE)
{
LLPerfBlock delblock("http_delete");
LLFastTimer _(FTM_PROCESS_HTTP_DELETE);
mNode.del(LLHTTPNode::ResponsePtr(mResponse), context);
}
else if(verb == HTTP_VERB_OPTIONS)
@ -443,7 +446,6 @@ LLIOPipe::EStatus LLHTTPResponseHeader::process_impl(
{
LLFastTimer t(FTM_PROCESS_HTTP_HEADER);
PUMP_DEBUG;
LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER);
if(eos)
{
PUMP_DEBUG;
@ -587,13 +589,11 @@ LLHTTPResponder::LLHTTPResponder(const LLHTTPNode& tree, const LLSD& ctx) :
mContentLength(0),
mRootNode(tree)
{
LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER);
}
// virtual
LLHTTPResponder::~LLHTTPResponder()
{
LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER);
//lldebugs << "destroying LLHTTPResponder" << llendl;
}
@ -603,7 +603,6 @@ bool LLHTTPResponder::readHeaderLine(
U8* dest,
S32& len)
{
LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER);
--len;
U8* last = buffer->readAfter(channels.in(), mLastRead, dest, len);
dest[len] = '\0';
@ -628,7 +627,6 @@ void LLHTTPResponder::markBad(
const LLChannelDescriptors& channels,
buffer_ptr_t buffer)
{
LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER);
mState = STATE_SHORT_CIRCUIT;
LLBufferStream out(channels, buffer.get());
out << HTTP_VERSION_STR << " 400 Bad Request\r\n\r\n<html>\n"
@ -648,7 +646,6 @@ LLIOPipe::EStatus LLHTTPResponder::process_impl(
{
LLFastTimer t(FTM_PROCESS_HTTP_RESPONDER);
PUMP_DEBUG;
LLMemType m1(LLMemType::MTYPE_IO_HTTP_SERVER);
LLIOPipe::EStatus status = STATUS_OK;
// parsing headers

View File

@ -33,7 +33,6 @@
#include "llbuffer.h"
#include "llhost.h"
#include "llmemtype.h"
#include "llpumpio.h"
//
@ -100,7 +99,6 @@ void ll_debug_socket(const char* msg, apr_socket_t* apr_sock)
// static
LLSocket::ptr_t LLSocket::create(apr_pool_t* pool, EType type, U16 port)
{
LLMemType m1(LLMemType::MTYPE_IO_TCP);
LLSocket::ptr_t rv;
apr_socket_t* socket = NULL;
apr_pool_t* new_pool = NULL;
@ -198,7 +196,6 @@ LLSocket::ptr_t LLSocket::create(apr_pool_t* pool, EType type, U16 port)
// static
LLSocket::ptr_t LLSocket::create(apr_socket_t* socket, apr_pool_t* pool)
{
LLMemType m1(LLMemType::MTYPE_IO_TCP);
LLSocket::ptr_t rv;
if(!socket)
{
@ -240,12 +237,10 @@ LLSocket::LLSocket(apr_socket_t* socket, apr_pool_t* pool) :
mPort(PORT_INVALID)
{
ll_debug_socket("Constructing wholely formed socket", mSocket);
LLMemType m1(LLMemType::MTYPE_IO_TCP);
}
LLSocket::~LLSocket()
{
LLMemType m1(LLMemType::MTYPE_IO_TCP);
// *FIX: clean up memory we are holding.
if(mSocket)
{
@ -265,7 +260,6 @@ LLSocket::~LLSocket()
void LLSocket::setBlocking(S32 timeout)
{
LLMemType m1(LLMemType::MTYPE_IO_TCP);
// set up the socket options
ll_apr_warn_status(apr_socket_timeout_set(mSocket, timeout));
ll_apr_warn_status(apr_socket_opt_set(mSocket, APR_SO_NONBLOCK, 0));
@ -276,7 +270,6 @@ void LLSocket::setBlocking(S32 timeout)
void LLSocket::setNonBlocking()
{
LLMemType m1(LLMemType::MTYPE_IO_TCP);
// set up the socket options
ll_apr_warn_status(apr_socket_timeout_set(mSocket, 0));
ll_apr_warn_status(apr_socket_opt_set(mSocket, APR_SO_NONBLOCK, 1));
@ -293,12 +286,10 @@ LLIOSocketReader::LLIOSocketReader(LLSocket::ptr_t socket) :
mSource(socket),
mInitialized(false)
{
LLMemType m1(LLMemType::MTYPE_IO_TCP);
}
LLIOSocketReader::~LLIOSocketReader()
{
LLMemType m1(LLMemType::MTYPE_IO_TCP);
//lldebugs << "Destroying LLIOSocketReader" << llendl;
}
@ -314,7 +305,6 @@ LLIOPipe::EStatus LLIOSocketReader::process_impl(
{
LLFastTimer t(FTM_PROCESS_SOCKET_READER);
PUMP_DEBUG;
LLMemType m1(LLMemType::MTYPE_IO_TCP);
if(!mSource) return STATUS_PRECONDITION_NOT_MET;
if(!mInitialized)
{
@ -396,12 +386,10 @@ LLIOSocketWriter::LLIOSocketWriter(LLSocket::ptr_t socket) :
mLastWritten(NULL),
mInitialized(false)
{
LLMemType m1(LLMemType::MTYPE_IO_TCP);
}
LLIOSocketWriter::~LLIOSocketWriter()
{
LLMemType m1(LLMemType::MTYPE_IO_TCP);
//lldebugs << "Destroying LLIOSocketWriter" << llendl;
}
@ -416,7 +404,6 @@ LLIOPipe::EStatus LLIOSocketWriter::process_impl(
{
LLFastTimer t(FTM_PROCESS_SOCKET_WRITER);
PUMP_DEBUG;
LLMemType m1(LLMemType::MTYPE_IO_TCP);
if(!mDestination) return STATUS_PRECONDITION_NOT_MET;
if(!mInitialized)
{
@ -550,12 +537,10 @@ LLIOServerSocket::LLIOServerSocket(
mInitialized(false),
mResponseTimeout(DEFAULT_CHAIN_EXPIRY_SECS)
{
LLMemType m1(LLMemType::MTYPE_IO_TCP);
}
LLIOServerSocket::~LLIOServerSocket()
{
LLMemType m1(LLMemType::MTYPE_IO_TCP);
//lldebugs << "Destroying LLIOServerSocket" << llendl;
}
@ -575,7 +560,6 @@ LLIOPipe::EStatus LLIOServerSocket::process_impl(
{
LLFastTimer t(FTM_PROCESS_SERVER_SOCKET);
PUMP_DEBUG;
LLMemType m1(LLMemType::MTYPE_IO_TCP);
if(!pump)
{
llwarns << "Need a pump for server socket." << llendl;

View File

@ -29,7 +29,6 @@
#include "lldarray.h"
#include "message.h" // TODO: babbage: Remove...
#include "llstat.h"
#include "llstl.h"
class LLMsgVarData
@ -263,6 +262,7 @@ enum EMsgDeprecation
MD_DEPRECATED
};
class LLMessageTemplate
{
public:
@ -364,7 +364,6 @@ public:
{
if (mHandlerFunc)
{
LLPerfBlock msg_cb_time("msg_cb", mName);
mHandlerFunc(msgsystem, mUserData);
return TRUE;
}

View File

@ -34,9 +34,7 @@
#include "apr_poll.h"
#include "llapr.h"
#include "llmemtype.h"
#include "llstl.h"
#include "llstat.h"
// These should not be enabled in production, but they can be
// intensely useful during development for finding certain kinds of
@ -153,7 +151,6 @@ struct ll_delete_apr_pollset_fd_client_data
typedef std::pair<LLIOPipe::ptr_t, apr_pollfd_t> pipe_conditional_t;
void operator()(const pipe_conditional_t& conditional)
{
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
S32* client_id = (S32*)conditional.second.client_data;
delete client_id;
}
@ -177,19 +174,16 @@ LLPumpIO::LLPumpIO(apr_pool_t* pool) :
{
mCurrentChain = mRunningChains.end();
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
initialize(pool);
}
LLPumpIO::~LLPumpIO()
{
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
cleanup();
}
bool LLPumpIO::prime(apr_pool_t* pool)
{
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
cleanup();
initialize(pool);
return ((pool == NULL) ? false : true);
@ -197,7 +191,6 @@ bool LLPumpIO::prime(apr_pool_t* pool)
bool LLPumpIO::addChain(const chain_t& chain, F32 timeout, bool has_curl_request)
{
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
if(chain.empty()) return false;
#if LL_THREADS_APR
@ -233,7 +226,6 @@ bool LLPumpIO::addChain(
LLSD context,
F32 timeout)
{
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
// remember that if the caller is providing a full link
// description, we need to have that description matched to a
@ -311,7 +303,6 @@ static std::string events_2_string(apr_int16_t events)
bool LLPumpIO::setConditional(LLIOPipe* pipe, const apr_pollfd_t* poll)
{
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
if(!pipe) return false;
ll_debug_poll_fd("Set conditional", poll);
@ -423,7 +414,6 @@ bool LLPumpIO::sleepChain(F64 seconds)
bool LLPumpIO::copyCurrentLinkInfo(links_t& links) const
{
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
if(mRunningChains.end() == mCurrentChain)
{
return false;
@ -441,6 +431,7 @@ void LLPumpIO::pump()
}
static LLFastTimer::DeclareTimer FTM_PUMP_IO("Pump IO");
static LLFastTimer::DeclareTimer FTM_PUMP_POLL("Pump Poll");
LLPumpIO::current_chain_t LLPumpIO::removeRunningChain(LLPumpIO::current_chain_t& run_chain)
{
@ -454,7 +445,6 @@ LLPumpIO::current_chain_t LLPumpIO::removeRunningChain(LLPumpIO::current_chain_t
//timeout is in microseconds
void LLPumpIO::pump(const S32& poll_timeout)
{
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
LLFastTimer t1(FTM_PUMP_IO);
//llinfos << "LLPumpIO::pump()" << llendl;
@ -536,7 +526,7 @@ void LLPumpIO::pump(const S32& poll_timeout)
S32 count = 0;
S32 client_id = 0;
{
LLPerfBlock polltime("pump_poll");
LLFastTimer _(FTM_PUMP_POLL);
apr_pollset_poll(mPollset, poll_timeout, &count, &poll_fd);
}
PUMP_DEBUG;
@ -747,7 +737,6 @@ void LLPumpIO::pump(const S32& poll_timeout)
bool LLPumpIO::respond(LLIOPipe* pipe)
{
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
if(NULL == pipe) return false;
#if LL_THREADS_APR
@ -766,7 +755,6 @@ bool LLPumpIO::respond(
LLIOPipe::buffer_ptr_t data,
LLSD context)
{
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
// if the caller is providing a full link description, we need to
// have that description matched to a particular buffer.
if(!data) return false;
@ -789,7 +777,6 @@ static LLFastTimer::DeclareTimer FTM_PUMP_CALLBACK_CHAIN("Chain");
void LLPumpIO::callback()
{
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
//llinfos << "LLPumpIO::callback()" << llendl;
if(true)
{
@ -840,7 +827,6 @@ void LLPumpIO::control(LLPumpIO::EControl op)
void LLPumpIO::initialize(apr_pool_t* pool)
{
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
if(!pool) return;
#if LL_THREADS_APR
// SJB: Windows defaults to NESTED and OSX defaults to UNNESTED, so use UNNESTED explicitly.
@ -852,7 +838,6 @@ void LLPumpIO::initialize(apr_pool_t* pool)
void LLPumpIO::cleanup()
{
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
#if LL_THREADS_APR
if(mChainsMutex) apr_thread_mutex_destroy(mChainsMutex);
if(mCallbackMutex) apr_thread_mutex_destroy(mCallbackMutex);
@ -875,7 +860,6 @@ void LLPumpIO::cleanup()
void LLPumpIO::rebuildPollset()
{
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
// lldebugs << "LLPumpIO::rebuildPollset()" << llendl;
if(mPollset)
{
@ -928,7 +912,6 @@ void LLPumpIO::rebuildPollset()
void LLPumpIO::processChain(LLChainInfo& chain)
{
PUMP_DEBUG;
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
LLIOPipe::EStatus status = LLIOPipe::STATUS_OK;
links_t::iterator it = chain.mHead;
links_t::iterator end = chain.mChainLinks.end();
@ -1130,7 +1113,6 @@ bool LLPumpIO::handleChainError(
LLChainInfo& chain,
LLIOPipe::EStatus error)
{
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
links_t::reverse_iterator rit;
if(chain.mHead == chain.mChainLinks.end())
{
@ -1194,13 +1176,11 @@ LLPumpIO::LLChainInfo::LLChainInfo() :
mEOS(false),
mHasCurlRequest(false)
{
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
mTimer.setTimerExpirySec(DEFAULT_CHAIN_EXPIRY_SECS);
}
void LLPumpIO::LLChainInfo::setTimeoutSeconds(F32 timeout)
{
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
if(timeout > 0.0f)
{
mTimer.start();
@ -1215,7 +1195,6 @@ void LLPumpIO::LLChainInfo::setTimeoutSeconds(F32 timeout)
void LLPumpIO::LLChainInfo::adjustTimeoutSeconds(F32 delta)
{
LLMemType m1(LLMemType::MTYPE_IO_PUMP);
if(mTimer.getStarted())
{
F64 expiry = mTimer.expiresAt();

View File

@ -31,7 +31,6 @@
#include "llbufferstream.h"
#include "llfiltersd2xmlrpc.h"
#include "llmemtype.h"
#include "llpumpio.h"
#include "llsd.h"
#include "llsdserialize.h"
@ -50,18 +49,15 @@ LLSDRPCResponse::LLSDRPCResponse() :
mIsError(false),
mIsFault(false)
{
LLMemType m1(LLMemType::MTYPE_IO_SD_CLIENT);
}
// virtual
LLSDRPCResponse::~LLSDRPCResponse()
{
LLMemType m1(LLMemType::MTYPE_IO_SD_CLIENT);
}
bool LLSDRPCResponse::extractResponse(const LLSD& sd)
{
LLMemType m1(LLMemType::MTYPE_IO_SD_CLIENT);
bool rv = true;
if(sd.has(LLSDRPC_RESPONSE_NAME))
{
@ -94,7 +90,6 @@ LLIOPipe::EStatus LLSDRPCResponse::process_impl(
{
LLFastTimer t(FTM_SDRPC_RESPONSE);
PUMP_DEBUG;
LLMemType m1(LLMemType::MTYPE_IO_SD_CLIENT);
if(mIsError)
{
error(pump);
@ -119,13 +114,11 @@ LLSDRPCClient::LLSDRPCClient() :
mState(STATE_NONE),
mQueue(EPBQ_PROCESS)
{
LLMemType m1(LLMemType::MTYPE_IO_SD_CLIENT);
}
// virtual
LLSDRPCClient::~LLSDRPCClient()
{
LLMemType m1(LLMemType::MTYPE_IO_SD_CLIENT);
}
bool LLSDRPCClient::call(
@ -135,7 +128,6 @@ bool LLSDRPCClient::call(
LLSDRPCResponse* response,
EPassBackQueue queue)
{
LLMemType m1(LLMemType::MTYPE_IO_SD_CLIENT);
//llinfos << "RPC: " << uri << "." << method << "(" << *parameter << ")"
// << llendl;
if(method.empty() || !response)
@ -162,7 +154,6 @@ bool LLSDRPCClient::call(
LLSDRPCResponse* response,
EPassBackQueue queue)
{
LLMemType m1(LLMemType::MTYPE_IO_SD_CLIENT);
//llinfos << "RPC: " << uri << "." << method << "(" << parameter << ")"
// << llendl;
if(method.empty() || parameter.empty() || !response)
@ -193,7 +184,6 @@ LLIOPipe::EStatus LLSDRPCClient::process_impl(
{
LLFastTimer t(FTM_PROCESS_SDRPC_CLIENT);
PUMP_DEBUG;
LLMemType m1(LLMemType::MTYPE_IO_SD_CLIENT);
if((STATE_NONE == mState) || (!pump))
{
// You should have called the call() method already.

View File

@ -31,7 +31,6 @@
#include "llbuffer.h"
#include "llbufferstream.h"
#include "llmemtype.h"
#include "llpumpio.h"
#include "llsdserialize.h"
#include "llstl.h"
@ -58,12 +57,10 @@ LLSDRPCServer::LLSDRPCServer() :
mPump(NULL),
mLock(0)
{
LLMemType m1(LLMemType::MTYPE_IO_SD_SERVER);
}
LLSDRPCServer::~LLSDRPCServer()
{
LLMemType m1(LLMemType::MTYPE_IO_SD_SERVER);
std::for_each(
mMethods.begin(),
mMethods.end(),
@ -109,7 +106,6 @@ LLIOPipe::EStatus LLSDRPCServer::process_impl(
{
LLFastTimer t(FTM_PROCESS_SDRPC_SERVER);
PUMP_DEBUG;
LLMemType m1(LLMemType::MTYPE_IO_SD_SERVER);
// lldebugs << "LLSDRPCServer::process_impl" << llendl;
// Once we have all the data, We need to read the sd on
// the the in channel, and respond on the out channel
@ -253,7 +249,6 @@ ESDRPCSStatus LLSDRPCServer::callMethod(
const LLChannelDescriptors& channels,
LLBufferArray* response)
{
LLMemType m1(LLMemType::MTYPE_IO_SD_SERVER);
// Try to find the method in the method table.
ESDRPCSStatus rv = ESDRPCS_DONE;
method_map_t::iterator it = mMethods.find(method);
@ -292,7 +287,6 @@ ESDRPCSStatus LLSDRPCServer::callbackMethod(
const LLChannelDescriptors& channels,
LLBufferArray* response)
{
LLMemType m1(LLMemType::MTYPE_IO_SD_SERVER);
// Try to find the method in the callback method table.
ESDRPCSStatus rv = ESDRPCS_DONE;
method_map_t::iterator it = mCallbackMethods.find(method);
@ -320,7 +314,6 @@ void LLSDRPCServer::buildFault(
S32 code,
const std::string& msg)
{
LLMemType m1(LLMemType::MTYPE_IO_SD_SERVER);
LLBufferStream ostr(channels, data);
ostr << FAULT_PART_1 << code << FAULT_PART_2 << msg << FAULT_PART_3;
llinfos << "LLSDRPCServer::buildFault: " << code << ", " << msg << llendl;
@ -332,7 +325,6 @@ void LLSDRPCServer::buildResponse(
LLBufferArray* data,
const LLSD& response)
{
LLMemType m1(LLMemType::MTYPE_IO_SD_SERVER);
LLBufferStream ostr(channels, data);
ostr << RESPONSE_PART_1;
LLSDSerialize::toNotation(response, ostr);

View File

@ -34,7 +34,6 @@
#include <openssl/ssl.h>
#include "llcurl.h"
#include "llioutil.h"
#include "llmemtype.h"
#include "llproxy.h"
#include "llpumpio.h"
#include "llsd.h"
@ -81,7 +80,6 @@ LLURLRequestDetail::LLURLRequestDetail() :
mIsBodyLimitSet(false),
mSSLVerifyCallback(NULL)
{
LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST);
mCurlRequest = new LLCurlEasyRequest();
if(!mCurlRequest->isValid()) //failed.
@ -93,7 +91,6 @@ LLURLRequestDetail::LLURLRequestDetail() :
LLURLRequestDetail::~LLURLRequestDetail()
{
LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST);
delete mCurlRequest;
mLastRead = NULL;
}
@ -156,7 +153,6 @@ std::string LLURLRequest::actionAsVerb(LLURLRequest::ERequestAction action)
LLURLRequest::LLURLRequest(LLURLRequest::ERequestAction action) :
mAction(action)
{
LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST);
initialize();
}
@ -165,21 +161,18 @@ LLURLRequest::LLURLRequest(
const std::string& url) :
mAction(action)
{
LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST);
initialize();
setURL(url);
}
LLURLRequest::~LLURLRequest()
{
LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST);
delete mDetail;
mDetail = NULL ;
}
void LLURLRequest::setURL(const std::string& url)
{
LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST);
mDetail->mURL = url;
if (url.empty())
{
@ -194,7 +187,6 @@ std::string LLURLRequest::getURL() const
void LLURLRequest::addHeader(const char* header)
{
LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST);
mDetail->mCurlRequest->slist_append(header);
}
@ -206,7 +198,6 @@ void LLURLRequest::setBodyLimit(U32 size)
void LLURLRequest::setCallback(LLURLRequestComplete* callback)
{
LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST);
mCompletionCallback = callback;
mDetail->mCurlRequest->setHeaderCallback(&headerCallback, (void*)callback);
}
@ -271,8 +262,6 @@ LLIOPipe::EStatus LLURLRequest::handleError(
LLIOPipe::EStatus status,
LLPumpIO* pump)
{
LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST);
if(!isValid())
{
return STATUS_EXPIRED ;
@ -306,7 +295,6 @@ LLIOPipe::EStatus LLURLRequest::process_impl(
{
LLFastTimer t(FTM_PROCESS_URL_REQUEST);
PUMP_DEBUG;
LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST);
//llinfos << "LLURLRequest::process_impl()" << llendl;
if (!buffer) return STATUS_ERROR;
@ -372,7 +360,8 @@ LLIOPipe::EStatus LLURLRequest::process_impl(
}
}
while(1)
bool keep_looping = true;
while(keep_looping)
{
CURLcode result;
@ -424,8 +413,9 @@ LLIOPipe::EStatus LLURLRequest::process_impl(
case CURLE_FAILED_INIT:
case CURLE_COULDNT_CONNECT:
status = STATUS_NO_CONNECTION;
keep_looping = false;
break;
default:
default: // CURLE_URL_MALFORMAT
llwarns << "URLRequest Error: " << result
<< ", "
<< LLCurl::strerror(result)
@ -433,6 +423,7 @@ LLIOPipe::EStatus LLURLRequest::process_impl(
<< (mDetail->mURL.empty() ? "<EMPTY URL>" : mDetail->mURL)
<< llendl;
status = STATUS_ERROR;
keep_looping = false;
break;
}
}
@ -459,7 +450,6 @@ LLIOPipe::EStatus LLURLRequest::process_impl(
void LLURLRequest::initialize()
{
LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST);
mState = STATE_INITIALIZED;
mDetail = new LLURLRequestDetail;
@ -480,7 +470,6 @@ bool LLURLRequest::configure()
{
LLFastTimer t(FTM_URL_REQUEST_CONFIGURE);
LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST);
bool rv = false;
S32 bytes = mDetail->mResponseBuffer->countAfter(
mDetail->mChannels.in(),
@ -560,7 +549,6 @@ size_t LLURLRequest::downCallback(
size_t nmemb,
void* user)
{
LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST);
LLURLRequest* req = (LLURLRequest*)user;
if(STATE_WAITING_FOR_RESPONSE == req->mState)
{
@ -596,7 +584,6 @@ size_t LLURLRequest::upCallback(
size_t nmemb,
void* user)
{
LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST);
LLURLRequest* req = (LLURLRequest*)user;
S32 bytes = llmin(
(S32)(size * nmemb),
@ -694,7 +681,6 @@ LLIOPipe::EStatus LLContextURLExtractor::process_impl(
{
LLFastTimer t(FTM_PROCESS_URL_EXTRACTOR);
PUMP_DEBUG;
LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST);
// The destination host is in the context.
if(context.isUndefined() || !mRequest)
{
@ -722,13 +708,11 @@ LLIOPipe::EStatus LLContextURLExtractor::process_impl(
LLURLRequestComplete::LLURLRequestComplete() :
mRequestStatus(LLIOPipe::STATUS_ERROR)
{
LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST);
}
// virtual
LLURLRequestComplete::~LLURLRequestComplete()
{
LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST);
}
//virtual
@ -767,7 +751,6 @@ void LLURLRequestComplete::noResponse()
void LLURLRequestComplete::responseStatus(LLIOPipe::EStatus status)
{
LLMemType m1(LLMemType::MTYPE_IO_URL_REQUEST);
mRequestStatus = status;
}

View File

@ -886,8 +886,17 @@ void LLXferManager::processFileRequest (LLMessageSystem *mesgsys, void ** /*user
return;
}
std::string expanded_filename = gDirUtilp->getExpandedFilename( local_path, local_filename );
// If we want to use a special path (e.g. LL_PATH_CACHE), we want to make sure we create the
// proper expanded filename.
std::string expanded_filename;
if (local_path != LL_PATH_NONE)
{
expanded_filename = gDirUtilp->getExpandedFilename( local_path, local_filename );
}
else
{
expanded_filename = local_filename;
}
llinfos << "starting file transfer: " << expanded_filename << " to " << mesgsys->getSender() << llendl;
BOOL delete_local_on_completion = FALSE;

View File

@ -80,7 +80,6 @@
#include "v3math.h"
#include "v4math.h"
#include "lltransfertargetvfile.h"
#include "llmemtype.h"
// Constants
//const char* MESSAGE_LOG_FILENAME = "message.log";
@ -793,7 +792,6 @@ S32 LLMessageSystem::getReceiveBytes() const
void LLMessageSystem::processAcks()
{
LLMemType mt_pa(LLMemType::MTYPE_MESSAGE_PROCESS_ACKS);
F64 mt_sec = getMessageTimeSeconds();
{
gTransferManager.updateTransfers();
@ -4020,7 +4018,6 @@ void LLMessageSystem::setTimeDecodesSpamThreshold( F32 seconds )
// TODO: babbage: move gServicePump in to LLMessageSystem?
bool LLMessageSystem::checkAllMessages(S64 frame_count, LLPumpIO* http_pump)
{
LLMemType mt_cam(LLMemType::MTYPE_MESSAGE_CHECK_ALL);
if(checkMessages(frame_count))
{
return true;

View File

@ -51,15 +51,20 @@ namespace tut
{
public:
HTTPClientTestData():
local_server(STRINGIZE("http://127.0.0.1:" << getenv("PORT") << "/"))
PORT(getenv("PORT")),
// Turning NULL PORT into empty string doesn't make things work;
// that's just to keep this initializer from blowing up. We test
// PORT separately in the constructor body.
local_server(STRINGIZE("http://127.0.0.1:" << (PORT? PORT : "") << "/"))
{
ensure("Set environment variable PORT to local test server port", PORT);
apr_pool_create(&mPool, NULL);
LLCurl::initClass(false);
mClientPump = new LLPumpIO(mPool);
LLHTTPClient::setPump(*mClientPump);
}
~HTTPClientTestData()
{
delete mClientPump;
@ -83,6 +88,7 @@ namespace tut
}
}
const char* const PORT;
const std::string local_server;
private:
@ -96,11 +102,11 @@ namespace tut
{
std::string msg =
llformat("error() called when not expected, status %d",
mStatus);
mStatus);
fail(msg);
}
}
void ensureStatusError()
{
if (!mSawError)
@ -108,7 +114,7 @@ namespace tut
fail("error() wasn't called");
}
}
LLSD getResult()
{
return mResult;
@ -117,7 +123,7 @@ namespace tut
{
return mHeader;
}
protected:
bool mSawError;
U32 mStatus;
@ -135,18 +141,18 @@ namespace tut
: mClient(client)
{
}
public:
static Result* build(HTTPClientTestData& client)
{
return new Result(client);
}
~Result()
{
mClient.mResultDeleted = true;
}
virtual void error(U32 status, const std::string& reason)
{
mClient.mSawError = true;
@ -164,7 +170,7 @@ namespace tut
const LLSD& content)
{
LLHTTPClient::Responder::completed(status, reason, content);
mClient.mSawCompleted = true;
}
@ -192,12 +198,12 @@ namespace tut
mResult.clear();
mHeader.clear();
mResultDeleted = false;
return Result::build(*this);
}
};
typedef test_group<HTTPClientTestData> HTTPClientTestGroup;
typedef HTTPClientTestGroup::object HTTPClientTestObject;
HTTPClientTestGroup httpClientTestGroup("http_client");

View File

@ -18,7 +18,6 @@ include_directories(SYSTEM
if (DARWIN)
include(CMakeFindFrameworks)
find_library(CARBON_LIBRARY Carbon)
find_library(COCOA_LIBRARY Cocoa)
endif (DARWIN)
@ -71,7 +70,7 @@ add_dependencies(SLPlugin
if (DARWIN)
# Mac version needs to link against Carbon
target_link_libraries(SLPlugin ${CARBON_LIBRARY} ${COCOA_LIBRARY})
target_link_libraries(SLPlugin ${COCOA_LIBRARY})
# Make sure the app bundle has a Resources directory (it will get populated by viewer-manifest.py later)
add_custom_command(
TARGET SLPlugin POST_BUILD

View File

@ -28,8 +28,26 @@
* @endcond
*/
//Protos for ObjectiveC classes (cannot import cocoa here due to BOOL conflict)
class NSWindow;
/* Defined in slplugin-objc.mm: */
void setupCocoa();
void createAutoReleasePool();
void deleteAutoReleasePool();
class LLCocoaPlugin
{
public:
LLCocoaPlugin();
void setupCocoa();
void createAutoReleasePool();
void deleteAutoReleasePool();
void setupGroup();
void updateWindows();
void processEvents();
public:
//EventTargetRef mEventTarget;
NSWindow* mFrontWindow;
NSWindow* mPluginWindow;
int mHackState;
};

View File

@ -30,11 +30,13 @@
#include <AppKit/AppKit.h>
#import <Cocoa/Cocoa.h>
#include "slplugin-objc.h"
//Note: NSApp is a global defined by cocoa which is an id to the application.
void setupCocoa()
void LLCocoaPlugin::setupCocoa()
{
static bool inited = false;
@ -56,6 +58,8 @@ void setupCocoa()
// Must first call [[[NSWindow alloc] init] release] to get the NSWindow machinery set up so that NSCursor can use a window to cache the cursor image
[[[NSWindow alloc] init] release];
mPluginWindow = [NSApp mainWindow];
deleteAutoReleasePool();
inited = true;
@ -64,7 +68,7 @@ void setupCocoa()
static NSAutoreleasePool *sPool = NULL;
void createAutoReleasePool()
void LLCocoaPlugin::createAutoReleasePool()
{
if(!sPool)
{
@ -72,7 +76,7 @@ void createAutoReleasePool()
}
}
void deleteAutoReleasePool()
void LLCocoaPlugin::deleteAutoReleasePool()
{
if(sPool)
{
@ -80,3 +84,94 @@ void deleteAutoReleasePool()
sPool = NULL;
}
}
LLCocoaPlugin::LLCocoaPlugin():mHackState(0)
{
NSArray* window_list = [NSApp orderedWindows];
mFrontWindow = [window_list objectAtIndex:0];
}
void LLCocoaPlugin::processEvents()
{
// Some plugins (webkit at least) will want an event loop. This qualifies.
NSEvent * event;
event = [NSApp nextEventMatchingMask:NSAnyEventMask untilDate:[NSDate distantPast] inMode:NSDefaultRunLoopMode dequeue:YES];
[NSApp sendEvent: event];
}
//Turns out the window ordering stuff never gets hit with any of the current plugins.
//Leaving the following code here 'just in case' for the time being.
void LLCocoaPlugin::setupGroup()
{
// CreateWindowGroup(kWindowGroupAttrFixedLevel, &layer_group);
// if(layer_group)
// {
// // Start out with a window layer that's way out in front (fixes the problem with the menubar not getting hidden on first switch to fullscreen youtube)
// SetWindowGroupName(layer_group, CFSTR("SLPlugin Layer"));
// SetWindowGroupLevel(layer_group, kCGOverlayWindowLevel);
// }
}
void LLCocoaPlugin::updateWindows() //SPATTERS give this a better name.
{
// NSArray* window_list = [NSApp orderedWindows];
// NSWindow* current_window = [window_list objectAtIndex:0];
// NSWindow* parent_window = [ current_window parentWindow ];
// bool this_is_front_process = false;
// bool parent_is_front_process = false;
//
//
// // Check for a change in this process's frontmost window.
// if ( current_window != mFrontWindow )
// {
// // and figure out whether this process or its parent are currently frontmost
// if ( current_window == parent_window ) parent_is_front_process = true;
// if ( current_window == mPluginWindow ) this_is_front_process = true;
//
// if (current_window != NULL && mFrontWindow == NULL)
// {
// // Opening the first window
//
// if(mHackState == 0)
// {
// // Next time through the event loop, lower the window group layer
// mHackState = 1;
// }
//
// if(parent_is_front_process)
// {
// // Bring this process's windows to the front.
// [mPluginWindow makeKeyAndOrderFront:NSApp];
// [mPluginWindow setOrderedIndex:0];
// }
//
// [NSApp activateIgnoringOtherApps:YES];
// }
//
// else if (( current_window == NULL) && (mFrontWindow != NULL))
// {
// // Closing the last window
//
// if(this_is_front_process)
// {
// // Try to bring this process's parent to the front
// [parent_window makeKeyAndOrderFront:NSApp];
// [parent_window setOrderedIndex:0];
// }
// }
// else if(mHackState == 1)
// {
//// if(layer_group)
//// {
//// // Set the window group level back to something less extreme
//// SetWindowGroupLevel(layer_group, kCGNormalWindowLevel);
//// }
// mHackState = 2;
// }
//
// mFrontWindow = [window_list objectAtIndex:0];
// }
}

View File

@ -37,8 +37,12 @@
#include "llapr.h"
#include "llstring.h"
#include <iostream>
#include <fstream>
using namespace std;
#if LL_DARWIN
#include <Carbon/Carbon.h>
#include "slplugin-objc.h"
#endif
@ -176,6 +180,7 @@ int APIENTRY WinMain( HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdL
int main(int argc, char **argv)
#endif
{
ll_init_apr();
// Set up llerror logging
@ -216,26 +221,25 @@ int main(int argc, char **argv)
// Catch signals that most kinds of crashes will generate, and exit cleanly so the system crash dialog isn't shown.
signal(SIGILL, &crash_handler); // illegal instruction
# if LL_DARWIN
signal(SIGEMT, &crash_handler); // emulate instruction executed
# endif // LL_DARWIN
signal(SIGFPE, &crash_handler); // floating-point exception
signal(SIGBUS, &crash_handler); // bus error
signal(SIGSEGV, &crash_handler); // segmentation violation
signal(SIGSYS, &crash_handler); // non-existent system call invoked
#endif
# if LL_DARWIN
signal(SIGEMT, &crash_handler); // emulate instruction executed
#if LL_DARWIN
setupCocoa();
createAutoReleasePool();
#endif
LLCocoaPlugin cocoa_interface;
cocoa_interface.setupCocoa();
cocoa_interface.createAutoReleasePool();
#endif //LL_DARWIN
LLPluginProcessChild *plugin = new LLPluginProcessChild();
plugin->init(port);
#if LL_DARWIN
deleteAutoReleasePool();
cocoa_interface.deleteAutoReleasePool();
#endif
LLTimer timer;
@ -246,114 +250,22 @@ int main(int argc, char **argv)
#endif
#if LL_DARWIN
// If the plugin opens a new window (such as the Flash plugin's fullscreen player), we may need to bring this plugin process to the foreground.
// Use this to track the current frontmost window and bring this process to the front if it changes.
WindowRef front_window = NULL;
WindowGroupRef layer_group = NULL;
int window_hack_state = 0;
CreateWindowGroup(kWindowGroupAttrFixedLevel, &layer_group);
if(layer_group)
{
// Start out with a window layer that's way out in front (fixes the problem with the menubar not getting hidden on first switch to fullscreen youtube)
SetWindowGroupName(layer_group, CFSTR("SLPlugin Layer"));
SetWindowGroupLevel(layer_group, kCGOverlayWindowLevel);
}
#endif
#if LL_DARWIN
EventTargetRef event_target = GetEventDispatcherTarget();
// cocoa_interface.mEventTarget = GetEventDispatcherTarget();
#endif
while(!plugin->isDone())
{
#if LL_DARWIN
createAutoReleasePool();
cocoa_interface.createAutoReleasePool();
#endif
timer.reset();
plugin->idle();
#if LL_DARWIN
{
// Some plugins (webkit at least) will want an event loop. This qualifies.
EventRef event;
if(ReceiveNextEvent(0, 0, kEventDurationNoWait, true, &event) == noErr)
{
SendEventToEventTarget (event, event_target);
ReleaseEvent(event);
}
// Check for a change in this process's frontmost window.
if(GetFrontWindowOfClass(kAllWindowClasses, true) != front_window)
{
ProcessSerialNumber self = { 0, kCurrentProcess };
ProcessSerialNumber parent = { 0, kNoProcess };
ProcessSerialNumber front = { 0, kNoProcess };
Boolean this_is_front_process = false;
Boolean parent_is_front_process = false;
{
// Get this process's parent
ProcessInfoRec info;
info.processInfoLength = sizeof(ProcessInfoRec);
info.processName = NULL;
info.processAppSpec = NULL;
if(GetProcessInformation( &self, &info ) == noErr)
{
parent = info.processLauncher;
}
// and figure out whether this process or its parent are currently frontmost
if(GetFrontProcess(&front) == noErr)
{
(void) SameProcess(&self, &front, &this_is_front_process);
(void) SameProcess(&parent, &front, &parent_is_front_process);
}
}
if((GetFrontWindowOfClass(kAllWindowClasses, true) != NULL) && (front_window == NULL))
{
// Opening the first window
if(window_hack_state == 0)
{
// Next time through the event loop, lower the window group layer
window_hack_state = 1;
}
if(layer_group)
{
SetWindowGroup(GetFrontWindowOfClass(kAllWindowClasses, true), layer_group);
}
if(parent_is_front_process)
{
// Bring this process's windows to the front.
(void) SetFrontProcess( &self );
}
ActivateWindow(GetFrontWindowOfClass(kAllWindowClasses, true), true);
}
else if((GetFrontWindowOfClass(kAllWindowClasses, true) == NULL) && (front_window != NULL))
{
// Closing the last window
if(this_is_front_process)
{
// Try to bring this process's parent to the front
(void) SetFrontProcess(&parent);
}
}
else if(window_hack_state == 1)
{
if(layer_group)
{
// Set the window group level back to something less extreme
SetWindowGroupLevel(layer_group, kCGNormalWindowLevel);
}
window_hack_state = 2;
}
front_window = GetFrontWindowOfClass(kAllWindowClasses, true);
}
}
cocoa_interface.processEvents();
}
#endif
F64 elapsed = timer.getElapsedTimeF64();
F64 remaining = plugin->getSleepTime() - elapsed;
@ -377,7 +289,8 @@ int main(int argc, char **argv)
// LL_INFOS("slplugin") << "slept for "<< timer.getElapsedTimeF64() * 1000.0f << " ms" << LL_ENDL;
}
#if LL_WINDOWS
// More agressive checking of interfering exception handlers.
// Doesn't appear to be required so far - even for plugins
@ -387,14 +300,14 @@ int main(int argc, char **argv)
#endif
#if LL_DARWIN
deleteAutoReleasePool();
cocoa_interface.deleteAutoReleasePool();
#endif
}
delete plugin;
ll_cleanup_apr();
return 0;
}

View File

@ -27,7 +27,6 @@
#include "linden_common.h"
#include "material_codes.h"
#include "llmemtype.h"
#include "llerror.h"
#include "message.h"
#include "llprimitive.h"
@ -190,7 +189,6 @@ void LLPrimitive::clearTextureList()
// static
LLPrimitive *LLPrimitive::createPrimitive(LLPCode p_code)
{
LLMemType m1(LLMemType::MTYPE_PRIMITIVE);
LLPrimitive *retval = new LLPrimitive();
if (retval)
@ -208,7 +206,6 @@ LLPrimitive *LLPrimitive::createPrimitive(LLPCode p_code)
//===============================================================
void LLPrimitive::init_primitive(LLPCode p_code)
{
LLMemType m1(LLMemType::MTYPE_PRIMITIVE);
clearTextureList();
mPrimitiveCode = p_code;
}
@ -706,7 +703,6 @@ S32 face_index_from_id(LLFaceID face_ID, const std::vector<LLProfile::Face>& fac
BOOL LLPrimitive::setVolume(const LLVolumeParams &volume_params, const S32 detail, bool unique_volume)
{
LLMemType m1(LLMemType::MTYPE_VOLUME);
LLVolume *volumep;
if (unique_volume)
{
@ -1250,6 +1246,7 @@ S32 LLPrimitive::parseTEMessage(LLMessageSystem* mesgsys, char const* block_name
if (tec.size == 0)
{
tec.face_count = 0;
return retval;
}

View File

@ -28,7 +28,6 @@
#include "llprimtexturelist.h"
#include "lltextureentry.h"
#include "llmemtype.h"
// static
//int (TMyClass::*pt2Member)(float, char, char) = NULL; // C++
@ -367,7 +366,6 @@ S32 LLPrimTextureList::size() const
// sets the size of the mEntryList container
void LLPrimTextureList::setSize(S32 new_size)
{
LLMemType m1(LLMemType::MTYPE_PRIMITIVE);
if (new_size < 0)
{
new_size = 0;

View File

@ -44,7 +44,6 @@
#include "llmath.h"
#include "m4math.h"
#include "llstring.h"
#include "llmemtype.h"
#include "llstacktrace.h"
#include "llglheaders.h"
@ -2286,7 +2285,6 @@ void LLGLNamePool::release(GLuint name)
//static
void LLGLNamePool::upkeepPools()
{
LLMemType mt(LLMemType::MTYPE_UPKEEP_POOLS);
for (tracker_t::instance_iter iter = beginInstances(); iter != endInstances(); ++iter)
{
LLGLNamePool & pool = *iter;

View File

@ -79,6 +79,15 @@ public:
MAX_GL_IMAGE_CATEGORY
};
typedef enum
{
DELETED = 0, //removed from memory
DELETION_CANDIDATE, //ready to be removed from memory
INACTIVE, //not be used for the last certain period (i.e., 30 seconds).
ACTIVE, //just being used, can become inactive if not being used for a certain time (10 seconds).
NO_DELETE = 99 //stay in memory, can not be removed.
} LLGLTextureState;
static S32 getTotalNumOfCategories() ;
static S32 getIndexFromCategory(S32 category) ;
static S32 getCategoryFromIndex(S32 index) ;
@ -143,6 +152,8 @@ public:
U32 getTexelsInGLTexture() const ;
BOOL isGLTextureCreated() const ;
S32 getDiscardLevelInAtlas() const ;
LLGLTextureState getTextureState() const { return mTextureState; }
//---------------------------------------------------------------------------------------------
//end of functions to access LLImageGL
//---------------------------------------------------------------------------------------------
@ -179,14 +190,6 @@ protected:
S8 mDontDiscard; // Keep full res version of this image (for UI, etc)
protected:
typedef enum
{
DELETED = 0, //removed from memory
DELETION_CANDIDATE, //ready to be removed from memory
INACTIVE, //not be used for the last certain period (i.e., 30 seconds).
ACTIVE, //just being used, can become inactive if not being used for a certain time (10 seconds).
NO_DELETE = 99 //stay in memory, can not be removed.
} LLGLTextureState;
LLGLTextureState mTextureState ;

View File

@ -31,7 +31,6 @@
#include "llvertexbuffer.h"
// #include "llrender.h"
#include "llglheaders.h"
#include "llmemtype.h"
#include "llrender.h"
#include "llvector4a.h"
#include "llshadermgr.h"
@ -873,7 +872,6 @@ void LLVertexBuffer::unbind()
//static
void LLVertexBuffer::cleanupClass()
{
LLMemType mt2(LLMemType::MTYPE_VERTEX_CLEANUP_CLASS);
unbind();
sStreamIBOPool.cleanup();
@ -954,8 +952,6 @@ LLVertexBuffer::LLVertexBuffer(U32 typemask, S32 usage) :
mMappable(false),
mFence(NULL)
{
LLMemType mt2(LLMemType::MTYPE_VERTEX_CONSTRUCTOR);
mMappable = (mUsage == GL_DYNAMIC_DRAW_ARB && !sDisableVBOMapping);
//zero out offsets
@ -1015,7 +1011,6 @@ S32 LLVertexBuffer::getSize() const
//virtual
LLVertexBuffer::~LLVertexBuffer()
{
LLMemType mt2(LLMemType::MTYPE_VERTEX_DESTRUCTOR);
destroyGLBuffer();
destroyGLIndices();
@ -1135,8 +1130,6 @@ void LLVertexBuffer::releaseIndices()
void LLVertexBuffer::createGLBuffer(U32 size)
{
LLMemType mt2(LLMemType::MTYPE_VERTEX_CREATE_VERTICES);
if (mGLBuffer)
{
destroyGLBuffer();
@ -1166,8 +1159,6 @@ void LLVertexBuffer::createGLBuffer(U32 size)
void LLVertexBuffer::createGLIndices(U32 size)
{
LLMemType mt2(LLMemType::MTYPE_VERTEX_CREATE_INDICES);
if (mGLIndices)
{
destroyGLIndices();
@ -1202,7 +1193,6 @@ void LLVertexBuffer::createGLIndices(U32 size)
void LLVertexBuffer::destroyGLBuffer()
{
LLMemType mt2(LLMemType::MTYPE_VERTEX_DESTROY_BUFFER);
if (mGLBuffer)
{
if (mMappedDataUsingVBOs)
@ -1223,7 +1213,6 @@ void LLVertexBuffer::destroyGLBuffer()
void LLVertexBuffer::destroyGLIndices()
{
LLMemType mt2(LLMemType::MTYPE_VERTEX_DESTROY_INDICES);
if (mGLIndices)
{
if (mMappedIndexDataUsingVBOs)
@ -1244,8 +1233,6 @@ void LLVertexBuffer::destroyGLIndices()
void LLVertexBuffer::updateNumVerts(S32 nverts)
{
LLMemType mt2(LLMemType::MTYPE_VERTEX_UPDATE_VERTS);
llassert(nverts >= 0);
if (nverts > 65536)
@ -1268,8 +1255,6 @@ void LLVertexBuffer::updateNumVerts(S32 nverts)
void LLVertexBuffer::updateNumIndices(S32 nindices)
{
LLMemType mt2(LLMemType::MTYPE_VERTEX_UPDATE_INDICES);
llassert(nindices >= 0);
U32 needed_size = sizeof(U16) * nindices;
@ -1286,8 +1271,6 @@ void LLVertexBuffer::updateNumIndices(S32 nindices)
void LLVertexBuffer::allocateBuffer(S32 nverts, S32 nindices, bool create)
{
LLMemType mt2(LLMemType::MTYPE_VERTEX_ALLOCATE_BUFFER);
stop_glerror();
if (nverts < 0 || nindices < 0 ||
@ -1438,8 +1421,6 @@ void LLVertexBuffer::resizeBuffer(S32 newnverts, S32 newnindices)
llassert(newnverts >= 0);
llassert(newnindices >= 0);
LLMemType mt2(LLMemType::MTYPE_VERTEX_RESIZE_BUFFER);
updateNumVerts(newnverts);
updateNumIndices(newnindices);
@ -1487,7 +1468,6 @@ static LLFastTimer::DeclareTimer FTM_VBO_MAP_BUFFER("VBO Map");
volatile U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, bool map_range)
{
bindGLBuffer(true);
LLMemType mt2(LLMemType::MTYPE_VERTEX_MAP_BUFFER);
if (mFinal)
{
llerrs << "LLVertexBuffer::mapVeretxBuffer() called on a finalized buffer." << llendl;
@ -1536,7 +1516,6 @@ volatile U8* LLVertexBuffer::mapVertexBuffer(S32 type, S32 index, S32 count, boo
if (!mVertexLocked)
{
LLMemType mt_v(LLMemType::MTYPE_VERTEX_MAP_BUFFER_VERTICES);
mVertexLocked = true;
sMappedCount++;
stop_glerror();
@ -1669,7 +1648,6 @@ static LLFastTimer::DeclareTimer FTM_VBO_MAP_INDEX("IBO Map");
volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range)
{
LLMemType mt2(LLMemType::MTYPE_VERTEX_MAP_BUFFER);
bindGLIndices(true);
if (mFinal)
{
@ -1716,8 +1694,6 @@ volatile U8* LLVertexBuffer::mapIndexBuffer(S32 index, S32 count, bool map_range
if (!mIndexLocked)
{
LLMemType mt_v(LLMemType::MTYPE_VERTEX_MAP_BUFFER_INDICES);
mIndexLocked = true;
sMappedCount++;
stop_glerror();
@ -1842,7 +1818,6 @@ static LLFastTimer::DeclareTimer FTM_IBO_FLUSH_RANGE("Flush IBO Range");
void LLVertexBuffer::unmapBuffer()
{
LLMemType mt2(LLMemType::MTYPE_VERTEX_UNMAP_BUFFER);
if (!useVBOs())
{
return; //nothing to unmap
@ -2200,7 +2175,6 @@ void LLVertexBuffer::setBuffer(U32 data_mask)
{
flush();
LLMemType mt2(LLMemType::MTYPE_VERTEX_SET_BUFFER);
//set up pointers if the data mask is different ...
bool setup = (sLastMask != data_mask);
@ -2339,7 +2313,6 @@ void LLVertexBuffer::setBuffer(U32 data_mask)
// virtual (default)
void LLVertexBuffer::setupVertexBuffer(U32 data_mask)
{
LLMemType mt2(LLMemType::MTYPE_VERTEX_SETUP_VERTEX_BUFFER);
stop_glerror();
volatile U8* base = useVBOs() ? (U8*) mAlignedOffset : mMappedData;

View File

@ -1105,17 +1105,26 @@ void LLFloater::handleReshape(const LLRect& new_rect, bool by_user)
const LLRect old_rect = getRect();
LLView::handleReshape(new_rect, by_user);
if (by_user && !isMinimized())
if (by_user && !getHost())
{
storeRectControl();
mPositioning = LLFloaterEnums::POSITIONING_RELATIVE;
LLRect screen_rect = calcScreenRect();
mPosition = LLCoordGL(screen_rect.getCenterX(), screen_rect.getCenterY()).convert();
static_cast<LLFloaterView*>(getParent())->adjustToFitScreen(this, !isMinimized());
}
// if not minimized, adjust all snapped dependents to new shape
if (!isMinimized())
{
if (by_user)
{
if (isDocked())
{
setDocked( false, false);
}
storeRectControl();
mPositioning = LLFloaterEnums::POSITIONING_RELATIVE;
LLRect screen_rect = calcScreenRect();
mPosition = LLCoordGL(screen_rect.getCenterX(), screen_rect.getCenterY()).convert();
}
// gather all snapped dependents
for(handle_set_iter_t dependent_it = mDependents.begin();
dependent_it != mDependents.end(); ++dependent_it)
@ -1711,56 +1720,10 @@ void LLFloater::onClickHelp( LLFloater* self )
}
}
// static
LLFloater* LLFloater::getClosableFloaterFromFocus()
{
LLFloater* focused_floater = NULL;
LLInstanceTracker<LLFloater>::instance_iter it = beginInstances();
LLInstanceTracker<LLFloater>::instance_iter end_it = endInstances();
for (; it != end_it; ++it)
{
if (it->hasFocus())
{
LLFloater& floater = *it;
focused_floater = &floater;
break;
}
}
if (it == endInstances())
{
// nothing found, return
return NULL;
}
// The focused floater may not be closable,
// Find and close a parental floater that is closeable, if any.
LLFloater* prev_floater = NULL;
for(LLFloater* floater_to_close = focused_floater;
NULL != floater_to_close;
floater_to_close = gFloaterView->getParentFloater(floater_to_close))
{
if(floater_to_close->isCloseable())
{
return floater_to_close;
}
// If floater has as parent root view
// gFloaterView->getParentFloater(floater_to_close) returns
// the same floater_to_close, so we need to check this.
if (prev_floater == floater_to_close) {
break;
}
prev_floater = floater_to_close;
}
return NULL;
}
// static
void LLFloater::closeFocusedFloater()
void LLFloater::closeFrontmostFloater()
{
LLFloater* floater_to_close = LLFloater::getClosableFloaterFromFocus();
LLFloater* floater_to_close = gFloaterView->getFrontmostClosableFloater();
if(floater_to_close)
{
floater_to_close->closeFloater();
@ -2478,6 +2441,24 @@ void LLFloaterView::highlightFocusedFloater()
}
}
LLFloater* LLFloaterView::getFrontmostClosableFloater()
{
child_list_const_iter_t child_it;
LLFloater* frontmost_floater = NULL;
for ( child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it)
{
frontmost_floater = (LLFloater *)(*child_it);
if (frontmost_floater->isInVisibleChain() && frontmost_floater->isCloseable())
{
return frontmost_floater;
}
}
return NULL;
}
void LLFloaterView::unhighlightFocusedFloater()
{
for ( child_list_const_iter_t child_it = getChildList()->begin(); child_it != getChildList()->end(); ++child_it)

View File

@ -325,12 +325,10 @@ public:
virtual void setTornOff(bool torn_off) { mTornOff = torn_off; }
// Return a closeable floater, if any, given the current focus.
static LLFloater* getClosableFloaterFromFocus();
// Close the floater returned by getClosableFloaterFromFocus() and
// Close the floater returned by getFrontmostClosableFloater() and
// handle refocusing.
static void closeFocusedFloater();
static void closeFrontmostFloater();
// LLNotification::Params contextualNotification(const std::string& name)
// {
@ -559,6 +557,7 @@ public:
S32 getZOrder(LLFloater* child);
void setFloaterSnapView(LLHandle<LLView> snap_view) {mSnapView = snap_view; }
LLFloater* getFrontmostClosableFloater();
private:
void hiddenFloaterClosed(LLFloater* floater);

View File

@ -1764,6 +1764,25 @@ bool LLMenuGL::addChild(LLView* view, S32 tab_group)
return false;
}
// Used in LLContextMenu and in LLTogleableMenu
// to add an item of context menu branch
bool LLMenuGL::addContextChild(LLView* view, S32 tab_group)
{
LLContextMenu* context = dynamic_cast<LLContextMenu*>(view);
if (context)
return appendContextSubMenu(context);
LLMenuItemSeparatorGL* separator = dynamic_cast<LLMenuItemSeparatorGL*>(view);
if (separator)
return append(separator);
LLMenuItemGL* item = dynamic_cast<LLMenuItemGL*>(view);
if (item)
return append(item);
return false;
}
void LLMenuGL::removeChild( LLView* ctrl)
{
// previously a dynamic_cast with if statement to check validity
@ -2501,6 +2520,30 @@ BOOL LLMenuGL::appendMenu( LLMenuGL* menu )
return success;
}
// add a context menu branch
BOOL LLMenuGL::appendContextSubMenu(LLMenuGL *menu)
{
if (menu == this)
{
llerrs << "Can't attach a context menu to itself" << llendl;
}
LLContextMenuBranch *item;
LLContextMenuBranch::Params p;
p.name = menu->getName();
p.label = menu->getLabel();
p.branch = (LLContextMenu *)menu;
p.enabled_color=LLUIColorTable::instance().getColor("MenuItemEnabledColor");
p.disabled_color=LLUIColorTable::instance().getColor("MenuItemDisabledColor");
p.highlight_bg_color=LLUIColorTable::instance().getColor("MenuItemHighlightBgColor");
p.highlight_fg_color=LLUIColorTable::instance().getColor("MenuItemHighlightFgColor");
item = LLUICtrlFactory::create<LLContextMenuBranch>(p);
LLMenuGL::sMenuContainer->addChild(item->getBranch());
return append( item );
}
void LLMenuGL::setEnabledSubMenus(BOOL enable)
{
setEnabled(enable);
@ -3725,39 +3768,6 @@ void LLTearOffMenu::closeTearOff()
mMenu->setDropShadowed(TRUE);
}
//-----------------------------------------------------------------------------
// class LLContextMenuBranch
// A branch to another context menu
//-----------------------------------------------------------------------------
class LLContextMenuBranch : public LLMenuItemGL
{
public:
struct Params : public LLInitParam::Block<Params, LLMenuItemGL::Params>
{
Mandatory<LLContextMenu*> branch;
};
LLContextMenuBranch(const Params&);
virtual ~LLContextMenuBranch()
{}
// called to rebuild the draw label
virtual void buildDrawLabel( void );
// onCommit() - do the primary funcationality of the menu item.
virtual void onCommit( void );
LLContextMenu* getBranch() { return mBranch.get(); }
void setHighlight( BOOL highlight );
protected:
void showSubMenu();
LLHandle<LLContextMenu> mBranch;
};
LLContextMenuBranch::LLContextMenuBranch(const LLContextMenuBranch::Params& p)
: LLMenuItemGL(p),
mBranch( p.branch()->getHandle() )
@ -4034,44 +4044,8 @@ void LLContextMenu::draw()
LLMenuGL::draw();
}
BOOL LLContextMenu::appendContextSubMenu(LLContextMenu *menu)
{
if (menu == this)
{
llerrs << "Can't attach a context menu to itself" << llendl;
}
LLContextMenuBranch *item;
LLContextMenuBranch::Params p;
p.name = menu->getName();
p.label = menu->getLabel();
p.branch = menu;
p.enabled_color=LLUIColorTable::instance().getColor("MenuItemEnabledColor");
p.disabled_color=LLUIColorTable::instance().getColor("MenuItemDisabledColor");
p.highlight_bg_color=LLUIColorTable::instance().getColor("MenuItemHighlightBgColor");
p.highlight_fg_color=LLUIColorTable::instance().getColor("MenuItemHighlightFgColor");
item = LLUICtrlFactory::create<LLContextMenuBranch>(p);
LLMenuGL::sMenuContainer->addChild(item->getBranch());
return append( item );
}
bool LLContextMenu::addChild(LLView* view, S32 tab_group)
{
LLContextMenu* context = dynamic_cast<LLContextMenu*>(view);
if (context)
return appendContextSubMenu(context);
LLMenuItemSeparatorGL* separator = dynamic_cast<LLMenuItemSeparatorGL*>(view);
if (separator)
return append(separator);
LLMenuItemGL* item = dynamic_cast<LLMenuItemGL*>(view);
if (item)
return append(item);
return false;
return addContextChild(view, tab_group);
}

View File

@ -519,6 +519,9 @@ public:
void resetScrollPositionOnShow(bool reset_scroll_pos) { mResetScrollPositionOnShow = reset_scroll_pos; }
bool isScrollPositionOnShowReset() { return mResetScrollPositionOnShow; }
// add a context menu branch
BOOL appendContextSubMenu(LLMenuGL *menu);
protected:
void createSpilloverBranch();
void cleanupSpilloverBranch();
@ -528,6 +531,10 @@ protected:
// add a menu - this will create a cascading menu
virtual BOOL appendMenu( LLMenuGL* menu );
// Used in LLContextMenu and in LLTogleableMenu
// to add an item of context menu branch
bool addContextChild(LLView* view, S32 tab_group);
// TODO: create accessor methods for these?
typedef std::list< LLMenuItemGL* > item_list_t;
item_list_t mItems;
@ -679,8 +686,6 @@ public:
virtual bool addChild (LLView* view, S32 tab_group = 0);
BOOL appendContextSubMenu(LLContextMenu *menu);
LLHandle<LLContextMenu> getHandle() { return getDerivedHandle<LLContextMenu>(); }
LLView* getSpawningView() const { return mSpawningViewHandle.get(); }
@ -694,6 +699,38 @@ protected:
};
//-----------------------------------------------------------------------------
// class LLContextMenuBranch
// A branch to another context menu
//-----------------------------------------------------------------------------
class LLContextMenuBranch : public LLMenuItemGL
{
public:
struct Params : public LLInitParam::Block<Params, LLMenuItemGL::Params>
{
Mandatory<LLContextMenu*> branch;
};
LLContextMenuBranch(const Params&);
virtual ~LLContextMenuBranch()
{}
// called to rebuild the draw label
virtual void buildDrawLabel( void );
// onCommit() - do the primary funcationality of the menu item.
virtual void onCommit( void );
LLContextMenu* getBranch() { return mBranch.get(); }
void setHighlight( BOOL highlight );
protected:
void showSubMenu();
LLHandle<LLContextMenu> mBranch;
};
//~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
// Class LLMenuBarGL

View File

@ -1116,6 +1116,11 @@ bool LLNotificationChannel::isEmpty() const
return mItems.empty();
}
S32 LLNotificationChannel::size() const
{
return mItems.size();
}
LLNotificationChannel::Iterator LLNotificationChannel::begin()
{
return mItems.begin();

View File

@ -813,6 +813,7 @@ public:
std::string getParentChannelName() { return mParent; }
bool isEmpty() const;
S32 size() const;
Iterator begin();
Iterator end();

View File

@ -139,13 +139,6 @@ BOOL LLResizeBar::handleHover(S32 x, S32 y, MASK mask)
if( valid_rect.localPointInRect( screen_x, screen_y ) && mResizingView )
{
// undock floater when user resize it
LLFloater* parent = dynamic_cast<LLFloater*>( getParent());
if (parent && parent->isDocked())
{
parent->setDocked( false, false);
}
// Resize the parent
LLRect orig_rect = mResizingView->getRect();
LLRect scaled_rect = orig_rect;
@ -219,20 +212,66 @@ BOOL LLResizeBar::handleHover(S32 x, S32 y, MASK mask)
// update last valid mouse cursor position based on resized view's actual size
LLRect new_rect = mResizingView->getRect();
switch(mSide)
{
case LEFT:
mDragLastScreenX += new_rect.mLeft - orig_rect.mLeft;
{
S32 actual_delta_x = new_rect.mLeft - orig_rect.mLeft;
if (actual_delta_x != delta_x)
{
// restore everything by left
new_rect.mBottom = orig_rect.mBottom;
new_rect.mTop = orig_rect.mTop;
new_rect.mRight = orig_rect.mRight;
mResizingView->setShape(new_rect, true);
}
mDragLastScreenX += actual_delta_x;
break;
}
case RIGHT:
{
S32 actual_delta_x = new_rect.mRight - orig_rect.mRight;
if (actual_delta_x != delta_x)
{
// restore everything by left
new_rect.mBottom = orig_rect.mBottom;
new_rect.mTop = orig_rect.mTop;
new_rect.mLeft = orig_rect.mLeft;
mResizingView->setShape(new_rect, true);
}
mDragLastScreenX += new_rect.mRight - orig_rect.mRight;
break;
}
case TOP:
{
S32 actual_delta_y = new_rect.mTop - orig_rect.mTop;
if (actual_delta_y != delta_y)
{
// restore everything by left
new_rect.mBottom = orig_rect.mBottom;
new_rect.mLeft = orig_rect.mLeft;
new_rect.mRight = orig_rect.mRight;
mResizingView->setShape(new_rect, true);
}
mDragLastScreenY += new_rect.mTop - orig_rect.mTop;
break;
}
case BOTTOM:
{
S32 actual_delta_y = new_rect.mBottom - orig_rect.mBottom;
if (actual_delta_y != delta_y)
{
// restore everything by left
new_rect.mTop = orig_rect.mTop;
new_rect.mLeft = orig_rect.mLeft;
new_rect.mRight = orig_rect.mRight;
mResizingView->setShape(new_rect, true);
}
mDragLastScreenY += new_rect.mBottom- orig_rect.mBottom;
break;
}
default:
break;
}

View File

@ -257,23 +257,65 @@ BOOL LLResizeHandle::handleHover(S32 x, S32 y, MASK mask)
// update last valid mouse cursor position based on resized view's actual size
LLRect new_rect = resizing_view->getRect();
S32 actual_delta_x = 0;
S32 actual_delta_y = 0;
switch(mCorner)
{
case LEFT_TOP:
mDragLastScreenX += new_rect.mLeft - orig_rect.mLeft;
mDragLastScreenY += new_rect.mTop - orig_rect.mTop;
actual_delta_x = new_rect.mLeft - orig_rect.mLeft;
actual_delta_y = new_rect.mTop - orig_rect.mTop;
if (actual_delta_x != delta_x
|| actual_delta_y != delta_y)
{
new_rect.mRight = orig_rect.mRight;
new_rect.mBottom = orig_rect.mBottom;
resizing_view->setShape(new_rect, true);
}
mDragLastScreenX += actual_delta_x;
mDragLastScreenY += actual_delta_y;
break;
case LEFT_BOTTOM:
mDragLastScreenX += new_rect.mLeft - orig_rect.mLeft;
mDragLastScreenY += new_rect.mBottom- orig_rect.mBottom;
actual_delta_x = new_rect.mLeft - orig_rect.mLeft;
actual_delta_y = new_rect.mBottom - orig_rect.mBottom;
if (actual_delta_x != delta_x
|| actual_delta_y != delta_y)
{
new_rect.mRight = orig_rect.mRight;
new_rect.mTop = orig_rect.mTop;
resizing_view->setShape(new_rect, true);
}
mDragLastScreenX += actual_delta_x;
mDragLastScreenY += actual_delta_y;
break;
case RIGHT_TOP:
mDragLastScreenX += new_rect.mRight - orig_rect.mRight;
mDragLastScreenY += new_rect.mTop - orig_rect.mTop;
actual_delta_x = new_rect.mRight - orig_rect.mRight;
actual_delta_y = new_rect.mTop - orig_rect.mTop;
if (actual_delta_x != delta_x
|| actual_delta_y != delta_y)
{
new_rect.mLeft = orig_rect.mLeft;
new_rect.mBottom = orig_rect.mBottom;
resizing_view->setShape(new_rect, true);
}
mDragLastScreenX += actual_delta_x;
mDragLastScreenY += actual_delta_y;
break;
case RIGHT_BOTTOM:
mDragLastScreenX += new_rect.mRight - orig_rect.mRight;
mDragLastScreenY += new_rect.mBottom- orig_rect.mBottom;
actual_delta_x = new_rect.mRight - orig_rect.mRight;
actual_delta_y = new_rect.mBottom - orig_rect.mBottom;
if (actual_delta_x != delta_x
|| actual_delta_y != delta_y)
{
new_rect.mLeft = orig_rect.mLeft;
new_rect.mTop = orig_rect.mTop;
resizing_view->setShape(new_rect, true);
}
mDragLastScreenX += actual_delta_x;
mDragLastScreenY += actual_delta_y;
break;
default:
break;

View File

@ -580,6 +580,15 @@ BOOL LLScrollListCtrl::addItem( LLScrollListItem* item, EAddPosition pos, BOOL r
addColumn(col_params);
}
S32 num_cols = item->getNumColumns();
S32 i = 0;
for (LLScrollListCell* cell = item->getColumn(i); i < num_cols; cell = item->getColumn(++i))
{
if (i >= (S32)mColumnsIndexed.size()) break;
cell->setWidth(mColumnsIndexed[i]->getWidth());
}
updateLineHeightInsert(item);
updateLayout();

View File

@ -239,7 +239,8 @@ LLTextEditor::Params::Params()
show_line_numbers("show_line_numbers", false),
default_color("default_color"),
commit_on_focus_lost("commit_on_focus_lost", false),
show_context_menu("show_context_menu")
show_context_menu("show_context_menu"),
enable_tooltip_paste("enable_tooltip_paste")
{
addSynonym(prevalidate_callback, "text_type");
}
@ -258,7 +259,8 @@ LLTextEditor::LLTextEditor(const LLTextEditor::Params& p) :
mTabsToNextField(p.ignore_tab),
mPrevalidateFunc(p.prevalidate_callback()),
mContextMenu(NULL),
mShowContextMenu(p.show_context_menu)
mShowContextMenu(p.show_context_menu),
mEnableTooltipPaste(p.enable_tooltip_paste)
{
mSourceID.generate();
@ -1411,6 +1413,23 @@ void LLTextEditor::pasteHelper(bool is_primary)
// Clean up string (replace tabs and remove characters that our fonts don't support).
LLWString clean_string(paste);
cleanStringForPaste(clean_string);
// Insert the new text into the existing text.
//paste text with linebreaks.
pasteTextWithLinebreaks(clean_string);
deselect();
onKeyStroke();
mParseOnTheFly = TRUE;
}
// Clean up string (replace tabs and remove characters that our fonts don't support).
void LLTextEditor::cleanStringForPaste(LLWString & clean_string)
{
LLWStringUtil::replaceTabsWithSpaces(clean_string, SPACES_PER_TAB);
if( mAllowEmbeddedItems )
{
@ -1429,10 +1448,11 @@ void LLTextEditor::pasteHelper(bool is_primary)
}
}
}
}
// Insert the new text into the existing text.
//paste text with linebreaks.
void LLTextEditor::pasteTextWithLinebreaks(LLWString & clean_string)
{
std::basic_string<llwchar>::size_type start = 0;
std::basic_string<llwchar>::size_type pos = clean_string.find('\n',start);
@ -1451,15 +1471,8 @@ void LLTextEditor::pasteHelper(bool is_primary)
std::basic_string<llwchar> str = std::basic_string<llwchar>(clean_string,start,clean_string.length()-start);
setCursorPos(mCursorPos + insert(mCursorPos, str, FALSE, LLTextSegmentPtr()));
deselect();
onKeyStroke();
mParseOnTheFly = TRUE;
}
// copy selection to primary
void LLTextEditor::copyPrimary()
{
@ -1680,19 +1693,50 @@ BOOL LLTextEditor::handleKeyHere(KEY key, MASK mask )
{
return FALSE;
}
if (mReadOnly && mScroller)
{
handled = (mScroller && mScroller->handleKeyHere( key, mask ))
|| handleSelectionKey(key, mask)
|| handleControlKey(key, mask);
}
else
{
if (mEnableTooltipPaste &&
LLToolTipMgr::instance().toolTipVisible() &&
KEY_TAB == key)
{ // Paste the first line of a tooltip into the editor
std::string message;
LLToolTipMgr::instance().getToolTipMessage(message);
LLWString tool_tip_text(utf8str_to_wstring(message));
if (tool_tip_text.size() > 0)
{
// Delete any selected characters (the tooltip text replaces them)
if(hasSelection())
{
deleteSelection(TRUE);
}
std::basic_string<llwchar>::size_type pos = tool_tip_text.find('\n',0);
if (pos != -1)
{ // Extract the first line of the tooltip
tool_tip_text = std::basic_string<llwchar>(tool_tip_text, 0, pos);
}
// Add the text
cleanStringForPaste(tool_tip_text);
pasteTextWithLinebreaks(tool_tip_text);
handled = TRUE;
}
}
else
{ // Normal key handling
handled = handleNavigationKey( key, mask )
|| handleSelectionKey(key, mask)
|| handleControlKey(key, mask)
|| handleSpecialKey(key, mask);
}
else
{
handled = handleNavigationKey( key, mask )
|| handleSelectionKey(key, mask)
|| handleControlKey(key, mask)
|| handleSpecialKey(key, mask);
}
if( handled )

View File

@ -64,7 +64,8 @@ public:
ignore_tab,
show_line_numbers,
commit_on_focus_lost,
show_context_menu;
show_context_menu,
enable_tooltip_paste;
//colors
Optional<LLUIColor> default_color;
@ -288,6 +289,8 @@ private:
// Methods
//
void pasteHelper(bool is_primary);
void cleanStringForPaste(LLWString & clean_string);
void pasteTextWithLinebreaks(LLWString & clean_string);
void drawLineNumbers();
@ -321,6 +324,7 @@ private:
BOOL mAllowEmbeddedItems;
bool mShowContextMenu;
bool mParseOnTheFly;
bool mEnableTooltipPaste;
LLUUID mSourceID;

View File

@ -101,3 +101,8 @@ bool LLToggleableMenu::toggleVisibility()
return true;
}
bool LLToggleableMenu::addChild(LLView* view, S32 tab_group)
{
return addContextChild(view, tab_group);
}

View File

@ -47,6 +47,8 @@ public:
virtual void handleVisibilityChange (BOOL curVisibilityIn);
virtual bool addChild (LLView* view, S32 tab_group = 0);
const LLRect& getButtonRect() const { return mButtonRect; }
// Converts the given local button rect to a screen rect

View File

@ -117,7 +117,8 @@ LLToolBar::LLToolBar(const LLToolBar::Params& p)
mButtonEnterSignal(NULL),
mButtonLeaveSignal(NULL),
mButtonRemoveSignal(NULL),
mDragAndDropTarget(false)
mDragAndDropTarget(false),
mCaretIcon(NULL)
{
mButtonParams[LLToolBarEnums::BTNTYPE_ICONS_WITH_TEXT] = p.button_icon_and_text;
mButtonParams[LLToolBarEnums::BTNTYPE_ICONS_ONLY] = p.button_icon;
@ -827,7 +828,12 @@ void LLToolBar::draw()
LLUI::translate((F32)getRect().mLeft, (F32)getRect().mBottom);
// Position the caret
LLIconCtrl* caret = getChild<LLIconCtrl>("caret");
if (!mCaretIcon)
{
mCaretIcon = getChild<LLIconCtrl>("caret");
}
LLIconCtrl* caret = mCaretIcon;
caret->setVisible(FALSE);
if (mDragAndDropTarget && !mButtonCommands.empty())
{

View File

@ -37,6 +37,7 @@
class LLToolBar;
class LLToolBarButton;
class LLIconCtrl;
typedef boost::function<void (S32 x, S32 y, LLToolBarButton* button)> tool_startdrag_callback_t;
typedef boost::function<BOOL (S32 x, S32 y, const LLUUID& uuid, LLAssetType::EType type)> tool_handledrag_callback_t;
@ -284,6 +285,8 @@ private:
button_signal_t* mButtonRemoveSignal;
std::string mButtonTooltipSuffix;
LLIconCtrl* mCaretIcon;
};

View File

@ -390,6 +390,15 @@ bool LLToolTip::hasClickCallback()
return mHasClickCallback;
}
void LLToolTip::getToolTipMessage(std::string & message)
{
if (mTextBox)
{
message = mTextBox->getText();
}
}
//
// LLToolTipMgr
@ -594,5 +603,14 @@ void LLToolTipMgr::updateToolTipVisibility()
}
// Return the current tooltip text
void LLToolTipMgr::getToolTipMessage(std::string & message)
{
if (toolTipVisible())
{
mToolTip->getToolTipMessage(message);
}
}
// EOF

View File

@ -105,6 +105,8 @@ public:
LLToolTip(const Params& p);
void initFromParams(const LLToolTip::Params& params);
void getToolTipMessage(std::string & message);
private:
class LLTextBox* mTextBox;
class LLButton* mInfoButton;
@ -142,6 +144,8 @@ public:
LLRect getMouseNearRect();
void updateToolTipVisibility();
void getToolTipMessage(std::string & message);
private:
void createToolTip(const LLToolTip::Params& params);

View File

@ -37,6 +37,8 @@ set(llvfs_HEADER_FILES
if (DARWIN)
LIST(APPEND llvfs_SOURCE_FILES lldir_mac.cpp)
LIST(APPEND llvfs_HEADER_FILES lldir_mac.h)
LIST(APPEND llvfs_SOURCE_FILES llvfs_objc.mm)
LIST(APPEND llvfs_HEADER_FILES llvfs_objc.h)
endif (DARWIN)
if (LINUX)
@ -75,8 +77,8 @@ target_link_libraries(llvfs
if (DARWIN)
include(CMakeFindFrameworks)
find_library(CARBON_LIBRARY Carbon)
target_link_libraries(llvfs ${CARBON_LIBRARY})
find_library(COCOA_LIBRARY Cocoa)
target_link_libraries(llvfs ${COCOA_LIBRARY})
endif (DARWIN)

View File

@ -73,10 +73,8 @@ class LLDir
virtual S32 deleteFilesInDir(const std::string &dirname, const std::string &mask);
// pure virtual functions
virtual U32 countFilesInDir(const std::string &dirname, const std::string &mask) = 0;
virtual std::string getCurPath() = 0;
virtual BOOL fileExists(const std::string &filename) const = 0;
virtual bool fileExists(const std::string &filename) const = 0;
const std::string findFile(const std::string& filename, const std::vector<std::string> filenames) const;
const std::string findFile(const std::string& filename, const std::string& searchPath1 = "", const std::string& searchPath2 = "", const std::string& searchPath3 = "") const;

Some files were not shown because too many files have changed in this diff Show More