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

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

Issue 2582823002: WIP: Surface Synchronization System
Patch Set: Only create ClientSurfaceEmbedder if window is visible. Trash it otherwise. Created 3 years, 10 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after
83 widget_valid_(false), 83 widget_valid_(false),
84 compositor_frame_sink_requested_(false), 84 compositor_frame_sink_requested_(false),
85 frame_sink_id_(frame_sink_id), 85 frame_sink_id_(frame_sink_id),
86 task_runner_(task_runner), 86 task_runner_(task_runner),
87 vsync_manager_(new CompositorVSyncManager()), 87 vsync_manager_(new CompositorVSyncManager()),
88 device_scale_factor_(0.0f), 88 device_scale_factor_(0.0f),
89 locks_will_time_out_(true), 89 locks_will_time_out_(true),
90 compositor_lock_(NULL), 90 compositor_lock_(NULL),
91 layer_animator_collection_(this), 91 layer_animator_collection_(this),
92 weak_ptr_factory_(this) { 92 weak_ptr_factory_(this) {
93 fprintf(stderr, ">>>ui::Compositor %s\n", frame_sink_id.ToString().c_str());
93 if (context_factory_private) { 94 if (context_factory_private) {
94 context_factory_private->GetSurfaceManager()->RegisterFrameSinkId( 95 context_factory_private->GetSurfaceManager()->RegisterFrameSinkId(
95 frame_sink_id_); 96 frame_sink_id_);
96 } 97 }
97 root_web_layer_ = cc::Layer::Create(); 98 root_web_layer_ = cc::Layer::Create();
98 99
99 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 100 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
100 101
101 cc::LayerTreeSettings settings; 102 cc::LayerTreeSettings settings;
102 103
(...skipping 448 matching lines...) Expand 10 before | Expand all | Expand 10 after
551 for (auto& observer : observer_list_) 552 for (auto& observer : observer_list_)
552 observer.OnCompositingLockStateChanged(this); 553 observer.OnCompositingLockStateChanged(this);
553 } 554 }
554 555
555 void Compositor::CancelCompositorLock() { 556 void Compositor::CancelCompositorLock() {
556 if (compositor_lock_) 557 if (compositor_lock_)
557 compositor_lock_->CancelLock(); 558 compositor_lock_->CancelLock();
558 } 559 }
559 560
560 } // namespace ui 561 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698