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

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

Issue 432093003: Enqueuing new frames in a Surface should cause Displays to reaggregate it (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | cc/surfaces/display.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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/surfaces_export.h" 15 #include "cc/surfaces/surfaces_export.h"
15 16
16 namespace gfx { 17 namespace gfx {
17 class Size; 18 class Size;
18 } 19 }
19 20
20 namespace cc { 21 namespace cc {
21 22
22 class DirectRenderer; 23 class DirectRenderer;
23 class DisplayClient; 24 class DisplayClient;
24 class OutputSurface; 25 class OutputSurface;
25 class ResourceProvider; 26 class ResourceProvider;
26 class SharedBitmapManager; 27 class SharedBitmapManager;
27 class Surface; 28 class Surface;
28 class SurfaceAggregator; 29 class SurfaceAggregator;
29 class SurfaceIdAllocator; 30 class SurfaceIdAllocator;
30 class SurfaceFactory; 31 class SurfaceFactory;
31 class SurfaceManager;
32 32
33 // A Display produces a surface that can be used to draw to a physical display 33 // A Display produces a surface that can be used to draw to a physical display
34 // (OutputSurface). The client is responsible for creating and sizing the 34 // (OutputSurface). The client is responsible for creating and sizing the
35 // surface IDs used to draw into the display and deciding when to draw. 35 // surface IDs used to draw into the display and deciding when to draw.
36 class CC_SURFACES_EXPORT Display : public OutputSurfaceClient, 36 class CC_SURFACES_EXPORT Display : public OutputSurfaceClient,
37 public RendererClient { 37 public RendererClient,
38 public SurfaceDamageObserver {
38 public: 39 public:
39 Display(DisplayClient* client, 40 Display(DisplayClient* client,
40 SurfaceManager* manager, 41 SurfaceManager* manager,
41 SharedBitmapManager* bitmap_manager); 42 SharedBitmapManager* bitmap_manager);
42 virtual ~Display(); 43 virtual ~Display();
43 44
44 void Resize(SurfaceId id, const gfx::Size& new_size); 45 void Resize(SurfaceId id, const gfx::Size& new_size);
45 bool Draw(); 46 bool Draw();
46 47
47 SurfaceId CurrentSurfaceId(); 48 SurfaceId CurrentSurfaceId();
(...skipping 17 matching lines...) Expand all
65 const gfx::Transform& transform_for_tile_priority, 66 const gfx::Transform& transform_for_tile_priority,
66 bool resourceless_software_draw) OVERRIDE {} 67 bool resourceless_software_draw) OVERRIDE {}
67 virtual void SetMemoryPolicy(const ManagedMemoryPolicy& policy) OVERRIDE {} 68 virtual void SetMemoryPolicy(const ManagedMemoryPolicy& policy) OVERRIDE {}
68 virtual void SetTreeActivationCallback( 69 virtual void SetTreeActivationCallback(
69 const base::Closure& callback) OVERRIDE {} 70 const base::Closure& callback) OVERRIDE {}
70 71
71 // RendererClient implementation. 72 // RendererClient implementation.
72 virtual void SetFullRootLayerDamage() OVERRIDE {} 73 virtual void SetFullRootLayerDamage() OVERRIDE {}
73 virtual void RunOnDemandRasterTask(Task* on_demand_raster_task) OVERRIDE {} 74 virtual void RunOnDemandRasterTask(Task* on_demand_raster_task) OVERRIDE {}
74 75
76 // SurfaceDamageObserver implementation.
77 virtual void OnSurfaceDamaged(SurfaceId surface) OVERRIDE;
78
75 private: 79 private:
76 void InitializeOutputSurface(); 80 void InitializeOutputSurface();
77 81
78 DisplayClient* client_; 82 DisplayClient* client_;
79 SurfaceManager* manager_; 83 SurfaceManager* manager_;
80 SharedBitmapManager* bitmap_manager_; 84 SharedBitmapManager* bitmap_manager_;
81 SurfaceId current_surface_id_; 85 SurfaceId current_surface_id_;
82 gfx::Size current_surface_size_; 86 gfx::Size current_surface_size_;
83 LayerTreeSettings settings_; 87 LayerTreeSettings settings_;
84 scoped_ptr<OutputSurface> output_surface_; 88 scoped_ptr<OutputSurface> output_surface_;
85 scoped_ptr<ResourceProvider> resource_provider_; 89 scoped_ptr<ResourceProvider> resource_provider_;
86 scoped_ptr<SurfaceAggregator> aggregator_; 90 scoped_ptr<SurfaceAggregator> aggregator_;
87 scoped_ptr<DirectRenderer> renderer_; 91 scoped_ptr<DirectRenderer> renderer_;
88 92
93 std::set<SurfaceId> contained_surfaces_;
94
89 DISALLOW_COPY_AND_ASSIGN(Display); 95 DISALLOW_COPY_AND_ASSIGN(Display);
90 }; 96 };
91 97
92 } // namespace cc 98 } // namespace cc
93 99
94 #endif // CC_SURFACES_DISPLAY_H_ 100 #endif // CC_SURFACES_DISPLAY_H_
OLDNEW
« no previous file with comments | « no previous file | cc/surfaces/display.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698