Home | History | Annotate | Download | only in debug
      1 // Copyright 2011 The Chromium Authors. All rights reserved.
      2 // Use of this source code is governed by a BSD-style license that can be
      3 // found in the LICENSE file.
      4 
      5 #ifndef CC_DEBUG_LAYER_TREE_DEBUG_STATE_H_
      6 #define CC_DEBUG_LAYER_TREE_DEBUG_STATE_H_
      7 
      8 #include "base/basictypes.h"
      9 #include "cc/base/cc_export.h"
     10 
     11 namespace cc {
     12 
     13 class CC_EXPORT LayerTreeDebugState {
     14  public:
     15   LayerTreeDebugState();
     16   ~LayerTreeDebugState();
     17 
     18   bool show_fps_counter;
     19   bool show_debug_borders;
     20   bool continuous_painting;
     21 
     22   bool show_paint_rects;
     23   bool show_property_changed_rects;
     24   bool show_surface_damage_rects;
     25   bool show_screen_space_rects;
     26   bool show_replica_screen_space_rects;
     27   bool show_occluding_rects;
     28   bool show_non_occluding_rects;
     29   bool show_touch_event_handler_rects;
     30   bool show_wheel_event_handler_rects;
     31   bool show_non_fast_scrollable_rects;
     32   bool show_layer_animation_bounds_rects;
     33 
     34   int slow_down_raster_scale_factor;
     35   bool rasterize_only_visible_content;
     36   bool show_picture_borders;
     37 
     38   void SetRecordRenderingStats(bool enabled);
     39   bool RecordRenderingStats() const;
     40 
     41   bool ShowHudInfo() const;
     42   bool ShowHudRects() const;
     43   bool ShowMemoryStats() const;
     44 
     45   static bool Equal(const LayerTreeDebugState& a, const LayerTreeDebugState& b);
     46   static LayerTreeDebugState Unite(const LayerTreeDebugState& a,
     47                                    const LayerTreeDebugState& b);
     48 
     49  private:
     50   bool record_rendering_stats_;
     51 };
     52 
     53 }  // namespace cc
     54 
     55 #endif  // CC_DEBUG_LAYER_TREE_DEBUG_STATE_H_
     56