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 242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
253 } | 253 } |
254 | 254 |
255 void CCSingleThreadProxy::stop() | 255 void CCSingleThreadProxy::stop() |
256 { | 256 { |
257 TRACE_EVENT0("cc", "CCSingleThreadProxy::stop"); | 257 TRACE_EVENT0("cc", "CCSingleThreadProxy::stop"); |
258 ASSERT(CCProxy::isMainThread()); | 258 ASSERT(CCProxy::isMainThread()); |
259 { | 259 { |
260 DebugScopedSetMainThreadBlocked mainThreadBlocked; | 260 DebugScopedSetMainThreadBlocked mainThreadBlocked; |
261 DebugScopedSetImplThread impl; | 261 DebugScopedSetImplThread impl; |
262 | 262 |
263 if (!m_layerTreeHostImpl->contentsTexturesWerePurgedSinceLastCommit()) | 263 if (!m_layerTreeHostImpl->contentsTexturesPurged()) |
264 m_layerTreeHost->deleteContentsTexturesOnImplThread(m_layerTreeHostI
mpl->resourceProvider()); | 264 m_layerTreeHost->deleteContentsTexturesOnImplThread(m_layerTreeHostI
mpl->resourceProvider()); |
265 m_layerTreeHostImpl.clear(); | 265 m_layerTreeHostImpl.clear(); |
266 } | 266 } |
267 m_layerTreeHost = 0; | 267 m_layerTreeHost = 0; |
268 } | 268 } |
269 | 269 |
270 void CCSingleThreadProxy::postAnimationEventsToMainThreadOnImplThread(PassOwnPtr
<CCAnimationEventsVector> events, double wallClockTime) | 270 void CCSingleThreadProxy::postAnimationEventsToMainThreadOnImplThread(PassOwnPtr
<CCAnimationEventsVector> events, double wallClockTime) |
271 { | 271 { |
272 ASSERT(CCProxy::isImplThread()); | 272 ASSERT(CCProxy::isImplThread()); |
273 DebugScopedSetMainThread main; | 273 DebugScopedSetMainThread main; |
(...skipping 19 matching lines...) Expand all Loading... |
293 } | 293 } |
294 | 294 |
295 bool CCSingleThreadProxy::commitAndComposite() | 295 bool CCSingleThreadProxy::commitAndComposite() |
296 { | 296 { |
297 ASSERT(CCProxy::isMainThread()); | 297 ASSERT(CCProxy::isMainThread()); |
298 | 298 |
299 | 299 |
300 if (!m_layerTreeHost->initializeLayerRendererIfNeeded()) | 300 if (!m_layerTreeHost->initializeLayerRendererIfNeeded()) |
301 return false; | 301 return false; |
302 | 302 |
303 if (m_layerTreeHostImpl->contentsTexturesWerePurgedSinceLastCommit()) | 303 if (m_layerTreeHostImpl->contentsTexturesPurged()) |
304 m_layerTreeHost->evictAllContentTextures(); | 304 m_layerTreeHost->evictAllContentTextures(); |
305 | 305 |
306 CCTextureUpdateQueue queue; | 306 CCTextureUpdateQueue queue; |
307 m_layerTreeHost->updateLayers(queue, m_layerTreeHostImpl->memoryAllocationLi
mitBytes()); | 307 m_layerTreeHost->updateLayers(queue, m_layerTreeHostImpl->memoryAllocationLi
mitBytes()); |
| 308 m_layerTreeHostImpl->resetContentsTexturesPurged(); |
308 | 309 |
309 m_layerTreeHost->willCommit(); | 310 m_layerTreeHost->willCommit(); |
310 doCommit(queue); | 311 doCommit(queue); |
311 bool result = doComposite(); | 312 bool result = doComposite(); |
312 m_layerTreeHost->didBeginFrame(); | 313 m_layerTreeHost->didBeginFrame(); |
313 return result; | 314 return result; |
314 } | 315 } |
315 | 316 |
316 bool CCSingleThreadProxy::doComposite() | 317 bool CCSingleThreadProxy::doComposite() |
317 { | 318 { |
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
349 | 350 |
350 void CCSingleThreadProxy::didSwapFrame() | 351 void CCSingleThreadProxy::didSwapFrame() |
351 { | 352 { |
352 if (m_nextFrameIsNewlyCommittedFrame) { | 353 if (m_nextFrameIsNewlyCommittedFrame) { |
353 m_nextFrameIsNewlyCommittedFrame = false; | 354 m_nextFrameIsNewlyCommittedFrame = false; |
354 m_layerTreeHost->didCommitAndDrawFrame(); | 355 m_layerTreeHost->didCommitAndDrawFrame(); |
355 } | 356 } |
356 } | 357 } |
357 | 358 |
358 } | 359 } |
OLD | NEW |