summaryrefslogtreecommitdiffstats
path: root/cc/trees
diff options
context:
space:
mode:
authorvollick@chromium.org <vollick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-02 17:08:24 +0000
committervollick@chromium.org <vollick@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-07-02 17:08:24 +0000
commitd2415fba6c4c02d6f6d50126cf11af54654c4443 (patch)
treeff0280c16b5f2a535da324dc607fbdc6ed3440fe /cc/trees
parenta7d65a8c6bc460a8f7a273029ecef543eb51017a (diff)
downloadchromium_src-d2415fba6c4c02d6f6d50126cf11af54654c4443.zip
chromium_src-d2415fba6c4c02d6f6d50126cf11af54654c4443.tar.gz
chromium_src-d2415fba6c4c02d6f6d50126cf11af54654c4443.tar.bz2
Reland "Shouldn't access LayerTreeTest::layer_tree_host on impl thread"
As Dana mentioned on the bug, the troublesome test doesn't make sense with impl painting. I've disabled it as suggested. BUG=235188 Review URL: https://chromiumcodereview.appspot.com/18454002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@209710 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/trees')
-rw-r--r--cc/trees/layer_tree_host_unittest.cc4
-rw-r--r--cc/trees/layer_tree_host_unittest_animation.cc14
-rw-r--r--cc/trees/single_thread_proxy.cc6
3 files changed, 9 insertions, 15 deletions
diff --git a/cc/trees/layer_tree_host_unittest.cc b/cc/trees/layer_tree_host_unittest.cc
index 849cb38..47bb753 100644
--- a/cc/trees/layer_tree_host_unittest.cc
+++ b/cc/trees/layer_tree_host_unittest.cc
@@ -2147,6 +2147,10 @@ class LayerTreeHostTestShutdownWithOnlySomeResourcesEvicted
child_layer2_(FakeContentLayer::Create(&client_)),
num_commits_(0) {}
+ virtual void InitializeSettings(LayerTreeSettings* settings) OVERRIDE {
+ settings->impl_side_painting = false;
+ }
+
virtual void BeginTest() OVERRIDE {
layer_tree_host()->SetViewportSize(gfx::Size(100, 100));
root_layer_->SetBounds(gfx::Size(100, 100));
diff --git a/cc/trees/layer_tree_host_unittest_animation.cc b/cc/trees/layer_tree_host_unittest_animation.cc
index df283de..7178e5b 100644
--- a/cc/trees/layer_tree_host_unittest_animation.cc
+++ b/cc/trees/layer_tree_host_unittest_animation.cc
@@ -291,7 +291,6 @@ class LayerTreeHostAnimationTestTickAnimationWhileBackgrounded
SINGLE_AND_MULTI_THREAD_TEST_F(
LayerTreeHostAnimationTestTickAnimationWhileBackgrounded);
-// Ensures that animations continue to be ticked when we are backgrounded.
class LayerTreeHostAnimationTestAddAnimationWithTimingFunction
: public LayerTreeHostAnimationTest {
public:
@@ -301,6 +300,7 @@ class LayerTreeHostAnimationTestAddAnimationWithTimingFunction
LayerTreeHostAnimationTest::SetupTree();
content_ = FakeContentLayer::Create(&client_);
content_->SetBounds(gfx::Size(4, 4));
+ content_->set_layer_animation_delegate(this);
layer_tree_host()->root_layer()->AddChild(content_);
}
@@ -308,9 +308,7 @@ class LayerTreeHostAnimationTestAddAnimationWithTimingFunction
PostAddAnimationToMainThread(content_.get());
}
- virtual void AnimateLayers(
- LayerTreeHostImpl* host_impl,
- base::TimeTicks monotonic_time) OVERRIDE {
+ virtual void NotifyAnimationStarted(double wallClockTime) OVERRIDE {
LayerAnimationController* controller =
layer_tree_host()->root_layer()->children()[0]->
layer_animation_controller();
@@ -331,14 +329,8 @@ class LayerTreeHostAnimationTestAddAnimationWithTimingFunction
// because of the default ease timing function.
EXPECT_FLOAT_EQ(linearly_interpolated_opacity, curve->GetValue(time));
- LayerAnimationController* controller_impl =
- host_impl->active_tree()->root_layer()->children()[0]->
- layer_animation_controller();
- Animation* animation_impl =
- controller_impl->GetAnimation(Animation::Opacity);
-
controller->RemoveAnimation(animation->id());
- controller_impl->RemoveAnimation(animation_impl->id());
+
EndTest();
}
diff --git a/cc/trees/single_thread_proxy.cc b/cc/trees/single_thread_proxy.cc
index 484acb6..ea04442 100644
--- a/cc/trees/single_thread_proxy.cc
+++ b/cc/trees/single_thread_proxy.cc
@@ -96,7 +96,7 @@ void SingleThreadProxy::SetLayerTreeHostClientReady() {
}
void SingleThreadProxy::SetVisible(bool visible) {
- DebugScopedSetImplThread impl(this);
+ DebugScopedSetImplThreadAndMainThreadBlocked impl(this);
layer_tree_host_impl_->SetVisible(visible);
}
@@ -175,9 +175,7 @@ void SingleThreadProxy::DoCommit(scoped_ptr<ResourceUpdateQueue> queue) {
DCHECK(Proxy::IsMainThread());
// Commit immediately.
{
- DebugScopedSetMainThreadBlocked mainThreadBlocked(this);
- DebugScopedSetImplThread impl(this);
-
+ DebugScopedSetImplThreadAndMainThreadBlocked impl_with_main_blocked(this);
RenderingStatsInstrumentation* stats_instrumentation =
layer_tree_host_->rendering_stats_instrumentation();
base::TimeTicks start_time = stats_instrumentation->StartRecording();