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

Side by Side Diff: cc/trees/layer_tree_impl.h

Issue 1412663005: Introduce painted-device-scale-factor and use it when --enable-use-zoom-for-dsf is specified. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 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 179 matching lines...) Expand 10 before | Expand all | Expand 10 after
190 } 190 }
191 float min_page_scale_factor() const { return min_page_scale_factor_; } 191 float min_page_scale_factor() const { return min_page_scale_factor_; }
192 float max_page_scale_factor() const { return max_page_scale_factor_; } 192 float max_page_scale_factor() const { return max_page_scale_factor_; }
193 193
194 float page_scale_delta() const { return page_scale_factor()->Delta(); } 194 float page_scale_delta() const { return page_scale_factor()->Delta(); }
195 195
196 SyncedProperty<ScaleGroup>* page_scale_factor(); 196 SyncedProperty<ScaleGroup>* page_scale_factor();
197 const SyncedProperty<ScaleGroup>* page_scale_factor() const; 197 const SyncedProperty<ScaleGroup>* page_scale_factor() const;
198 198
199 void SetDeviceScaleFactor(float device_scale_factor); 199 void SetDeviceScaleFactor(float device_scale_factor);
200 void SetPaintedDeviceScaleFactor(float painted_device_scale_factor);
danakj 2015/10/22 23:15:29 nit: normally keep the set/get pair together for e
oshima 2015/10/23 18:05:36 Done.
200 float device_scale_factor() const { return device_scale_factor_; } 201 float device_scale_factor() const { return device_scale_factor_; }
202 float painted_device_scale_factor() const {
203 return painted_device_scale_factor_;
204 }
201 205
202 SyncedElasticOverscroll* elastic_overscroll() { 206 SyncedElasticOverscroll* elastic_overscroll() {
203 return elastic_overscroll_.get(); 207 return elastic_overscroll_.get();
204 } 208 }
205 const SyncedElasticOverscroll* elastic_overscroll() const { 209 const SyncedElasticOverscroll* elastic_overscroll() const {
206 return elastic_overscroll_.get(); 210 return elastic_overscroll_.get();
207 } 211 }
208 212
209 SyncedTopControls* top_controls_shown_ratio() { 213 SyncedTopControls* top_controls_shown_ratio() {
210 return top_controls_shown_ratio_.get(); 214 return top_controls_shown_ratio_.get();
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after
431 int inner_viewport_scroll_layer_id_; 435 int inner_viewport_scroll_layer_id_;
432 int outer_viewport_scroll_layer_id_; 436 int outer_viewport_scroll_layer_id_;
433 437
434 LayerSelection selection_; 438 LayerSelection selection_;
435 439
436 scoped_refptr<SyncedProperty<ScaleGroup>> page_scale_factor_; 440 scoped_refptr<SyncedProperty<ScaleGroup>> page_scale_factor_;
437 float min_page_scale_factor_; 441 float min_page_scale_factor_;
438 float max_page_scale_factor_; 442 float max_page_scale_factor_;
439 443
440 float device_scale_factor_; 444 float device_scale_factor_;
445 float painted_device_scale_factor_;
441 446
442 scoped_refptr<SyncedElasticOverscroll> elastic_overscroll_; 447 scoped_refptr<SyncedElasticOverscroll> elastic_overscroll_;
443 448
444 typedef base::hash_map<int, LayerImpl*> LayerIdMap; 449 typedef base::hash_map<int, LayerImpl*> LayerIdMap;
445 LayerIdMap layer_id_map_; 450 LayerIdMap layer_id_map_;
446 451
447 // Maps from clip layer ids to scroll layer ids. Note that this only includes 452 // Maps from clip layer ids to scroll layer ids. Note that this only includes
448 // the subset of clip layers that act as scrolling containers. (This is 453 // the subset of clip layers that act as scrolling containers. (This is
449 // derived from LayerImpl::scroll_clip_layer_ and exists to avoid O(n) walks.) 454 // derived from LayerImpl::scroll_clip_layer_ and exists to avoid O(n) walks.)
450 base::hash_map<int, int> clip_scroll_map_; 455 base::hash_map<int, int> clip_scroll_map_;
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
494 499
495 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; 500 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_;
496 501
497 private: 502 private:
498 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl); 503 DISALLOW_COPY_AND_ASSIGN(LayerTreeImpl);
499 }; 504 };
500 505
501 } // namespace cc 506 } // namespace cc
502 507
503 #endif // CC_TREES_LAYER_TREE_IMPL_H_ 508 #endif // CC_TREES_LAYER_TREE_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698