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

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

Issue 23455060: mix-blend-mode implementation for accelerated layers (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 7 years, 3 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
OLDNEW
1 // Copyright 2010 The Chromium Authors. All rights reserved. 1 // Copyright 2010 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 5
6 #ifndef CC_LAYERS_RENDER_SURFACE_H_ 6 #ifndef CC_LAYERS_RENDER_SURFACE_H_
7 #define CC_LAYERS_RENDER_SURFACE_H_ 7 #define CC_LAYERS_RENDER_SURFACE_H_
8 8
9 #include <vector> 9 #include <vector>
10 10
(...skipping 17 matching lines...) Expand all
28 // Returns the rect that encloses the RenderSurfaceImpl including any 28 // Returns the rect that encloses the RenderSurfaceImpl including any
29 // reflection. 29 // reflection.
30 gfx::RectF DrawableContentRect() const; 30 gfx::RectF DrawableContentRect() const;
31 31
32 void SetContentRect(gfx::Rect content_rect) { content_rect_ = content_rect; } 32 void SetContentRect(gfx::Rect content_rect) { content_rect_ = content_rect; }
33 gfx::Rect content_rect() const { return content_rect_; } 33 gfx::Rect content_rect() const { return content_rect_; }
34 34
35 void SetDrawOpacity(float opacity) { draw_opacity_ = opacity; } 35 void SetDrawOpacity(float opacity) { draw_opacity_ = opacity; }
36 float draw_opacity() const { return draw_opacity_; } 36 float draw_opacity() const { return draw_opacity_; }
37 37
38 void SetHasBlendMode(bool has_blend_mode) {
39 has_blend_mode_ = has_blend_mode;
40 }
41 bool has_blend_mode() const { return has_blend_mode_; }
42
38 void SetDrawOpacityIsAnimating(bool draw_opacity_is_animating) { 43 void SetDrawOpacityIsAnimating(bool draw_opacity_is_animating) {
39 draw_opacity_is_animating_ = draw_opacity_is_animating; 44 draw_opacity_is_animating_ = draw_opacity_is_animating;
40 } 45 }
41 bool draw_opacity_is_animating() const { return draw_opacity_is_animating_; } 46 bool draw_opacity_is_animating() const { return draw_opacity_is_animating_; }
42 47
43 void SetDrawTransform(const gfx::Transform& draw_transform) { 48 void SetDrawTransform(const gfx::Transform& draw_transform) {
44 draw_transform_ = draw_transform; 49 draw_transform_ = draw_transform;
45 } 50 }
46 const gfx::Transform& draw_transform() const { return draw_transform_; } 51 const gfx::Transform& draw_transform() const { return draw_transform_; }
47 52
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 private: 117 private:
113 friend struct LayerIteratorActions; 118 friend struct LayerIteratorActions;
114 119
115 Layer* owning_layer_; 120 Layer* owning_layer_;
116 121
117 // Uses this surface's space. 122 // Uses this surface's space.
118 gfx::Rect content_rect_; 123 gfx::Rect content_rect_;
119 124
120 float draw_opacity_; 125 float draw_opacity_;
121 bool draw_opacity_is_animating_; 126 bool draw_opacity_is_animating_;
127 bool has_blend_mode_;
122 gfx::Transform draw_transform_; 128 gfx::Transform draw_transform_;
123 gfx::Transform screen_space_transform_; 129 gfx::Transform screen_space_transform_;
124 gfx::Transform replica_draw_transform_; 130 gfx::Transform replica_draw_transform_;
125 gfx::Transform replica_screen_space_transform_; 131 gfx::Transform replica_screen_space_transform_;
126 bool target_surface_transforms_are_animating_; 132 bool target_surface_transforms_are_animating_;
127 bool screen_space_transforms_are_animating_; 133 bool screen_space_transforms_are_animating_;
128 134
129 bool is_clipped_; 135 bool is_clipped_;
130 bool contributes_to_drawn_surface_; 136 bool contributes_to_drawn_surface_;
131 137
132 // Uses the space of the surface's target surface. 138 // Uses the space of the surface's target surface.
133 gfx::Rect clip_rect_; 139 gfx::Rect clip_rect_;
134 140
135 RenderSurfaceLayerList layer_list_; 141 RenderSurfaceLayerList layer_list_;
136 142
137 // The nearest ancestor target surface that will contain the contents of this 143 // The nearest ancestor target surface that will contain the contents of this
138 // surface, and that is going to move pixels within the surface (such as with 144 // surface, and that is going to move pixels within the surface (such as with
139 // a blur). This can point to itself. 145 // a blur). This can point to itself.
140 RenderSurface* nearest_ancestor_that_moves_pixels_; 146 RenderSurface* nearest_ancestor_that_moves_pixels_;
141 147
142 // For LayerIteratorActions 148 // For LayerIteratorActions
143 int target_render_surface_layer_index_history_; 149 int target_render_surface_layer_index_history_;
144 int current_layer_index_history_; 150 int current_layer_index_history_;
145 151
146 DISALLOW_COPY_AND_ASSIGN(RenderSurface); 152 DISALLOW_COPY_AND_ASSIGN(RenderSurface);
147 }; 153 };
148 154
149 } // namespace cc 155 } // namespace cc
150 #endif // CC_LAYERS_RENDER_SURFACE_H_ 156 #endif // CC_LAYERS_RENDER_SURFACE_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698