summaryrefslogtreecommitdiffstats
path: root/cc/debug_rect_history.cc
diff options
context:
space:
mode:
Diffstat (limited to 'cc/debug_rect_history.cc')
-rw-r--r--cc/debug_rect_history.cc50
1 files changed, 25 insertions, 25 deletions
diff --git a/cc/debug_rect_history.cc b/cc/debug_rect_history.cc
index 7ff9f75..fc835cb 100644
--- a/cc/debug_rect_history.cc
+++ b/cc/debug_rect_history.cc
@@ -14,19 +14,19 @@
namespace cc {
// static
-scoped_ptr<CCDebugRectHistory> CCDebugRectHistory::create() {
- return make_scoped_ptr(new CCDebugRectHistory());
+scoped_ptr<DebugRectHistory> DebugRectHistory::create() {
+ return make_scoped_ptr(new DebugRectHistory());
}
-CCDebugRectHistory::CCDebugRectHistory()
+DebugRectHistory::DebugRectHistory()
{
}
-CCDebugRectHistory::~CCDebugRectHistory()
+DebugRectHistory::~DebugRectHistory()
{
}
-void CCDebugRectHistory::saveDebugRectsForCurrentFrame(CCLayerImpl* rootLayer, const std::vector<CCLayerImpl*>& renderSurfaceLayerList, const Vector<IntRect>& occludingScreenSpaceRects, const CCLayerTreeSettings& settings)
+void DebugRectHistory::saveDebugRectsForCurrentFrame(LayerImpl* rootLayer, const std::vector<LayerImpl*>& renderSurfaceLayerList, const Vector<IntRect>& occludingScreenSpaceRects, const LayerTreeSettings& settings)
{
// For now, clear all rects from previous frames. In the future we may want to store
// all debug rects for a history of many frames.
@@ -49,7 +49,7 @@ void CCDebugRectHistory::saveDebugRectsForCurrentFrame(CCLayerImpl* rootLayer, c
}
-void CCDebugRectHistory::savePaintRects(CCLayerImpl* layer)
+void DebugRectHistory::savePaintRects(LayerImpl* layer)
{
// We would like to visualize where any layer's paint rect (update rect) has changed,
// regardless of whether this layer is skipped for actual drawing or not. Therefore
@@ -58,65 +58,65 @@ void CCDebugRectHistory::savePaintRects(CCLayerImpl* layer)
if (!layer->updateRect().isEmpty() && layer->drawsContent()) {
FloatRect updateContentRect = layer->updateRect();
updateContentRect.scale(layer->contentBounds().width() / static_cast<float>(layer->bounds().width()), layer->contentBounds().height() / static_cast<float>(layer->bounds().height()));
- m_debugRects.append(CCDebugRect(PaintRectType, CCMathUtil::mapClippedRect(layer->screenSpaceTransform(), updateContentRect)));
+ m_debugRects.append(DebugRect(PaintRectType, MathUtil::mapClippedRect(layer->screenSpaceTransform(), updateContentRect)));
}
for (unsigned i = 0; i < layer->children().size(); ++i)
savePaintRects(layer->children()[i]);
}
-void CCDebugRectHistory::savePropertyChangedRects(const std::vector<CCLayerImpl*>& renderSurfaceLayerList)
+void DebugRectHistory::savePropertyChangedRects(const std::vector<LayerImpl*>& renderSurfaceLayerList)
{
for (int surfaceIndex = renderSurfaceLayerList.size() - 1; surfaceIndex >= 0 ; --surfaceIndex) {
- CCLayerImpl* renderSurfaceLayer = renderSurfaceLayerList[surfaceIndex];
- CCRenderSurface* renderSurface = renderSurfaceLayer->renderSurface();
+ LayerImpl* renderSurfaceLayer = renderSurfaceLayerList[surfaceIndex];
+ RenderSurfaceImpl* renderSurface = renderSurfaceLayer->renderSurface();
DCHECK(renderSurface);
- const std::vector<CCLayerImpl*>& layerList = renderSurface->layerList();
+ const std::vector<LayerImpl*>& layerList = renderSurface->layerList();
for (unsigned layerIndex = 0; layerIndex < layerList.size(); ++layerIndex) {
- CCLayerImpl* layer = layerList[layerIndex];
+ LayerImpl* layer = layerList[layerIndex];
- if (CCLayerTreeHostCommon::renderSurfaceContributesToTarget<CCLayerImpl>(layer, renderSurfaceLayer->id()))
+ if (LayerTreeHostCommon::renderSurfaceContributesToTarget<LayerImpl>(layer, renderSurfaceLayer->id()))
continue;
if (layer->layerIsAlwaysDamaged())
continue;
if (layer->layerPropertyChanged() || layer->layerSurfacePropertyChanged())
- m_debugRects.append(CCDebugRect(PropertyChangedRectType, CCMathUtil::mapClippedRect(layer->screenSpaceTransform(), FloatRect(FloatPoint::zero(), layer->contentBounds()))));
+ m_debugRects.append(DebugRect(PropertyChangedRectType, MathUtil::mapClippedRect(layer->screenSpaceTransform(), FloatRect(FloatPoint::zero(), layer->contentBounds()))));
}
}
}
-void CCDebugRectHistory::saveSurfaceDamageRects(const std::vector<CCLayerImpl* >& renderSurfaceLayerList)
+void DebugRectHistory::saveSurfaceDamageRects(const std::vector<LayerImpl* >& renderSurfaceLayerList)
{
for (int surfaceIndex = renderSurfaceLayerList.size() - 1; surfaceIndex >= 0 ; --surfaceIndex) {
- CCLayerImpl* renderSurfaceLayer = renderSurfaceLayerList[surfaceIndex];
- CCRenderSurface* renderSurface = renderSurfaceLayer->renderSurface();
+ LayerImpl* renderSurfaceLayer = renderSurfaceLayerList[surfaceIndex];
+ RenderSurfaceImpl* renderSurface = renderSurfaceLayer->renderSurface();
DCHECK(renderSurface);
- m_debugRects.append(CCDebugRect(SurfaceDamageRectType, CCMathUtil::mapClippedRect(renderSurface->screenSpaceTransform(), renderSurface->damageTracker()->currentDamageRect())));
+ m_debugRects.append(DebugRect(SurfaceDamageRectType, MathUtil::mapClippedRect(renderSurface->screenSpaceTransform(), renderSurface->damageTracker()->currentDamageRect())));
}
}
-void CCDebugRectHistory::saveScreenSpaceRects(const std::vector<CCLayerImpl* >& renderSurfaceLayerList)
+void DebugRectHistory::saveScreenSpaceRects(const std::vector<LayerImpl* >& renderSurfaceLayerList)
{
for (int surfaceIndex = renderSurfaceLayerList.size() - 1; surfaceIndex >= 0 ; --surfaceIndex) {
- CCLayerImpl* renderSurfaceLayer = renderSurfaceLayerList[surfaceIndex];
- CCRenderSurface* renderSurface = renderSurfaceLayer->renderSurface();
+ LayerImpl* renderSurfaceLayer = renderSurfaceLayerList[surfaceIndex];
+ RenderSurfaceImpl* renderSurface = renderSurfaceLayer->renderSurface();
DCHECK(renderSurface);
- m_debugRects.append(CCDebugRect(ScreenSpaceRectType, CCMathUtil::mapClippedRect(renderSurface->screenSpaceTransform(), renderSurface->contentRect())));
+ m_debugRects.append(DebugRect(ScreenSpaceRectType, MathUtil::mapClippedRect(renderSurface->screenSpaceTransform(), renderSurface->contentRect())));
if (renderSurfaceLayer->replicaLayer())
- m_debugRects.append(CCDebugRect(ReplicaScreenSpaceRectType, CCMathUtil::mapClippedRect(renderSurface->replicaScreenSpaceTransform(), renderSurface->contentRect())));
+ m_debugRects.append(DebugRect(ReplicaScreenSpaceRectType, MathUtil::mapClippedRect(renderSurface->replicaScreenSpaceTransform(), renderSurface->contentRect())));
}
}
-void CCDebugRectHistory::saveOccludingRects(const Vector<IntRect>& occludingRects)
+void DebugRectHistory::saveOccludingRects(const Vector<IntRect>& occludingRects)
{
for (size_t i = 0; i < occludingRects.size(); ++i)
- m_debugRects.append(CCDebugRect(OccludingRectType, occludingRects[i]));
+ m_debugRects.append(DebugRect(OccludingRectType, occludingRects[i]));
}
} // namespace cc