diff options
author | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-26 22:15:34 +0000 |
---|---|---|
committer | tfarina@chromium.org <tfarina@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98> | 2012-10-26 22:15:34 +0000 |
commit | e17f30777beb14441921d8cdc81823e77dc4f859 (patch) | |
tree | c6fbe9c079461cd6a38f4d70e7cff164676075ee /cc | |
parent | a11991369f8c6411384099d8bd4c3ed01e5db546 (diff) | |
download | chromium_src-e17f30777beb14441921d8cdc81823e77dc4f859.zip chromium_src-e17f30777beb14441921d8cdc81823e77dc4f859.tar.gz chromium_src-e17f30777beb14441921d8cdc81823e77dc4f859.tar.bz2 |
cc: Get rid of the remaining wtf Vector includes.
BUG=154451
TEST=cc_unittests
R=enne@chromium.org,jamesr@chromium.org
Review URL: https://codereview.chromium.org/11304014
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@164426 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'cc')
-rw-r--r-- | cc/debug_rect_history.cc | 17 | ||||
-rw-r--r-- | cc/debug_rect_history.h | 9 | ||||
-rw-r--r-- | cc/heads_up_display_layer_impl.cc | 4 | ||||
-rw-r--r-- | cc/layer_tree_host_common.h | 3 | ||||
-rw-r--r-- | cc/layer_tree_host_impl.h | 2 | ||||
-rw-r--r-- | cc/occlusion_tracker.cc | 6 | ||||
-rw-r--r-- | cc/occlusion_tracker.h | 7 |
7 files changed, 23 insertions, 25 deletions
diff --git a/cc/debug_rect_history.cc b/cc/debug_rect_history.cc index 41c0d8a..339d78b 100644 --- a/cc/debug_rect_history.cc +++ b/cc/debug_rect_history.cc @@ -26,7 +26,7 @@ DebugRectHistory::~DebugRectHistory() { } -void DebugRectHistory::saveDebugRectsForCurrentFrame(LayerImpl* rootLayer, const std::vector<LayerImpl*>& renderSurfaceLayerList, const Vector<IntRect>& occludingScreenSpaceRects, const LayerTreeSettings& settings) +void DebugRectHistory::saveDebugRectsForCurrentFrame(LayerImpl* rootLayer, const std::vector<LayerImpl*>& renderSurfaceLayerList, const std::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. @@ -58,7 +58,7 @@ void DebugRectHistory::savePaintRects(LayerImpl* 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(DebugRect(PaintRectType, MathUtil::mapClippedRect(layer->screenSpaceTransform(), updateContentRect))); + m_debugRects.push_back(DebugRect(PaintRectType, MathUtil::mapClippedRect(layer->screenSpaceTransform(), updateContentRect))); } for (unsigned i = 0; i < layer->children().size(); ++i) @@ -83,7 +83,7 @@ void DebugRectHistory::savePropertyChangedRects(const std::vector<LayerImpl*>& r continue; if (layer->layerPropertyChanged() || layer->layerSurfacePropertyChanged()) - m_debugRects.append(DebugRect(PropertyChangedRectType, MathUtil::mapClippedRect(layer->screenSpaceTransform(), FloatRect(FloatPoint::zero(), layer->contentBounds())))); + m_debugRects.push_back(DebugRect(PropertyChangedRectType, MathUtil::mapClippedRect(layer->screenSpaceTransform(), FloatRect(FloatPoint::zero(), layer->contentBounds())))); } } } @@ -95,7 +95,7 @@ void DebugRectHistory::saveSurfaceDamageRects(const std::vector<LayerImpl* >& re RenderSurfaceImpl* renderSurface = renderSurfaceLayer->renderSurface(); DCHECK(renderSurface); - m_debugRects.append(DebugRect(SurfaceDamageRectType, MathUtil::mapClippedRect(renderSurface->screenSpaceTransform(), renderSurface->damageTracker()->currentDamageRect()))); + m_debugRects.push_back(DebugRect(SurfaceDamageRectType, MathUtil::mapClippedRect(renderSurface->screenSpaceTransform(), renderSurface->damageTracker()->currentDamageRect()))); } } @@ -106,18 +106,17 @@ void DebugRectHistory::saveScreenSpaceRects(const std::vector<LayerImpl* >& rend RenderSurfaceImpl* renderSurface = renderSurfaceLayer->renderSurface(); DCHECK(renderSurface); - m_debugRects.append(DebugRect(ScreenSpaceRectType, MathUtil::mapClippedRect(renderSurface->screenSpaceTransform(), renderSurface->contentRect()))); + m_debugRects.push_back(DebugRect(ScreenSpaceRectType, MathUtil::mapClippedRect(renderSurface->screenSpaceTransform(), renderSurface->contentRect()))); if (renderSurfaceLayer->replicaLayer()) - m_debugRects.append(DebugRect(ReplicaScreenSpaceRectType, MathUtil::mapClippedRect(renderSurface->replicaScreenSpaceTransform(), renderSurface->contentRect()))); + m_debugRects.push_back(DebugRect(ReplicaScreenSpaceRectType, MathUtil::mapClippedRect(renderSurface->replicaScreenSpaceTransform(), renderSurface->contentRect()))); } } -void DebugRectHistory::saveOccludingRects(const Vector<IntRect>& occludingRects) +void DebugRectHistory::saveOccludingRects(const std::vector<IntRect>& occludingRects) { for (size_t i = 0; i < occludingRects.size(); ++i) - m_debugRects.append(DebugRect(OccludingRectType, occludingRects[i])); + m_debugRects.push_back(DebugRect(OccludingRectType, occludingRects[i])); } } // namespace cc - diff --git a/cc/debug_rect_history.h b/cc/debug_rect_history.h index 79c5602..e0dac2e 100644 --- a/cc/debug_rect_history.h +++ b/cc/debug_rect_history.h @@ -9,7 +9,6 @@ #include "base/memory/scoped_ptr.h" #include "FloatRect.h" #include "IntRect.h" -#include <wtf/Vector.h> #include <vector> namespace cc { @@ -57,9 +56,9 @@ public: ~DebugRectHistory(); // Note: Saving debug rects must happen before layers' change tracking is reset. - void saveDebugRectsForCurrentFrame(LayerImpl* rootLayer, const std::vector<LayerImpl*>& renderSurfaceLayerList, const Vector<IntRect>& occludingScreenSpaceRects, const LayerTreeSettings&); + void saveDebugRectsForCurrentFrame(LayerImpl* rootLayer, const std::vector<LayerImpl*>& renderSurfaceLayerList, const std::vector<IntRect>& occludingScreenSpaceRects, const LayerTreeSettings&); - const Vector<DebugRect>& debugRects() { return m_debugRects; } + const std::vector<DebugRect>& debugRects() { return m_debugRects; } private: DebugRectHistory(); @@ -68,9 +67,9 @@ private: void savePropertyChangedRects(const std::vector<LayerImpl*>& renderSurfaceLayerList); void saveSurfaceDamageRects(const std::vector<LayerImpl* >& renderSurfaceLayerList); void saveScreenSpaceRects(const std::vector<LayerImpl* >& renderSurfaceLayerList); - void saveOccludingRects(const Vector<IntRect>& occludingScreenSpaceRects); + void saveOccludingRects(const std::vector<IntRect>& occludingScreenSpaceRects); - Vector<DebugRect> m_debugRects; + std::vector<DebugRect> m_debugRects; DISALLOW_COPY_AND_ASSIGN(DebugRectHistory); }; diff --git a/cc/heads_up_display_layer_impl.cc b/cc/heads_up_display_layer_impl.cc index c64c034..381fff5 100644 --- a/cc/heads_up_display_layer_impl.cc +++ b/cc/heads_up_display_layer_impl.cc @@ -237,7 +237,7 @@ void HeadsUpDisplayLayerImpl::drawFPSCounterText(SkCanvas* canvas, FrameRateCoun void HeadsUpDisplayLayerImpl::drawDebugRects(SkCanvas* canvas, DebugRectHistory* debugRectHistory) { - const Vector<DebugRect>& debugRects = debugRectHistory->debugRects(); + const std::vector<DebugRect>& debugRects = debugRectHistory->debugRects(); for (size_t i = 0; i < debugRects.size(); ++i) { SkColor strokeColor = 0; @@ -294,4 +294,4 @@ const char* HeadsUpDisplayLayerImpl::layerTypeAsString() const return "HeadsUpDisplayLayer"; } -} +} // namespace cc diff --git a/cc/layer_tree_host_common.h b/cc/layer_tree_host_common.h index 506274d..5822ea1 100644 --- a/cc/layer_tree_host_common.h +++ b/cc/layer_tree_host_common.h @@ -10,7 +10,6 @@ #include "IntRect.h" #include "IntSize.h" #include <public/WebTransformationMatrix.h> -#include <wtf/Vector.h> namespace cc { @@ -91,6 +90,6 @@ LayerType* LayerTreeHostCommon::findLayerInSubtree(LayerType* rootLayer, int lay return 0; } -} // namespace cc +} // namespace cc #endif diff --git a/cc/layer_tree_host_impl.h b/cc/layer_tree_host_impl.h index 1dc750d..f864d3e 100644 --- a/cc/layer_tree_host_impl.h +++ b/cc/layer_tree_host_impl.h @@ -121,7 +121,7 @@ public: FrameData(); ~FrameData(); - Vector<IntRect> occludingScreenSpaceRects; + std::vector<IntRect> occludingScreenSpaceRects; RenderPassList renderPasses; RenderPassIdHashMap renderPassesById; LayerList* renderSurfaceLayerList; diff --git a/cc/occlusion_tracker.cc b/cc/occlusion_tracker.cc index d357505..66dd219 100644 --- a/cc/occlusion_tracker.cc +++ b/cc/occlusion_tracker.cc @@ -246,7 +246,7 @@ void OcclusionTrackerBase<LayerType, RenderSurfaceType>::leaveToRenderTarget(con // FIXME: Remove usePaintTracking when paint tracking is on for paint culling. template<typename LayerType> -static inline void addOcclusionBehindLayer(Region& region, const LayerType* layer, const WebTransformationMatrix& transform, const Region& opaqueContents, const IntRect& clipRectInTarget, const IntSize& minimumTrackingSize, Vector<IntRect>* occludingScreenSpaceRects) +static inline void addOcclusionBehindLayer(Region& region, const LayerType* layer, const WebTransformationMatrix& transform, const Region& opaqueContents, const IntRect& clipRectInTarget, const IntSize& minimumTrackingSize, std::vector<IntRect>* occludingScreenSpaceRects) { DCHECK(layer->visibleContentRect().contains(opaqueContents.bounds())); @@ -263,7 +263,7 @@ static inline void addOcclusionBehindLayer(Region& region, const LayerType* laye transformedRect.intersect(clipRectInTarget); if (transformedRect.width() >= minimumTrackingSize.width() || transformedRect.height() >= minimumTrackingSize.height()) { if (occludingScreenSpaceRects) - occludingScreenSpaceRects->append(transformedRect); + occludingScreenSpaceRects->push_back(transformedRect); region.unite(transformedRect); } } @@ -479,4 +479,4 @@ template IntRect OcclusionTrackerBase<LayerImpl, RenderSurfaceImpl>::unoccludedC template IntRect OcclusionTrackerBase<LayerImpl, RenderSurfaceImpl>::layerClipRectInTarget(const LayerImpl*) const; -} // namespace cc +} // namespace cc diff --git a/cc/occlusion_tracker.h b/cc/occlusion_tracker.h index 2481845..a76c363 100644 --- a/cc/occlusion_tracker.h +++ b/cc/occlusion_tracker.h @@ -50,7 +50,7 @@ public: void setMinimumTrackingSize(const IntSize& size) { m_minimumTrackingSize = size; } // The following is used for visualization purposes. - void setOccludingScreenSpaceRectsContainer(Vector<IntRect>* rects) { m_occludingScreenSpaceRects = rects; } + void setOccludingScreenSpaceRectsContainer(std::vector<IntRect>* rects) { m_occludingScreenSpaceRects = rects; } protected: struct StackObject { @@ -93,7 +93,7 @@ private: IntSize m_minimumTrackingSize; // This is used for visualizing the occlusion tracking process. - Vector<IntRect>* m_occludingScreenSpaceRects; + std::vector<IntRect>* m_occludingScreenSpaceRects; DISALLOW_COPY_AND_ASSIGN(OcclusionTrackerBase); }; @@ -101,5 +101,6 @@ private: typedef OcclusionTrackerBase<Layer, RenderSurface> OcclusionTracker; typedef OcclusionTrackerBase<LayerImpl, RenderSurfaceImpl> OcclusionTrackerImpl; -} +} // namespace cc + #endif // CCOcclusionTracker_h |