OLD | NEW |
1 // Copyright 2011 The Chromium Authors. All rights reserved. | 1 // Copyright 2011 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_LAYER_IMPL_H_ | 5 #ifndef CC_LAYERS_LAYER_IMPL_H_ |
6 #define CC_LAYERS_LAYER_IMPL_H_ | 6 #define CC_LAYERS_LAYER_IMPL_H_ |
7 | 7 |
8 #include <set> | 8 #include <set> |
9 #include <string> | 9 #include <string> |
10 #include <vector> | 10 #include <vector> |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 | 191 |
192 bool has_mask() const { return mask_layer_; } | 192 bool has_mask() const { return mask_layer_; } |
193 bool has_replica() const { return replica_layer_; } | 193 bool has_replica() const { return replica_layer_; } |
194 bool replica_has_mask() const { | 194 bool replica_has_mask() const { |
195 return replica_layer_ && (mask_layer_ || replica_layer_->mask_layer_); | 195 return replica_layer_ && (mask_layer_ || replica_layer_->mask_layer_); |
196 } | 196 } |
197 | 197 |
198 LayerTreeImpl* layer_tree_impl() const { return layer_tree_impl_; } | 198 LayerTreeImpl* layer_tree_impl() const { return layer_tree_impl_; } |
199 | 199 |
200 void PopulateSharedQuadState(SharedQuadState* state) const; | 200 void PopulateSharedQuadState(SharedQuadState* state) const; |
201 void PopulateScaledSharedQuadState(SharedQuadState* state, float scale) const; | |
202 // WillDraw must be called before AppendQuads. If WillDraw returns false, | 201 // WillDraw must be called before AppendQuads. If WillDraw returns false, |
203 // AppendQuads and DidDraw will not be called. If WillDraw returns true, | 202 // AppendQuads and DidDraw will not be called. If WillDraw returns true, |
204 // DidDraw is guaranteed to be called before another WillDraw or before | 203 // DidDraw is guaranteed to be called before another WillDraw or before |
205 // the layer is destroyed. To enforce this, any class that overrides | 204 // the layer is destroyed. To enforce this, any class that overrides |
206 // WillDraw/DidDraw must call the base class version only if WillDraw | 205 // WillDraw/DidDraw must call the base class version only if WillDraw |
207 // returns true. | 206 // returns true. |
208 virtual bool WillDraw(DrawMode draw_mode, | 207 virtual bool WillDraw(DrawMode draw_mode, |
209 ResourceProvider* resource_provider); | 208 ResourceProvider* resource_provider); |
210 virtual void AppendQuads(RenderPass* render_pass, | 209 virtual void AppendQuads(RenderPass* render_pass, |
211 const Occlusion& occlusion_in_content_space, | 210 const Occlusion& occlusion_in_content_space, |
(...skipping 556 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
768 | 767 |
769 std::vector<FrameTimingRequest> frame_timing_requests_; | 768 std::vector<FrameTimingRequest> frame_timing_requests_; |
770 bool frame_timing_requests_dirty_; | 769 bool frame_timing_requests_dirty_; |
771 | 770 |
772 DISALLOW_COPY_AND_ASSIGN(LayerImpl); | 771 DISALLOW_COPY_AND_ASSIGN(LayerImpl); |
773 }; | 772 }; |
774 | 773 |
775 } // namespace cc | 774 } // namespace cc |
776 | 775 |
777 #endif // CC_LAYERS_LAYER_IMPL_H_ | 776 #endif // CC_LAYERS_LAYER_IMPL_H_ |
OLD | NEW |