Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(79)

Side by Side Diff: Source/WebCore/platform/graphics/chromium/cc/CCSingleThreadProxy.cpp

Issue 10836250: Merge 125577 - [chromium] race between CCLayerTreeHostImpl::releaseContentsTextures and CCThreadPro… (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1229/
Patch Set: Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
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 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698