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

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

Issue 2108033004: cc: Re-enable GPU rasterization after content veto. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 5 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 <stddef.h> 8 #include <stddef.h>
9 #include <stdint.h> 9 #include <stdint.h>
10 10
(...skipping 472 matching lines...) Expand 10 before | Expand all | Expand 10 after
483 483
484 MicroBenchmarkController micro_benchmark_controller_; 484 MicroBenchmarkController micro_benchmark_controller_;
485 485
486 void OnCommitForSwapPromises(); 486 void OnCommitForSwapPromises();
487 487
488 void RecordGpuRasterizationHistogram(); 488 void RecordGpuRasterizationHistogram();
489 489
490 private: 490 private:
491 friend class LayerTreeHostSerializationTest; 491 friend class LayerTreeHostSerializationTest;
492 492
493 // Maximum amount of times to re-enable gpu rasterization after it's been
494 // turned off due to content.
495 enum { kMaxTimesToEnableGpuRasterization = 5 };
enne (OOO) 2016/06/30 01:02:24 Why do you want to have a limit on how many times
ericrk 2016/06/30 18:46:00 +1
496 // The number of commits to waitch before attempting to re-enable gpu
enne (OOO) 2016/06/30 01:02:24 <_<
497 // rasterization.
498 enum { kFramePeriodToReeanbleGpuRasterization = 10 };
enne (OOO) 2016/06/30 01:02:24 Reeanble?
ericrk 2016/06/30 18:46:00 There's a significant cost to switching I'd imagin
499
493 void InitializeProxy( 500 void InitializeProxy(
494 std::unique_ptr<Proxy> proxy, 501 std::unique_ptr<Proxy> proxy,
495 std::unique_ptr<BeginFrameSource> external_begin_frame_source); 502 std::unique_ptr<BeginFrameSource> external_begin_frame_source);
496 503
497 bool DoUpdateLayers(Layer* root_layer); 504 bool DoUpdateLayers(Layer* root_layer);
498 void UpdateHudLayer(); 505 void UpdateHudLayer();
499 506
500 bool AnimateLayersRecursive(Layer* current, base::TimeTicks time); 507 bool AnimateLayersRecursive(Layer* current, base::TimeTicks time);
501 508
502 struct UIResourceClientData { 509 struct UIResourceClientData {
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 LayerIdMap layer_id_map_; 616 LayerIdMap layer_id_map_;
610 617
611 using ElementLayersMap = std::unordered_map<ElementId, Layer*, ElementIdHash>; 618 using ElementLayersMap = std::unordered_map<ElementId, Layer*, ElementIdHash>;
612 ElementLayersMap element_layers_map_; 619 ElementLayersMap element_layers_map_;
613 620
614 // Set of layers that need to push properties. 621 // Set of layers that need to push properties.
615 std::unordered_set<Layer*> layers_that_should_push_properties_; 622 std::unordered_set<Layer*> layers_that_should_push_properties_;
616 623
617 uint32_t surface_id_namespace_; 624 uint32_t surface_id_namespace_;
618 uint32_t next_surface_sequence_; 625 uint32_t next_surface_sequence_;
626 int num_times_gpu_rasterization_reenabled_ = 0;
619 627
620 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); 628 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost);
621 }; 629 };
622 630
623 } // namespace cc 631 } // namespace cc
624 632
625 #endif // CC_TREES_LAYER_TREE_HOST_H_ 633 #endif // CC_TREES_LAYER_TREE_HOST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698