summaryrefslogtreecommitdiffstats
path: root/cc/resources/picture_pile_impl.cc
diff options
context:
space:
mode:
authorenne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-04 11:51:58 +0000
committerenne@chromium.org <enne@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2013-04-04 11:51:58 +0000
commit334a7725c64d81625b54dfe2054127ea44efde1f (patch)
tree93c67ffe8a275bb975eba176c2dfcc968df6784c /cc/resources/picture_pile_impl.cc
parentab33e3e9fdedb2b70df347c17fbbc3ee98cb9b9b (diff)
downloadchromium_src-334a7725c64d81625b54dfe2054127ea44efde1f.zip
chromium_src-334a7725c64d81625b54dfe2054127ea44efde1f.tar.gz
chromium_src-334a7725c64d81625b54dfe2054127ea44efde1f.tar.bz2
cc: Add debug borders for pictures
Add a different debug state setting for this, as it's often used in different circumstances than composited layer borders. Also, turning it on by default leads to a lot more fruit salad. R=danakj@chromium.org BUG=none Review URL: https://chromiumcodereview.appspot.com/13586007 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@192305 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc/resources/picture_pile_impl.cc')
-rw-r--r--cc/resources/picture_pile_impl.cc16
1 files changed, 16 insertions, 0 deletions
diff --git a/cc/resources/picture_pile_impl.cc b/cc/resources/picture_pile_impl.cc
index 4e425e5..6e71cad 100644
--- a/cc/resources/picture_pile_impl.cc
+++ b/cc/resources/picture_pile_impl.cc
@@ -153,6 +153,22 @@ int64 PicturePileImpl::Raster(
(*i)->Raster(canvas, content_clip, contents_scale, enable_lcd_text_);
}
+ if (show_debug_picture_borders_) {
+ gfx::Rect border = content_clip;
+ border.Inset(0, 0, 1, 1);
+
+ SkPaint picture_border_paint;
+ picture_border_paint.setColor(DebugColors::PictureBorderColor());
+ canvas->drawLine(border.x(), border.y(), border.right(), border.y(),
+ picture_border_paint);
+ canvas->drawLine(border.right(), border.y(), border.right(),
+ border.bottom(), picture_border_paint);
+ canvas->drawLine(border.right(), border.bottom(), border.x(),
+ border.bottom(), picture_border_paint);
+ canvas->drawLine(border.x(), border.bottom(), border.x(), border.y(),
+ picture_border_paint);
+ }
+
// Don't allow pictures underneath to draw where this picture did.
canvas->clipRect(
gfx::RectToSkRect(content_clip),