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

Side by Side Diff: services/ui/surfaces/display_compositor.cc

Issue 2632273003: Move ReferencedSurfaceTracker into GpuCompositorFrameSink. (Closed)
Patch Set: Change ReferencedSurfaceTracker. 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
OLDNEW
1 // Copyright 2015 The Chromium Authors. All rights reserved. 1 // Copyright 2015 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 "services/ui/surfaces/display_compositor.h" 5 #include "services/ui/surfaces/display_compositor.h"
6 6
7 #include <utility> 7 #include <utility>
8 8
9 #include "base/memory/ptr_util.h" 9 #include "base/memory/ptr_util.h"
10 #include "base/threading/thread_task_runner_handle.h" 10 #include "base/threading/thread_task_runner_handle.h"
(...skipping 23 matching lines...) Expand all
34 cc::mojom::DisplayCompositorClientPtr client) 34 cc::mojom::DisplayCompositorClientPtr client)
35 : manager_(cc::SurfaceManager::LifetimeType::REFERENCES), 35 : manager_(cc::SurfaceManager::LifetimeType::REFERENCES),
36 reference_manager_(&manager_), 36 reference_manager_(&manager_),
37 gpu_service_(std::move(gpu_service)), 37 gpu_service_(std::move(gpu_service)),
38 gpu_memory_buffer_manager_(std::move(gpu_memory_buffer_manager)), 38 gpu_memory_buffer_manager_(std::move(gpu_memory_buffer_manager)),
39 image_factory_(image_factory), 39 image_factory_(image_factory),
40 task_runner_(base::ThreadTaskRunnerHandle::Get()), 40 task_runner_(base::ThreadTaskRunnerHandle::Get()),
41 client_(std::move(client)), 41 client_(std::move(client)),
42 binding_(this, std::move(request)) { 42 binding_(this, std::move(request)) {
43 manager_.AddObserver(this); 43 manager_.AddObserver(this);
44 if (client_)
45 client_->OnDisplayCompositorCreated(GetRootSurfaceId());
46 } 44 }
47 45
48 void DisplayCompositor::AddSurfaceReferences( 46 void DisplayCompositor::AddSurfaceReferences(
49 const std::vector<cc::SurfaceReference>& references) { 47 const std::vector<cc::SurfaceReference>& references) {
50 DCHECK(thread_checker_.CalledOnValidThread()); 48 DCHECK(thread_checker_.CalledOnValidThread());
51 for (auto& reference : references) 49 for (auto& reference : references)
52 AddSurfaceReference(reference); 50 AddSurfaceReference(reference);
53 } 51 }
54 52
55 void DisplayCompositor::RemoveSurfaceReferences( 53 void DisplayCompositor::RemoveSurfaceReferences(
(...skipping 210 matching lines...) Expand 10 before | Expand all | Expand 10 after
266 surface_info.id().local_frame_id()); 264 surface_info.id().local_frame_id());
267 265
268 if (client_) 266 if (client_)
269 client_->OnSurfaceCreated(surface_info); 267 client_->OnSurfaceCreated(surface_info);
270 } 268 }
271 269
272 void DisplayCompositor::OnSurfaceDamaged(const cc::SurfaceId& surface_id, 270 void DisplayCompositor::OnSurfaceDamaged(const cc::SurfaceId& surface_id,
273 bool* changed) {} 271 bool* changed) {}
274 272
275 } // namespace ui 273 } // namespace ui
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698