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

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

Issue 10702135: Merge 120858 - [chromium] Separate LayerRenderer initialization from updateLayers (Closed) Base URL: http://svn.webkit.org/repository/webkit/branches/chromium/1180/
Patch Set: Created 8 years, 5 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 326 matching lines...) Expand 10 before | Expand all | Expand 10 after
337 DebugScopedSetImplThread impl; 337 DebugScopedSetImplThread impl;
338 if (m_layerRendererInitialized) 338 if (m_layerRendererInitialized)
339 m_layerTreeHostImpl->layerRenderer()->doNoOp(); 339 m_layerTreeHostImpl->layerRenderer()->doNoOp();
340 } 340 }
341 } 341 }
342 342
343 bool CCSingleThreadProxy::commitAndComposite() 343 bool CCSingleThreadProxy::commitAndComposite()
344 { 344 {
345 ASSERT(CCProxy::isMainThread()); 345 ASSERT(CCProxy::isMainThread());
346 346
347 if (!m_layerTreeHost->initializeLayerRendererIfNeeded())
348 return false;
349
347 CCTextureUpdater updater; 350 CCTextureUpdater updater;
348 351 m_layerTreeHost->updateLayers(updater);
349 if (!m_layerTreeHost->updateLayers(updater))
350 return false;
351 352
352 m_layerTreeHost->willCommit(); 353 m_layerTreeHost->willCommit();
353 doCommit(updater); 354 doCommit(updater);
354 bool result = doComposite(); 355 bool result = doComposite();
355 m_layerTreeHost->didBeginFrame(); 356 m_layerTreeHost->didBeginFrame();
356 return result; 357 return result;
357 } 358 }
358 359
359 bool CCSingleThreadProxy::doComposite() 360 bool CCSingleThreadProxy::doComposite()
360 { 361 {
(...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after
392 393
393 void CCSingleThreadProxy::didSwapFrame() 394 void CCSingleThreadProxy::didSwapFrame()
394 { 395 {
395 if (m_nextFrameIsNewlyCommittedFrame) { 396 if (m_nextFrameIsNewlyCommittedFrame) {
396 m_nextFrameIsNewlyCommittedFrame = false; 397 m_nextFrameIsNewlyCommittedFrame = false;
397 m_layerTreeHost->didCommitAndDrawFrame(); 398 m_layerTreeHost->didCommitAndDrawFrame();
398 } 399 }
399 } 400 }
400 401
401 } 402 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698