summaryrefslogtreecommitdiffstats
path: root/o3d/core/cross/pack.h
diff options
context:
space:
mode:
authortschmelcher@chromium.org <tschmelcher@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-24 22:58:47 +0000
committertschmelcher@chromium.org <tschmelcher@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2010-11-24 22:58:47 +0000
commitab31b8f682af3ef1019b9a9bb0dbc8063236f13c (patch)
tree5795b382a5fc8eaf95e1fb36a398892e53a0165d /o3d/core/cross/pack.h
parent2c3b7580b590f96d12e332bcfe3ade421fb483a5 (diff)
downloadchromium_src-ab31b8f682af3ef1019b9a9bb0dbc8063236f13c.zip
chromium_src-ab31b8f682af3ef1019b9a9bb0dbc8063236f13c.tar.gz
chromium_src-ab31b8f682af3ef1019b9a9bb0dbc8063236f13c.tar.bz2
O2D:
(1) De-couple the Layer abstraction from the implementations details of Texture, giving JavaScript more control over the scene: - Create a Pattern class backed by Cairo's cairo_pattern_t types (which we were already using implicitly) to represent a particular pattern to paint on a layer (think of it like a brush in PhotoShop/GIMP). A Pattern can be created from either a Texture or a solid colour. This will later allow us to move the PaintBackground() method out in to JS-space. - Axe the overloaded Layer scaling parameters (which were used to represent both the width/height of the Layer and the scaling applied to the Texture), and replace them with separate width/height parameters to describe the Layer dimensions and scale_x/scale_y parameters to describe the scaling applied to the Pattern. (2) Code clean-up: - Use properties instead of functions in the Layer class. - Use double instead of float. - Get rid of unnecessary inheritance of Layer from ParamObject. - Get rid of many unnecessary #include directives in layer.h. - Get rid of super-spammy log message in RendererCairo::Paint(). - Improve comments. TEST=compiled and loaded on Linux in both GL mode and Cairo mode with simple test scenes BUG=none Review URL: http://codereview.chromium.org/5276006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@67335 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'o3d/core/cross/pack.h')
-rw-r--r--o3d/core/cross/pack.h15
1 files changed, 8 insertions, 7 deletions
diff --git a/o3d/core/cross/pack.h b/o3d/core/cross/pack.h
index 1d17c83..3a9f0ed 100644
--- a/o3d/core/cross/pack.h
+++ b/o3d/core/cross/pack.h
@@ -394,6 +394,14 @@ class Pack : public NamedObject {
// Array of Object Pointers.
ObjectBaseArray GetObjectsByClassName(const String& class_type_name) const;
+ // Register the given object with the Pack. The pack will add a reference
+ // to the object, guaranteeing its existence as long as the pack has not
+ // been destroyed. This is public so that it can be called by static
+ // factory methods.
+ // Parameters:
+ // object: Pointer to a ObjectBase to register within the pack
+ void RegisterObject(ObjectBase *object);
+
private:
// Texture objects function as factories for RenderSurface objects.
// Constructed RenderSurfaces are registered with the pack associated with
@@ -405,13 +413,6 @@ class Pack : public NamedObject {
virtual ~Pack();
- // Register the given object with the Pack. The pack will add a reference
- // to the object, guaranteeing its existence as long as the pack has not
- // been destroyed.
- // Parameters:
- // object: Pointer to a ObjectBase to register within the pack
- void RegisterObject(ObjectBase *object);
-
// Unregister a registered object from the pack. If this is the last reference
// to the object it will be destroyed.
// Parameters: