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

Unified Diff: cc/trees/layer_tree_host_unittest.cc

Issue 2141233002: cc: Clean up RecordingSource API (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix failed compositor_unittests Created 4 years, 4 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_unittest.cc
diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc
index 45c435a0a6277611382918892238a3c8deb91bdb..4fb8e693ab54f2406184a909fc2268cacdee2b10 100644
--- a/cc/trees/layer_tree_host_unittest.cc
+++ b/cc/trees/layer_tree_host_unittest.cc
@@ -4993,7 +4993,6 @@ class LayerTreeHostTestGpuRasterizationDefault : public LayerTreeHostTest {
}
void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
- EXPECT_TRUE(recording_source_->IsSuitableForGpuRasterization());
EXPECT_TRUE(layer_->IsSuitableForGpuRasterization());
EXPECT_FALSE(host_impl->pending_tree()->use_gpu_rasterization());
@@ -5001,7 +5000,6 @@ class LayerTreeHostTestGpuRasterizationDefault : public LayerTreeHostTest {
}
void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
- EXPECT_TRUE(recording_source_->IsSuitableForGpuRasterization());
EXPECT_TRUE(layer_->IsSuitableForGpuRasterization());
EXPECT_FALSE(host_impl->active_tree()->use_gpu_rasterization());
@@ -5046,7 +5044,6 @@ class LayerTreeHostTestEmptyLayerGpuRasterization : public LayerTreeHostTest {
}
void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
- EXPECT_TRUE(recording_source_->IsSuitableForGpuRasterization());
EXPECT_TRUE(layer_->IsSuitableForGpuRasterization());
EXPECT_FALSE(host_impl->pending_tree()->use_gpu_rasterization());
@@ -5054,7 +5051,6 @@ class LayerTreeHostTestEmptyLayerGpuRasterization : public LayerTreeHostTest {
}
void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
- EXPECT_TRUE(recording_source_->IsSuitableForGpuRasterization());
EXPECT_TRUE(layer_->IsSuitableForGpuRasterization());
EXPECT_FALSE(host_impl->active_tree()->use_gpu_rasterization());
@@ -5104,7 +5100,7 @@ class LayerTreeHostTestGpuRasterizationEnabled : public LayerTreeHostTest {
EXPECT_TRUE(layer_tree_host()->has_gpu_rasterization_trigger());
// Content-based veto is relevant as well.
- recording_source_->SetForceUnsuitableForGpuRasterization(true);
+ layer_->set_force_unsuitable_for_gpu_rasterization(true);
// Veto will take effect when layers are updated.
// The results will be verified after commit is completed below.
@@ -5116,7 +5112,6 @@ class LayerTreeHostTestGpuRasterizationEnabled : public LayerTreeHostTest {
void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
// Ensure the suitability bit sticks.
- EXPECT_FALSE(recording_source_->IsSuitableForGpuRasterization());
EXPECT_FALSE(layer_->IsSuitableForGpuRasterization());
EXPECT_FALSE(host_impl->pending_tree()->use_gpu_rasterization());
@@ -5124,7 +5119,6 @@ class LayerTreeHostTestGpuRasterizationEnabled : public LayerTreeHostTest {
}
void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
- EXPECT_FALSE(recording_source_->IsSuitableForGpuRasterization());
EXPECT_FALSE(layer_->IsSuitableForGpuRasterization());
EXPECT_FALSE(host_impl->active_tree()->use_gpu_rasterization());
@@ -5176,7 +5170,7 @@ class LayerTreeHostTestGpuRasterizationReenabled : public LayerTreeHostTest {
EXPECT_TRUE(layer_tree_host()->has_gpu_rasterization_trigger());
// Content-based veto is relevant as well.
- recording_source_->SetForceUnsuitableForGpuRasterization(true);
+ layer_->set_force_unsuitable_for_gpu_rasterization(true);
// Veto will take effect when layers are updated.
// The results will be verified after commit is completed below.
@@ -5197,13 +5191,13 @@ class LayerTreeHostTestGpuRasterizationReenabled : public LayerTreeHostTest {
++num_commits_;
switch (num_commits_) {
case 1:
- recording_source_->SetForceUnsuitableForGpuRasterization(false);
+ layer_->set_force_unsuitable_for_gpu_rasterization(false);
break;
case 30:
- recording_source_->SetForceUnsuitableForGpuRasterization(true);
+ layer_->set_force_unsuitable_for_gpu_rasterization(true);
break;
case 31:
- recording_source_->SetForceUnsuitableForGpuRasterization(false);
+ layer_->set_force_unsuitable_for_gpu_rasterization(false);
break;
case 90:
expected_gpu_enabled_ = true;
@@ -5259,7 +5253,7 @@ class LayerTreeHostTestGpuRasterizationForced : public LayerTreeHostTest {
EXPECT_TRUE(layer_tree_host()->has_gpu_rasterization_trigger());
// Content-based veto is irrelevant as well.
- recording_source_->SetForceUnsuitableForGpuRasterization(true);
+ layer_->set_force_unsuitable_for_gpu_rasterization(true);
// Veto will take effect when layers are updated.
// The results will be verified after commit is completed below.
@@ -5271,7 +5265,6 @@ class LayerTreeHostTestGpuRasterizationForced : public LayerTreeHostTest {
void CommitCompleteOnThread(LayerTreeHostImpl* host_impl) override {
// Ensure the suitability bit sticks.
- EXPECT_FALSE(recording_source_->IsSuitableForGpuRasterization());
EXPECT_FALSE(layer_->IsSuitableForGpuRasterization());
EXPECT_TRUE(host_impl->sync_tree()->use_gpu_rasterization());
@@ -5279,7 +5272,6 @@ class LayerTreeHostTestGpuRasterizationForced : public LayerTreeHostTest {
}
void DidActivateTreeOnThread(LayerTreeHostImpl* host_impl) override {
- EXPECT_FALSE(recording_source_->IsSuitableForGpuRasterization());
EXPECT_FALSE(layer_->IsSuitableForGpuRasterization());
EXPECT_TRUE(host_impl->active_tree()->use_gpu_rasterization());

Powered by Google App Engine
This is Rietveld 408576698