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

Side by Side Diff: cc/CCThreadProxy.cpp

Issue 10916279: Chromium compositor change implementing page-scale driven pinch-zoom. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src/
Patch Set: Reduce number of prepared tiles and correct existing tests. Created 8 years, 3 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 | Annotate | Revision Log
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 "CCThreadProxy.h" 7 #include "CCThreadProxy.h"
8 8
9 #include "CCDelayBasedTimeSource.h" 9 #include "CCDelayBasedTimeSource.h"
10 #include "CCDrawQuad.h" 10 #include "CCDrawQuad.h"
(...skipping 449 matching lines...) Expand 10 before | Expand all | Expand 10 after
460 setNeedsForcedCommitOnImplThread(); 460 setNeedsForcedCommitOnImplThread();
461 } 461 }
462 462
463 void CCThreadProxy::scheduledActionBeginFrame() 463 void CCThreadProxy::scheduledActionBeginFrame()
464 { 464 {
465 TRACE_EVENT0("cc", "CCThreadProxy::scheduledActionBeginFrame"); 465 TRACE_EVENT0("cc", "CCThreadProxy::scheduledActionBeginFrame");
466 ASSERT(!m_pendingBeginFrameRequest); 466 ASSERT(!m_pendingBeginFrameRequest);
467 m_pendingBeginFrameRequest = adoptPtr(new BeginFrameAndCommitState()); 467 m_pendingBeginFrameRequest = adoptPtr(new BeginFrameAndCommitState());
468 m_pendingBeginFrameRequest->monotonicFrameBeginTime = monotonicallyIncreasin gTime(); 468 m_pendingBeginFrameRequest->monotonicFrameBeginTime = monotonicallyIncreasin gTime();
469 m_pendingBeginFrameRequest->scrollInfo = m_layerTreeHostImpl->processScrollD eltas(); 469 m_pendingBeginFrameRequest->scrollInfo = m_layerTreeHostImpl->processScrollD eltas();
470 m_pendingBeginFrameRequest->implTransform = m_layerTreeHostImpl->implTransfo rm();
Jeff Timanus 2012/09/21 18:10:01 I pass the impl-transform from the pinch state to
470 m_pendingBeginFrameRequest->memoryAllocationLimitBytes = m_layerTreeHostImpl ->memoryAllocationLimitBytes(); 471 m_pendingBeginFrameRequest->memoryAllocationLimitBytes = m_layerTreeHostImpl ->memoryAllocationLimitBytes();
471 m_layerTreeHost->getEvictedContentTexturesBackings(m_pendingBeginFrameReques t->evictedContentsTexturesBackings); 472 m_layerTreeHost->getEvictedContentTexturesBackings(m_pendingBeginFrameReques t->evictedContentsTexturesBackings);
472 473
473 m_mainThreadProxy->postTask(createCCThreadTask(this, &CCThreadProxy::beginFr ame)); 474 m_mainThreadProxy->postTask(createCCThreadTask(this, &CCThreadProxy::beginFr ame));
474 475
475 if (m_beginFrameCompletionEventOnImplThread) { 476 if (m_beginFrameCompletionEventOnImplThread) {
476 m_beginFrameCompletionEventOnImplThread->signal(); 477 m_beginFrameCompletionEventOnImplThread->signal();
477 m_beginFrameCompletionEventOnImplThread = 0; 478 m_beginFrameCompletionEventOnImplThread = 0;
478 } 479 }
479 } 480 }
(...skipping 24 matching lines...) Expand all
504 m_commitRequestSentToImplThread = true; 505 m_commitRequestSentToImplThread = true;
505 506
506 // On the other hand, the animationRequested flag needs to be cleared 507 // On the other hand, the animationRequested flag needs to be cleared
507 // here so that any animation requests generated by the apply or animate 508 // here so that any animation requests generated by the apply or animate
508 // callbacks will trigger another frame. 509 // callbacks will trigger another frame.
509 m_animateRequested = false; 510 m_animateRequested = false;
510 511
511 // FIXME: technically, scroll deltas need to be applied for dropped commits as well. 512 // FIXME: technically, scroll deltas need to be applied for dropped commits as well.
512 // Re-do the commit flow so that we don't send the scrollInfo on the BFAC me ssage. 513 // Re-do the commit flow so that we don't send the scrollInfo on the BFAC me ssage.
513 m_layerTreeHost->applyScrollAndScale(*request->scrollInfo); 514 m_layerTreeHost->applyScrollAndScale(*request->scrollInfo);
515 m_layerTreeHost->setImplTransform(request->implTransform);
514 516
515 if (!m_inCompositeAndReadback && !m_layerTreeHost->visible()) { 517 if (!m_inCompositeAndReadback && !m_layerTreeHost->visible()) {
516 m_commitRequested = false; 518 m_commitRequested = false;
517 m_commitRequestSentToImplThread = false; 519 m_commitRequestSentToImplThread = false;
518 m_forcedCommitRequested = false; 520 m_forcedCommitRequested = false;
519 521
520 TRACE_EVENT0("cc", "EarlyOut_NotVisible"); 522 TRACE_EVENT0("cc", "EarlyOut_NotVisible");
521 CCProxy::implThread()->postTask(createCCThreadTask(this, &CCThreadProxy: :beginFrameAbortedOnImplThread)); 523 CCProxy::implThread()->postTask(createCCThreadTask(this, &CCThreadProxy: :beginFrameAbortedOnImplThread));
522 return; 524 return;
523 } 525 }
(...skipping 406 matching lines...) Expand 10 before | Expand all | Expand 10 after
930 } 932 }
931 933
932 void CCThreadProxy::implSideRenderingStatsOnImplThread(CCCompletionEvent* comple tion, CCRenderingStats* stats) 934 void CCThreadProxy::implSideRenderingStatsOnImplThread(CCCompletionEvent* comple tion, CCRenderingStats* stats)
933 { 935 {
934 ASSERT(isImplThread()); 936 ASSERT(isImplThread());
935 m_layerTreeHostImpl->renderingStats(*stats); 937 m_layerTreeHostImpl->renderingStats(*stats);
936 completion->signal(); 938 completion->signal();
937 } 939 }
938 940
939 } // namespace cc 941 } // namespace cc
OLDNEW
« cc/CCSettings.cpp ('K') | « cc/CCThreadProxy.h ('k') | cc/LayerChromium.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698