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

Unified 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 side-by-side diff with in-line comments
Download patch
« 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')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layers/heads_up_display_layer_impl.h
diff --git a/cc/layers/heads_up_display_layer_impl.h b/cc/layers/heads_up_display_layer_impl.h
index 8ee386c6773509c8a45a9bfb8ced16136a1e7a47..53b953c486622a4c82a4e5f23874c6901d0ef365 100644
--- a/cc/layers/heads_up_display_layer_impl.h
+++ b/cc/layers/heads_up_display_layer_impl.h
@@ -5,6 +5,7 @@
#ifndef CC_LAYERS_HEADS_UP_DISPLAY_LAYER_IMPL_H_
#define CC_LAYERS_HEADS_UP_DISPLAY_LAYER_IMPL_H_
+#include <list>
#include <string>
#include <vector>
@@ -119,7 +120,14 @@ class CC_EXPORT HeadsUpDisplayLayerImpl : public LayerImpl {
const std::string& label_text) const;
void DrawDebugRects(SkCanvas* canvas, DebugRectHistory* debug_rect_history);
- scoped_ptr<ScopedResource> hud_resource_;
+ ScopedResource* AcquireResource(ResourceProvider* resource_provider);
+ void ReleaseUnusedResources(ResourceProvider* resource_provider);
+ typedef std::list<ScopedResource*> HUDResourceList;
danakj 2014/08/25 14:51:21 move down to L128 just above the variable?
+ void ReleaseResource(HUDResourceList::iterator);
+
+ HUDResourceList resources_;
+ ScopedResource* hud_resource_;
+
scoped_ptr<SkCanvas> hud_canvas_;
skia::RefPtr<SkTypeface> typeface_;
« 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