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

Side by Side Diff: cc/draw_properties.h

Issue 11280263: Organize internal properties of cc/ layer types (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Complete patch Created 8 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « cc/cc.gyp ('k') | cc/layer.h » ('j') | cc/layer.h » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
(Empty)
1 // Copyright 2011 The Chromium Authors. All rights reserved.
danakj 2012/12/03 18:54:36 2012. Use chromium style names/indents for new fi
2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file.
4
5 #ifndef CC_DRAW_PROPERTIES_H_
6 #define CC_DRAW_PROPERTIES_H_
7
8 #include "ui/gfx/rect.h"
9 #include "ui/gfx/transform.h"
10
11 namespace cc {
12
13 // Container for properties that layers need to compute before they can be
14 // drawn.
15 template<typename LayerType>
16 struct DrawProperties {
17 DrawProperties()
18 : drawOpacity(0)
19 , drawOpacityIsAnimating(false)
20 , drawTransformIsAnimating(false)
21 , screenSpaceTransformIsAnimating(false)
22 , isClipped(false)
23 , renderTarget(0)
24 {
25 }
26
27 // Transforms objects from content space to target surface space, where
28 // this layer would be drawn.
29 gfx::Transform drawTransform;
jamesr 2012/12/04 06:44:32 drawProperties().drawTransform is a bit redundant.
30
31 // Transforms objects from content space to screen space (viewport space).
32 gfx::Transform screenSpaceTransform;
33
34 // drawOpacity may be different than layer's opacity, particularly in the
35 // case where a renderSurface re-parents the layer's opacity.
36 float drawOpacity;
jamesr 2012/12/04 06:44:32 same here - drawProperties().opacity ?
37
38 // XXXIsAnimating flags are used to indicate whether the drawProperties
39 // are actually meaningful on the main thread. When the properties are
40 // animating, the main thread may not have the same values that are used
41 // to draw.
42 bool drawOpacityIsAnimating;
43 bool drawTransformIsAnimating;
jamesr 2012/12/04 06:44:32 more possibly unnecessary draw prefixes
44 bool screenSpaceTransformIsAnimating;
45
46 // True if the layer needs to be clipped by clipRect.
47 bool isClipped;
48
49 // The layer whose coordinate space this layer draws into. This can be
50 // either the same layer (m_drawProperties.renderTarget == this) or an
51 // ancestor of this layer.
52 LayerType* renderTarget;
53
54 // Uses layer's content space.
55 gfx::Rect visibleContentRect;
56
57 // In target surface space, the rect that encloses the clipped, drawable
58 // content of the layer.
59 gfx::Rect drawableContentRect;
60
61 // In target surface space, the original rect that clipped this
62 // layer. This value is used to avoid unnecessarily changing GL scissor
63 // state.
64 gfx::Rect clipRect;
65 };
66
67 }
danakj 2012/12/03 18:54:36 } // namespace cc
68
69 #endif // CC_DRAW_PROPERTIES_H_
OLDNEW
« no previous file with comments | « cc/cc.gyp ('k') | cc/layer.h » ('j') | cc/layer.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698