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 "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "CCAppendQuadsData.h" | 10 #include "CCAppendQuadsData.h" |
(...skipping 11 matching lines...) Expand all Loading... |
22 #include "CCPageScaleAnimation.h" | 22 #include "CCPageScaleAnimation.h" |
23 #include "CCPrioritizedTextureManager.h" | 23 #include "CCPrioritizedTextureManager.h" |
24 #include "CCRenderPassDrawQuad.h" | 24 #include "CCRenderPassDrawQuad.h" |
25 #include "CCRendererGL.h" | 25 #include "CCRendererGL.h" |
26 #include "CCRendererSoftware.h" | 26 #include "CCRendererSoftware.h" |
27 #include "CCRenderingStats.h" | 27 #include "CCRenderingStats.h" |
28 #include "CCScrollbarAnimationController.h" | 28 #include "CCScrollbarAnimationController.h" |
29 #include "CCScrollbarLayerImpl.h" | 29 #include "CCScrollbarLayerImpl.h" |
30 #include "CCSettings.h" | 30 #include "CCSettings.h" |
31 #include "CCSingleThreadProxy.h" | 31 #include "CCSingleThreadProxy.h" |
| 32 #include "TextureUploader.h" |
32 #include "TraceEvent.h" | 33 #include "TraceEvent.h" |
33 #include <wtf/CurrentTime.h> | 34 #include <wtf/CurrentTime.h> |
34 #include <algorithm> | 35 #include <algorithm> |
35 | 36 |
36 using WebKit::WebTransformationMatrix; | 37 using WebKit::WebTransformationMatrix; |
37 | 38 |
38 namespace { | 39 namespace { |
39 | 40 |
40 void didVisibilityChange(cc::CCLayerTreeHostImpl* id, bool visible) | 41 void didVisibilityChange(cc::CCLayerTreeHostImpl* id, bool visible) |
41 { | 42 { |
(...skipping 536 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
578 // The next frame should start by assuming nothing has changed, and changes
are noted as they occur. | 579 // The next frame should start by assuming nothing has changed, and changes
are noted as they occur. |
579 for (unsigned int i = 0; i < frame.renderSurfaceLayerList->size(); i++) | 580 for (unsigned int i = 0; i < frame.renderSurfaceLayerList->size(); i++) |
580 (*frame.renderSurfaceLayerList)[i]->renderSurface()->damageTracker()->di
dDrawDamagedArea(); | 581 (*frame.renderSurfaceLayerList)[i]->renderSurface()->damageTracker()->di
dDrawDamagedArea(); |
581 m_rootLayerImpl->resetAllChangeTrackingForSubtree(); | 582 m_rootLayerImpl->resetAllChangeTrackingForSubtree(); |
582 } | 583 } |
583 | 584 |
584 void CCLayerTreeHostImpl::didDrawAllLayers(const FrameData& frame) | 585 void CCLayerTreeHostImpl::didDrawAllLayers(const FrameData& frame) |
585 { | 586 { |
586 for (size_t i = 0; i < frame.willDrawLayers.size(); ++i) | 587 for (size_t i = 0; i < frame.willDrawLayers.size(); ++i) |
587 frame.willDrawLayers[i]->didDraw(m_resourceProvider.get()); | 588 frame.willDrawLayers[i]->didDraw(m_resourceProvider.get()); |
| 589 |
| 590 // Once all layers have been drawn, pending texture uploads should no |
| 591 // longer block future uploads. |
| 592 m_resourceProvider->textureUploader()->markPendingUploadsAsNonBlocking(); |
588 } | 593 } |
589 | 594 |
590 void CCLayerTreeHostImpl::finishAllRendering() | 595 void CCLayerTreeHostImpl::finishAllRendering() |
591 { | 596 { |
592 if (m_renderer) | 597 if (m_renderer) |
593 m_renderer->finish(); | 598 m_renderer->finish(); |
594 } | 599 } |
595 | 600 |
596 bool CCLayerTreeHostImpl::isContextLost() | 601 bool CCLayerTreeHostImpl::isContextLost() |
597 { | 602 { |
(...skipping 710 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1308 | 1313 |
1309 CCScrollbarAnimationController* scrollbarController = layer->scrollbarAnimat
ionController(); | 1314 CCScrollbarAnimationController* scrollbarController = layer->scrollbarAnimat
ionController(); |
1310 if (scrollbarController && scrollbarController->animate(monotonicTime)) | 1315 if (scrollbarController && scrollbarController->animate(monotonicTime)) |
1311 m_client->setNeedsRedrawOnImplThread(); | 1316 m_client->setNeedsRedrawOnImplThread(); |
1312 | 1317 |
1313 for (size_t i = 0; i < layer->children().size(); ++i) | 1318 for (size_t i = 0; i < layer->children().size(); ++i) |
1314 animateScrollbarsRecursive(layer->children()[i], monotonicTime); | 1319 animateScrollbarsRecursive(layer->children()[i], monotonicTime); |
1315 } | 1320 } |
1316 | 1321 |
1317 } // namespace cc | 1322 } // namespace cc |
OLD | NEW |