summaryrefslogtreecommitdiffstats
path: root/cc/test/fake_content_layer_impl.cc
diff options
context:
space:
mode:
authordanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-13 14:01:29 +0000
committerdanakj@chromium.org <danakj@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-13 14:01:29 +0000
commit2a61ad5338b93b7eb55e9b76a99531165b24b08b (patch)
treefc889ce0c9875987efd07ceeb958cb4bb00058a4 /cc/test/fake_content_layer_impl.cc
parentd242cb3f2ddf1469d4eb71fc190c9ce122e16d2b (diff)
downloadchromium_src-2a61ad5338b93b7eb55e9b76a99531165b24b08b.zip
chromium_src-2a61ad5338b93b7eb55e9b76a99531165b24b08b.tar.gz
chromium_src-2a61ad5338b93b7eb55e9b76a99531165b24b08b.tar.bz2
Run all LayerTreeHost tests with impl-side painting.
This will be always on in the future. All tests should pass with it enabled. If a pending tree is activated during draw, it requests another redraw. If the context is also lost during the activation draw, we end up trying to draw the active tree with its lost resources, instead of doing a commit to get new resources. This is fixed and covered by SchedulerStateMachineTest.DontDrawBeforeCommitAfterLostOutputSurface If you commit and pending tree with animations, but are unable to draw, we would activate the pending tree via an animation tick, but never unblock the main thread if it was waiting on the activation to finish commit. This is covered by the animation unit tests. Similarly, if you commited a tree without animations, it would be activated by the thread proxy without drawing, but the main thread would remain blocked. This was uncovered and is covered by layer tree host tests. When an active tree has layers in it, and the root layer is removed, the impl side would crash trying to use the non-existent pending tree's root layer. This is fixed in LayerTreeImpl::ClearRenderSurfaces() and PushPersistedState(). BUG=239329 Review URL: https://chromiumcodereview.appspot.com/15004013 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@199721 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/test/fake_content_layer_impl.cc')
-rw-r--r--cc/test/fake_content_layer_impl.cc6
1 files changed, 6 insertions, 0 deletions
diff --git a/cc/test/fake_content_layer_impl.cc b/cc/test/fake_content_layer_impl.cc
index b1c01f1..5f72668 100644
--- a/cc/test/fake_content_layer_impl.cc
+++ b/cc/test/fake_content_layer_impl.cc
@@ -13,11 +13,17 @@ FakeContentLayerImpl::FakeContentLayerImpl(LayerTreeImpl* tree_impl, int id)
FakeContentLayerImpl::~FakeContentLayerImpl() {}
+scoped_ptr<LayerImpl> FakeContentLayerImpl::CreateLayerImpl(
+ LayerTreeImpl* tree_impl) {
+ return FakeContentLayerImpl::Create(tree_impl, id()).PassAs<LayerImpl>();
+}
+
bool FakeContentLayerImpl::HaveResourceForTileAt(int i, int j) {
return HasResourceIdForTileAt(i, j);
}
void FakeContentLayerImpl::DidLoseOutputSurface() {
+ TiledLayerImpl::DidLoseOutputSurface();
++lost_output_surface_count_;
}