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

Unified Diff: cc/trees/single_thread_proxy.cc

Issue 289903008: Merge SingleThreadProxy::CommitAndComposite into CompositeImmediately. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
« no previous file with comments | « cc/trees/single_thread_proxy.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/trees/single_thread_proxy.cc
diff --git a/cc/trees/single_thread_proxy.cc b/cc/trees/single_thread_proxy.cc
index a39627b644b16ab372a809ee227a3f567092576b..dd9e16a81cffaf7d1ee13784cf4182dfbb3b6438 100644
--- a/cc/trees/single_thread_proxy.cc
+++ b/cc/trees/single_thread_proxy.cc
@@ -338,9 +338,31 @@ void SingleThreadProxy::DidSwapBuffersCompleteOnImplThread() {
// scheduling)
void SingleThreadProxy::CompositeImmediately(base::TimeTicks frame_begin_time) {
TRACE_EVENT0("cc", "SingleThreadProxy::CompositeImmediately");
+ DCHECK(Proxy::IsMainThread());
+
+ if (!layer_tree_host_->InitializeOutputSurfaceIfNeeded())
+ return;
+
+ layer_tree_host_->AnimateLayers(frame_begin_time);
+
+ if (PrioritizedResourceManager* contents_texture_manager =
+ layer_tree_host_->contents_texture_manager()) {
+ contents_texture_manager->UnlinkAndClearEvictedBackings();
+ contents_texture_manager->SetMaxMemoryLimitBytes(
+ layer_tree_host_impl_->memory_allocation_limit_bytes());
+ contents_texture_manager->SetExternalPriorityCutoff(
+ layer_tree_host_impl_->memory_allocation_priority_cutoff());
+ }
+
+ scoped_ptr<ResourceUpdateQueue> queue =
+ make_scoped_ptr(new ResourceUpdateQueue);
+ layer_tree_host_->UpdateLayers(queue.get());
+ layer_tree_host_->WillCommit();
+ DoCommit(queue.Pass());
+ layer_tree_host_->DidBeginMainFrame();
LayerTreeHostImpl::FrameData frame;
- if (CommitAndComposite(frame_begin_time, &frame)) {
+ if (DoComposite(frame_begin_time, &frame)) {
{
DebugScopedSetMainThreadBlocked main_thread_blocked(this);
DebugScopedSetImplThread impl(this);
@@ -384,38 +406,6 @@ void SingleThreadProxy::ForceSerializeOnSwapBuffers() {
}
}
-bool SingleThreadProxy::CommitAndComposite(
- base::TimeTicks frame_begin_time,
- LayerTreeHostImpl::FrameData* frame) {
- TRACE_EVENT0("cc", "SingleThreadProxy::CommitAndComposite");
- DCHECK(Proxy::IsMainThread());
-
- if (!layer_tree_host_->InitializeOutputSurfaceIfNeeded())
- return false;
-
- layer_tree_host_->AnimateLayers(frame_begin_time);
-
- if (PrioritizedResourceManager* contents_texture_manager =
- layer_tree_host_->contents_texture_manager()) {
- contents_texture_manager->UnlinkAndClearEvictedBackings();
- contents_texture_manager->SetMaxMemoryLimitBytes(
- layer_tree_host_impl_->memory_allocation_limit_bytes());
- contents_texture_manager->SetExternalPriorityCutoff(
- layer_tree_host_impl_->memory_allocation_priority_cutoff());
- }
-
- scoped_ptr<ResourceUpdateQueue> queue =
- make_scoped_ptr(new ResourceUpdateQueue);
- layer_tree_host_->UpdateLayers(queue.get());
-
- layer_tree_host_->WillCommit();
-
- DoCommit(queue.Pass());
- bool result = DoComposite(frame_begin_time, frame);
- layer_tree_host_->DidBeginMainFrame();
- return result;
-}
-
bool SingleThreadProxy::ShouldComposite() const {
DCHECK(Proxy::IsImplThread());
return layer_tree_host_impl_->visible() &&
« no previous file with comments | « cc/trees/single_thread_proxy.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698