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

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') | cc/surfaces/display.cc » ('J')
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 <set>
9
8 #include "base/memory/scoped_ptr.h" 10 #include "base/memory/scoped_ptr.h"
11 #include "base/memory/weak_ptr.h"
9 #include "cc/output/output_surface_client.h" 12 #include "cc/output/output_surface_client.h"
10 #include "cc/output/renderer.h" 13 #include "cc/output/renderer.h"
11 #include "cc/resources/returned_resource.h" 14 #include "cc/resources/returned_resource.h"
12 #include "cc/surfaces/surface_aggregator.h" 15 #include "cc/surfaces/surface_aggregator.h"
13 #include "cc/surfaces/surface_id.h" 16 #include "cc/surfaces/surface_id.h"
14 #include "cc/surfaces/surfaces_export.h" 17 #include "cc/surfaces/surfaces_export.h"
15 18
16 namespace gfx { 19 namespace gfx {
17 class Size; 20 class Size;
18 } 21 }
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
63 const gfx::Rect& clip, 66 const gfx::Rect& clip,
64 bool resourceless_software_draw) OVERRIDE {} 67 bool resourceless_software_draw) OVERRIDE {}
65 virtual void SetMemoryPolicy(const ManagedMemoryPolicy& policy) OVERRIDE {} 68 virtual void SetMemoryPolicy(const ManagedMemoryPolicy& policy) OVERRIDE {}
66 virtual void SetTreeActivationCallback( 69 virtual void SetTreeActivationCallback(
67 const base::Closure& callback) OVERRIDE {} 70 const base::Closure& callback) OVERRIDE {}
68 71
69 // RendererClient implementation. 72 // RendererClient implementation.
70 virtual void SetFullRootLayerDamage() OVERRIDE {} 73 virtual void SetFullRootLayerDamage() OVERRIDE {}
71 virtual void RunOnDemandRasterTask(Task* on_demand_raster_task) OVERRIDE {} 74 virtual void RunOnDemandRasterTask(Task* on_demand_raster_task) OVERRIDE {}
72 75
76 std::set<Surface*>& contained_surfaces() { return contained_surfaces_; }
77
73 private: 78 private:
74 void InitializeOutputSurface(); 79 void InitializeOutputSurface();
80 void DoDraw();
81 void ClearSurfaceList();
75 82
76 DisplayClient* client_; 83 DisplayClient* client_;
77 SurfaceManager* manager_; 84 SurfaceManager* manager_;
78 SharedBitmapManager* bitmap_manager_; 85 SharedBitmapManager* bitmap_manager_;
79 SurfaceId current_surface_id_; 86 SurfaceId current_surface_id_;
80 gfx::Size current_surface_size_; 87 gfx::Size current_surface_size_;
81 LayerTreeSettings settings_; 88 LayerTreeSettings settings_;
82 scoped_ptr<OutputSurface> output_surface_; 89 scoped_ptr<OutputSurface> output_surface_;
83 scoped_ptr<ResourceProvider> resource_provider_; 90 scoped_ptr<ResourceProvider> resource_provider_;
84 scoped_ptr<SurfaceAggregator> aggregator_; 91 scoped_ptr<SurfaceAggregator> aggregator_;
85 scoped_ptr<DirectRenderer> renderer_; 92 scoped_ptr<DirectRenderer> renderer_;
93 bool scheduled_draw_;
94
95 // This is the set of surfaces that were drawn by this last time.
96 std::set<Surface*> contained_surfaces_;
jamesr 2014/08/07 21:04:06 i think this should be a set of IDs, not raw surfa
97
98 base::WeakPtrFactory<Display> weak_ptr_factory_;
86 99
87 DISALLOW_COPY_AND_ASSIGN(Display); 100 DISALLOW_COPY_AND_ASSIGN(Display);
88 }; 101 };
89 102
90 } // namespace cc 103 } // namespace cc
91 104
92 #endif // CC_SURFACES_DISPLAY_H_ 105 #endif // CC_SURFACES_DISPLAY_H_
OLDNEW
« no previous file with comments | « no previous file | cc/surfaces/display.cc » ('j') | cc/surfaces/display.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698