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

Side by Side Diff: Source/core/platform/graphics/GraphicsLayer.cpp

Issue 54803002: Centralize TextStream functions to remove RenderTreeAsText dependency of the filters (Closed) Base URL: https://chromium.googlesource.com/chromium/blink.git@master
Patch Set: Created 7 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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright (C) 2009 Apple Inc. All rights reserved. 2 * Copyright (C) 2009 Apple Inc. All rights reserved.
3 * 3 *
4 * Redistribution and use in source and binary forms, with or without 4 * Redistribution and use in source and binary forms, with or without
5 * modification, are permitted provided that the following conditions 5 * modification, are permitted provided that the following conditions
6 * are met: 6 * are met:
7 * 1. Redistributions of source code must retain the above copyright 7 * 1. Redistributions of source code must retain the above copyright
8 * notice, this list of conditions and the following disclaimer. 8 * notice, this list of conditions and the following disclaimer.
9 * 2. Redistributions in binary form must reproduce the above copyright 9 * 2. Redistributions in binary form must reproduce the above copyright
10 * notice, this list of conditions and the following disclaimer in the 10 * notice, this list of conditions and the following disclaimer in the
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after
547 void GraphicsLayer::collectTrackedRepaintRects(Vector<FloatRect>& rects) const 547 void GraphicsLayer::collectTrackedRepaintRects(Vector<FloatRect>& rects) const
548 { 548 {
549 if (!m_client->isTrackingRepaints()) 549 if (!m_client->isTrackingRepaints())
550 return; 550 return;
551 551
552 RepaintMap::iterator repaintIt = repaintRectMap().find(this); 552 RepaintMap::iterator repaintIt = repaintRectMap().find(this);
553 if (repaintIt != repaintRectMap().end()) 553 if (repaintIt != repaintRectMap().end())
554 rects.append(repaintIt->value); 554 rects.append(repaintIt->value);
555 } 555 }
556 556
557 void GraphicsLayer::writeIndent(TextStream& ts, int indent)
558 {
559 for (int i = 0; i != indent; ++i)
560 ts << " ";
561 }
562
563 void GraphicsLayer::dumpLayer(TextStream& ts, int indent, LayerTreeFlags flags) const 557 void GraphicsLayer::dumpLayer(TextStream& ts, int indent, LayerTreeFlags flags) const
564 { 558 {
565 writeIndent(ts, indent); 559 writeIndent(ts, indent);
566 ts << "(" << "GraphicsLayer"; 560 ts << "(" << "GraphicsLayer";
567 561
568 if (flags & LayerTreeIncludesDebugInfo) { 562 if (flags & LayerTreeIncludesDebugInfo) {
569 ts << " " << static_cast<void*>(const_cast<GraphicsLayer*>(this)); 563 ts << " " << static_cast<void*>(const_cast<GraphicsLayer*>(this));
570 ts << " \"" << m_client->debugName(this) << "\""; 564 ts << " \"" << m_client->debugName(this) << "\"";
571 } 565 }
572 566
(...skipping 644 matching lines...) Expand 10 before | Expand all | Expand 10 after
1217 #ifndef NDEBUG 1211 #ifndef NDEBUG
1218 void showGraphicsLayerTree(const WebCore::GraphicsLayer* layer) 1212 void showGraphicsLayerTree(const WebCore::GraphicsLayer* layer)
1219 { 1213 {
1220 if (!layer) 1214 if (!layer)
1221 return; 1215 return;
1222 1216
1223 String output = layer->layerTreeAsText(WebCore::LayerTreeIncludesDebugInfo); 1217 String output = layer->layerTreeAsText(WebCore::LayerTreeIncludesDebugInfo);
1224 fprintf(stderr, "%s\n", output.utf8().data()); 1218 fprintf(stderr, "%s\n", output.utf8().data());
1225 } 1219 }
1226 #endif 1220 #endif
OLDNEW
« no previous file with comments | « Source/core/platform/graphics/GraphicsLayer.h ('k') | Source/core/platform/graphics/filters/DistantLightSource.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698