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

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

Issue 1126963006: Move VISUAL_STATE promise to activation (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Current state (presubmit warnings, cc_unittests tests failing) Created 5 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 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 <algorithm> 7 #include <algorithm>
8 #include <deque> 8 #include <deque>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after
219 } 219 }
220 220
221 void Compositor::DisableSwapUntilResize() { 221 void Compositor::DisableSwapUntilResize() {
222 host_->FinishAllRendering(); 222 host_->FinishAllRendering();
223 context_factory_->ResizeDisplay(this, gfx::Size()); 223 context_factory_->ResizeDisplay(this, gfx::Size());
224 } 224 }
225 225
226 void Compositor::SetLatencyInfo(const ui::LatencyInfo& latency_info) { 226 void Compositor::SetLatencyInfo(const ui::LatencyInfo& latency_info) {
227 scoped_ptr<cc::SwapPromise> swap_promise( 227 scoped_ptr<cc::SwapPromise> swap_promise(
228 new cc::LatencyInfoSwapPromise(latency_info)); 228 new cc::LatencyInfoSwapPromise(latency_info));
229 host_->QueueSwapPromise(swap_promise.Pass()); 229 host_->QueuePromise(swap_promise.Pass());
230 } 230 }
231 231
232 void Compositor::SetScaleAndSize(float scale, const gfx::Size& size_in_pixel) { 232 void Compositor::SetScaleAndSize(float scale, const gfx::Size& size_in_pixel) {
233 DCHECK_GT(scale, 0); 233 DCHECK_GT(scale, 0);
234 if (!size_in_pixel.IsEmpty()) { 234 if (!size_in_pixel.IsEmpty()) {
235 size_ = size_in_pixel; 235 size_ = size_in_pixel;
236 host_->SetViewportSize(size_in_pixel); 236 host_->SetViewportSize(size_in_pixel);
237 root_web_layer_->SetBounds(size_in_pixel); 237 root_web_layer_->SetBounds(size_in_pixel);
238 context_factory_->ResizeDisplay(this, size_in_pixel); 238 context_factory_->ResizeDisplay(this, size_in_pixel);
239 } 239 }
(...skipping 185 matching lines...) Expand 10 before | Expand all | Expand 10 after
425 observer_list_, 425 observer_list_,
426 OnCompositingLockStateChanged(this)); 426 OnCompositingLockStateChanged(this));
427 } 427 }
428 428
429 void Compositor::CancelCompositorLock() { 429 void Compositor::CancelCompositorLock() {
430 if (compositor_lock_) 430 if (compositor_lock_)
431 compositor_lock_->CancelLock(); 431 compositor_lock_->CancelLock();
432 } 432 }
433 433
434 } // namespace ui 434 } // namespace ui
OLDNEW
« cc/trees/layer_tree_host_impl.cc ('K') | « content/renderer/render_widget.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698