OLD | NEW |
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 "ui/views/mus/surface_context_factory.h" | 5 #include "ui/views/mus/surface_context_factory.h" |
6 | 6 |
7 #include "base/memory/ptr_util.h" | 7 #include "base/memory/ptr_util.h" |
8 #include "cc/resources/shared_bitmap_manager.h" | 8 #include "cc/resources/shared_bitmap_manager.h" |
9 #include "cc/surfaces/surface_id_allocator.h" | 9 #include "cc/surfaces/surface_id_allocator.h" |
10 #include "services/ui/public/cpp/compositor_frame_sink.h" | 10 #include "services/ui/public/cpp/compositor_frame_sink.h" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 | 82 |
83 gpu::GpuMemoryBufferManager* | 83 gpu::GpuMemoryBufferManager* |
84 SurfaceContextFactory::GetGpuMemoryBufferManager() { | 84 SurfaceContextFactory::GetGpuMemoryBufferManager() { |
85 return gpu_service_->gpu_memory_buffer_manager(); | 85 return gpu_service_->gpu_memory_buffer_manager(); |
86 } | 86 } |
87 | 87 |
88 cc::TaskGraphRunner* SurfaceContextFactory::GetTaskGraphRunner() { | 88 cc::TaskGraphRunner* SurfaceContextFactory::GetTaskGraphRunner() { |
89 return raster_thread_helper_.task_graph_runner(); | 89 return raster_thread_helper_.task_graph_runner(); |
90 } | 90 } |
91 | 91 |
92 uint32_t SurfaceContextFactory::AllocateSurfaceClientId() { | 92 cc::FrameSinkId SurfaceContextFactory::AllocateFrameSinkId() { |
93 return next_surface_id_namespace_++; | 93 return cc::FrameSinkId(next_surface_id_namespace_++, 0); |
94 } | 94 } |
95 | 95 |
96 cc::SurfaceManager* SurfaceContextFactory::GetSurfaceManager() { | 96 cc::SurfaceManager* SurfaceContextFactory::GetSurfaceManager() { |
97 return &surface_manager_; | 97 return &surface_manager_; |
98 } | 98 } |
99 | 99 |
100 void SurfaceContextFactory::SetDisplayVisible(ui::Compositor* compositor, | 100 void SurfaceContextFactory::SetDisplayVisible(ui::Compositor* compositor, |
101 bool visible) { | 101 bool visible) { |
102 // TODO(fsamuel): display[compositor]->SetVisible(visible); | 102 // TODO(fsamuel): display[compositor]->SetVisible(visible); |
103 } | 103 } |
104 | 104 |
105 void SurfaceContextFactory::ResizeDisplay(ui::Compositor* compositor, | 105 void SurfaceContextFactory::ResizeDisplay(ui::Compositor* compositor, |
106 const gfx::Size& size) { | 106 const gfx::Size& size) { |
107 // TODO(fsamuel): display[compositor]->Resize(size); | 107 // TODO(fsamuel): display[compositor]->Resize(size); |
108 } | 108 } |
109 | 109 |
110 } // namespace views | 110 } // namespace views |
OLD | NEW |