| OLD | NEW |
| 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 "CCLayerTreeHostImpl.h" | 7 #include "CCLayerTreeHostImpl.h" |
| 8 | 8 |
| 9 #include "CCAppendQuadsData.h" | 9 #include "CCAppendQuadsData.h" |
| 10 #include "CCDamageTracker.h" | 10 #include "CCDamageTracker.h" |
| (...skipping 367 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 378 // a cleaner way to get the contentBounds on the Impl side. | 378 // a cleaner way to get the contentBounds on the Impl side. |
| 379 if (!m_rootScrollLayerImpl || m_rootScrollLayerImpl->children().isEmpty()) | 379 if (!m_rootScrollLayerImpl || m_rootScrollLayerImpl->children().isEmpty()) |
| 380 return IntSize(); | 380 return IntSize(); |
| 381 return m_rootScrollLayerImpl->children()[0]->contentBounds(); | 381 return m_rootScrollLayerImpl->children()[0]->contentBounds(); |
| 382 } | 382 } |
| 383 | 383 |
| 384 static inline CCRenderPass* findRenderPassById(CCRenderPass::Id renderPassId, co
nst CCLayerTreeHostImpl::FrameData& frame) | 384 static inline CCRenderPass* findRenderPassById(CCRenderPass::Id renderPassId, co
nst CCLayerTreeHostImpl::FrameData& frame) |
| 385 { | 385 { |
| 386 CCRenderPassIdHashMap::const_iterator it = frame.renderPassesById.find(rende
rPassId); | 386 CCRenderPassIdHashMap::const_iterator it = frame.renderPassesById.find(rende
rPassId); |
| 387 ASSERT(it != frame.renderPassesById.end()); | 387 ASSERT(it != frame.renderPassesById.end()); |
| 388 #if WTF_NEW_HASHMAP_ITERATORS_INTERFACE |
| 389 return it->value.get(); |
| 390 #else |
| 388 return it->second.get(); | 391 return it->second.get(); |
| 392 #endif |
| 389 } | 393 } |
| 390 | 394 |
| 391 static void removeRenderPassesRecursive(CCRenderPass::Id removeRenderPassId, CCL
ayerTreeHostImpl::FrameData& frame) | 395 static void removeRenderPassesRecursive(CCRenderPass::Id removeRenderPassId, CCL
ayerTreeHostImpl::FrameData& frame) |
| 392 { | 396 { |
| 393 CCRenderPass* removeRenderPass = findRenderPassById(removeRenderPassId, fram
e); | 397 CCRenderPass* removeRenderPass = findRenderPassById(removeRenderPassId, fram
e); |
| 394 size_t removeIndex = frame.renderPasses.find(removeRenderPass); | 398 size_t removeIndex = frame.renderPasses.find(removeRenderPass); |
| 395 | 399 |
| 396 // The pass was already removed by another quad - probably the original, and
we are the replica. | 400 // The pass was already removed by another quad - probably the original, and
we are the replica. |
| 397 if (removeIndex == notFound) | 401 if (removeIndex == notFound) |
| 398 return; | 402 return; |
| (...skipping 864 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1263 | 1267 |
| 1264 CCScrollbarAnimationController* scrollbarController = layer->scrollbarAnimat
ionController(); | 1268 CCScrollbarAnimationController* scrollbarController = layer->scrollbarAnimat
ionController(); |
| 1265 if (scrollbarController && scrollbarController->animate(monotonicTime)) | 1269 if (scrollbarController && scrollbarController->animate(monotonicTime)) |
| 1266 m_client->setNeedsRedrawOnImplThread(); | 1270 m_client->setNeedsRedrawOnImplThread(); |
| 1267 | 1271 |
| 1268 for (size_t i = 0; i < layer->children().size(); ++i) | 1272 for (size_t i = 0; i < layer->children().size(); ++i) |
| 1269 animateScrollbarsRecursive(layer->children()[i].get(), monotonicTime); | 1273 animateScrollbarsRecursive(layer->children()[i].get(), monotonicTime); |
| 1270 } | 1274 } |
| 1271 | 1275 |
| 1272 } // namespace cc | 1276 } // namespace cc |
| OLD | NEW |