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

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

Issue 675083002: Add cc::RendererSettings for use in with cc::Display (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 2 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 "base/memory/scoped_ptr.h" 8 #include "base/memory/scoped_ptr.h"
9 #include "cc/output/output_surface_client.h" 9 #include "cc/output/output_surface_client.h"
10 #include "cc/output/renderer.h" 10 #include "cc/output/renderer.h"
11 #include "cc/resources/returned_resource.h" 11 #include "cc/resources/returned_resource.h"
12 #include "cc/surfaces/surface_aggregator.h" 12 #include "cc/surfaces/surface_aggregator.h"
13 #include "cc/surfaces/surface_id.h" 13 #include "cc/surfaces/surface_id.h"
14 #include "cc/surfaces/surface_manager.h" 14 #include "cc/surfaces/surface_manager.h"
15 #include "cc/surfaces/surfaces_export.h" 15 #include "cc/surfaces/surfaces_export.h"
16 16
17 namespace gfx { 17 namespace gfx {
18 class Size; 18 class Size;
19 } 19 }
20 20
21 namespace cc { 21 namespace cc {
22 22
23 class BlockingTaskRunner; 23 class BlockingTaskRunner;
24 class DirectRenderer; 24 class DirectRenderer;
25 class DisplayClient; 25 class DisplayClient;
26 class OutputSurface; 26 class OutputSurface;
27 class RendererSettings;
27 class ResourceProvider; 28 class ResourceProvider;
28 class SharedBitmapManager; 29 class SharedBitmapManager;
29 class Surface; 30 class Surface;
30 class SurfaceAggregator; 31 class SurfaceAggregator;
31 class SurfaceIdAllocator; 32 class SurfaceIdAllocator;
32 class SurfaceFactory; 33 class SurfaceFactory;
33 class TextureMailboxDeleter; 34 class TextureMailboxDeleter;
34 35
35 // A Display produces a surface that can be used to draw to a physical display 36 // A Display produces a surface that can be used to draw to a physical display
36 // (OutputSurface). The client is responsible for creating and sizing the 37 // (OutputSurface). The client is responsible for creating and sizing the
37 // surface IDs used to draw into the display and deciding when to draw. 38 // surface IDs used to draw into the display and deciding when to draw.
38 class CC_SURFACES_EXPORT Display : public OutputSurfaceClient, 39 class CC_SURFACES_EXPORT Display : public OutputSurfaceClient,
39 public RendererClient, 40 public RendererClient,
40 public SurfaceDamageObserver { 41 public SurfaceDamageObserver {
41 public: 42 public:
42 Display(DisplayClient* client, 43 Display(DisplayClient* client,
43 SurfaceManager* manager, 44 SurfaceManager* manager,
44 SharedBitmapManager* bitmap_manager, 45 SharedBitmapManager* bitmap_manager,
45 GpuMemoryBufferManager* gpu_memory_buffer_manager); 46 GpuMemoryBufferManager* gpu_memory_buffer_manager,
47 const RendererSettings& settings);
46 ~Display() override; 48 ~Display() override;
47 49
48 bool Initialize(scoped_ptr<OutputSurface> output_surface); 50 bool Initialize(scoped_ptr<OutputSurface> output_surface);
49 void Resize(SurfaceId id, const gfx::Size& new_size); 51 void Resize(SurfaceId id, const gfx::Size& new_size);
50 bool Draw(); 52 bool Draw();
51 53
52 SurfaceId CurrentSurfaceId(); 54 SurfaceId CurrentSurfaceId();
53 int GetMaxFramesPending(); 55 int GetMaxFramesPending();
54 56
55 // OutputSurfaceClient implementation. 57 // OutputSurfaceClient implementation.
(...skipping 25 matching lines...) Expand all
81 83
82 private: 84 private:
83 void InitializeRenderer(); 85 void InitializeRenderer();
84 86
85 DisplayClient* client_; 87 DisplayClient* client_;
86 SurfaceManager* manager_; 88 SurfaceManager* manager_;
87 SharedBitmapManager* bitmap_manager_; 89 SharedBitmapManager* bitmap_manager_;
88 GpuMemoryBufferManager* gpu_memory_buffer_manager_; 90 GpuMemoryBufferManager* gpu_memory_buffer_manager_;
89 SurfaceId current_surface_id_; 91 SurfaceId current_surface_id_;
90 gfx::Size current_surface_size_; 92 gfx::Size current_surface_size_;
91 LayerTreeSettings settings_; 93 RendererSettings settings_;
92 scoped_ptr<OutputSurface> output_surface_; 94 scoped_ptr<OutputSurface> output_surface_;
93 scoped_ptr<ResourceProvider> resource_provider_; 95 scoped_ptr<ResourceProvider> resource_provider_;
94 scoped_ptr<SurfaceAggregator> aggregator_; 96 scoped_ptr<SurfaceAggregator> aggregator_;
95 scoped_ptr<DirectRenderer> renderer_; 97 scoped_ptr<DirectRenderer> renderer_;
96 scoped_ptr<BlockingTaskRunner> blocking_main_thread_task_runner_; 98 scoped_ptr<BlockingTaskRunner> blocking_main_thread_task_runner_;
97 scoped_ptr<TextureMailboxDeleter> texture_mailbox_deleter_; 99 scoped_ptr<TextureMailboxDeleter> texture_mailbox_deleter_;
98 100
99 DISALLOW_COPY_AND_ASSIGN(Display); 101 DISALLOW_COPY_AND_ASSIGN(Display);
100 }; 102 };
101 103
102 } // namespace cc 104 } // namespace cc
103 105
104 #endif // CC_SURFACES_DISPLAY_H_ 106 #endif // CC_SURFACES_DISPLAY_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698