Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 Loading... | |
| 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 ResourceId UpdateHudTexture(DrawMode draw_mode, |
|
vmpstr
2017/07/12 23:39:54
Leave a comment on what this returns please.
sohan
2017/07/13 11:34:12
Done.
| |
| 47 ResourceProvider* resource_provider, | 47 ResourceProvider* resource_provider, |
| 48 ContextProvider* context_provider); | 48 ContextProvider* context_provider); |
| 49 | 49 |
| 50 void ReleaseResources() override; | 50 void ReleaseResources() override; |
| 51 | 51 |
| 52 gfx::Rect GetEnclosingRectInTargetSpace() const override; | 52 gfx::Rect GetEnclosingRectInTargetSpace() const override; |
| 53 | 53 |
| 54 bool IsAnimatingHUDContents() const { return fade_step_ > 0; } | 54 bool IsAnimatingHUDContents() const { return fade_step_ > 0; } |
| 55 | 55 |
| 56 void SetHUDTypeface(sk_sp<SkTypeface> typeface); | 56 void SetHUDTypeface(sk_sp<SkTypeface> typeface); |
| 57 | 57 |
| 58 void EvictHudQuad(const RenderPassList& list); | |
|
vmpstr
2017/07/12 23:39:54
Leave a comment for new functions please.
sohan
2017/07/13 11:34:12
Done.
| |
| 59 | |
| 58 // LayerImpl overrides. | 60 // LayerImpl overrides. |
| 59 void PushPropertiesTo(LayerImpl* layer) override; | 61 void PushPropertiesTo(LayerImpl* layer) override; |
| 60 | 62 |
| 61 private: | 63 private: |
| 62 class Graph { | 64 class Graph { |
| 63 public: | 65 public: |
| 64 Graph(double indicator_value, double start_upper_bound); | 66 Graph(double indicator_value, double start_upper_bound); |
| 65 | 67 |
| 66 // Eases the upper bound, which limits what is currently visible in the | 68 // 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 | 69 // 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 Loading... | |
| 147 std::vector<DebugRect> paint_rects_; | 149 std::vector<DebugRect> paint_rects_; |
| 148 | 150 |
| 149 base::TimeTicks time_of_last_graph_update_; | 151 base::TimeTicks time_of_last_graph_update_; |
| 150 | 152 |
| 151 DISALLOW_COPY_AND_ASSIGN(HeadsUpDisplayLayerImpl); | 153 DISALLOW_COPY_AND_ASSIGN(HeadsUpDisplayLayerImpl); |
| 152 }; | 154 }; |
| 153 | 155 |
| 154 } // namespace cc | 156 } // namespace cc |
| 155 | 157 |
| 156 #endif // CC_LAYERS_HEADS_UP_DISPLAY_LAYER_IMPL_H_ | 158 #endif // CC_LAYERS_HEADS_UP_DISPLAY_LAYER_IMPL_H_ |
| OLD | NEW |