Index: cc/trees/layer_tree_host_unittest_damage.cc |
diff --git a/cc/trees/layer_tree_host_unittest_damage.cc b/cc/trees/layer_tree_host_unittest_damage.cc |
index 402a56a8986f0185bc96a1b64c3b577ae661067e..4c28738a9c3d9d9d2062a74a05ff9c2f038e0dee 100644 |
--- a/cc/trees/layer_tree_host_unittest_damage.cc |
+++ b/cc/trees/layer_tree_host_unittest_damage.cc |
@@ -54,15 +54,6 @@ class LayerTreeHostDamageTestSetVisibleDoesNotDraw |
case 0: |
// The first frame has full damage. |
EXPECT_EQ(gfx::RectF(10.f, 10.f).ToString(), root_damage.ToString()); |
- |
- // No evictions when we become not-visible. |
- impl->SetMemoryPolicy(ManagedMemoryPolicy( |
- 1000 * 1000 * 1000, |
- gpu::MemoryAllocation::CUTOFF_ALLOW_EVERYTHING, |
- 1000 * 1000 * 1000, |
- gpu::MemoryAllocation::CUTOFF_ALLOW_EVERYTHING, |
- ManagedMemoryPolicy::kDefaultNumResourcesLimit)); |
- |
PostSetVisibleToMainThread(false); |
break; |
case 1: |
@@ -74,12 +65,24 @@ class LayerTreeHostDamageTestSetVisibleDoesNotDraw |
case 2: |
// The compositor has been set visible again. |
EXPECT_TRUE(impl->visible()); |
- // But it still does not draw. |
- NOTREACHED(); |
+ if (!impl->settings().impl_side_painting) { |
+ // Evicting resources for non-impl-side painting will trigger a full |
+ // redraw. |
+ EXPECT_EQ(gfx::RectF(10.f, 10.f).ToString(), root_damage.ToString()); |
+ } else { |
+ // Otherwise there will be no redraw. |
+ NOTREACHED(); |
+ } |
break; |
case 3: |
- // Finally we force a draw, but it will have no damage. |
- EXPECT_EQ(gfx::RectF().ToString(), root_damage.ToString()); |
+ if (impl->settings().impl_side_painting && !delegating_renderer()) { |
+ // The forced draw will have full damage with a direct impl-side |
+ // painting renderer. |
+ EXPECT_EQ(gfx::RectF(10.f, 10.f).ToString(), root_damage.ToString()); |
+ } else { |
+ // Finally we force a draw, but it will have no damage. |
+ EXPECT_EQ(gfx::RectF().ToString(), root_damage.ToString()); |
+ } |
EndTest(); |
break; |
case 4: |