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

Side by Side Diff: ui/compositor/compositor.cc

Issue 986173002: Animations: Implement runtime flag for enabling compositor animation timelines. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase Created 5 years, 8 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 unified diff | Download patch
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.cc ('k') | ui/compositor/compositor_switches.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "ui/compositor/compositor.h" 5 #include "ui/compositor/compositor.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after
131 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking)); 131 command_line->HasSwitch(cc::switches::kEnableGpuBenchmarking));
132 132
133 settings.impl_side_painting = IsUIImplSidePaintingEnabled(); 133 settings.impl_side_painting = IsUIImplSidePaintingEnabled();
134 settings.use_zero_copy = IsUIZeroCopyEnabled(); 134 settings.use_zero_copy = IsUIZeroCopyEnabled();
135 settings.use_one_copy = IsUIOneCopyEnabled(); 135 settings.use_one_copy = IsUIOneCopyEnabled();
136 settings.use_image_texture_target = context_factory_->GetImageTextureTarget(); 136 settings.use_image_texture_target = context_factory_->GetImageTextureTarget();
137 // Note: gathering of pixel refs is only needed when using multiple 137 // Note: gathering of pixel refs is only needed when using multiple
138 // raster threads. 138 // raster threads.
139 settings.gather_pixel_refs = false; 139 settings.gather_pixel_refs = false;
140 140
141 settings.use_compositor_animation_timelines =
142 command_line->HasSwitch(switches::kUIEnableCompositorAnimationTimelines);
143
141 base::TimeTicks before_create = base::TimeTicks::Now(); 144 base::TimeTicks before_create = base::TimeTicks::Now();
142 host_ = cc::LayerTreeHost::CreateSingleThreaded( 145 host_ = cc::LayerTreeHost::CreateSingleThreaded(
143 this, this, context_factory_->GetSharedBitmapManager(), 146 this, this, context_factory_->GetSharedBitmapManager(),
144 context_factory_->GetGpuMemoryBufferManager(), 147 context_factory_->GetGpuMemoryBufferManager(),
145 context_factory_->GetTaskGraphRunner(), settings, task_runner_, nullptr); 148 context_factory_->GetTaskGraphRunner(), settings, task_runner_, nullptr);
146 UMA_HISTOGRAM_TIMES("GPU.CreateBrowserCompositor", 149 UMA_HISTOGRAM_TIMES("GPU.CreateBrowserCompositor",
147 base::TimeTicks::Now() - before_create); 150 base::TimeTicks::Now() - before_create);
148 host_->SetRootLayer(root_web_layer_); 151 host_->SetRootLayer(root_web_layer_);
149 host_->set_surface_id_namespace(surface_id_allocator_->id_namespace()); 152 host_->set_surface_id_namespace(surface_id_allocator_->id_namespace());
150 host_->SetLayerTreeHostClientReady(); 153 host_->SetLayerTreeHostClientReady();
(...skipping 266 matching lines...) Expand 10 before | Expand all | Expand 10 after
417 observer_list_, 420 observer_list_,
418 OnCompositingLockStateChanged(this)); 421 OnCompositingLockStateChanged(this));
419 } 422 }
420 423
421 void Compositor::CancelCompositorLock() { 424 void Compositor::CancelCompositorLock() {
422 if (compositor_lock_) 425 if (compositor_lock_)
423 compositor_lock_->CancelLock(); 426 compositor_lock_->CancelLock();
424 } 427 }
425 428
426 } // namespace ui 429 } // namespace ui
OLDNEW
« no previous file with comments | « content/renderer/gpu/render_widget_compositor.cc ('k') | ui/compositor/compositor_switches.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698