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

Side by Side Diff: cc/single_thread_proxy.cc

Issue 11280268: Merge 170403 - Use a lock to deal with concurrent access to the m_evictedBackings (Closed) Base URL: svn://svn.chromium.org/chrome/branches/1312/src
Patch Set: Created 8 years 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 | Annotate | Revision Log
« no previous file with comments | « cc/prioritized_texture_unittest.cc ('k') | cc/thread_proxy.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "config.h" 5 #include "config.h"
6 6
7 #include "cc/single_thread_proxy.h" 7 #include "cc/single_thread_proxy.h"
8 8
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "cc/draw_quad.h" 10 #include "cc/draw_quad.h"
(...skipping 320 matching lines...) Expand 10 before | Expand all | Expand 10 after
331 } 331 }
332 332
333 bool SingleThreadProxy::commitAndComposite() 333 bool SingleThreadProxy::commitAndComposite()
334 { 334 {
335 DCHECK(Proxy::isMainThread()); 335 DCHECK(Proxy::isMainThread());
336 336
337 if (!m_layerTreeHost->initializeRendererIfNeeded()) 337 if (!m_layerTreeHost->initializeRendererIfNeeded())
338 return false; 338 return false;
339 339
340 // Unlink any texture backings that were deleted 340 // Unlink any texture backings that were deleted
341 PrioritizedTextureManager::BackingList evictedContentsTexturesBackings; 341 m_layerTreeHost->contentsTextureManager()->unlinkAndClearEvictedBackings();
342 {
343 DebugScopedSetImplThread implThread;
344 m_layerTreeHost->contentsTextureManager()->getEvictedBackings(evictedCon tentsTexturesBackings);
345 }
346 m_layerTreeHost->contentsTextureManager()->unlinkEvictedBackings(evictedCont entsTexturesBackings);
347 342
348 scoped_ptr<ResourceUpdateQueue> queue = make_scoped_ptr(new ResourceUpdateQu eue); 343 scoped_ptr<ResourceUpdateQueue> queue = make_scoped_ptr(new ResourceUpdateQu eue);
349 m_layerTreeHost->updateLayers(*(queue.get()), m_layerTreeHostImpl->memoryAll ocationLimitBytes()); 344 m_layerTreeHost->updateLayers(*(queue.get()), m_layerTreeHostImpl->memoryAll ocationLimitBytes());
350 345
351 if (m_layerTreeHostImpl->contentsTexturesPurged()) 346 if (m_layerTreeHostImpl->contentsTexturesPurged())
352 m_layerTreeHostImpl->resetContentsTexturesPurged(); 347 m_layerTreeHostImpl->resetContentsTexturesPurged();
353 348
354 m_layerTreeHost->willCommit(); 349 m_layerTreeHost->willCommit();
355 doCommit(queue.Pass()); 350 doCommit(queue.Pass());
356 bool result = doComposite(); 351 bool result = doComposite();
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 387
393 void SingleThreadProxy::didSwapFrame() 388 void SingleThreadProxy::didSwapFrame()
394 { 389 {
395 if (m_nextFrameIsNewlyCommittedFrame) { 390 if (m_nextFrameIsNewlyCommittedFrame) {
396 m_nextFrameIsNewlyCommittedFrame = false; 391 m_nextFrameIsNewlyCommittedFrame = false;
397 m_layerTreeHost->didCommitAndDrawFrame(); 392 m_layerTreeHost->didCommitAndDrawFrame();
398 } 393 }
399 } 394 }
400 395
401 } 396 }
OLDNEW
« no previous file with comments | « cc/prioritized_texture_unittest.cc ('k') | cc/thread_proxy.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698