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

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

Issue 2136413002: Update Surface ID Terminology (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed webkit_unit_tests Created 4 years, 5 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
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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <deque> 10 #include <deque>
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
204 params.animation_host = cc::AnimationHost::CreateMainInstance(); 204 params.animation_host = cc::AnimationHost::CreateMainInstance();
205 host_ = cc::LayerTreeHost::CreateSingleThreaded(this, &params); 205 host_ = cc::LayerTreeHost::CreateSingleThreaded(this, &params);
206 UMA_HISTOGRAM_TIMES("GPU.CreateBrowserCompositor", 206 UMA_HISTOGRAM_TIMES("GPU.CreateBrowserCompositor",
207 base::TimeTicks::Now() - before_create); 207 base::TimeTicks::Now() - before_create);
208 208
209 animation_timeline_ = 209 animation_timeline_ =
210 cc::AnimationTimeline::Create(cc::AnimationIdProvider::NextTimelineId()); 210 cc::AnimationTimeline::Create(cc::AnimationIdProvider::NextTimelineId());
211 host_->animation_host()->AddAnimationTimeline(animation_timeline_.get()); 211 host_->animation_host()->AddAnimationTimeline(animation_timeline_.get());
212 212
213 host_->SetRootLayer(root_web_layer_); 213 host_->SetRootLayer(root_web_layer_);
214 host_->set_surface_id_namespace(surface_id_allocator_->id_namespace()); 214 host_->set_surface_client_id(surface_id_allocator_->client_id());
215 host_->SetVisible(true); 215 host_->SetVisible(true);
216 } 216 }
217 217
218 Compositor::~Compositor() { 218 Compositor::~Compositor() {
219 TRACE_EVENT0("shutdown", "Compositor::destructor"); 219 TRACE_EVENT0("shutdown", "Compositor::destructor");
220 220
221 CancelCompositorLock(); 221 CancelCompositorLock();
222 DCHECK(!compositor_lock_); 222 DCHECK(!compositor_lock_);
223 223
224 FOR_EACH_OBSERVER(CompositorObserver, observer_list_, 224 FOR_EACH_OBSERVER(CompositorObserver, observer_list_,
(...skipping 275 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 observer_list_, 500 observer_list_,
501 OnCompositingLockStateChanged(this)); 501 OnCompositingLockStateChanged(this));
502 } 502 }
503 503
504 void Compositor::CancelCompositorLock() { 504 void Compositor::CancelCompositorLock() {
505 if (compositor_lock_) 505 if (compositor_lock_)
506 compositor_lock_->CancelLock(); 506 compositor_lock_->CancelLock();
507 } 507 }
508 508
509 } // namespace ui 509 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698