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

Side by Side Diff: cc/layers/heads_up_display_layer_impl.h

Issue 491783003: cc: Resource list for headup display (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
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
OLDNEW
1 // Copyright 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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_LAYERS_HEADS_UP_DISPLAY_LAYER_IMPL_H_ 5 #ifndef CC_LAYERS_HEADS_UP_DISPLAY_LAYER_IMPL_H_
6 #define CC_LAYERS_HEADS_UP_DISPLAY_LAYER_IMPL_H_ 6 #define CC_LAYERS_HEADS_UP_DISPLAY_LAYER_IMPL_H_
7 7
8 #include <list>
8 #include <string> 9 #include <string>
9 #include <vector> 10 #include <vector>
10 11
11 #include "base/memory/scoped_ptr.h" 12 #include "base/memory/scoped_ptr.h"
12 #include "base/time/time.h" 13 #include "base/time/time.h"
13 #include "cc/base/cc_export.h" 14 #include "cc/base/cc_export.h"
14 #include "cc/debug/debug_rect_history.h" 15 #include "cc/debug/debug_rect_history.h"
15 #include "cc/layers/layer_impl.h" 16 #include "cc/layers/layer_impl.h"
16 #include "cc/resources/memory_history.h" 17 #include "cc/resources/memory_history.h"
17 #include "cc/resources/scoped_resource.h" 18 #include "cc/resources/scoped_resource.h"
(...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after
112 int right) const; 113 int right) const;
113 void DrawDebugRect(SkCanvas* canvas, 114 void DrawDebugRect(SkCanvas* canvas,
114 SkPaint* paint, 115 SkPaint* paint,
115 const DebugRect& rect, 116 const DebugRect& rect,
116 SkColor stroke_color, 117 SkColor stroke_color,
117 SkColor fill_color, 118 SkColor fill_color,
118 float stroke_width, 119 float stroke_width,
119 const std::string& label_text) const; 120 const std::string& label_text) const;
120 void DrawDebugRects(SkCanvas* canvas, DebugRectHistory* debug_rect_history); 121 void DrawDebugRects(SkCanvas* canvas, DebugRectHistory* debug_rect_history);
121 122
122 scoped_ptr<ScopedResource> hud_resource_; 123 ScopedResource* AcquireResource(ResourceProvider* resource_provider);
124 void ReleaseUnusedResources(ResourceProvider* resource_provider);
125 typedef std::list<ScopedResource*> HUDResourceList;
danakj 2014/08/25 14:51:21 move down to L128 just above the variable?
126 void ReleaseResource(HUDResourceList::iterator);
127
128 HUDResourceList resources_;
129 ScopedResource* hud_resource_;
130
123 scoped_ptr<SkCanvas> hud_canvas_; 131 scoped_ptr<SkCanvas> hud_canvas_;
124 132
125 skia::RefPtr<SkTypeface> typeface_; 133 skia::RefPtr<SkTypeface> typeface_;
126 134
127 Graph fps_graph_; 135 Graph fps_graph_;
128 Graph paint_time_graph_; 136 Graph paint_time_graph_;
129 MemoryHistory::Entry memory_entry_; 137 MemoryHistory::Entry memory_entry_;
130 int fade_step_; 138 int fade_step_;
131 std::vector<DebugRect> paint_rects_; 139 std::vector<DebugRect> paint_rects_;
132 140
133 base::TimeTicks time_of_last_graph_update_; 141 base::TimeTicks time_of_last_graph_update_;
134 142
135 DISALLOW_COPY_AND_ASSIGN(HeadsUpDisplayLayerImpl); 143 DISALLOW_COPY_AND_ASSIGN(HeadsUpDisplayLayerImpl);
136 }; 144 };
137 145
138 } // namespace cc 146 } // namespace cc
139 147
140 #endif // CC_LAYERS_HEADS_UP_DISPLAY_LAYER_IMPL_H_ 148 #endif // CC_LAYERS_HEADS_UP_DISPLAY_LAYER_IMPL_H_
OLDNEW
« no previous file with comments | « no previous file | cc/layers/heads_up_display_layer_impl.cc » ('j') | cc/layers/heads_up_display_layer_impl.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698