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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 | 139 |
140 void CCLayerTreeHostImpl::beginCommit() | 140 void CCLayerTreeHostImpl::beginCommit() |
141 { | 141 { |
142 } | 142 } |
143 | 143 |
144 void CCLayerTreeHostImpl::commitComplete() | 144 void CCLayerTreeHostImpl::commitComplete() |
145 { | 145 { |
146 // Recompute max scroll position; must be after layer content bounds are | 146 // Recompute max scroll position; must be after layer content bounds are |
147 // updated. | 147 // updated. |
148 updateMaxScrollPosition(); | 148 updateMaxScrollPosition(); |
149 | |
150 // Ensure all GL calls (including texture deletions) will actually be | |
151 // submitted for execution in the case we didn't call swap buffers. | |
152 if ((!m_visible || !canDraw()) && context()) | |
153 context()->flush(); | |
154 } | 149 } |
155 | 150 |
156 bool CCLayerTreeHostImpl::canDraw() | 151 bool CCLayerTreeHostImpl::canDraw() |
157 { | 152 { |
158 if (!m_rootLayerImpl) | 153 if (!m_rootLayerImpl) |
159 return false; | 154 return false; |
160 if (viewportSize().isEmpty()) | 155 if (viewportSize().isEmpty()) |
161 return false; | 156 return false; |
162 if (!m_layerRenderer) | 157 if (!m_layerRenderer) |
163 return false; | 158 return false; |
(...skipping 748 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
912 return; | 907 return; |
913 | 908 |
914 bool isContinuing = m_activeGestureAnimation->animate(monotonicTime); | 909 bool isContinuing = m_activeGestureAnimation->animate(monotonicTime); |
915 if (isContinuing) | 910 if (isContinuing) |
916 m_client->setNeedsRedrawOnImplThread(); | 911 m_client->setNeedsRedrawOnImplThread(); |
917 else | 912 else |
918 m_activeGestureAnimation.clear(); | 913 m_activeGestureAnimation.clear(); |
919 } | 914 } |
920 | 915 |
921 } // namespace WebCore | 916 } // namespace WebCore |
OLD | NEW |