diff options
author | Dr Scofield | 2009-06-09 06:39:27 +0000 |
---|---|---|
committer | Dr Scofield | 2009-06-09 06:39:27 +0000 |
commit | 759636f37e4ea212af4ca40565b2d4e9be1eebbe (patch) | |
tree | a61ad3c3cf5fa5991625064e2d6f78f555c8f9e0 /OpenSim/Region/ScriptEngine/Shared | |
parent | Updating the flotsam asset cache. Thank you, mcortez! (diff) | |
download | opensim-SC_OLD-759636f37e4ea212af4ca40565b2d4e9be1eebbe.zip opensim-SC_OLD-759636f37e4ea212af4ca40565b2d4e9be1eebbe.tar.gz opensim-SC_OLD-759636f37e4ea212af4ca40565b2d4e9be1eebbe.tar.bz2 opensim-SC_OLD-759636f37e4ea212af4ca40565b2d4e9be1eebbe.tar.xz |
From: Alan Webb <alan_webb@us.ibm.com>
This change addresses two issues:
[1] It adds a flag field to the blendface call which allows the
caller to indicate whether or not the generated asset is
temporary, and whether or not the asset being replaced should
be explicitly retired fromt the memory cache. The decimal
values correspond to:
0 - Permanent asset, do not expire old asset
1 - Permanent asset, expire old asset
2 - Temporary asset, do not expire old asset
3 - Temporary asset, expire old asset
'3' corresponds to the default behavior seen today, and is
the continued behavior of the non-blendface calls.
[2] The dynamic texture routines are highly-asynchronous and can
be scheduled simultaneously on a multi-core machine. The nature
of the texture management interfaece is such that updates may
be lost, and the nature of asynchornous operation means that
they may be processed out of order. A lock has been added to
ensure that updates are at least atomic. No attempt has been
made to enforce ordering. The lock applies to the SceneObjectPart
being updated and is held for the lifetime of the TextureEntry
used to carry texture updates (the one instance carries all
faces supported by the prim).
Users of these services should remember that the dynamic texture
call is asynchronous and control will be returned *before* the
texture update has actually occurred. As a result, a isubsequent
GetTexture call may not return the expected asset id. A script
must wait for the corresponding TEXTURE_CHANGED event before
retrieving any texture information.
Diffstat (limited to 'OpenSim/Region/ScriptEngine/Shared')
3 files changed, 10 insertions, 10 deletions
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs index 9b65d8d..7f3db9c 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Implementation/OSSL_Api.cs | |||
@@ -428,7 +428,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
428 | } | 428 | } |
429 | 429 | ||
430 | public string osSetDynamicTextureURLBlendFace(string dynamicID, string contentType, string url, string extraParams, | 430 | public string osSetDynamicTextureURLBlendFace(string dynamicID, string contentType, string url, string extraParams, |
431 | bool blend, int timer, int alpha, int face) | 431 | bool blend, int disp, int timer, int alpha, int face) |
432 | { | 432 | { |
433 | CheckThreatLevel(ThreatLevel.VeryLow, "osSetDynamicTextureURLBlendFace"); | 433 | CheckThreatLevel(ThreatLevel.VeryLow, "osSetDynamicTextureURLBlendFace"); |
434 | 434 | ||
@@ -438,7 +438,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
438 | IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>(); | 438 | IDynamicTextureManager textureManager = World.RequestModuleInterface<IDynamicTextureManager>(); |
439 | UUID createdTexture = | 439 | UUID createdTexture = |
440 | textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, m_host.UUID, contentType, url, | 440 | textureManager.AddDynamicTextureURL(World.RegionInfo.RegionID, m_host.UUID, contentType, url, |
441 | extraParams, timer, blend, (byte) alpha, face); | 441 | extraParams, timer, blend, disp, (byte) alpha, face); |
442 | return createdTexture.ToString(); | 442 | return createdTexture.ToString(); |
443 | } | 443 | } |
444 | else | 444 | else |
@@ -508,7 +508,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
508 | } | 508 | } |
509 | 509 | ||
510 | public string osSetDynamicTextureDataBlendFace(string dynamicID, string contentType, string data, string extraParams, | 510 | public string osSetDynamicTextureDataBlendFace(string dynamicID, string contentType, string data, string extraParams, |
511 | bool blend, int timer, int alpha, int face) | 511 | bool blend, int disp, int timer, int alpha, int face) |
512 | { | 512 | { |
513 | CheckThreatLevel(ThreatLevel.VeryLow, "osSetDynamicTextureDataBlendFace"); | 513 | CheckThreatLevel(ThreatLevel.VeryLow, "osSetDynamicTextureDataBlendFace"); |
514 | 514 | ||
@@ -524,7 +524,7 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api | |||
524 | } | 524 | } |
525 | UUID createdTexture = | 525 | UUID createdTexture = |
526 | textureManager.AddDynamicTextureData(World.RegionInfo.RegionID, m_host.UUID, contentType, data, | 526 | textureManager.AddDynamicTextureData(World.RegionInfo.RegionID, m_host.UUID, contentType, data, |
527 | extraParams, timer, blend, (byte) alpha, face); | 527 | extraParams, timer, blend, disp, (byte) alpha, face); |
528 | return createdTexture.ToString(); | 528 | return createdTexture.ToString(); |
529 | } | 529 | } |
530 | } | 530 | } |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs index e337c6b..debbad6 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Interface/IOSSL_Api.cs | |||
@@ -59,12 +59,12 @@ namespace OpenSim.Region.ScriptEngine.Shared.Api.Interfaces | |||
59 | string osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams, | 59 | string osSetDynamicTextureURLBlend(string dynamicID, string contentType, string url, string extraParams, |
60 | int timer, int alpha); | 60 | int timer, int alpha); |
61 | string osSetDynamicTextureURLBlendFace(string dynamicID, string contentType, string url, string extraParams, | 61 | string osSetDynamicTextureURLBlendFace(string dynamicID, string contentType, string url, string extraParams, |
62 | bool blend, int timer, int alpha, int face); | 62 | bool blend, int disp, int timer, int alpha, int face); |
63 | string osSetDynamicTextureData(string dynamicID, string contentType, string data, string extraParams, int timer); | 63 | string osSetDynamicTextureData(string dynamicID, string contentType, string data, string extraParams, int timer); |
64 | string osSetDynamicTextureDataBlend(string dynamicID, string contentType, string data, string extraParams, | 64 | string osSetDynamicTextureDataBlend(string dynamicID, string contentType, string data, string extraParams, |
65 | int timer, int alpha); | 65 | int timer, int alpha); |
66 | string osSetDynamicTextureDataBlendFace(string dynamicID, string contentType, string data, string extraParams, | 66 | string osSetDynamicTextureDataBlendFace(string dynamicID, string contentType, string data, string extraParams, |
67 | bool blend, int timer, int alpha, int face); | 67 | bool blend, int disp, int timer, int alpha, int face); |
68 | 68 | ||
69 | LSL_Float osTerrainGetHeight(int x, int y); | 69 | LSL_Float osTerrainGetHeight(int x, int y); |
70 | LSL_Integer osTerrainSetHeight(int x, int y, double val); | 70 | LSL_Integer osTerrainSetHeight(int x, int y, double val); |
diff --git a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs index 5df2d6e..193e2e0 100644 --- a/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs +++ b/OpenSim/Region/ScriptEngine/Shared/Api/Runtime/OSSL_Stub.cs | |||
@@ -135,17 +135,17 @@ namespace OpenSim.Region.ScriptEngine.Shared.ScriptBase | |||
135 | } | 135 | } |
136 | 136 | ||
137 | public string osSetDynamicTextureURLBlendFace(string dynamicID, string contentType, string url, string extraParams, | 137 | public string osSetDynamicTextureURLBlendFace(string dynamicID, string contentType, string url, string extraParams, |
138 | bool blend, int timer, int alpha, int face) | 138 | bool blend, int disp, int timer, int alpha, int face) |
139 | { | 139 | { |
140 | return m_OSSL_Functions.osSetDynamicTextureURLBlendFace(dynamicID, contentType, url, extraParams, | 140 | return m_OSSL_Functions.osSetDynamicTextureURLBlendFace(dynamicID, contentType, url, extraParams, |
141 | blend, timer, alpha, face); | 141 | blend, disp, timer, alpha, face); |
142 | } | 142 | } |
143 | 143 | ||
144 | public string osSetDynamicTextureDataBlendFace(string dynamicID, string contentType, string data, string extraParams, | 144 | public string osSetDynamicTextureDataBlendFace(string dynamicID, string contentType, string data, string extraParams, |
145 | bool blend, int timer, int alpha, int face) | 145 | bool blend, int disp, int timer, int alpha, int face) |
146 | { | 146 | { |
147 | return m_OSSL_Functions.osSetDynamicTextureDataBlendFace(dynamicID, contentType, data, extraParams, | 147 | return m_OSSL_Functions.osSetDynamicTextureDataBlendFace(dynamicID, contentType, data, extraParams, |
148 | blend, timer, alpha, face); | 148 | blend, disp, timer, alpha, face); |
149 | } | 149 | } |
150 | 150 | ||
151 | public LSL_Float osTerrainGetHeight(int x, int y) | 151 | public LSL_Float osTerrainGetHeight(int x, int y) |