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

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

Issue 900063002: Fixes for two different HUD issues related to win32k lockdown (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: i am a plumber Created 5 years, 10 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 <string> 8 #include <string>
9 #include <vector> 9 #include <vector>
10 10
(...skipping 11 matching lines...) Expand all
22 struct SkRect; 22 struct SkRect;
23 23
24 namespace cc { 24 namespace cc {
25 25
26 class FrameRateCounter; 26 class FrameRateCounter;
27 class PaintTimeCounter; 27 class PaintTimeCounter;
28 28
29 class CC_EXPORT HeadsUpDisplayLayerImpl : public LayerImpl { 29 class CC_EXPORT HeadsUpDisplayLayerImpl : public LayerImpl {
30 public: 30 public:
31 static scoped_ptr<HeadsUpDisplayLayerImpl> Create(LayerTreeImpl* tree_impl, 31 static scoped_ptr<HeadsUpDisplayLayerImpl> Create(LayerTreeImpl* tree_impl,
32 int id) { 32 int id,
33 return make_scoped_ptr(new HeadsUpDisplayLayerImpl(tree_impl, id)); 33 SkTypeface* typeface) {
34 return make_scoped_ptr(
35 new HeadsUpDisplayLayerImpl(tree_impl, id, typeface));
34 } 36 }
35 ~HeadsUpDisplayLayerImpl() override; 37 ~HeadsUpDisplayLayerImpl() override;
36 38
37 scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override; 39 scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
38 40
39 bool WillDraw(DrawMode draw_mode, 41 bool WillDraw(DrawMode draw_mode,
40 ResourceProvider* resource_provider) override; 42 ResourceProvider* resource_provider) override;
41 void AppendQuads(RenderPass* render_pass, 43 void AppendQuads(RenderPass* render_pass,
42 const Occlusion& occlusion_in_content_space, 44 const Occlusion& occlusion_in_content_space,
43 AppendQuadsData* append_quads_data) override; 45 AppendQuadsData* append_quads_data) override;
(...skipping 16 matching lines...) Expand all
60 62
61 double value; 63 double value;
62 double min; 64 double min;
63 double max; 65 double max;
64 66
65 double current_upper_bound; 67 double current_upper_bound;
66 const double default_upper_bound; 68 const double default_upper_bound;
67 const double indicator; 69 const double indicator;
68 }; 70 };
69 71
70 HeadsUpDisplayLayerImpl(LayerTreeImpl* tree_impl, int id); 72 HeadsUpDisplayLayerImpl(LayerTreeImpl* tree_impl,
73 int id,
74 SkTypeface* typeface);
71 75
72 const char* LayerTypeAsString() const override; 76 const char* LayerTypeAsString() const override;
73 77
74 void AsValueInto(base::debug::TracedValue* dict) const override; 78 void AsValueInto(base::debug::TracedValue* dict) const override;
75 79
76 void UpdateHudContents(); 80 void UpdateHudContents();
77 void DrawHudContents(SkCanvas* canvas); 81 void DrawHudContents(SkCanvas* canvas);
78 82
79 void DrawText(SkCanvas* canvas, 83 void DrawText(SkCanvas* canvas,
80 SkPaint* paint, 84 SkPaint* paint,
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 SkColor stroke_color, 123 SkColor stroke_color,
120 SkColor fill_color, 124 SkColor fill_color,
121 float stroke_width, 125 float stroke_width,
122 const std::string& label_text) const; 126 const std::string& label_text) const;
123 void DrawDebugRects(SkCanvas* canvas, DebugRectHistory* debug_rect_history); 127 void DrawDebugRects(SkCanvas* canvas, DebugRectHistory* debug_rect_history);
124 128
125 void AcquireResource(ResourceProvider* resource_provider); 129 void AcquireResource(ResourceProvider* resource_provider);
126 void ReleaseUnmatchedSizeResources(ResourceProvider* resource_provider); 130 void ReleaseUnmatchedSizeResources(ResourceProvider* resource_provider);
127 131
128 ScopedPtrVector<ScopedResource> resources_; 132 ScopedPtrVector<ScopedResource> resources_;
129 scoped_ptr<SkCanvas> hud_canvas_; 133 skia::RefPtr<SkSurface> hud_surface_;
134 SkCanvas* hud_canvas_;
enne (OOO) 2015/02/05 01:30:28 Can you make this a RefPtr or just access it off t
scottmg 2015/02/05 03:28:32 Done.
130 135
131 skia::RefPtr<SkTypeface> typeface_; 136 SkTypeface* typeface_;
enne (OOO) 2015/02/05 01:30:28 Can this be a skia::RefPtr all the way through the
scottmg 2015/02/05 03:28:32 I did the Windows one first where it's leaked earl
132 137
133 Graph fps_graph_; 138 Graph fps_graph_;
134 Graph paint_time_graph_; 139 Graph paint_time_graph_;
135 MemoryHistory::Entry memory_entry_; 140 MemoryHistory::Entry memory_entry_;
136 int fade_step_; 141 int fade_step_;
137 std::vector<DebugRect> paint_rects_; 142 std::vector<DebugRect> paint_rects_;
138 143
139 base::TimeTicks time_of_last_graph_update_; 144 base::TimeTicks time_of_last_graph_update_;
140 145
141 DISALLOW_COPY_AND_ASSIGN(HeadsUpDisplayLayerImpl); 146 DISALLOW_COPY_AND_ASSIGN(HeadsUpDisplayLayerImpl);
142 }; 147 };
143 148
144 } // namespace cc 149 } // namespace cc
145 150
146 #endif // CC_LAYERS_HEADS_UP_DISPLAY_LAYER_IMPL_H_ 151 #endif // CC_LAYERS_HEADS_UP_DISPLAY_LAYER_IMPL_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698