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

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: Test code refactor 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 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 baa1618b0a25656e304f5e75cac046d19eb1491c..8bd161e225e252409fcbdacdf5bad4b5e1f6705c 100644
--- a/cc/trees/layer_tree_host_unittest.cc
+++ b/cc/trees/layer_tree_host_unittest.cc
@@ -4945,7 +4945,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());
@@ -4953,7 +4952,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());
@@ -4998,7 +4996,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());
@@ -5006,7 +5003,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());
@@ -5056,7 +5052,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_->SetForceUnsuitableForGpuRasterization(true);
// Veto will take effect when layers are updated.
// The results will be verified after commit is completed below.
@@ -5068,7 +5064,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());
@@ -5076,7 +5071,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());
@@ -5128,7 +5122,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_->SetForceUnsuitableForGpuRasterization(true);
// Veto will take effect when layers are updated.
// The results will be verified after commit is completed below.
@@ -5149,13 +5143,13 @@ class LayerTreeHostTestGpuRasterizationReenabled : public LayerTreeHostTest {
++num_commits_;
switch (num_commits_) {
case 1:
- recording_source_->SetForceUnsuitableForGpuRasterization(false);
+ layer_->SetForceUnsuitableForGpuRasterization(false);
break;
case 30:
- recording_source_->SetForceUnsuitableForGpuRasterization(true);
+ layer_->SetForceUnsuitableForGpuRasterization(true);
break;
case 31:
- recording_source_->SetForceUnsuitableForGpuRasterization(false);
+ layer_->SetForceUnsuitableForGpuRasterization(false);
break;
case 90:
expected_gpu_enabled_ = true;
@@ -5211,7 +5205,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_->SetForceUnsuitableForGpuRasterization(true);
// Veto will take effect when layers are updated.
// The results will be verified after commit is completed below.
@@ -5223,7 +5217,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());
@@ -5231,7 +5224,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