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

Side by Side Diff: cc/CCDamageTracker.cpp

Issue 11048044: cc: Switch to Chromium DCHECKs and LOGs (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Created 8 years, 2 months 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 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 6
7 #if USE(ACCELERATED_COMPOSITING) 7 #if USE(ACCELERATED_COMPOSITING)
8 8
9 #include "CCDamageTracker.h" 9 #include "CCDamageTracker.h"
10 10
(...skipping 142 matching lines...) Expand 10 before | Expand all | Expand 10 after
153 { 153 {
154 layerIsNew = !m_currentRectHistory->contains(layerID); 154 layerIsNew = !m_currentRectHistory->contains(layerID);
155 155
156 // take() will remove the entry from the map, or if not found, return a defa ult (empty) rect. 156 // take() will remove the entry from the map, or if not found, return a defa ult (empty) rect.
157 return m_currentRectHistory->take(layerID); 157 return m_currentRectHistory->take(layerID);
158 } 158 }
159 159
160 void CCDamageTracker::saveRectForNextFrame(int layerID, const FloatRect& targetS paceRect) 160 void CCDamageTracker::saveRectForNextFrame(int layerID, const FloatRect& targetS paceRect)
161 { 161 {
162 // This layer should not yet exist in next frame's history. 162 // This layer should not yet exist in next frame's history.
163 ASSERT(layerID > 0); 163 DCHECK(layerID > 0);
164 ASSERT(m_nextRectHistory->find(layerID) == m_nextRectHistory->end()); 164 DCHECK(m_nextRectHistory->find(layerID) == m_nextRectHistory->end());
165 m_nextRectHistory->set(layerID, targetSpaceRect); 165 m_nextRectHistory->set(layerID, targetSpaceRect);
166 } 166 }
167 167
168 FloatRect CCDamageTracker::trackDamageFromActiveLayers(const std::vector<CCLayer Impl*>& layerList, int targetSurfaceLayerID) 168 FloatRect CCDamageTracker::trackDamageFromActiveLayers(const std::vector<CCLayer Impl*>& layerList, int targetSurfaceLayerID)
169 { 169 {
170 FloatRect damageRect = FloatRect(); 170 FloatRect damageRect = FloatRect();
171 171
172 for (unsigned layerIndex = 0; layerIndex < layerList.size(); ++layerIndex) { 172 for (unsigned layerIndex = 0; layerIndex < layerList.size(); ++layerIndex) {
173 // Visit layers in back-to-front order. 173 // Visit layers in back-to-front order.
174 CCLayerImpl* layer = layerList[layerIndex]; 174 CCLayerImpl* layer = layerList[layerIndex];
(...skipping 165 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 // at or below this layer. We expand the damage from this layer too, as we n eed to readback those pixels from the surface with only 340 // at or below this layer. We expand the damage from this layer too, as we n eed to readback those pixels from the surface with only
341 // the contents of layers below this one in them. This means we need to redr aw any pixels in the surface being used for the blur in 341 // the contents of layers below this one in them. This means we need to redr aw any pixels in the surface being used for the blur in
342 // this layer this frame. 342 // this layer this frame.
343 if (layer->backgroundFilters().hasFilterThatMovesPixels()) 343 if (layer->backgroundFilters().hasFilterThatMovesPixels())
344 expandDamageRectInsideRectWithFilters(targetDamageRect, surfaceRectInTar getSpace, layer->backgroundFilters()); 344 expandDamageRectInsideRectWithFilters(targetDamageRect, surfaceRectInTar getSpace, layer->backgroundFilters());
345 } 345 }
346 346
347 } // namespace cc 347 } // namespace cc
348 348
349 #endif // USE(ACCELERATED_COMPOSITING) 349 #endif // USE(ACCELERATED_COMPOSITING)
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698