| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 TRACE_EVENT("CCSingleThreadProxy::~CCSingleThreadProxy", this, 0); | 65 TRACE_EVENT("CCSingleThreadProxy::~CCSingleThreadProxy", this, 0); |
| 66 ASSERT(CCProxy::isMainThread()); | 66 ASSERT(CCProxy::isMainThread()); |
| 67 ASSERT(!m_layerTreeHostImpl && !m_layerTreeHost); // make sure stop() got ca
lled. | 67 ASSERT(!m_layerTreeHostImpl && !m_layerTreeHost); // make sure stop() got ca
lled. |
| 68 } | 68 } |
| 69 | 69 |
| 70 bool CCSingleThreadProxy::compositeAndReadback(void *pixels, const IntRect& rect
) | 70 bool CCSingleThreadProxy::compositeAndReadback(void *pixels, const IntRect& rect
) |
| 71 { | 71 { |
| 72 TRACE_EVENT("CCSingleThreadProxy::compositeAndReadback", this, 0); | 72 TRACE_EVENT("CCSingleThreadProxy::compositeAndReadback", this, 0); |
| 73 ASSERT(CCProxy::isMainThread()); | 73 ASSERT(CCProxy::isMainThread()); |
| 74 | 74 |
| 75 ScopedEnsureFramebufferAllocation ensureFramebuffer(m_layerTreeHostImpl->lay
erRenderer()); | |
| 76 | |
| 77 if (!commitIfNeeded()) | 75 if (!commitIfNeeded()) |
| 78 return false; | 76 return false; |
| 79 | 77 |
| 80 if (!doComposite()) | 78 if (!doComposite()) |
| 81 return false; | 79 return false; |
| 82 | 80 |
| 83 m_layerTreeHostImpl->readback(pixels, rect); | 81 m_layerTreeHostImpl->readback(pixels, rect); |
| 84 | 82 |
| 85 if (m_layerTreeHostImpl->isContextLost()) | 83 if (m_layerTreeHostImpl->isContextLost()) |
| 86 return false; | 84 return false; |
| (...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 321 | 319 |
| 322 void CCSingleThreadProxy::didSwapFrame() | 320 void CCSingleThreadProxy::didSwapFrame() |
| 323 { | 321 { |
| 324 if (m_nextFrameIsNewlyCommittedFrame) { | 322 if (m_nextFrameIsNewlyCommittedFrame) { |
| 325 m_nextFrameIsNewlyCommittedFrame = false; | 323 m_nextFrameIsNewlyCommittedFrame = false; |
| 326 m_layerTreeHost->didCommitAndDrawFrame(); | 324 m_layerTreeHost->didCommitAndDrawFrame(); |
| 327 } | 325 } |
| 328 } | 326 } |
| 329 | 327 |
| 330 } | 328 } |
| OLD | NEW |