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

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

Issue 2166423002: ui::ContextFactory should not create SurfaceIdAllocators (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fixed Android + Addressed Antoine's comment 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 64 matching lines...) Expand 10 before | Expand all | Expand 10 after
75 compositor_ = NULL; 75 compositor_ = NULL;
76 } 76 }
77 77
78 Compositor::Compositor(ui::ContextFactory* context_factory, 78 Compositor::Compositor(ui::ContextFactory* context_factory,
79 scoped_refptr<base::SingleThreadTaskRunner> task_runner) 79 scoped_refptr<base::SingleThreadTaskRunner> task_runner)
80 : context_factory_(context_factory), 80 : context_factory_(context_factory),
81 root_layer_(NULL), 81 root_layer_(NULL),
82 widget_(gfx::kNullAcceleratedWidget), 82 widget_(gfx::kNullAcceleratedWidget),
83 widget_valid_(false), 83 widget_valid_(false),
84 output_surface_requested_(false), 84 output_surface_requested_(false),
85 surface_id_allocator_(context_factory->CreateSurfaceIdAllocator()), 85 surface_id_allocator_(new cc::SurfaceIdAllocator(
86 context_factory->AllocateSurfaceClientId())),
86 task_runner_(task_runner), 87 task_runner_(task_runner),
87 vsync_manager_(new CompositorVSyncManager()), 88 vsync_manager_(new CompositorVSyncManager()),
88 device_scale_factor_(0.0f), 89 device_scale_factor_(0.0f),
89 locks_will_time_out_(true), 90 locks_will_time_out_(true),
90 compositor_lock_(NULL), 91 compositor_lock_(NULL),
91 layer_animator_collection_(this), 92 layer_animator_collection_(this),
92 weak_ptr_factory_(this) { 93 weak_ptr_factory_(this) {
93 root_web_layer_ = cc::Layer::Create(); 94 root_web_layer_ = cc::Layer::Create();
94 95
95 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess(); 96 base::CommandLine* command_line = base::CommandLine::ForCurrentProcess();
(...skipping 404 matching lines...) Expand 10 before | Expand all | Expand 10 after
500 observer_list_, 501 observer_list_,
501 OnCompositingLockStateChanged(this)); 502 OnCompositingLockStateChanged(this));
502 } 503 }
503 504
504 void Compositor::CancelCompositorLock() { 505 void Compositor::CancelCompositorLock() {
505 if (compositor_lock_) 506 if (compositor_lock_)
506 compositor_lock_->CancelLock(); 507 compositor_lock_->CancelLock();
507 } 508 }
508 509
509 } // namespace ui 510 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698