summaryrefslogtreecommitdiffstats
path: root/o3d/plugin
diff options
context:
space:
mode:
authorgman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-04 22:54:06 +0000
committergman@google.com <gman@google.com@0039d316-1c4b-4281-b951-d872f2087c98>2009-09-04 22:54:06 +0000
commitbbae131539955ac8c8b92f0e721ad593fd50f593 (patch)
tree3c4627e8e9864d72e16b38f356f9caf0c363700e /o3d/plugin
parentca2f19e15442db908f02e9fcfc1e35243d4689d7 (diff)
downloadchromium_src-bbae131539955ac8c8b92f0e721ad593fd50f593.zip
chromium_src-bbae131539955ac8c8b92f0e721ad593fd50f593.tar.gz
chromium_src-bbae131539955ac8c8b92f0e721ad593fd50f593.tar.bz2
Since loading textures from a file request is
deprecated update the docs to match. Review URL: http://codereview.chromium.org/198033 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@25542 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/plugin')
-rw-r--r--o3d/plugin/idl/file_request.idl23
1 files changed, 15 insertions, 8 deletions
diff --git a/o3d/plugin/idl/file_request.idl b/o3d/plugin/idl/file_request.idl
index 0e64812..b83b58e 100644
--- a/o3d/plugin/idl/file_request.idl
+++ b/o3d/plugin/idl/file_request.idl
@@ -35,25 +35,29 @@ namespace o3d {
callback void FileRequestCallback();
%[
- A FileRequest object is used to carry out an asynchronous request for a file
+ A FileRequest is used to carry out an asynchronous request for a file
to be loaded. Its use parallels that of XMLHttpRequest; you create one, call
open, set the onreadystatechange callback, and call send.
Note that unlike XMLHttpRequests, FileRequests cannot be reused.
- For texture loads, on success the texture will be stored in a field of the
- same name on the FileRequest itself.
+ For RawData loads, on success the RawData will be stored in the data field
+ on the FileRequest itself. It is only valid until the FileRequest is freed by
+ calling pack.removeObject(request).
\code
- var request = pack.createFileRequest("TEXTURE");
- var texture;
+ var request = pack.createFileRequest("RAWDATA");
request.open("GET", url, true);
request.onreadystatechange = function() {
if (request.done) {
if (request.success) {
- texture = request.texture;
+ var rawData = request.data;
+ // do something with raw data like create a bitmap.
+ ...
} else {
- dump('Load of texture file returned failure.');
+ dump('Load of rawdata returned failure.');
}
+ // Free the request (and the rawData)
+ pack.removeObject(request);
}
};
request.send();
@@ -74,7 +78,8 @@ callback void FileRequestCallback();
[getter=uri] String uri;
%[
On completion of successful texture file loads, this holds the loaded
- texture.
+ texture. Loading textures through FileRequest is depreated.
+ @deprecated
%]
[getter=texture] Texture? texture;
@@ -88,6 +93,8 @@ callback void FileRequestCallback();
Whether or not to generate mip-maps on textures that are loaded (default:
true). Mip-maps are not generated for DXTC textures. DDS files can contain
pre-computed mip-maps for DXTC textures though.
+ Loading textures through FileRequest is depreated.
+ @deprecated
%]
[getter, setter] bool generate_mipmaps;