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

Side by Side Diff: cc/surfaces/display.h

Issue 2194013002: cc: Delete the Renderer base class. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@dcheck-delegating
Patch Set: delete-renderer-base-class: rebase Created 4 years, 4 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 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 #ifndef CC_SURFACES_DISPLAY_H_ 5 #ifndef CC_SURFACES_DISPLAY_H_
6 #define CC_SURFACES_DISPLAY_H_ 6 #define CC_SURFACES_DISPLAY_H_
7 7
8 #include <memory> 8 #include <memory>
9 #include <vector> 9 #include <vector>
10 10
11 #include "base/macros.h" 11 #include "base/macros.h"
12 #include "cc/output/direct_renderer.h"
12 #include "cc/output/output_surface_client.h" 13 #include "cc/output/output_surface_client.h"
13 #include "cc/output/renderer.h"
14 #include "cc/resources/returned_resource.h" 14 #include "cc/resources/returned_resource.h"
15 #include "cc/scheduler/begin_frame_source.h" 15 #include "cc/scheduler/begin_frame_source.h"
16 #include "cc/surfaces/display_scheduler.h" 16 #include "cc/surfaces/display_scheduler.h"
17 #include "cc/surfaces/surface_aggregator.h" 17 #include "cc/surfaces/surface_aggregator.h"
18 #include "cc/surfaces/surface_id.h" 18 #include "cc/surfaces/surface_id.h"
19 #include "cc/surfaces/surface_manager.h" 19 #include "cc/surfaces/surface_manager.h"
20 #include "cc/surfaces/surfaces_export.h" 20 #include "cc/surfaces/surfaces_export.h"
21 #include "gpu/command_buffer/common/texture_in_use_response.h" 21 #include "gpu/command_buffer/common/texture_in_use_response.h"
22 #include "ui/events/latency_info.h" 22 #include "ui/events/latency_info.h"
23 #include "ui/gfx/color_space.h" 23 #include "ui/gfx/color_space.h"
24 24
25 namespace gpu { 25 namespace gpu {
26 class GpuMemoryBufferManager; 26 class GpuMemoryBufferManager;
27 } 27 }
28 28
29 namespace gfx { 29 namespace gfx {
30 class Size; 30 class Size;
31 } 31 }
32 32
33 namespace cc { 33 namespace cc {
34 34
35 class BeginFrameSource; 35 class BeginFrameSource;
36 class DirectRenderer;
37 class DisplayClient; 36 class DisplayClient;
38 class OutputSurface; 37 class OutputSurface;
39 class RendererSettings; 38 class RendererSettings;
40 class ResourceProvider; 39 class ResourceProvider;
41 class SharedBitmapManager; 40 class SharedBitmapManager;
42 class SoftwareRenderer; 41 class SoftwareRenderer;
43 class Surface; 42 class Surface;
44 class SurfaceAggregator; 43 class SurfaceAggregator;
45 class SurfaceIdAllocator; 44 class SurfaceIdAllocator;
46 class SurfaceFactory; 45 class SurfaceFactory;
47 class TextureMailboxDeleter; 46 class TextureMailboxDeleter;
48 47
49 // A Display produces a surface that can be used to draw to a physical display 48 // A Display produces a surface that can be used to draw to a physical display
50 // (OutputSurface). The client is responsible for creating and sizing the 49 // (OutputSurface). The client is responsible for creating and sizing the
51 // surface IDs used to draw into the display and deciding when to draw. 50 // surface IDs used to draw into the display and deciding when to draw.
52 class CC_SURFACES_EXPORT Display : public DisplaySchedulerClient, 51 class CC_SURFACES_EXPORT Display : public DisplaySchedulerClient,
53 public OutputSurfaceClient, 52 public OutputSurfaceClient,
54 public RendererClient, 53 public DirectRendererClient,
55 public SurfaceDamageObserver { 54 public SurfaceDamageObserver {
56 public: 55 public:
57 // The |begin_frame_source| and |scheduler| may be null (together). In that 56 // The |begin_frame_source| and |scheduler| may be null (together). In that
58 // case, DrawAndSwap must be called externally when needed. 57 // case, DrawAndSwap must be called externally when needed.
59 Display(SharedBitmapManager* bitmap_manager, 58 Display(SharedBitmapManager* bitmap_manager,
60 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager, 59 gpu::GpuMemoryBufferManager* gpu_memory_buffer_manager,
61 const RendererSettings& settings, 60 const RendererSettings& settings,
62 std::unique_ptr<BeginFrameSource> begin_frame_source, 61 std::unique_ptr<BeginFrameSource> begin_frame_source,
63 std::unique_ptr<OutputSurface> output_surface, 62 std::unique_ptr<OutputSurface> output_surface,
64 std::unique_ptr<DisplayScheduler> scheduler, 63 std::unique_ptr<DisplayScheduler> scheduler,
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
96 void DidLoseOutputSurface() override; 95 void DidLoseOutputSurface() override;
97 void SetExternalTilePriorityConstraints( 96 void SetExternalTilePriorityConstraints(
98 const gfx::Rect& viewport_rect, 97 const gfx::Rect& viewport_rect,
99 const gfx::Transform& transform) override; 98 const gfx::Transform& transform) override;
100 void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override; 99 void SetMemoryPolicy(const ManagedMemoryPolicy& policy) override;
101 void SetTreeActivationCallback(const base::Closure& callback) override; 100 void SetTreeActivationCallback(const base::Closure& callback) override;
102 void OnDraw(const gfx::Transform& transform, 101 void OnDraw(const gfx::Transform& transform,
103 const gfx::Rect& viewport, 102 const gfx::Rect& viewport,
104 bool resourceless_software_draw) override; 103 bool resourceless_software_draw) override;
105 104
106 // RendererClient implementation. 105 // DirectRendererClient implementation.
107 void SetFullRootLayerDamage() override; 106 void SetFullRootLayerDamage() override;
108 107
109 // SurfaceDamageObserver implementation. 108 // SurfaceDamageObserver implementation.
110 void OnSurfaceDamaged(const SurfaceId& surface, bool* changed) override; 109 void OnSurfaceDamaged(const SurfaceId& surface, bool* changed) override;
111 110
112 void SetEnlargePassTextureAmountForTesting( 111 void SetEnlargePassTextureAmountForTesting(
113 const gfx::Size& enlarge_texture_amount) { 112 const gfx::Size& enlarge_texture_amount) {
114 enlarge_texture_amount_ = enlarge_texture_amount; 113 enlarge_texture_amount_ = enlarge_texture_amount;
115 } 114 }
116 115
(...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after
150 SoftwareRenderer* software_renderer_ = nullptr; 149 SoftwareRenderer* software_renderer_ = nullptr;
151 std::vector<ui::LatencyInfo> stored_latency_info_; 150 std::vector<ui::LatencyInfo> stored_latency_info_;
152 151
153 private: 152 private:
154 DISALLOW_COPY_AND_ASSIGN(Display); 153 DISALLOW_COPY_AND_ASSIGN(Display);
155 }; 154 };
156 155
157 } // namespace cc 156 } // namespace cc
158 157
159 #endif // CC_SURFACES_DISPLAY_H_ 158 #endif // CC_SURFACES_DISPLAY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698