OLD | NEW |
1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "cc/surfaces/display.h" | 5 #include "cc/surfaces/display.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 | 8 |
9 #include "base/memory/ptr_util.h" | 9 #include "base/memory/ptr_util.h" |
10 #include "base/metrics/histogram_macros.h" | 10 #include "base/metrics/histogram_macros.h" |
11 #include "base/timer/elapsed_timer.h" | 11 #include "base/timer/elapsed_timer.h" |
12 #include "base/trace_event/trace_event.h" | 12 #include "base/trace_event/trace_event.h" |
13 #include "cc/debug/benchmark_instrumentation.h" | 13 #include "cc/debug/benchmark_instrumentation.h" |
14 #include "cc/output/compositor_frame.h" | 14 #include "cc/output/compositor_frame.h" |
15 #include "cc/output/direct_renderer.h" | 15 #include "cc/output/direct_renderer.h" |
16 #include "cc/output/gl_renderer.h" | 16 #include "cc/output/gl_renderer.h" |
17 #include "cc/output/renderer_settings.h" | 17 #include "cc/output/renderer_settings.h" |
18 #include "cc/output/software_renderer.h" | 18 #include "cc/output/software_renderer.h" |
19 #include "cc/output/texture_mailbox_deleter.h" | 19 #include "cc/output/texture_mailbox_deleter.h" |
20 #include "cc/scheduler/begin_frame_source.h" | 20 #include "cc/scheduler/begin_frame_source.h" |
21 #include "cc/surfaces/display_client.h" | 21 #include "cc/surfaces/display_client.h" |
22 #include "cc/surfaces/display_scheduler.h" | 22 #include "cc/surfaces/display_scheduler.h" |
23 #include "cc/surfaces/surface.h" | 23 #include "cc/surfaces/surface.h" |
24 #include "cc/surfaces/surface_aggregator.h" | 24 #include "cc/surfaces/surface_aggregator.h" |
25 #include "cc/surfaces/surface_manager.h" | 25 #include "cc/surfaces/surface_manager.h" |
26 #include "gpu/command_buffer/client/gles2_interface.h" | 26 #include "gpu/command_buffer/client/gles2_interface.h" |
27 #include "gpu/vulkan/features.h" | |
28 #include "ui/gfx/buffer_types.h" | 27 #include "ui/gfx/buffer_types.h" |
29 | 28 |
30 #if BUILDFLAG(ENABLE_VULKAN) | 29 #if defined(ENABLE_VULKAN) |
31 #include "cc/output/vulkan_renderer.h" | 30 #include "cc/output/vulkan_renderer.h" |
32 #endif | 31 #endif |
33 | 32 |
34 namespace cc { | 33 namespace cc { |
35 | 34 |
36 Display::Display(SharedBitmapManager* bitmap_manager, | 35 Display::Display(SharedBitmapManager* bitmap_manager, |
37 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, | 36 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, |
38 const RendererSettings& settings, | 37 const RendererSettings& settings, |
39 const FrameSinkId& frame_sink_id, | 38 const FrameSinkId& frame_sink_id, |
40 BeginFrameSource* begin_frame_source, | 39 BeginFrameSource* begin_frame_source, |
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
417 const SurfaceId& Display::CurrentSurfaceId() { | 416 const SurfaceId& Display::CurrentSurfaceId() { |
418 return current_surface_id_; | 417 return current_surface_id_; |
419 } | 418 } |
420 | 419 |
421 void Display::ForceImmediateDrawAndSwapIfPossible() { | 420 void Display::ForceImmediateDrawAndSwapIfPossible() { |
422 if (scheduler_) | 421 if (scheduler_) |
423 scheduler_->ForceImmediateSwapIfPossible(); | 422 scheduler_->ForceImmediateSwapIfPossible(); |
424 } | 423 } |
425 | 424 |
426 } // namespace cc | 425 } // namespace cc |
OLD | NEW |