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

Unified 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, 6 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 side-by-side diff with in-line comments
Download patch
Index: cc/trees/layer_tree_host.h
diff --git a/cc/trees/layer_tree_host.h b/cc/trees/layer_tree_host.h
index 26560e7facc54de59aeac0c710b117231a05baf0..752a9f8fa75e96b9ae53830e25d6079cc880761d 100644
--- a/cc/trees/layer_tree_host.h
+++ b/cc/trees/layer_tree_host.h
@@ -490,6 +490,13 @@ class CC_EXPORT LayerTreeHost : public MutatorHostClient {
private:
friend class LayerTreeHostSerializationTest;
+ // Maximum amount of times to re-enable gpu rasterization after it's been
+ // turned off due to content.
+ 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
+ // The number of commits to waitch before attempting to re-enable gpu
enne (OOO) 2016/06/30 01:02:24 <_<
+ // rasterization.
+ 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
+
void InitializeProxy(
std::unique_ptr<Proxy> proxy,
std::unique_ptr<BeginFrameSource> external_begin_frame_source);
@@ -616,6 +623,7 @@ class CC_EXPORT LayerTreeHost : public MutatorHostClient {
uint32_t surface_id_namespace_;
uint32_t next_surface_sequence_;
+ int num_times_gpu_rasterization_reenabled_ = 0;
DISALLOW_COPY_AND_ASSIGN(LayerTreeHost);
};

Powered by Google App Engine
This is Rietveld 408576698