| 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 47afa1fd73af2ba4d28b6bf9128be34a06bca650..3423ddc7a05ed884a58610f7c4726d89d11976f2 100644
|
| --- a/cc/layers/heads_up_display_layer_impl.h
|
| +++ b/cc/layers/heads_up_display_layer_impl.h
|
| @@ -6,10 +6,12 @@
|
| #define CC_LAYERS_HEADS_UP_DISPLAY_LAYER_IMPL_H_
|
|
|
| #include <string>
|
| +#include <vector>
|
|
|
| #include "base/memory/scoped_ptr.h"
|
| #include "base/time/time.h"
|
| #include "cc/base/cc_export.h"
|
| +#include "cc/debug/debug_rect_history.h"
|
| #include "cc/layers/layer_impl.h"
|
| #include "cc/resources/memory_history.h"
|
| #include "cc/resources/scoped_resource.h"
|
| @@ -21,7 +23,6 @@ struct SkRect;
|
|
|
| namespace cc {
|
|
|
| -class DebugRectHistory;
|
| class FrameRateCounter;
|
| class PaintTimeCounter;
|
|
|
| @@ -47,6 +48,8 @@ class CC_EXPORT HeadsUpDisplayLayerImpl : public LayerImpl {
|
|
|
| virtual bool LayerIsAlwaysDamaged() const OVERRIDE;
|
|
|
| + bool NeedsUpdate() const { return needs_update_; }
|
| +
|
| private:
|
| class Graph {
|
| public:
|
| @@ -73,7 +76,7 @@ class CC_EXPORT HeadsUpDisplayLayerImpl : public LayerImpl {
|
| virtual void AsValueInto(base::DictionaryValue* dict) const OVERRIDE;
|
|
|
| void UpdateHudContents();
|
| - void DrawHudContents(SkCanvas* canvas) const;
|
| + void DrawHudContents(SkCanvas* canvas);
|
|
|
| void DrawText(SkCanvas* canvas,
|
| SkPaint* paint,
|
| @@ -108,8 +111,13 @@ class CC_EXPORT HeadsUpDisplayLayerImpl : public LayerImpl {
|
| const PaintTimeCounter* paint_time_counter,
|
| int top,
|
| int right) const;
|
| - void DrawDebugRects(SkCanvas* canvas,
|
| - DebugRectHistory* debug_rect_history) const;
|
| + void DrawDebugRect(SkCanvas* canvas,
|
| + const DebugRect& rect,
|
| + const SkColor stroke_color,
|
| + const SkColor fill_color,
|
| + const float stroke_width,
|
| + const std::string label_text) const;
|
| + void DrawDebugRects(SkCanvas* canvas, DebugRectHistory* debug_rect_history);
|
|
|
| scoped_ptr<ScopedResource> hud_resource_;
|
| scoped_ptr<SkCanvas> hud_canvas_;
|
| @@ -119,6 +127,9 @@ class CC_EXPORT HeadsUpDisplayLayerImpl : public LayerImpl {
|
| Graph fps_graph_;
|
| Graph paint_time_graph_;
|
| MemoryHistory::Entry memory_entry_;
|
| + bool needs_update_;
|
| + int fade_step_;
|
| + std::vector<DebugRect> paint_rects_;
|
|
|
| base::TimeTicks time_of_last_graph_update_;
|
|
|
|
|