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

Side by Side Diff: cc/trees/layer_tree_settings_unittest.cc

Issue 1783613004: CC Animation: Erase cc::LayerSettings everywhere. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@eraseandroid
Patch Set: Rebase. Created 4 years, 9 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 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 #include "cc/trees/layer_tree_settings.h" 5 #include "cc/trees/layer_tree_settings.h"
6 6
7 #include "cc/proto/layer_tree_settings.pb.h" 7 #include "cc/proto/layer_tree_settings.pb.h"
8 #include "testing/gtest/include/gtest/gtest.h" 8 #include "testing/gtest/include/gtest/gtest.h"
9 9
10 namespace cc { 10 namespace cc {
(...skipping 70 matching lines...) Expand 10 before | Expand all | Expand 10 after
81 settings.use_zero_copy = !settings.use_zero_copy; 81 settings.use_zero_copy = !settings.use_zero_copy;
82 settings.use_partial_raster = !settings.use_partial_raster; 82 settings.use_partial_raster = !settings.use_partial_raster;
83 settings.enable_elastic_overscroll = !settings.enable_elastic_overscroll; 83 settings.enable_elastic_overscroll = !settings.enable_elastic_overscroll;
84 settings.use_image_texture_targets.push_back(54); 84 settings.use_image_texture_targets.push_back(54);
85 settings.use_image_texture_targets.push_back(55); 85 settings.use_image_texture_targets.push_back(55);
86 settings.ignore_root_layer_flings = !settings.ignore_root_layer_flings; 86 settings.ignore_root_layer_flings = !settings.ignore_root_layer_flings;
87 settings.scheduled_raster_task_limit = 87 settings.scheduled_raster_task_limit =
88 settings.scheduled_raster_task_limit * 3 + 1; 88 settings.scheduled_raster_task_limit * 3 + 1;
89 settings.use_occlusion_for_tile_prioritization = 89 settings.use_occlusion_for_tile_prioritization =
90 !settings.use_occlusion_for_tile_prioritization; 90 !settings.use_occlusion_for_tile_prioritization;
91 settings.use_compositor_animation_timelines =
92 !settings.use_compositor_animation_timelines;
93 settings.wait_for_beginframe_interval = 91 settings.wait_for_beginframe_interval =
94 !settings.wait_for_beginframe_interval; 92 !settings.wait_for_beginframe_interval;
95 settings.max_staging_buffer_usage_in_bytes = 93 settings.max_staging_buffer_usage_in_bytes =
96 settings.max_staging_buffer_usage_in_bytes * 3 + 1; 94 settings.max_staging_buffer_usage_in_bytes * 3 + 1;
97 settings.memory_policy_ = ManagedMemoryPolicy( 95 settings.memory_policy_ = ManagedMemoryPolicy(
98 56, gpu::MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE, 57); 96 56, gpu::MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE, 57);
99 LayerTreeDebugState debug_state; 97 LayerTreeDebugState debug_state;
100 debug_state.show_fps_counter = !debug_state.show_fps_counter; 98 debug_state.show_fps_counter = !debug_state.show_fps_counter;
101 settings.initial_debug_state = debug_state; 99 settings.initial_debug_state = debug_state;
102 VerifySerializeAndDeserialize(settings); 100 VerifySerializeAndDeserialize(settings);
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
141 settings.max_memory_for_prepaint_percentage = 62; 139 settings.max_memory_for_prepaint_percentage = 62;
142 settings.strict_layer_property_change_checking = true; 140 settings.strict_layer_property_change_checking = true;
143 settings.use_zero_copy = true; 141 settings.use_zero_copy = true;
144 settings.use_partial_raster = true; 142 settings.use_partial_raster = true;
145 settings.enable_elastic_overscroll = false; 143 settings.enable_elastic_overscroll = false;
146 settings.use_image_texture_targets.push_back(10); 144 settings.use_image_texture_targets.push_back(10);
147 settings.use_image_texture_targets.push_back(19); 145 settings.use_image_texture_targets.push_back(19);
148 settings.ignore_root_layer_flings = true; 146 settings.ignore_root_layer_flings = true;
149 settings.scheduled_raster_task_limit = 41; 147 settings.scheduled_raster_task_limit = 41;
150 settings.use_occlusion_for_tile_prioritization = true; 148 settings.use_occlusion_for_tile_prioritization = true;
151 settings.use_compositor_animation_timelines = true;
152 settings.wait_for_beginframe_interval = true; 149 settings.wait_for_beginframe_interval = true;
153 settings.max_staging_buffer_usage_in_bytes = 70; 150 settings.max_staging_buffer_usage_in_bytes = 70;
154 settings.memory_policy_ = ManagedMemoryPolicy( 151 settings.memory_policy_ = ManagedMemoryPolicy(
155 71, gpu::MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE, 77); 152 71, gpu::MemoryAllocation::CUTOFF_ALLOW_NICE_TO_HAVE, 77);
156 LayerTreeDebugState debug_state; 153 LayerTreeDebugState debug_state;
157 debug_state.show_fps_counter = true; 154 debug_state.show_fps_counter = true;
158 settings.initial_debug_state = debug_state; 155 settings.initial_debug_state = debug_state;
159 VerifySerializeAndDeserialize(settings); 156 VerifySerializeAndDeserialize(settings);
160 } 157 }
161 158
162 } // namespace 159 } // namespace
163 } // namespace cc 160 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698