ui: Add debug flag to show composited layer borders in ChromeOS UI.

This adds an entry to chrome://flags that allows layer borders to be
enabled for Chrome OS UI.

It also makes the debug border setting a bitset so borders for individual
layer types can be enabled. This makes the debug flag more useful when
debugging a specific layer type (e.g. render surface layers).

BUG=678236
TEST=chrome --ui-show-composited-layer-borders=renderpass
CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel

Review-Url: https://codereview.chromium.org/2795703002
Cr-Commit-Position: refs/heads/master@{#464640}
diff --git a/cc/layers/layer_impl.cc b/cc/layers/layer_impl.cc
index 705b9ff..bd7b9fe 100644
--- a/cc/layers/layer_impl.cc
+++ b/cc/layers/layer_impl.cc
@@ -187,8 +187,8 @@
   current_draw_mode_ = DRAW_MODE_NONE;
 }
 
-bool LayerImpl::ShowDebugBorders() const {
-  return layer_tree_impl()->debug_state().show_debug_borders;
+bool LayerImpl::ShowDebugBorders(DebugBorderType type) const {
+  return layer_tree_impl()->debug_state().show_debug_borders.test(type);
 }
 
 void LayerImpl::GetDebugBorderProperties(SkColor* color, float* width) const {
@@ -229,7 +229,7 @@
                                       AppendQuadsData* append_quads_data,
                                       SkColor color,
                                       float width) const {
-  if (!ShowDebugBorders())
+  if (!ShowDebugBorders(DebugBorderType::LAYER))
     return;
 
   gfx::Rect quad_rect(bounds);