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 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 } | 245 } |
246 | 246 |
247 void CCSingleThreadProxy::setNeedsCommit() | 247 void CCSingleThreadProxy::setNeedsCommit() |
248 { | 248 { |
249 ASSERT(CCProxy::isMainThread()); | 249 ASSERT(CCProxy::isMainThread()); |
250 m_layerTreeHost->scheduleComposite(); | 250 m_layerTreeHost->scheduleComposite(); |
251 } | 251 } |
252 | 252 |
253 void CCSingleThreadProxy::setNeedsForcedCommit() | 253 void CCSingleThreadProxy::setNeedsForcedCommit() |
254 { | 254 { |
255 // Do the commit right here. Simply scheduling a commit won't | 255 // This proxy doesn't block commits when not visible so use a normal commit. |
256 // work if we're not visible. | 256 setNeedsCommit(); |
257 commitAndComposite(); | |
258 } | 257 } |
259 | 258 |
260 void CCSingleThreadProxy::setNeedsRedraw() | 259 void CCSingleThreadProxy::setNeedsRedraw() |
261 { | 260 { |
262 // FIXME: Once we move render_widget scheduling into this class, we can | 261 // FIXME: Once we move render_widget scheduling into this class, we can |
263 // treat redraw requests more efficiently than commitAndRedraw requests. | 262 // treat redraw requests more efficiently than commitAndRedraw requests. |
264 m_layerTreeHostImpl->setFullRootLayerDamage(); | 263 m_layerTreeHostImpl->setFullRootLayerDamage(); |
265 setNeedsCommit(); | 264 setNeedsCommit(); |
266 } | 265 } |
267 | 266 |
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
376 | 375 |
377 void CCSingleThreadProxy::didSwapFrame() | 376 void CCSingleThreadProxy::didSwapFrame() |
378 { | 377 { |
379 if (m_nextFrameIsNewlyCommittedFrame) { | 378 if (m_nextFrameIsNewlyCommittedFrame) { |
380 m_nextFrameIsNewlyCommittedFrame = false; | 379 m_nextFrameIsNewlyCommittedFrame = false; |
381 m_layerTreeHost->didCommitAndDrawFrame(); | 380 m_layerTreeHost->didCommitAndDrawFrame(); |
382 } | 381 } |
383 } | 382 } |
384 | 383 |
385 } | 384 } |
OLD | NEW |