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

Unified Diff: cc/layers/picture_layer_impl_unittest.cc

Issue 1134123005: cc: split UpdateGpuRasterizationStatus() into two parts. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 7 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
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_impl.h » ('j') | cc/trees/layer_tree_host_impl.h » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/picture_layer_impl_unittest.cc
diff --git a/cc/layers/picture_layer_impl_unittest.cc b/cc/layers/picture_layer_impl_unittest.cc
index e2df5ef011e68b10252a611923d389b6aad4535c..e9097d8ac82b15c35a5e9d6ceb89cdd4378e9650 100644
--- a/cc/layers/picture_layer_impl_unittest.cc
+++ b/cc/layers/picture_layer_impl_unittest.cc
@@ -2438,7 +2438,7 @@ TEST_F(PictureLayerImplTest, SyncTilingAfterGpuRasterizationToggles) {
// Toggling the gpu rasterization clears all tilings on both trees.
host_impl_.set_has_gpu_rasterization_trigger(true);
host_impl_.set_content_is_suitable_for_gpu_rasterization(true);
- host_impl_.UpdateGpuRasterizationStatus();
+ host_impl_.UpdateTreeResourcesIfNeeded();
EXPECT_EQ(0u, pending_layer_->tilings()->num_tilings());
EXPECT_EQ(0u, active_layer_->tilings()->num_tilings());
@@ -2460,7 +2460,7 @@ TEST_F(PictureLayerImplTest, SyncTilingAfterGpuRasterizationToggles) {
// Toggling the gpu rasterization clears all tilings on both trees.
EXPECT_TRUE(host_impl_.use_gpu_rasterization());
host_impl_.set_has_gpu_rasterization_trigger(false);
- host_impl_.UpdateGpuRasterizationStatus();
+ host_impl_.UpdateTreeResourcesIfNeeded();
EXPECT_EQ(GpuRasterizationStatus::OFF_VIEWPORT,
host_impl_.gpu_rasterization_status());
EXPECT_EQ(0u, pending_layer_->tilings()->num_tilings());
@@ -2468,7 +2468,6 @@ TEST_F(PictureLayerImplTest, SyncTilingAfterGpuRasterizationToggles) {
host_impl_.set_has_gpu_rasterization_trigger(true);
host_impl_.set_content_is_suitable_for_gpu_rasterization(false);
- host_impl_.UpdateGpuRasterizationStatus();
EXPECT_EQ(GpuRasterizationStatus::OFF_CONTENT,
host_impl_.gpu_rasterization_status());
}
@@ -2515,7 +2514,6 @@ TEST_F(PictureLayerImplTest, LowResTilingWithoutGpuRasterization) {
default_tile_size.height() * 4);
host_impl_.set_has_gpu_rasterization_trigger(false);
Stephen White 2015/05/13 19:44:17 Should we be calling UpdateTreeResourcesIfNeeded()
- host_impl_.UpdateGpuRasterizationStatus();
SetupDefaultTrees(layer_bounds);
EXPECT_FALSE(host_impl_.use_gpu_rasterization());
@@ -2530,7 +2528,6 @@ TEST_F(PictureLayerImplTest, NoLowResTilingWithGpuRasterization) {
host_impl_.set_has_gpu_rasterization_trigger(true);
host_impl_.set_content_is_suitable_for_gpu_rasterization(true);
Stephen White 2015/05/13 19:44:17 Same here?
- host_impl_.UpdateGpuRasterizationStatus();
SetupDefaultTrees(layer_bounds);
EXPECT_TRUE(host_impl_.use_gpu_rasterization());
@@ -2541,7 +2538,6 @@ TEST_F(PictureLayerImplTest, NoLowResTilingWithGpuRasterization) {
TEST_F(PictureLayerImplTest, RequiredTilesWithGpuRasterization) {
host_impl_.set_has_gpu_rasterization_trigger(true);
host_impl_.set_content_is_suitable_for_gpu_rasterization(true);
Stephen White 2015/05/13 19:44:17 Same here?
- host_impl_.UpdateGpuRasterizationStatus();
gfx::Size viewport_size(1000, 1000);
host_impl_.SetViewportSize(viewport_size);
@@ -2843,7 +2839,7 @@ TEST_F(PictureLayerImplTest, HighResTilingDuringAnimationForGpuRasterization) {
host_impl_.SetViewportSize(viewport_size);
host_impl_.set_has_gpu_rasterization_trigger(true);
host_impl_.set_content_is_suitable_for_gpu_rasterization(true);
- host_impl_.UpdateGpuRasterizationStatus();
+ host_impl_.UpdateTreeResourcesIfNeeded();
float contents_scale = 1.f;
float device_scale = 1.3f;
@@ -5030,7 +5026,6 @@ TEST_F(TileSizeTest, TileSizes) {
host_impl_.set_content_is_suitable_for_gpu_rasterization(true);
host_impl_.set_has_gpu_rasterization_trigger(false);
- host_impl_.UpdateGpuRasterizationStatus();
EXPECT_EQ(host_impl_.gpu_rasterization_status(),
GpuRasterizationStatus::OFF_VIEWPORT);
@@ -5052,7 +5047,6 @@ TEST_F(TileSizeTest, TileSizes) {
// Gpu-rasterization uses 25% viewport-height tiles.
// The +2's below are for border texels.
host_impl_.set_has_gpu_rasterization_trigger(true);
- host_impl_.UpdateGpuRasterizationStatus();
EXPECT_EQ(host_impl_.gpu_rasterization_status(), GpuRasterizationStatus::ON);
host_impl_.SetViewportSize(gfx::Size(2000, 2000));
« no previous file with comments | « no previous file | cc/trees/layer_tree_host_impl.h » ('j') | cc/trees/layer_tree_host_impl.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698