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

Unified Diff: cc/heads_up_display_layer_impl.h

Issue 12603013: Part 10 of cc/ directory shuffles: layers (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 9 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 | « cc/heads_up_display_layer.cc ('k') | cc/heads_up_display_layer_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/heads_up_display_layer_impl.h
diff --git a/cc/heads_up_display_layer_impl.h b/cc/heads_up_display_layer_impl.h
deleted file mode 100644
index 3a95b695fad17d72491e0e46ab42ad0633ebacc8..0000000000000000000000000000000000000000
--- a/cc/heads_up_display_layer_impl.h
+++ /dev/null
@@ -1,126 +0,0 @@
-// Copyright 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef CC_HEADS_UP_DISPLAY_LAYER_IMPL_H_
-#define CC_HEADS_UP_DISPLAY_LAYER_IMPL_H_
-
-#include "base/memory/scoped_ptr.h"
-#include "base/time.h"
-#include "cc/base/cc_export.h"
-#include "cc/layer_impl.h"
-#include "cc/resources/memory_history.h"
-#include "cc/resources/scoped_resource.h"
-
-class SkCanvas;
-class SkPaint;
-class SkTypeface;
-struct SkRect;
-
-namespace cc {
-
-class DebugRectHistory;
-class FrameRateCounter;
-class PaintTimeCounter;
-
-class CC_EXPORT HeadsUpDisplayLayerImpl : public LayerImpl {
- public:
- static scoped_ptr<HeadsUpDisplayLayerImpl> Create(LayerTreeImpl* tree_impl,
- int id) {
- return make_scoped_ptr(new HeadsUpDisplayLayerImpl(tree_impl, id));
- }
- virtual ~HeadsUpDisplayLayerImpl();
-
- virtual scoped_ptr<LayerImpl> CreateLayerImpl(LayerTreeImpl* tree_impl)
- OVERRIDE;
-
- virtual void WillDraw(ResourceProvider* resource_provider) OVERRIDE;
- virtual void AppendQuads(QuadSink* quad_sink,
- AppendQuadsData* append_quads_data) OVERRIDE;
- void UpdateHudTexture(ResourceProvider* resource_provider);
- virtual void DidDraw(ResourceProvider* resource_provider) OVERRIDE;
-
- virtual void DidLoseOutputSurface() OVERRIDE;
-
- virtual bool LayerIsAlwaysDamaged() const OVERRIDE;
-
- private:
- class Graph {
- public:
- Graph(double indicator_value, double start_upper_bound);
-
- // Eases the upper bound, which limits what is currently visible in the
- // graph, so that the graph always scales to either it's max or
- // default_upper_bound.
- double UpdateUpperBound();
-
- double value;
- double min;
- double max;
-
- double current_upper_bound;
- const double default_upper_bound;
- const double indicator;
- };
-
- HeadsUpDisplayLayerImpl(LayerTreeImpl* tree_impl, int id);
-
- virtual const char* LayerTypeAsString() const OVERRIDE;
-
- void UpdateHudContents();
- void DrawHudContents(SkCanvas* canvas) const;
-
- void DrawText(SkCanvas* canvas,
- SkPaint* paint,
- const std::string& text,
- SkPaint::Align align,
- int size,
- int x,
- int y) const;
- void DrawText(SkCanvas* canvas,
- SkPaint* paint,
- const std::string& text,
- SkPaint::Align align,
- int size,
- const SkPoint& pos) const;
- void DrawGraphBackground(SkCanvas* canvas,
- SkPaint* paint,
- const SkRect& bounds) const;
- void DrawGraphLines(SkCanvas* canvas,
- SkPaint* paint,
- const SkRect& bounds,
- const Graph& graph) const;
-
- void DrawPlatformLayerTree(SkCanvas* canvas) const;
- SkRect DrawFPSDisplay(SkCanvas* canvas,
- const FrameRateCounter* fps_counter,
- int right,
- int top) const;
- SkRect DrawMemoryDisplay(SkCanvas* canvas,
- int top,
- int right,
- int width) const;
- SkRect DrawPaintTimeDisplay(SkCanvas* canvas,
- const PaintTimeCounter* paint_time_counter,
- int top,
- int right) const;
- void DrawDebugRects(SkCanvas* canvas,
- DebugRectHistory* debug_rect_history) const;
-
- scoped_ptr<ScopedResource> hud_texture_;
- scoped_ptr<SkCanvas> hud_canvas_;
-
- skia::RefPtr<SkTypeface> typeface_;
-
- Graph fps_graph_;
- Graph paint_time_graph_;
- MemoryHistory::Entry memory_entry_;
-
- base::TimeTicks time_of_last_graph_update_;
-
- DISALLOW_COPY_AND_ASSIGN(HeadsUpDisplayLayerImpl);
-};
-
-} // namespace cc
-
-#endif // CC_HEADS_UP_DISPLAY_LAYER_IMPL_H_
« no previous file with comments | « cc/heads_up_display_layer.cc ('k') | cc/heads_up_display_layer_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698