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

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

Issue 2582653002: ui::Compositor needs a valid FrameSinkId even when it doesn't have ContextFactoryPrivate. (Closed)
Patch Set: Created 4 years 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 | « no previous file | no next file » | 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 <stddef.h> 7 #include <stddef.h>
8 8
9 #include <algorithm> 9 #include <algorithm>
10 #include <deque> 10 #include <deque>
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after
78 context_factory_private_(context_factory_private), 78 context_factory_private_(context_factory_private),
79 root_layer_(NULL), 79 root_layer_(NULL),
80 widget_(gfx::kNullAcceleratedWidget), 80 widget_(gfx::kNullAcceleratedWidget),
81 #if defined(USE_AURA) 81 #if defined(USE_AURA)
82 window_(nullptr), 82 window_(nullptr),
83 #endif 83 #endif
84 widget_valid_(false), 84 widget_valid_(false),
85 compositor_frame_sink_requested_(false), 85 compositor_frame_sink_requested_(false),
86 frame_sink_id_(context_factory_private 86 frame_sink_id_(context_factory_private
87 ? context_factory_private->AllocateFrameSinkId() 87 ? context_factory_private->AllocateFrameSinkId()
88 : cc::FrameSinkId()), 88 : cc::FrameSinkId(1, 1)),
sadrul 2016/12/16 02:29:09 Let's have a kDefaultFrameSinkId for this. So some
mfomitchev 2016/12/16 18:17:58 Done.
89 task_runner_(task_runner), 89 task_runner_(task_runner),
90 vsync_manager_(new CompositorVSyncManager()), 90 vsync_manager_(new CompositorVSyncManager()),
91 device_scale_factor_(0.0f), 91 device_scale_factor_(0.0f),
92 locks_will_time_out_(true), 92 locks_will_time_out_(true),
93 compositor_lock_(NULL), 93 compositor_lock_(NULL),
94 layer_animator_collection_(this), 94 layer_animator_collection_(this),
95 weak_ptr_factory_(this) { 95 weak_ptr_factory_(this) {
96 if (context_factory_private) { 96 if (context_factory_private) {
97 context_factory_private->GetSurfaceManager()->RegisterFrameSinkId( 97 context_factory_private->GetSurfaceManager()->RegisterFrameSinkId(
98 frame_sink_id_); 98 frame_sink_id_);
(...skipping 459 matching lines...) Expand 10 before | Expand all | Expand 10 after
558 for (auto& observer : observer_list_) 558 for (auto& observer : observer_list_)
559 observer.OnCompositingLockStateChanged(this); 559 observer.OnCompositingLockStateChanged(this);
560 } 560 }
561 561
562 void Compositor::CancelCompositorLock() { 562 void Compositor::CancelCompositorLock() {
563 if (compositor_lock_) 563 if (compositor_lock_)
564 compositor_lock_->CancelLock(); 564 compositor_lock_->CancelLock();
565 } 565 }
566 566
567 } // namespace ui 567 } // namespace ui
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698