Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(176)

Issue 5276006: O2D:... (Closed)

Created:
10 years, 1 month ago by Tristan Schmelcher 2
Modified:
9 years, 6 months ago
Reviewers:
zhurunz1, zhurunz, Tim H
CC:
o3d-review_googlegroups.com
Visibility:
Public.

Description

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 Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=67335

Patch Set 1 #

Total comments: 4

Patch Set 2 : '' #

Patch Set 3 : '' #

Unified diffs Side-by-side diffs Delta from patch set Stats (+395 lines, -101 lines) Patch
M core/core.gyp View 1 chunk +2 lines, -0 lines 0 comments Download
M core/cross/cairo/layer.h View 1 chunk +71 lines, -46 lines 0 comments Download
M core/cross/cairo/layer.cc View 1 chunk +10 lines, -9 lines 0 comments Download
A core/cross/cairo/pattern.h View 1 1 chunk +86 lines, -0 lines 0 comments Download
A core/cross/cairo/pattern.cc View 1 1 chunk +95 lines, -0 lines 0 comments Download
M core/cross/cairo/renderer_cairo.cc View 4 chunks +11 lines, -22 lines 0 comments Download
M core/cross/class_manager.cc View 1 chunk +2 lines, -0 lines 0 comments Download
M core/cross/pack.h View 2 chunks +8 lines, -7 lines 0 comments Download
M plugin/idl/idl.gyp View 1 chunk +1 line, -0 lines 0 comments Download
M plugin/idl/layer.idl View 1 chunk +27 lines, -17 lines 0 comments Download
A plugin/idl/pattern.idl View 1 chunk +82 lines, -0 lines 0 comments Download

Messages

Total messages: 4 (0 generated)
Tristan Schmelcher 2
10 years, 1 month ago (2010-11-24 00:48:18 UTC) #1
zhurunz
http://codereview.chromium.org/5276006/diff/1/core/cross/cairo/layer.h File core/cross/cairo/layer.h (right): http://codereview.chromium.org/5276006/diff/1/core/cross/cairo/layer.h#newcode114 core/cross/cairo/layer.h:114: scale_y_ = scale_y; Consider using some macro here for ...
10 years, 1 month ago (2010-11-24 01:11:38 UTC) #2
Tristan Schmelcher 2
http://codereview.chromium.org/5276006/diff/1/core/cross/cairo/layer.h File core/cross/cairo/layer.h (right): http://codereview.chromium.org/5276006/diff/1/core/cross/cairo/layer.h#newcode114 core/cross/cairo/layer.h:114: scale_y_ = scale_y; On 2010/11/24 01:11:38, zhurunz wrote: > ...
10 years, 1 month ago (2010-11-24 20:00:55 UTC) #3
zhurunz
10 years, 1 month ago (2010-11-25 01:32:55 UTC) #4
LGTM.

Powered by Google App Engine
This is Rietveld 408576698