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

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

Issue 2651593002: mus: Remove the old client lib. (Closed)
Patch Set: restore test Created 3 years, 11 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 | « ui/compositor/compositor.h ('k') | 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 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
73 } 73 }
74 74
75 Compositor::Compositor(const cc::FrameSinkId& frame_sink_id, 75 Compositor::Compositor(const cc::FrameSinkId& frame_sink_id,
76 ui::ContextFactory* context_factory, 76 ui::ContextFactory* context_factory,
77 ui::ContextFactoryPrivate* context_factory_private, 77 ui::ContextFactoryPrivate* context_factory_private,
78 scoped_refptr<base::SingleThreadTaskRunner> task_runner) 78 scoped_refptr<base::SingleThreadTaskRunner> task_runner)
79 : context_factory_(context_factory), 79 : context_factory_(context_factory),
80 context_factory_private_(context_factory_private), 80 context_factory_private_(context_factory_private),
81 root_layer_(NULL), 81 root_layer_(NULL),
82 widget_(gfx::kNullAcceleratedWidget), 82 widget_(gfx::kNullAcceleratedWidget),
83 #if defined(USE_AURA)
84 window_(nullptr),
85 #endif
86 widget_valid_(false), 83 widget_valid_(false),
87 compositor_frame_sink_requested_(false), 84 compositor_frame_sink_requested_(false),
88 frame_sink_id_(frame_sink_id), 85 frame_sink_id_(frame_sink_id),
89 task_runner_(task_runner), 86 task_runner_(task_runner),
90 vsync_manager_(new CompositorVSyncManager()), 87 vsync_manager_(new CompositorVSyncManager()),
91 device_scale_factor_(0.0f), 88 device_scale_factor_(0.0f),
92 locks_will_time_out_(true), 89 locks_will_time_out_(true),
93 compositor_lock_(NULL), 90 compositor_lock_(NULL),
94 layer_animator_collection_(this), 91 layer_animator_collection_(this),
95 weak_ptr_factory_(this) { 92 weak_ptr_factory_(this) {
(...skipping 332 matching lines...) Expand 10 before | Expand all | Expand 10 after
428 gfx::AcceleratedWidget widget = widget_; 425 gfx::AcceleratedWidget widget = widget_;
429 widget_ = gfx::kNullAcceleratedWidget; 426 widget_ = gfx::kNullAcceleratedWidget;
430 return widget; 427 return widget;
431 } 428 }
432 429
433 gfx::AcceleratedWidget Compositor::widget() const { 430 gfx::AcceleratedWidget Compositor::widget() const {
434 DCHECK(widget_valid_); 431 DCHECK(widget_valid_);
435 return widget_; 432 return widget_;
436 } 433 }
437 434
438 #if defined(USE_AURA)
439 void Compositor::SetWindow(ui::Window* window) {
440 window_ = window;
441 }
442
443 ui::Window* Compositor::window() const {
444 return window_;
445 }
446 #endif
447
448 scoped_refptr<CompositorVSyncManager> Compositor::vsync_manager() const { 435 scoped_refptr<CompositorVSyncManager> Compositor::vsync_manager() const {
449 return vsync_manager_; 436 return vsync_manager_;
450 } 437 }
451 438
452 void Compositor::AddObserver(CompositorObserver* observer) { 439 void Compositor::AddObserver(CompositorObserver* observer) {
453 observer_list_.AddObserver(observer); 440 observer_list_.AddObserver(observer);
454 } 441 }
455 442
456 void Compositor::RemoveObserver(CompositorObserver* observer) { 443 void Compositor::RemoveObserver(CompositorObserver* observer) {
457 observer_list_.RemoveObserver(observer); 444 observer_list_.RemoveObserver(observer);
(...skipping 106 matching lines...) Expand 10 before | Expand all | Expand 10 after
564 for (auto& observer : observer_list_) 551 for (auto& observer : observer_list_)
565 observer.OnCompositingLockStateChanged(this); 552 observer.OnCompositingLockStateChanged(this);
566 } 553 }
567 554
568 void Compositor::CancelCompositorLock() { 555 void Compositor::CancelCompositorLock() {
569 if (compositor_lock_) 556 if (compositor_lock_)
570 compositor_lock_->CancelLock(); 557 compositor_lock_->CancelLock();
571 } 558 }
572 559
573 } // namespace ui 560 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/compositor.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698