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_host.h

Issue 913203006: cc: Calculate "can use lcd text" on the compositor thread (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 10 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 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_TREES_LAYER_TREE_HOST_H_ 5 #ifndef CC_TREES_LAYER_TREE_HOST_H_
6 #define CC_TREES_LAYER_TREE_HOST_H_ 6 #define CC_TREES_LAYER_TREE_HOST_H_
7 7
8 #include <limits> 8 #include <limits>
9 #include <set> 9 #include <set>
10 #include <string> 10 #include <string>
(...skipping 429 matching lines...) Expand 10 before | Expand all | Expand 10 after
440 scoped_ptr<AnimationRegistrar> animation_registrar_; 440 scoped_ptr<AnimationRegistrar> animation_registrar_;
441 441
442 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_; 442 scoped_ptr<PendingPageScaleAnimation> pending_page_scale_animation_;
443 443
444 // If set, then page scale animation has completed, but the client hasn't been 444 // If set, then page scale animation has completed, but the client hasn't been
445 // notified about it yet. 445 // notified about it yet.
446 bool did_complete_scale_animation_; 446 bool did_complete_scale_animation_;
447 447
448 bool in_paint_layer_contents_; 448 bool in_paint_layer_contents_;
449 449
450 static const int kTotalFramesToUseForLCDTextMetrics = 50;
451 int total_frames_used_for_lcd_text_metrics_;
452
453 struct LCDTextMetrics {
454 LCDTextMetrics()
455 : total_num_cc_layers(0),
456 total_num_cc_layers_can_use_lcd_text(0),
457 total_num_cc_layers_will_use_lcd_text(0) {}
458
459 int64 total_num_cc_layers;
460 int64 total_num_cc_layers_can_use_lcd_text;
461 int64 total_num_cc_layers_will_use_lcd_text;
462 };
463 LCDTextMetrics lcd_text_metrics_;
Ian Vollick 2015/02/18 09:12:10 Could this be moved to LTHI now that LCD text stuf
enne (OOO) 2015/02/18 19:22:23 We could, but do you think we need this data still
Ian Vollick 2015/02/18 19:58:13 sg. Should the histogram be removed in this case?
enne (OOO) 2015/02/18 20:01:44 Done.
464 int id_; 450 int id_;
465 bool next_commit_forces_redraw_; 451 bool next_commit_forces_redraw_;
466 452
467 scoped_refptr<Layer> overscroll_elasticity_layer_; 453 scoped_refptr<Layer> overscroll_elasticity_layer_;
468 scoped_refptr<Layer> page_scale_layer_; 454 scoped_refptr<Layer> page_scale_layer_;
469 scoped_refptr<Layer> inner_viewport_scroll_layer_; 455 scoped_refptr<Layer> inner_viewport_scroll_layer_;
470 scoped_refptr<Layer> outer_viewport_scroll_layer_; 456 scoped_refptr<Layer> outer_viewport_scroll_layer_;
471 457
472 LayerSelectionBound selection_start_; 458 LayerSelectionBound selection_start_;
473 LayerSelectionBound selection_end_; 459 LayerSelectionBound selection_end_;
474 460
475 SharedBitmapManager* shared_bitmap_manager_; 461 SharedBitmapManager* shared_bitmap_manager_;
476 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_; 462 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager_;
477 463
478 ScopedPtrVector<SwapPromise> swap_promise_list_; 464 ScopedPtrVector<SwapPromise> swap_promise_list_;
479 std::set<SwapPromiseMonitor*> swap_promise_monitor_; 465 std::set<SwapPromiseMonitor*> swap_promise_monitor_;
480 466
481 uint32_t surface_id_namespace_; 467 uint32_t surface_id_namespace_;
482 uint32_t next_surface_sequence_; 468 uint32_t next_surface_sequence_;
483 469
484 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); 470 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost);
485 }; 471 };
486 472
487 } // namespace cc 473 } // namespace cc
488 474
489 #endif // CC_TREES_LAYER_TREE_HOST_H_ 475 #endif // CC_TREES_LAYER_TREE_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698