DescriptionO2D:
(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
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=67335
Patch Set 1 #
Total comments: 4
Patch Set 2 : '' #Patch Set 3 : '' #
Messages
Total messages: 4 (0 generated)
|