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 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 : m_layerTreeHostImpl(layerTreeHostImpl) | 82 : m_layerTreeHostImpl(layerTreeHostImpl) |
83 , m_timeSource(timeSource) | 83 , m_timeSource(timeSource) |
84 { | 84 { |
85 m_timeSource->setClient(this); | 85 m_timeSource->setClient(this); |
86 } | 86 } |
87 | 87 |
88 CCLayerTreeHostImpl* m_layerTreeHostImpl; | 88 CCLayerTreeHostImpl* m_layerTreeHostImpl; |
89 RefPtr<CCDelayBasedTimeSource> m_timeSource; | 89 RefPtr<CCDelayBasedTimeSource> m_timeSource; |
90 }; | 90 }; |
91 | 91 |
| 92 CCLayerTreeHostImpl::FrameData::FrameData() |
| 93 { |
| 94 } |
| 95 |
| 96 CCLayerTreeHostImpl::FrameData::~FrameData() |
| 97 { |
| 98 } |
| 99 |
92 PassOwnPtr<CCLayerTreeHostImpl> CCLayerTreeHostImpl::create(const CCLayerTreeSet
tings& settings, CCLayerTreeHostImplClient* client) | 100 PassOwnPtr<CCLayerTreeHostImpl> CCLayerTreeHostImpl::create(const CCLayerTreeSet
tings& settings, CCLayerTreeHostImplClient* client) |
93 { | 101 { |
94 return adoptPtr(new CCLayerTreeHostImpl(settings, client)); | 102 return adoptPtr(new CCLayerTreeHostImpl(settings, client)); |
95 } | 103 } |
96 | 104 |
97 CCLayerTreeHostImpl::CCLayerTreeHostImpl(const CCLayerTreeSettings& settings, CC
LayerTreeHostImplClient* client) | 105 CCLayerTreeHostImpl::CCLayerTreeHostImpl(const CCLayerTreeSettings& settings, CC
LayerTreeHostImplClient* client) |
98 : m_client(client) | 106 : m_client(client) |
99 , m_sourceFrameNumber(-1) | 107 , m_sourceFrameNumber(-1) |
100 , m_rootScrollLayerImpl(0) | 108 , m_rootScrollLayerImpl(0) |
101 , m_currentlyScrollingLayerImpl(0) | 109 , m_currentlyScrollingLayerImpl(0) |
(...skipping 478 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
580 } | 588 } |
581 | 589 |
582 bool CCLayerTreeHostImpl::swapBuffers() | 590 bool CCLayerTreeHostImpl::swapBuffers() |
583 { | 591 { |
584 ASSERT(m_renderer); | 592 ASSERT(m_renderer); |
585 | 593 |
586 m_fpsCounter->markEndOfFrame(); | 594 m_fpsCounter->markEndOfFrame(); |
587 return m_renderer->swapBuffers(); | 595 return m_renderer->swapBuffers(); |
588 } | 596 } |
589 | 597 |
| 598 const IntSize& CCLayerTreeHostImpl::deviceViewportSize() const |
| 599 { |
| 600 return m_deviceViewportSize; |
| 601 } |
| 602 |
| 603 const CCLayerTreeSettings& CCLayerTreeHostImpl::settings() const |
| 604 { |
| 605 return m_settings; |
| 606 } |
| 607 |
590 void CCLayerTreeHostImpl::didLoseContext() | 608 void CCLayerTreeHostImpl::didLoseContext() |
591 { | 609 { |
592 m_client->didLoseContextOnImplThread(); | 610 m_client->didLoseContextOnImplThread(); |
593 } | 611 } |
594 | 612 |
595 void CCLayerTreeHostImpl::onSwapBuffersComplete() | 613 void CCLayerTreeHostImpl::onSwapBuffersComplete() |
596 { | 614 { |
597 m_client->onSwapBuffersCompleteOnImplThread(); | 615 m_client->onSwapBuffersCompleteOnImplThread(); |
598 } | 616 } |
599 | 617 |
(...skipping 673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1273 | 1291 |
1274 CCScrollbarAnimationController* scrollbarController = layer->scrollbarAnimat
ionController(); | 1292 CCScrollbarAnimationController* scrollbarController = layer->scrollbarAnimat
ionController(); |
1275 if (scrollbarController && scrollbarController->animate(monotonicTime)) | 1293 if (scrollbarController && scrollbarController->animate(monotonicTime)) |
1276 m_client->setNeedsRedrawOnImplThread(); | 1294 m_client->setNeedsRedrawOnImplThread(); |
1277 | 1295 |
1278 for (size_t i = 0; i < layer->children().size(); ++i) | 1296 for (size_t i = 0; i < layer->children().size(); ++i) |
1279 animateScrollbarsRecursive(layer->children()[i].get(), monotonicTime); | 1297 animateScrollbarsRecursive(layer->children()[i].get(), monotonicTime); |
1280 } | 1298 } |
1281 | 1299 |
1282 } // namespace cc | 1300 } // namespace cc |
OLD | NEW |