OLD | NEW |
1 /* | 1 /* |
2 * Copyright (C) 2011 Google Inc. All rights reserved. | 2 * Copyright (C) 2011 Google Inc. All rights reserved. |
3 * | 3 * |
4 * Redistribution and use in source and binary forms, with or without | 4 * Redistribution and use in source and binary forms, with or without |
5 * modification, are permitted provided that the following conditions | 5 * modification, are permitted provided that the following conditions |
6 * are met: | 6 * are met: |
7 * 1. Redistributions of source code must retain the above copyright | 7 * 1. Redistributions of source code must retain the above copyright |
8 * notice, this list of conditions and the following disclaimer. | 8 * notice, this list of conditions and the following disclaimer. |
9 * 2. Redistributions in binary form must reproduce the above copyright | 9 * 2. Redistributions in binary form must reproduce the above copyright |
10 * notice, this list of conditions and the following disclaimer in the | 10 * notice, this list of conditions and the following disclaimer in the |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
73 , m_layerRendererInitialized(false) | 73 , m_layerRendererInitialized(false) |
74 , m_contextLost(false) | 74 , m_contextLost(false) |
75 , m_numTimesRecreateShouldFail(0) | 75 , m_numTimesRecreateShouldFail(0) |
76 , m_numFailedRecreateAttempts(0) | 76 , m_numFailedRecreateAttempts(0) |
77 , m_settings(settings) | 77 , m_settings(settings) |
78 , m_visible(true) | 78 , m_visible(true) |
79 , m_pageScaleFactor(1) | 79 , m_pageScaleFactor(1) |
80 , m_minPageScaleFactor(1) | 80 , m_minPageScaleFactor(1) |
81 , m_maxPageScaleFactor(1) | 81 , m_maxPageScaleFactor(1) |
82 , m_triggerIdlePaints(true) | 82 , m_triggerIdlePaints(true) |
| 83 , m_backgroundColor(Color::white) |
83 , m_partialTextureUpdateRequests(0) | 84 , m_partialTextureUpdateRequests(0) |
84 { | 85 { |
85 ASSERT(CCProxy::isMainThread()); | 86 ASSERT(CCProxy::isMainThread()); |
86 numLayerTreeInstances++; | 87 numLayerTreeInstances++; |
87 } | 88 } |
88 | 89 |
89 bool CCLayerTreeHost::initialize() | 90 bool CCLayerTreeHost::initialize() |
90 { | 91 { |
91 TRACE_EVENT("CCLayerTreeHost::initialize", this, 0); | 92 TRACE_EVENT("CCLayerTreeHost::initialize", this, 0); |
92 if (CCProxy::hasImplThread()) { | 93 if (CCProxy::hasImplThread()) { |
(...skipping 124 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
217 // We may have added an animation during the tree sync. This will cause both
layer tree hosts | 218 // We may have added an animation during the tree sync. This will cause both
layer tree hosts |
218 // to visit their controllers. | 219 // to visit their controllers. |
219 if (rootLayer()) { | 220 if (rootLayer()) { |
220 hostImpl->setNeedsAnimateLayers(); | 221 hostImpl->setNeedsAnimateLayers(); |
221 m_needsAnimateLayers = true; | 222 m_needsAnimateLayers = true; |
222 } | 223 } |
223 | 224 |
224 hostImpl->setSourceFrameNumber(frameNumber()); | 225 hostImpl->setSourceFrameNumber(frameNumber()); |
225 hostImpl->setViewportSize(viewportSize()); | 226 hostImpl->setViewportSize(viewportSize()); |
226 hostImpl->setPageScaleFactorAndLimits(m_pageScaleFactor, m_minPageScaleFacto
r, m_maxPageScaleFactor); | 227 hostImpl->setPageScaleFactorAndLimits(m_pageScaleFactor, m_minPageScaleFacto
r, m_maxPageScaleFactor); |
| 228 hostImpl->setBackgroundColor(m_backgroundColor); |
227 | 229 |
228 m_frameNumber++; | 230 m_frameNumber++; |
229 } | 231 } |
230 | 232 |
231 void CCLayerTreeHost::commitComplete() | 233 void CCLayerTreeHost::commitComplete() |
232 { | 234 { |
233 m_deleteTextureAfterCommitList.clear(); | 235 m_deleteTextureAfterCommitList.clear(); |
234 clearPendingUpdate(); | 236 clearPendingUpdate(); |
235 m_contentsTextureManager->unprotectAllTextures(); | 237 m_contentsTextureManager->unprotectAllTextures(); |
236 m_client->didCommit(); | 238 m_client->didCommit(); |
(...skipping 456 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
693 for (size_t eventIndex = 0; eventIndex < events.size(); ++eventIndex) { | 695 for (size_t eventIndex = 0; eventIndex < events.size(); ++eventIndex) { |
694 if (layer->id() == events[eventIndex].layerId) | 696 if (layer->id() == events[eventIndex].layerId) |
695 layer->notifyAnimationStarted(events[eventIndex], wallClockTime); | 697 layer->notifyAnimationStarted(events[eventIndex], wallClockTime); |
696 } | 698 } |
697 | 699 |
698 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn
dex) | 700 for (size_t childIndex = 0; childIndex < layer->children().size(); ++childIn
dex) |
699 setAnimationEventsRecursive(events, layer->children()[childIndex].get(),
wallClockTime); | 701 setAnimationEventsRecursive(events, layer->children()[childIndex].get(),
wallClockTime); |
700 } | 702 } |
701 | 703 |
702 } // namespace WebCore | 704 } // namespace WebCore |
OLD | NEW |