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

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: update 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
« no previous file with comments | « cc/test/fake_recording_source.h ('k') | cc/trees/layer_tree_host.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 // This is the number of consecutive frames in which we want the content to be
494 // suitable for GPU rasterization before re-enabling it.
495 enum { kNumFramesToConsiderBeforeGpuRasterization = 60 };
496
493 void InitializeProxy( 497 void InitializeProxy(
494 std::unique_ptr<Proxy> proxy, 498 std::unique_ptr<Proxy> proxy,
495 std::unique_ptr<BeginFrameSource> external_begin_frame_source); 499 std::unique_ptr<BeginFrameSource> external_begin_frame_source);
496 500
497 bool DoUpdateLayers(Layer* root_layer); 501 bool DoUpdateLayers(Layer* root_layer);
498 void UpdateHudLayer(); 502 void UpdateHudLayer();
499 503
500 bool AnimateLayersRecursive(Layer* current, base::TimeTicks time); 504 bool AnimateLayersRecursive(Layer* current, base::TimeTicks time);
501 505
502 struct UIResourceClientData { 506 struct UIResourceClientData {
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
609 LayerIdMap layer_id_map_; 613 LayerIdMap layer_id_map_;
610 614
611 using ElementLayersMap = std::unordered_map<ElementId, Layer*, ElementIdHash>; 615 using ElementLayersMap = std::unordered_map<ElementId, Layer*, ElementIdHash>;
612 ElementLayersMap element_layers_map_; 616 ElementLayersMap element_layers_map_;
613 617
614 // Set of layers that need to push properties. 618 // Set of layers that need to push properties.
615 std::unordered_set<Layer*> layers_that_should_push_properties_; 619 std::unordered_set<Layer*> layers_that_should_push_properties_;
616 620
617 uint32_t surface_id_namespace_; 621 uint32_t surface_id_namespace_;
618 uint32_t next_surface_sequence_; 622 uint32_t next_surface_sequence_;
623 uint32_t num_consecutive_frames_suitable_for_gpu_ = 0;
619 624
620 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost); 625 DISALLOW_COPY_AND_ASSIGN(LayerTreeHost);
621 }; 626 };
622 627
623 } // namespace cc 628 } // namespace cc
624 629
625 #endif // CC_TREES_LAYER_TREE_HOST_H_ 630 #endif // CC_TREES_LAYER_TREE_HOST_H_
OLDNEW
« no previous file with comments | « cc/test/fake_recording_source.h ('k') | cc/trees/layer_tree_host.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698