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

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
« no previous file with comments | « cc/debug_colors.cc ('k') | cc/quad_culler.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: cc/layer_impl.cc
diff --git a/cc/layer_impl.cc b/cc/layer_impl.cc
index 72ef8818977e8cc3ba2862477bc5c9c3653bcfa0..82df351c555d39505d1b6e06a08195e24c86294e 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::ContentLayerBorderColor();
+ *width = DebugColors::ContentLayerBorderWidth(m_layerTreeHostImpl);
return;
}
if (m_masksToBounds) {
- // Masking layers are pale blue.
- *color = SkColorSetARGB(48, 128, 255, 255);
- *width = 20;
+ *color = DebugColors::MaskingLayerBorderColor();
+ *width = DebugColors::MaskingLayerBorderWidth(m_layerTreeHostImpl);
return;
}
- // Other container layers are yellow.
- *color = SkColorSetARGB(192, 255, 255, 0);
- *width = 2;
+ *color = DebugColors::ContainerLayerBorderColor();
+ *width = DebugColors::ContainerLayerBorderWidth(m_layerTreeHostImpl);
}
void LayerImpl::appendDebugBorderQuad(QuadSink& quadList, const SharedQuadState* sharedQuadState, AppendQuadsData& appendQuadsData) const
« no previous file with comments | « cc/debug_colors.cc ('k') | cc/quad_culler.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698