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

Unified Diff: cc/layer_impl.cc

Issue 11316026: cc: Create cc::DebugColors class to hold all the debugging color/width constants. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 8 years, 1 month 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
Index: cc/layer_impl.cc
diff --git a/cc/layer_impl.cc b/cc/layer_impl.cc
index 72ef8818977e8cc3ba2862477bc5c9c3653bcfa0..ee2743ae771c4879dcacbef35f4de21d68a27800 100644
--- a/cc/layer_impl.cc
+++ b/cc/layer_impl.cc
@@ -7,6 +7,7 @@
#include "base/debug/trace_event.h"
#include "base/stringprintf.h"
#include "cc/debug_border_draw_quad.h"
+#include "cc/debug_colors.h"
#include "cc/geometry.h"
#include "cc/layer_sorter.h"
#include "cc/layer_tree_host_impl.h"
@@ -154,22 +155,19 @@ bool LayerImpl::showDebugBorders() const
void LayerImpl::getDebugBorderProperties(SkColor* color, float* width) const
{
if (m_drawsContent) {
- // Non-tiled content layers are green.
- *color = SkColorSetARGB(128, 0, 128, 32);
- *width = 2;
+ *color = DebugColors::kContentLayerBorderColor();
+ *width = DebugColors::kContentLayerBorderWidth(m_layerTreeHostImpl);
return;
}
if (m_masksToBounds) {
- // Masking layers are pale blue.
- *color = SkColorSetARGB(48, 128, 255, 255);
- *width = 20;
+ *color = DebugColors::kMaskingLayerBorderColor();
+ *width = DebugColors::kMaskingLayerBorderWidth(m_layerTreeHostImpl);
return;
}
- // Other container layers are yellow.
- *color = SkColorSetARGB(192, 255, 255, 0);
- *width = 2;
+ *color = DebugColors::kContainerLayerBorderColor();
+ *width = DebugColors::kContainerLayerBorderWidth(m_layerTreeHostImpl);
}
void LayerImpl::appendDebugBorderQuad(QuadSink& quadList, const SharedQuadState* sharedQuadState, AppendQuadsData& appendQuadsData) const
« cc/debug_colors.h ('K') | « cc/debug_colors.cc ('k') | cc/quad_culler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698