OLD | NEW |
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_TREES_LAYER_TREE_IMPL_H_ | 5 #ifndef CC_TREES_LAYER_TREE_IMPL_H_ |
6 #define CC_TREES_LAYER_TREE_IMPL_H_ | 6 #define CC_TREES_LAYER_TREE_IMPL_H_ |
7 | 7 |
8 #include <map> | 8 #include <map> |
9 #include <set> | 9 #include <set> |
10 #include <string> | 10 #include <string> |
(...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
191 float max_page_scale_factor() const { return max_page_scale_factor_; } | 191 float max_page_scale_factor() const { return max_page_scale_factor_; } |
192 | 192 |
193 float page_scale_delta() const { return page_scale_factor()->Delta(); } | 193 float page_scale_delta() const { return page_scale_factor()->Delta(); } |
194 | 194 |
195 SyncedProperty<ScaleGroup>* page_scale_factor(); | 195 SyncedProperty<ScaleGroup>* page_scale_factor(); |
196 const SyncedProperty<ScaleGroup>* page_scale_factor() const; | 196 const SyncedProperty<ScaleGroup>* page_scale_factor() const; |
197 | 197 |
198 void SetDeviceScaleFactor(float device_scale_factor); | 198 void SetDeviceScaleFactor(float device_scale_factor); |
199 float device_scale_factor() const { return device_scale_factor_; } | 199 float device_scale_factor() const { return device_scale_factor_; } |
200 | 200 |
| 201 void set_painted_device_scale_factor(float painted_device_scale_factor) { |
| 202 painted_device_scale_factor_ = painted_device_scale_factor; |
| 203 } |
| 204 float painted_device_scale_factor() const { |
| 205 return painted_device_scale_factor_; |
| 206 } |
| 207 |
201 SyncedElasticOverscroll* elastic_overscroll() { | 208 SyncedElasticOverscroll* elastic_overscroll() { |
202 return elastic_overscroll_.get(); | 209 return elastic_overscroll_.get(); |
203 } | 210 } |
204 const SyncedElasticOverscroll* elastic_overscroll() const { | 211 const SyncedElasticOverscroll* elastic_overscroll() const { |
205 return elastic_overscroll_.get(); | 212 return elastic_overscroll_.get(); |
206 } | 213 } |
207 | 214 |
208 SyncedTopControls* top_controls_shown_ratio() { | 215 SyncedTopControls* top_controls_shown_ratio() { |
209 return top_controls_shown_ratio_.get(); | 216 return top_controls_shown_ratio_.get(); |
210 } | 217 } |
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
430 int inner_viewport_scroll_layer_id_; | 437 int inner_viewport_scroll_layer_id_; |
431 int outer_viewport_scroll_layer_id_; | 438 int outer_viewport_scroll_layer_id_; |
432 | 439 |
433 LayerSelection selection_; | 440 LayerSelection selection_; |
434 | 441 |
435 scoped_refptr<SyncedProperty<ScaleGroup>> page_scale_factor_; | 442 scoped_refptr<SyncedProperty<ScaleGroup>> page_scale_factor_; |
436 float min_page_scale_factor_; | 443 float min_page_scale_factor_; |
437 float max_page_scale_factor_; | 444 float max_page_scale_factor_; |
438 | 445 |
439 float device_scale_factor_; | 446 float device_scale_factor_; |
| 447 float painted_device_scale_factor_; |
440 | 448 |
441 scoped_refptr<SyncedElasticOverscroll> elastic_overscroll_; | 449 scoped_refptr<SyncedElasticOverscroll> elastic_overscroll_; |
442 | 450 |
443 typedef base::hash_map<int, LayerImpl*> LayerIdMap; | 451 typedef base::hash_map<int, LayerImpl*> LayerIdMap; |
444 LayerIdMap layer_id_map_; | 452 LayerIdMap layer_id_map_; |
445 | 453 |
446 // Maps from clip layer ids to scroll layer ids. Note that this only includes | 454 // Maps from clip layer ids to scroll layer ids. Note that this only includes |
447 // the subset of clip layers that act as scrolling containers. (This is | 455 // the subset of clip layers that act as scrolling containers. (This is |
448 // derived from LayerImpl::scroll_clip_layer_ and exists to avoid O(n) walks.) | 456 // derived from LayerImpl::scroll_clip_layer_ and exists to avoid O(n) walks.) |
449 base::hash_map<int, int> clip_scroll_map_; | 457 base::hash_map<int, int> clip_scroll_map_; |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
493 | 501 |
494 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; | 502 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; |
495 | 503 |
496 private: | 504 private: |
497 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); | 505 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); |
498 }; | 506 }; |
499 | 507 |
500 } // namespace cc | 508 } // namespace cc |
501 | 509 |
502 #endif // CC_TREES_LAYER_TREE_IMPL_H_ | 510 #endif // CC_TREES_LAYER_TREE_IMPL_H_ |
OLD | NEW |