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

Side by Side Diff: cc/layers/draw_properties.h

Issue 1236943002: Revert of Compute if a layer is clipped outside CalcDrawProps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 5 months 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
« no previous file with comments | « cc/layers/delegated_renderer_layer_impl_unittest.cc ('k') | cc/layers/layer.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #ifndef CC_LAYERS_DRAW_PROPERTIES_H_ 5 #ifndef CC_LAYERS_DRAW_PROPERTIES_H_
6 #define CC_LAYERS_DRAW_PROPERTIES_H_ 6 #define CC_LAYERS_DRAW_PROPERTIES_H_
7 7
8 #include "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "cc/trees/occlusion.h" 9 #include "cc/trees/occlusion.h"
10 #include "third_party/skia/include/core/SkXfermode.h" 10 #include "third_party/skia/include/core/SkXfermode.h"
11 #include "ui/gfx/geometry/rect.h" 11 #include "ui/gfx/geometry/rect.h"
12 #include "ui/gfx/transform.h" 12 #include "ui/gfx/transform.h"
13 13
14 namespace cc { 14 namespace cc {
15 15
16 // Container for properties that layers need to compute before they can be 16 // Container for properties that layers need to compute before they can be
17 // drawn. 17 // drawn.
18 template <typename LayerType> 18 template <typename LayerType>
19 struct CC_EXPORT DrawProperties { 19 struct CC_EXPORT DrawProperties {
20 DrawProperties() 20 DrawProperties()
21 : opacity(0.f), 21 : opacity(0.f),
22 blend_mode(SkXfermode::kSrcOver_Mode), 22 blend_mode(SkXfermode::kSrcOver_Mode),
23 opacity_is_animating(false), 23 opacity_is_animating(false),
24 screen_space_opacity_is_animating(false), 24 screen_space_opacity_is_animating(false),
25 target_space_transform_is_animating(false), 25 target_space_transform_is_animating(false),
26 screen_space_transform_is_animating(false), 26 screen_space_transform_is_animating(false),
27 can_use_lcd_text(false), 27 can_use_lcd_text(false),
28 is_clipped(false),
28 render_target(nullptr), 29 render_target(nullptr),
29 num_unclipped_descendants(0), 30 num_unclipped_descendants(0),
30 layer_or_descendant_has_copy_request(false), 31 layer_or_descendant_has_copy_request(false),
31 layer_or_descendant_has_input_handler(false), 32 layer_or_descendant_has_input_handler(false),
32 has_child_with_a_scroll_parent(false), 33 has_child_with_a_scroll_parent(false),
33 index_of_first_descendants_addition(0), 34 index_of_first_descendants_addition(0),
34 num_descendants_added(0), 35 num_descendants_added(0),
35 index_of_first_render_surface_layer_list_addition(0), 36 index_of_first_render_surface_layer_list_addition(0),
36 num_render_surfaces_added(0), 37 num_render_surfaces_added(0),
37 last_drawn_render_surface_layer_list_id(0), 38 last_drawn_render_surface_layer_list_id(0),
(...skipping 25 matching lines...) Expand all
63 // animating, the main thread may not have the same values that are used 64 // animating, the main thread may not have the same values that are used
64 // to draw. 65 // to draw.
65 bool opacity_is_animating; 66 bool opacity_is_animating;
66 bool screen_space_opacity_is_animating; 67 bool screen_space_opacity_is_animating;
67 bool target_space_transform_is_animating; 68 bool target_space_transform_is_animating;
68 bool screen_space_transform_is_animating; 69 bool screen_space_transform_is_animating;
69 70
70 // True if the layer can use LCD text. 71 // True if the layer can use LCD text.
71 bool can_use_lcd_text; 72 bool can_use_lcd_text;
72 73
74 // True if the layer needs to be clipped by clip_rect.
75 bool is_clipped;
76
73 // The layer whose coordinate space this layer draws into. This can be 77 // The layer whose coordinate space this layer draws into. This can be
74 // either the same layer (draw_properties_.render_target == this) or an 78 // either the same layer (draw_properties_.render_target == this) or an
75 // ancestor of this layer. 79 // ancestor of this layer.
76 LayerType* render_target; 80 LayerType* render_target;
77 81
78 // This rect is a bounding box around what part of the layer is visible, in 82 // This rect is a bounding box around what part of the layer is visible, in
79 // the layer's coordinate space. 83 // the layer's coordinate space.
80 gfx::Rect visible_layer_rect; 84 gfx::Rect visible_layer_rect;
81 85
82 // In target surface space, the rect that encloses the clipped, drawable 86 // In target surface space, the rect that encloses the clipped, drawable
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
130 float maximum_animation_contents_scale; 134 float maximum_animation_contents_scale;
131 135
132 // The scale during the layer animation start at which content should be 136 // The scale during the layer animation start at which content should be
133 // rastered at to be crisp. 137 // rastered at to be crisp.
134 float starting_animation_contents_scale; 138 float starting_animation_contents_scale;
135 }; 139 };
136 140
137 } // namespace cc 141 } // namespace cc
138 142
139 #endif // CC_LAYERS_DRAW_PROPERTIES_H_ 143 #endif // CC_LAYERS_DRAW_PROPERTIES_H_
OLDNEW
« no previous file with comments | « cc/layers/delegated_renderer_layer_impl_unittest.cc ('k') | cc/layers/layer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698