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

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

Issue 2961633002: cc: HUD handle context lost in Gpu raster.
Patch Set: update comments. Created 3 years, 5 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
« no previous file with comments | « no previous file | cc/layers/heads_up_display_layer_impl.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 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 <memory> 8 #include <memory>
9 #include <string> 9 #include <string>
10 #include <vector> 10 #include <vector>
(...skipping 25 matching lines...) Expand all
36 return base::WrapUnique(new HeadsUpDisplayLayerImpl(tree_impl, id)); 36 return base::WrapUnique(new HeadsUpDisplayLayerImpl(tree_impl, id));
37 } 37 }
38 ~HeadsUpDisplayLayerImpl() override; 38 ~HeadsUpDisplayLayerImpl() override;
39 39
40 std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override; 40 std::unique_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl) override;
41 41
42 bool WillDraw(DrawMode draw_mode, 42 bool WillDraw(DrawMode draw_mode,
43 ResourceProvider* resource_provider) override; 43 ResourceProvider* resource_provider) override;
44 void AppendQuads(RenderPass* render_pass, 44 void AppendQuads(RenderPass* render_pass,
45 AppendQuadsData* append_quads_data) override; 45 AppendQuadsData* append_quads_data) override;
46 void UpdateHudTexture(DrawMode draw_mode, 46
47 ResourceProvider* resource_provider, 47 // This returns the quad ResourceID to evict in case it fails to update
48 ContextProvider* context_provider); 48 // Hud contents. Otherwise returns 0.
49 ResourceId UpdateHudTexture(DrawMode draw_mode,
50 ResourceProvider* resource_provider,
51 ContextProvider* context_provider);
49 52
50 void ReleaseResources() override; 53 void ReleaseResources() override;
51 54
52 gfx::Rect GetEnclosingRectInTargetSpace() const override; 55 gfx::Rect GetEnclosingRectInTargetSpace() const override;
53 56
54 bool IsAnimatingHUDContents() const { return fade_step_ > 0; } 57 bool IsAnimatingHUDContents() const { return fade_step_ > 0; }
55 58
56 void SetHUDTypeface(sk_sp<SkTypeface> typeface); 59 void SetHUDTypeface(sk_sp<SkTypeface> typeface);
57 60
61 // This evicts hud quad appended during render pass preparation.
62 void EvictHudQuad(const RenderPassList& list);
63
58 // LayerImpl overrides. 64 // LayerImpl overrides.
59 void PushPropertiesTo(LayerImpl* layer) override; 65 void PushPropertiesTo(LayerImpl* layer) override;
60 66
61 private: 67 private:
62 class Graph { 68 class Graph {
63 public: 69 public:
64 Graph(double indicator_value, double start_upper_bound); 70 Graph(double indicator_value, double start_upper_bound);
65 71
66 // Eases the upper bound, which limits what is currently visible in the 72 // Eases the upper bound, which limits what is currently visible in the
67 // graph, so that the graph always scales to either it's max or 73 // graph, so that the graph always scales to either it's max or
(...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after
147 std::vector<DebugRect> paint_rects_; 153 std::vector<DebugRect> paint_rects_;
148 154
149 base::TimeTicks time_of_last_graph_update_; 155 base::TimeTicks time_of_last_graph_update_;
150 156
151 DISALLOW_COPY_AND_ASSIGN(HeadsUpDisplayLayerImpl); 157 DISALLOW_COPY_AND_ASSIGN(HeadsUpDisplayLayerImpl);
152 }; 158 };
153 159
154 } // namespace cc 160 } // namespace cc
155 161
156 #endif // CC_LAYERS_HEADS_UP_DISPLAY_LAYER_IMPL_H_ 162 #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') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698