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

Side by Side Diff: cc/damage_tracker.cc

Issue 11192030: cc: Switch to Chromium DCHECKs LOGs (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebaseonenne 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 | Annotate | Revision Log
« no previous file with comments | « cc/completion_event.h ('k') | cc/debug_border_draw_quad.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 #include "CCDamageTracker.h" 7 #include "CCDamageTracker.h"
8 8
9 #include "CCLayerImpl.h" 9 #include "CCLayerImpl.h"
10 #include "CCLayerTreeHostCommon.h" 10 #include "CCLayerTreeHostCommon.h"
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 return FloatRect(); 155 return FloatRect();
156 156
157 FloatRect ret = iter->second; 157 FloatRect ret = iter->second;
158 m_currentRectHistory->erase(iter); 158 m_currentRectHistory->erase(iter);
159 return ret; 159 return ret;
160 } 160 }
161 161
162 void CCDamageTracker::saveRectForNextFrame(int layerID, const FloatRect& targetS paceRect) 162 void CCDamageTracker::saveRectForNextFrame(int layerID, const FloatRect& targetS paceRect)
163 { 163 {
164 // This layer should not yet exist in next frame's history. 164 // This layer should not yet exist in next frame's history.
165 ASSERT(layerID > 0); 165 DCHECK(layerID > 0);
166 ASSERT(m_nextRectHistory->find(layerID) == m_nextRectHistory->end()); 166 DCHECK(m_nextRectHistory->find(layerID) == m_nextRectHistory->end());
167 (*m_nextRectHistory)[layerID] = targetSpaceRect; 167 (*m_nextRectHistory)[layerID] = targetSpaceRect;
168 } 168 }
169 169
170 FloatRect CCDamageTracker::trackDamageFromActiveLayers(const std::vector<CCLayer Impl*>& layerList, int targetSurfaceLayerID) 170 FloatRect CCDamageTracker::trackDamageFromActiveLayers(const std::vector<CCLayer Impl*>& layerList, int targetSurfaceLayerID)
171 { 171 {
172 FloatRect damageRect = FloatRect(); 172 FloatRect damageRect = FloatRect();
173 173
174 for (unsigned layerIndex = 0; layerIndex < layerList.size(); ++layerIndex) { 174 for (unsigned layerIndex = 0; layerIndex < layerList.size(); ++layerIndex) {
175 // Visit layers in back-to-front order. 175 // Visit layers in back-to-front order.
176 CCLayerImpl* layer = layerList[layerIndex]; 176 CCLayerImpl* layer = layerList[layerIndex];
(...skipping 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 // If the layer has a background filter, this may cause pixels in our surfac e to be expanded, so we will need to expand any damage 337 // If the layer has a background filter, this may cause pixels in our surfac e to be expanded, so we will need to expand any damage
338 // 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 338 // 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
339 // 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 339 // 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
340 // this layer this frame. 340 // this layer this frame.
341 if (layer->backgroundFilters().hasFilterThatMovesPixels()) 341 if (layer->backgroundFilters().hasFilterThatMovesPixels())
342 expandDamageRectInsideRectWithFilters(targetDamageRect, surfaceRectInTar getSpace, layer->backgroundFilters()); 342 expandDamageRectInsideRectWithFilters(targetDamageRect, surfaceRectInTar getSpace, layer->backgroundFilters());
343 } 343 }
344 344
345 } // namespace cc 345 } // namespace cc
346 346
OLDNEW
« no previous file with comments | « cc/completion_event.h ('k') | cc/debug_border_draw_quad.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698