diff options
author | yux@google.com <yux@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-15 01:07:36 +0000 |
---|---|---|
committer | yux@google.com <yux@google.com@0039d316-1c4b-4281-b951-d872f2087c98> | 2009-07-15 01:07:36 +0000 |
commit | 128ff759facb55e3c0c1326e97c00b325ac3f484 (patch) | |
tree | 868fda83a815ac414abac1466091faced5bc3eb1 /o3d/core/cross/pack.h | |
parent | 267088ffb702c649bfd2c1123f1f9c3f391b69d2 (diff) | |
download | chromium_src-128ff759facb55e3c0c1326e97c00b325ac3f484.zip chromium_src-128ff759facb55e3c0c1326e97c00b325ac3f484.tar.gz chromium_src-128ff759facb55e3c0c1326e97c00b325ac3f484.tar.bz2 |
expose bitmap in js.
Review URL: http://codereview.chromium.org/150058
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@20700 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/core/cross/pack.h')
-rw-r--r-- | o3d/core/cross/pack.h | 26 |
1 files changed, 23 insertions, 3 deletions
diff --git a/o3d/core/cross/pack.h b/o3d/core/cross/pack.h index 2628dc0..8832f02 100644 --- a/o3d/core/cross/pack.h +++ b/o3d/core/cross/pack.h @@ -215,6 +215,26 @@ class Pack : public NamedObject { Texture* CreateTextureFromRawData(RawData* raw_data, bool generate_mips); + // Creates a new Bitmap object of the specified size and format and + // reserves the necessary resources for it. + // Paramters: + // width: The width of the bitmap in pixel. + // height: The height of the bitmap in pixel. + // format: The format of the bitmap. + // Returns: + // A pointer to the bitmap obejct. + + Bitmap* CreateBitmap(int width, int height, Texture::Format format); + + // Creates a new Bitmap object from RawData. + // Parameters: + // raw_data: contains the bitmap data in one of the know formats. + // file_type: the format of the bitmap data. If UNKNOW, the file + // type would determined from the extension. + // Returns: + // A pointer to the bitmap object. + Bitmap* CreateBitmapFromRawData(RawData* raw_data); + // Creates a new Texture2D object of the specified size and format and // reserves the necessary resources for it. // Parameters: @@ -404,13 +424,13 @@ class Pack : public NamedObject { } }; - // Helper method - Texture* CreateTextureFromBitmap(Bitmap *bitmap, const String& uri); - IClassManager* class_manager_; ObjectManager* object_manager_; Renderer* renderer_; + // helper function + Texture* CreateTextureFromBitmap(Bitmap *bitmap, const String& uri); + // The set of objects owned by the pack. This container contains all of the // references that force the lifespan of the contained objects to match // or exceed that of the pack. |