| OLD | NEW |
| 1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 "CCQuadCuller.h" | 7 #include "CCQuadCuller.h" |
| 8 | 8 |
| 9 #include "CCAppendQuadsData.h" | 9 #include "CCAppendQuadsData.h" |
| 10 #include "CCDebugBorderDrawQuad.h" | 10 #include "CCDebugBorderDrawQuad.h" |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 } | 63 } |
| 64 | 64 |
| 65 // Pass the quad after we're done using it. | 65 // Pass the quad after we're done using it. |
| 66 quadList.append(drawQuad.Pass()); | 66 quadList.append(drawQuad.Pass()); |
| 67 } | 67 } |
| 68 return keepQuad; | 68 return keepQuad; |
| 69 } | 69 } |
| 70 | 70 |
| 71 bool CCQuadCuller::append(scoped_ptr<CCDrawQuad> drawQuad, CCAppendQuadsData& ap
pendQuadsData) | 71 bool CCQuadCuller::append(scoped_ptr<CCDrawQuad> drawQuad, CCAppendQuadsData& ap
pendQuadsData) |
| 72 { | 72 { |
| 73 ASSERT(drawQuad->sharedQuadState() == m_currentSharedQuadState); | 73 DCHECK(drawQuad->sharedQuadState() == m_currentSharedQuadState); |
| 74 ASSERT(drawQuad->sharedQuadStateId() == m_currentSharedQuadState->id); | 74 DCHECK(drawQuad->sharedQuadStateId() == m_currentSharedQuadState->id); |
| 75 ASSERT(!m_sharedQuadStateList.isEmpty()); | 75 DCHECK(!m_sharedQuadStateList.isEmpty()); |
| 76 ASSERT(m_sharedQuadStateList.last() == m_currentSharedQuadState); | 76 DCHECK(m_sharedQuadStateList.last() == m_currentSharedQuadState); |
| 77 | 77 |
| 78 IntRect culledRect; | 78 IntRect culledRect; |
| 79 bool hasOcclusionFromOutsideTargetSurface; | 79 bool hasOcclusionFromOutsideTargetSurface; |
| 80 | 80 |
| 81 if (m_forSurface) | 81 if (m_forSurface) |
| 82 culledRect = m_occlusionTracker->unoccludedContributingSurfaceContentRec
t(m_layer, false, drawQuad->quadRect(), &hasOcclusionFromOutsideTargetSurface); | 82 culledRect = m_occlusionTracker->unoccludedContributingSurfaceContentRec
t(m_layer, false, drawQuad->quadRect(), &hasOcclusionFromOutsideTargetSurface); |
| 83 else | 83 else |
| 84 culledRect = m_occlusionTracker->unoccludedContentRect(m_layer, drawQuad
->quadRect(), &hasOcclusionFromOutsideTargetSurface); | 84 culledRect = m_occlusionTracker->unoccludedContentRect(m_layer, drawQuad
->quadRect(), &hasOcclusionFromOutsideTargetSurface); |
| 85 | 85 |
| 86 appendQuadsData.hadOcclusionFromOutsideTargetSurface |= hasOcclusionFromOuts
ideTargetSurface; | 86 appendQuadsData.hadOcclusionFromOutsideTargetSurface |= hasOcclusionFromOuts
ideTargetSurface; |
| 87 | 87 |
| 88 return appendQuadInternal(drawQuad.Pass(), culledRect, m_quadList, *m_occlus
ionTracker, m_showCullingWithDebugBorderQuads); | 88 return appendQuadInternal(drawQuad.Pass(), culledRect, m_quadList, *m_occlus
ionTracker, m_showCullingWithDebugBorderQuads); |
| 89 } | 89 } |
| 90 | 90 |
| 91 } // namespace cc | 91 } // namespace cc |
| OLD | NEW |