diff options
author | auygun <auygun@opera.com> | 2016-03-07 09:48:27 -0800 |
---|---|---|
committer | Commit bot <commit-bot@chromium.org> | 2016-03-07 17:49:44 +0000 |
commit | 78fdadc2dfdd59934d9ce56bb8588b2fd11258a3 (patch) | |
tree | 7436f182cbc621cd1cc85390ff758dff00d42646 | |
parent | c1e2a4290e4c065dbbfc64c22b7fe3d59fd40e89 (diff) | |
download | chromium_src-78fdadc2dfdd59934d9ce56bb8588b2fd11258a3.zip chromium_src-78fdadc2dfdd59934d9ce56bb8588b2fd11258a3.tar.gz chromium_src-78fdadc2dfdd59934d9ce56bb8588b2fd11258a3.tar.bz2 |
Set debug color for borders of compressed tiles.
BUG=434699
CQ_INCLUDE_TRYBOTS=tryserver.blink:linux_blink_rel
Review URL: https://codereview.chromium.org/1774533002
Cr-Commit-Position: refs/heads/master@{#379582}
-rw-r--r-- | cc/debug/debug_colors.cc | 8 | ||||
-rw-r--r-- | cc/debug/debug_colors.h | 3 | ||||
-rw-r--r-- | cc/layers/picture_layer_impl.cc | 3 | ||||
-rw-r--r-- | cc/tiles/tile_draw_info.h | 4 |
4 files changed, 18 insertions, 0 deletions
diff --git a/cc/debug/debug_colors.cc b/cc/debug/debug_colors.cc index 55d7119..564452d 100644 --- a/cc/debug/debug_colors.cc +++ b/cc/debug/debug_colors.cc @@ -146,6 +146,14 @@ int DebugColors::DirectPictureBorderWidth(const LayerTreeImpl* tree_impl) { return Scale(1, tree_impl); } +// Compressed tile borders are blue. +SkColor DebugColors::CompressedTileBorderColor() { + return SkColorSetARGB(100, 20, 20, 240); +} +int DebugColors::CompressedTileBorderWidth(const LayerTreeImpl* tree_impl) { + return Scale(2, tree_impl); +} + // ======= Checkerboard colors ======= // Non-debug checkerboards are grey. diff --git a/cc/debug/debug_colors.h b/cc/debug/debug_colors.h index 673f199..03f8855 100644 --- a/cc/debug/debug_colors.h +++ b/cc/debug/debug_colors.h @@ -62,6 +62,9 @@ class DebugColors { static SkColor DirectPictureBorderColor(); static int DirectPictureBorderWidth(const LayerTreeImpl* tree_impl); + static SkColor CompressedTileBorderColor(); + static int CompressedTileBorderWidth(const LayerTreeImpl* tree_impl); + static SkColor DefaultCheckerboardColor(); static SkColor EvictedTileCheckerboardColor(); static SkColor InvalidatedTileCheckerboardColor(); diff --git a/cc/layers/picture_layer_impl.cc b/cc/layers/picture_layer_impl.cc index 076ee23..8e823d9 100644 --- a/cc/layers/picture_layer_impl.cc +++ b/cc/layers/picture_layer_impl.cc @@ -230,6 +230,9 @@ void PictureLayerImpl::AppendQuads(RenderPass* render_pass, } else if (mode == TileDrawInfo::OOM_MODE) { color = DebugColors::OOMTileBorderColor(); width = DebugColors::OOMTileBorderWidth(layer_tree_impl()); + } else if (iter->draw_info().has_compressed_resource()) { + color = DebugColors::CompressedTileBorderColor(); + width = DebugColors::CompressedTileBorderWidth(layer_tree_impl()); } else if (iter.resolution() == HIGH_RESOLUTION) { color = DebugColors::HighResTileBorderColor(); width = DebugColors::HighResTileBorderWidth(layer_tree_impl()); diff --git a/cc/tiles/tile_draw_info.h b/cc/tiles/tile_draw_info.h index 05596ba..6d694eb 100644 --- a/cc/tiles/tile_draw_info.h +++ b/cc/tiles/tile_draw_info.h @@ -73,6 +73,10 @@ class CC_EXPORT TileDrawInfo { inline bool has_resource() const { return !!resource_; } + inline bool has_compressed_resource() const { + return resource_ ? IsResourceFormatCompressed(resource_->format()) : false; + } + void SetSolidColorForTesting(SkColor color) { set_solid_color(color); } void AsValueInto(base::trace_event::TracedValue* state) const; |