| 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 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 ASSERT(CCProxy::isMainThread()); | 149 ASSERT(CCProxy::isMainThread()); |
| 150 ASSERT(m_contextLost); | 150 ASSERT(m_contextLost); |
| 151 | 151 |
| 152 OwnPtr<CCGraphicsContext> context = m_layerTreeHost->createContext(); | 152 OwnPtr<CCGraphicsContext> context = m_layerTreeHost->createContext(); |
| 153 if (!context) | 153 if (!context) |
| 154 return false; | 154 return false; |
| 155 | 155 |
| 156 bool initialized; | 156 bool initialized; |
| 157 { | 157 { |
| 158 DebugScopedSetImplThread impl; | 158 DebugScopedSetImplThread impl; |
| 159 m_layerTreeHost->deleteContentsTexturesOnImplThread(m_layerTreeHostImpl-
>resourceProvider()); | 159 if (!m_layerTreeHostImpl->contentsTexturesPurged()) |
| 160 m_layerTreeHost->deleteContentsTexturesOnImplThread(m_layerTreeHostI
mpl->resourceProvider()); |
| 160 initialized = m_layerTreeHostImpl->initializeLayerRenderer(context.relea
se(), UnthrottledUploader); | 161 initialized = m_layerTreeHostImpl->initializeLayerRenderer(context.relea
se(), UnthrottledUploader); |
| 161 if (initialized) { | 162 if (initialized) { |
| 162 m_layerRendererCapabilitiesForMainThread = m_layerTreeHostImpl->laye
rRendererCapabilities(); | 163 m_layerRendererCapabilitiesForMainThread = m_layerTreeHostImpl->laye
rRendererCapabilities(); |
| 163 } | 164 } |
| 164 } | 165 } |
| 165 | 166 |
| 166 if (initialized) | 167 if (initialized) |
| 167 m_contextLost = false; | 168 m_contextLost = false; |
| 168 | 169 |
| 169 return initialized; | 170 return initialized; |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 350 | 351 |
| 351 void CCSingleThreadProxy::didSwapFrame() | 352 void CCSingleThreadProxy::didSwapFrame() |
| 352 { | 353 { |
| 353 if (m_nextFrameIsNewlyCommittedFrame) { | 354 if (m_nextFrameIsNewlyCommittedFrame) { |
| 354 m_nextFrameIsNewlyCommittedFrame = false; | 355 m_nextFrameIsNewlyCommittedFrame = false; |
| 355 m_layerTreeHost->didCommitAndDrawFrame(); | 356 m_layerTreeHost->didCommitAndDrawFrame(); |
| 356 } | 357 } |
| 357 } | 358 } |
| 358 | 359 |
| 359 } | 360 } |
| OLD | NEW |