OLD | NEW |
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 #ifndef CC_LAYERS_LAYER_H_ | 5 #ifndef CC_LAYERS_LAYER_H_ |
6 #define CC_LAYERS_LAYER_H_ | 6 #define CC_LAYERS_LAYER_H_ |
7 | 7 |
8 #include <stddef.h> | 8 #include <stddef.h> |
9 #include <stdint.h> | 9 #include <stdint.h> |
10 | 10 |
(...skipping 319 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
330 virtual bool Update(); | 330 virtual bool Update(); |
331 virtual void SetIsMask(bool is_mask) {} | 331 virtual void SetIsMask(bool is_mask) {} |
332 virtual bool IsSuitableForGpuRasterization() const; | 332 virtual bool IsSuitableForGpuRasterization() const; |
333 | 333 |
334 virtual std::unique_ptr<base::trace_event::ConvertableToTraceFormat> | 334 virtual std::unique_ptr<base::trace_event::ConvertableToTraceFormat> |
335 TakeDebugInfo(); | 335 TakeDebugInfo(); |
336 virtual void didUpdateMainThreadScrollingReasons(); | 336 virtual void didUpdateMainThreadScrollingReasons(); |
337 | 337 |
338 void SetLayerClient(LayerClient* client) { inputs_.client = client; } | 338 void SetLayerClient(LayerClient* client) { inputs_.client = client; } |
339 | 339 |
| 340 virtual bool IsSnapped(); |
| 341 |
340 virtual void PushPropertiesTo(LayerImpl* layer); | 342 virtual void PushPropertiesTo(LayerImpl* layer); |
341 | 343 |
342 // Sets the type proto::LayerType that should be used for serialization | 344 // Sets the type proto::LayerType that should be used for serialization |
343 // of the current layer by calling LayerNode::set_type(proto::LayerType). | 345 // of the current layer by calling LayerNode::set_type(proto::LayerType). |
344 // TODO(nyquist): Start using a forward declared enum class when | 346 // TODO(nyquist): Start using a forward declared enum class when |
345 // https://github.com/google/protobuf/issues/67 has been fixed and rolled in. | 347 // https://github.com/google/protobuf/issues/67 has been fixed and rolled in. |
346 // This function would preferably instead return a proto::LayerType, but | 348 // This function would preferably instead return a proto::LayerType, but |
347 // since that is an enum (the protobuf library does not generate enum | 349 // since that is an enum (the protobuf library does not generate enum |
348 // classes), it can't be forward declared. We don't want to include | 350 // classes), it can't be forward declared. We don't want to include |
349 // //cc/proto/layer.pb.h in this header file, as it requires that all | 351 // //cc/proto/layer.pb.h in this header file, as it requires that all |
(...skipping 384 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
734 // These all act like draw properties, so don't need push properties. | 736 // These all act like draw properties, so don't need push properties. |
735 gfx::Rect visible_layer_rect_; | 737 gfx::Rect visible_layer_rect_; |
736 size_t num_unclipped_descendants_; | 738 size_t num_unclipped_descendants_; |
737 | 739 |
738 DISALLOW_COPY_AND_ASSIGN(Layer); | 740 DISALLOW_COPY_AND_ASSIGN(Layer); |
739 }; | 741 }; |
740 | 742 |
741 } // namespace cc | 743 } // namespace cc |
742 | 744 |
743 #endif // CC_LAYERS_LAYER_H_ | 745 #endif // CC_LAYERS_LAYER_H_ |
OLD | NEW |