summaryrefslogtreecommitdiffstats
path: root/cc
diff options
context:
space:
mode:
authorboliu@chromium.org <boliu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-08 21:51:30 +0000
committerboliu@chromium.org <boliu@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-05-08 21:51:30 +0000
commit14bd554b95adc002247427614aeb70c213132282 (patch)
tree16c7a7b3d1fadbf65014948dd538eacd30f30b87 /cc
parentfc9dda6d8135c09a04cc20e6b85d8e12a368482a (diff)
downloadchromium_src-14bd554b95adc002247427614aeb70c213132282.zip
chromium_src-14bd554b95adc002247427614aeb70c213132282.tar.gz
chromium_src-14bd554b95adc002247427614aeb70c213132282.tar.bz2
Compositor method renames
LayerTreeHostClient::DidRecreateOutputSurface > DidInitializeOutputSurface LayerTreeHost::SetSurfaceReady > SetLayerTreeHostClientReady TBR=sievers,jamesr,piman NOTRY=true BUG= Review URL: https://chromiumcodereview.appspot.com/14951002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@199023 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc')
-rw-r--r--cc/test/fake_layer_tree_host_client.h2
-rw-r--r--cc/test/fake_proxy.h2
-rw-r--r--cc/test/layer_tree_test.cc6
-rw-r--r--cc/test/layer_tree_test.h2
-rw-r--r--cc/trees/layer_tree_host.cc8
-rw-r--r--cc/trees/layer_tree_host.h3
-rw-r--r--cc/trees/layer_tree_host_client.h3
-rw-r--r--cc/trees/layer_tree_host_unittest_context.cc18
-rw-r--r--cc/trees/proxy.h2
-rw-r--r--cc/trees/single_thread_proxy.cc2
-rw-r--r--cc/trees/single_thread_proxy.h2
-rw-r--r--cc/trees/thread_proxy.cc11
-rw-r--r--cc/trees/thread_proxy.h4
13 files changed, 32 insertions, 33 deletions
diff --git a/cc/test/fake_layer_tree_host_client.h b/cc/test/fake_layer_tree_host_client.h
index a25063a..5e029e7 100644
--- a/cc/test/fake_layer_tree_host_client.h
+++ b/cc/test/fake_layer_tree_host_client.h
@@ -32,7 +32,7 @@ class FakeLayerTreeHostClient : public LayerTreeHostClient {
float page_scale) OVERRIDE {}
virtual scoped_ptr<OutputSurface> CreateOutputSurface() OVERRIDE;
- virtual void DidRecreateOutputSurface(bool success) OVERRIDE {}
+ virtual void DidInitializeOutputSurface(bool success) OVERRIDE {}
virtual scoped_ptr<InputHandlerClient> CreateInputHandlerClient() OVERRIDE;
virtual void WillCommit() OVERRIDE {}
virtual void DidCommit() OVERRIDE {}
diff --git a/cc/test/fake_proxy.h b/cc/test/fake_proxy.h
index 712a70e..b806df4 100644
--- a/cc/test/fake_proxy.h
+++ b/cc/test/fake_proxy.h
@@ -22,7 +22,7 @@ class FakeProxy : public Proxy {
virtual bool CompositeAndReadback(void* pixels, gfx::Rect rect) OVERRIDE;
virtual void FinishAllRendering() OVERRIDE {}
virtual bool IsStarted() const OVERRIDE;
- virtual void SetSurfaceReady() OVERRIDE {}
+ virtual void SetLayerTreeHostClientReady() OVERRIDE {}
virtual void SetVisible(bool visible) OVERRIDE {}
virtual void CreateAndInitializeOutputSurface() OVERRIDE;
virtual const RendererCapabilities& GetRendererCapabilities() const OVERRIDE;
diff --git a/cc/test/layer_tree_test.cc b/cc/test/layer_tree_test.cc
index 4ae3f90..b696b3d 100644
--- a/cc/test/layer_tree_test.cc
+++ b/cc/test/layer_tree_test.cc
@@ -258,8 +258,8 @@ class LayerTreeHostClientForTesting : public LayerTreeHostClient {
return test_hooks_->CreateOutputSurface();
}
- virtual void DidRecreateOutputSurface(bool succeeded) OVERRIDE {
- test_hooks_->DidRecreateOutputSurface(succeeded);
+ virtual void DidInitializeOutputSurface(bool succeeded) OVERRIDE {
+ test_hooks_->DidInitializeOutputSurface(succeeded);
}
virtual void DidFailToInitializeOutputSurface() OVERRIDE {
@@ -409,7 +409,7 @@ void LayerTreeTest::DoBeginTest() {
started_ = true;
beginning_ = true;
SetupTree();
- layer_tree_host_->SetSurfaceReady();
+ layer_tree_host_->SetLayerTreeHostClientReady();
BeginTest();
beginning_ = false;
if (end_when_begin_returns_)
diff --git a/cc/test/layer_tree_test.h b/cc/test/layer_tree_test.h
index a8e4db7..81cb174 100644
--- a/cc/test/layer_tree_test.h
+++ b/cc/test/layer_tree_test.h
@@ -53,7 +53,7 @@ class TestHooks : public WebKit::WebAnimationDelegate {
float scale) {}
virtual void Animate(base::TimeTicks monotonic_time) {}
virtual void Layout() {}
- virtual void DidRecreateOutputSurface(bool succeeded) {}
+ virtual void DidInitializeOutputSurface(bool succeeded) {}
virtual void DidFailToInitializeOutputSurface() {}
virtual void DidAddAnimation() {}
virtual void DidCommit() {}
diff --git a/cc/trees/layer_tree_host.cc b/cc/trees/layer_tree_host.cc
index 7083187..b82673f 100644
--- a/cc/trees/layer_tree_host.cc
+++ b/cc/trees/layer_tree_host.cc
@@ -154,8 +154,8 @@ LayerTreeHost::~LayerTreeHost() {
}
}
-void LayerTreeHost::SetSurfaceReady() {
- proxy_->SetSurfaceReady();
+void LayerTreeHost::SetLayerTreeHostClientReady() {
+ proxy_->SetLayerTreeHostClientReady();
}
LayerTreeHost::CreateResult
@@ -191,7 +191,7 @@ LayerTreeHost::OnCreateAndInitializeOutputSurfaceAttempted(bool success) {
contents_texture_manager_->CreateTexture(gfx::Size(), GL_RGBA);
}
- client_->DidRecreateOutputSurface(true);
+ client_->DidInitializeOutputSurface(true);
return CreateSucceeded;
}
@@ -206,7 +206,7 @@ LayerTreeHost::OnCreateAndInitializeOutputSurfaceAttempted(bool success) {
// We have tried too many times to recreate the output surface. Tell the
// host to fall back to software rendering.
output_surface_can_be_initialized_ = false;
- client_->DidRecreateOutputSurface(false);
+ client_->DidInitializeOutputSurface(false);
return CreateFailedAndGaveUp;
}
diff --git a/cc/trees/layer_tree_host.h b/cc/trees/layer_tree_host.h
index 88c66d3..f805bb71 100644
--- a/cc/trees/layer_tree_host.h
+++ b/cc/trees/layer_tree_host.h
@@ -88,8 +88,7 @@ class CC_EXPORT LayerTreeHost : NON_EXPORTED_BASE(public RateLimiterClient) {
scoped_ptr<Thread> impl_thread);
virtual ~LayerTreeHost();
- // TODO(boliu): Rename to SetLayerTreeHostClientReady.
- void SetSurfaceReady();
+ void SetLayerTreeHostClientReady();
// Returns true if any LayerTreeHost is alive.
static bool AnyLayerTreeHostInstanceExists();
diff --git a/cc/trees/layer_tree_host_client.h b/cc/trees/layer_tree_host_client.h
index 324b93f..6869103 100644
--- a/cc/trees/layer_tree_host_client.h
+++ b/cc/trees/layer_tree_host_client.h
@@ -28,8 +28,7 @@ class LayerTreeHostClient {
virtual void ApplyScrollAndScale(gfx::Vector2d scroll_delta,
float page_scale) = 0;
virtual scoped_ptr<OutputSurface> CreateOutputSurface() = 0;
- // TODO(boliu): Rename to DidInitializeOutputSurface.
- virtual void DidRecreateOutputSurface(bool success) = 0;
+ virtual void DidInitializeOutputSurface(bool success) = 0;
virtual scoped_ptr<InputHandlerClient> CreateInputHandlerClient() = 0;
virtual void WillCommit() = 0;
virtual void DidCommit() = 0;
diff --git a/cc/trees/layer_tree_host_unittest_context.cc b/cc/trees/layer_tree_host_unittest_context.cc
index 675b14c..6ca7001 100644
--- a/cc/trees/layer_tree_host_unittest_context.cc
+++ b/cc/trees/layer_tree_host_unittest_context.cc
@@ -248,7 +248,7 @@ class LayerTreeHostContextTestLostContextSucceeds
PostSetNeedsCommitToMainThread();
}
- virtual void DidRecreateOutputSurface(bool succeeded) OVERRIDE {
+ virtual void DidInitializeOutputSurface(bool succeeded) OVERRIDE {
EXPECT_TRUE(succeeded);
if (first_initialized_)
@@ -567,7 +567,7 @@ class LayerTreeHostContextTestLostContextFails
PostSetNeedsCommitToMainThread();
}
- virtual void DidRecreateOutputSurface(bool succeeded) OVERRIDE {
+ virtual void DidInitializeOutputSurface(bool succeeded) OVERRIDE {
if (first_initialized_) {
EXPECT_FALSE(succeeded);
EndTest();
@@ -660,7 +660,7 @@ class LayerTreeHostContextTestFinishAllRenderingAfterLoss
PostSetNeedsCommitToMainThread();
}
- virtual void DidRecreateOutputSurface(bool succeeded) OVERRIDE {
+ virtual void DidInitializeOutputSurface(bool succeeded) OVERRIDE {
if (first_initialized_) {
EXPECT_FALSE(succeeded);
layer_tree_host()->FinishAllRendering();
@@ -734,7 +734,7 @@ class LayerTreeHostContextTestLostContextAndEvictTextures
impl_host_ = impl;
}
- virtual void DidRecreateOutputSurface(bool succeeded) OVERRIDE {
+ virtual void DidInitializeOutputSurface(bool succeeded) OVERRIDE {
EXPECT_TRUE(succeeded);
EndTest();
}
@@ -815,7 +815,7 @@ class LayerTreeHostContextTestLostContextWhileUpdatingResources
EndTest();
}
- virtual void DidRecreateOutputSurface(bool succeeded) OVERRIDE {
+ virtual void DidInitializeOutputSurface(bool succeeded) OVERRIDE {
EXPECT_TRUE(succeeded);
}
@@ -1143,7 +1143,7 @@ class LayerTreeHostContextTestLosesFirstOutputSurface
virtual void AfterTest() OVERRIDE {}
- virtual void DidRecreateOutputSurface(bool succeeded) OVERRIDE {
+ virtual void DidInitializeOutputSurface(bool succeeded) OVERRIDE {
EXPECT_FALSE(succeeded);
// If we make it this far without crashing, we pass!
@@ -1214,7 +1214,7 @@ class LayerTreeHostContextTestCompositeAndReadbackBeforeOutputSurfaceInit
PostSetNeedsCommitToMainThread();
}
- virtual void DidRecreateOutputSurface(bool succeeded) OVERRIDE {
+ virtual void DidInitializeOutputSurface(bool succeeded) OVERRIDE {
EXPECT_TRUE(succeeded);
++times_output_surface_created_;
}
@@ -1270,7 +1270,7 @@ class LayerTreeHostContextTestImplSidePainting
virtual void AfterTest() OVERRIDE {}
- virtual void DidRecreateOutputSurface(bool succeeded) OVERRIDE {
+ virtual void DidInitializeOutputSurface(bool succeeded) OVERRIDE {
EXPECT_TRUE(succeeded);
EndTest();
}
@@ -1345,7 +1345,7 @@ class LayerTreeHostContextTestFailsToCreateSurface
virtual void AfterTest() OVERRIDE {}
- virtual void DidRecreateOutputSurface(bool success) OVERRIDE {
+ virtual void DidInitializeOutputSurface(bool success) OVERRIDE {
EXPECT_FALSE(success);
EXPECT_EQ(0, failure_count_);
times_to_lose_on_create_ = 0;
diff --git a/cc/trees/proxy.h b/cc/trees/proxy.h
index d2d678f..aaab780 100644
--- a/cc/trees/proxy.h
+++ b/cc/trees/proxy.h
@@ -56,7 +56,7 @@ class CC_EXPORT Proxy {
// Indicates that the compositing surface associated with our context is
// ready to use.
- virtual void SetSurfaceReady() = 0;
+ virtual void SetLayerTreeHostClientReady() = 0;
virtual void SetVisible(bool visible) = 0;
diff --git a/cc/trees/single_thread_proxy.cc b/cc/trees/single_thread_proxy.cc
index 2ca82a4..8e7d466 100644
--- a/cc/trees/single_thread_proxy.cc
+++ b/cc/trees/single_thread_proxy.cc
@@ -90,7 +90,7 @@ bool SingleThreadProxy::IsStarted() const {
return layer_tree_host_impl_;
}
-void SingleThreadProxy::SetSurfaceReady() {
+void SingleThreadProxy::SetLayerTreeHostClientReady() {
// Scheduling is controlled by the embedder in the single thread case, so
// nothing to do.
}
diff --git a/cc/trees/single_thread_proxy.h b/cc/trees/single_thread_proxy.h
index 06c843f..7bd7da2 100644
--- a/cc/trees/single_thread_proxy.h
+++ b/cc/trees/single_thread_proxy.h
@@ -26,7 +26,7 @@ class SingleThreadProxy : public Proxy, LayerTreeHostImplClient {
virtual bool CompositeAndReadback(void* pixels, gfx::Rect rect) OVERRIDE;
virtual void FinishAllRendering() OVERRIDE;
virtual bool IsStarted() const OVERRIDE;
- virtual void SetSurfaceReady() OVERRIDE;
+ virtual void SetLayerTreeHostClientReady() OVERRIDE;
virtual void SetVisible(bool visible) OVERRIDE;
virtual void CreateAndInitializeOutputSurface() OVERRIDE;
virtual const RendererCapabilities& GetRendererCapabilities() const OVERRIDE;
diff --git a/cc/trees/thread_proxy.cc b/cc/trees/thread_proxy.cc
index 23c91c6..6dd72856 100644
--- a/cc/trees/thread_proxy.cc
+++ b/cc/trees/thread_proxy.cc
@@ -151,14 +151,15 @@ bool ThreadProxy::IsStarted() const {
return started_;
}
-void ThreadProxy::SetSurfaceReady() {
- TRACE_EVENT0("cc", "ThreadProxy::SetSurfaceReady");
+void ThreadProxy::SetLayerTreeHostClientReady() {
+ TRACE_EVENT0("cc", "ThreadProxy::SetLayerTreeHostClientReady");
Proxy::ImplThread()->PostTask(base::Bind(
- &ThreadProxy::SetSurfaceReadyOnImplThread, impl_thread_weak_ptr_));
+ &ThreadProxy::SetLayerTreeHostClientReadyOnImplThread,
+ impl_thread_weak_ptr_));
}
-void ThreadProxy::SetSurfaceReadyOnImplThread() {
- TRACE_EVENT0("cc", "ThreadProxy::SetSurfaceReadyOnImplThread");
+void ThreadProxy::SetLayerTreeHostClientReadyOnImplThread() {
+ TRACE_EVENT0("cc", "ThreadProxy::SetLayerTreeHostClientReadyOnImplThread");
scheduler_on_impl_thread_->SetCanStart();
}
diff --git a/cc/trees/thread_proxy.h b/cc/trees/thread_proxy.h
index 981157f..ea42299 100644
--- a/cc/trees/thread_proxy.h
+++ b/cc/trees/thread_proxy.h
@@ -41,7 +41,7 @@ class ThreadProxy : public Proxy,
virtual bool CompositeAndReadback(void* pixels, gfx::Rect rect) OVERRIDE;
virtual void FinishAllRendering() OVERRIDE;
virtual bool IsStarted() const OVERRIDE;
- virtual void SetSurfaceReady() OVERRIDE;
+ virtual void SetLayerTreeHostClientReady() OVERRIDE;
virtual void SetVisible(bool visible) OVERRIDE;
virtual void CreateAndInitializeOutputSurface() OVERRIDE;
virtual const RendererCapabilities& GetRendererCapabilities() const OVERRIDE;
@@ -160,7 +160,7 @@ class ThreadProxy : public Proxy,
void FinishAllRenderingOnImplThread(CompletionEvent* completion);
void InitializeImplOnImplThread(CompletionEvent* completion,
InputHandlerClient* input_handler_client);
- void SetSurfaceReadyOnImplThread();
+ void SetLayerTreeHostClientReadyOnImplThread();
void SetVisibleOnImplThread(CompletionEvent* completion, bool visible);
void HasInitializedOutputSurfaceOnImplThread(
CompletionEvent* completion,