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

Side by Side Diff: cc/thread_proxy.cc

Issue 12252058: Add a |scope| argument to TRACE_EVENT_INSTANT* and require its presence. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Use flags to record scope Created 7 years, 10 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 "cc/thread_proxy.h" 5 #include "cc/thread_proxy.h"
6 6
7 #include "base/auto_reset.h" 7 #include "base/auto_reset.h"
8 #include "base/bind.h" 8 #include "base/bind.h"
9 #include "base/debug/trace_event.h" 9 #include "base/debug/trace_event.h"
10 #include "cc/delay_based_time_source.h" 10 #include "cc/delay_based_time_source.h"
(...skipping 742 matching lines...) Expand 10 before | Expand all | Expand 10 after
753 m_layerTreeHost->beginCommitOnImplThread(m_layerTreeHostImpl.get()); 753 m_layerTreeHost->beginCommitOnImplThread(m_layerTreeHostImpl.get());
754 m_layerTreeHost->finishCommitOnImplThread(m_layerTreeHostImpl.get()); 754 m_layerTreeHost->finishCommitOnImplThread(m_layerTreeHostImpl.get());
755 m_layerTreeHostImpl->commitComplete(); 755 m_layerTreeHostImpl->commitComplete();
756 756
757 m_nextFrameIsNewlyCommittedFrameOnImplThread = true; 757 m_nextFrameIsNewlyCommittedFrameOnImplThread = true;
758 758
759 if (m_layerTreeHost->settings().implSidePainting && m_layerTreeHost->blocksP endingCommit()) 759 if (m_layerTreeHost->settings().implSidePainting && m_layerTreeHost->blocksP endingCommit())
760 { 760 {
761 // For some layer types in impl-side painting, the commit is held until 761 // For some layer types in impl-side painting, the commit is held until
762 // the pending tree is activated. 762 // the pending tree is activated.
763 TRACE_EVENT_INSTANT0("cc", "HoldCommit"); 763 TRACE_EVENT_INSTANT0("cc", "HoldCommit", TRACE_EVENT_SCOPE_THREAD);
764 m_completionEventForCommitHeldOnTreeActivation = m_commitCompletionEvent OnImplThread; 764 m_completionEventForCommitHeldOnTreeActivation = m_commitCompletionEvent OnImplThread;
765 m_commitCompletionEventOnImplThread = 0; 765 m_commitCompletionEventOnImplThread = 0;
766 } 766 }
767 else 767 else
768 { 768 {
769 m_commitCompletionEventOnImplThread->signal(); 769 m_commitCompletionEventOnImplThread->signal();
770 m_commitCompletionEventOnImplThread = 0; 770 m_commitCompletionEventOnImplThread = 0;
771 } 771 }
772 772
773 // SetVisible kicks off the next scheduler action, so this must be last. 773 // SetVisible kicks off the next scheduler action, so this must be last.
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after
835 bool drawFrame = m_layerTreeHostImpl->canDraw() && (m_layerTreeHostImpl->pre pareToDraw(frame) || forcedDraw); 835 bool drawFrame = m_layerTreeHostImpl->canDraw() && (m_layerTreeHostImpl->pre pareToDraw(frame) || forcedDraw);
836 if (drawFrame) { 836 if (drawFrame) {
837 m_layerTreeHostImpl->drawLayers(frame); 837 m_layerTreeHostImpl->drawLayers(frame);
838 result.didDraw = true; 838 result.didDraw = true;
839 } 839 }
840 m_layerTreeHostImpl->didDrawAllLayers(frame); 840 m_layerTreeHostImpl->didDrawAllLayers(frame);
841 841
842 // Check for tree activation. 842 // Check for tree activation.
843 if (m_completionEventForCommitHeldOnTreeActivation && !m_layerTreeHostImpl-> pendingTree()) 843 if (m_completionEventForCommitHeldOnTreeActivation && !m_layerTreeHostImpl-> pendingTree())
844 { 844 {
845 TRACE_EVENT_INSTANT0("cc", "ReleaseCommitbyActivation"); 845 TRACE_EVENT_INSTANT0("cc", "ReleaseCommitbyActivation",
846 TRACE_EVENT_SCOPE_THREAD);
846 DCHECK(m_layerTreeHostImpl->settings().implSidePainting); 847 DCHECK(m_layerTreeHostImpl->settings().implSidePainting);
847 m_completionEventForCommitHeldOnTreeActivation->signal(); 848 m_completionEventForCommitHeldOnTreeActivation->signal();
848 m_completionEventForCommitHeldOnTreeActivation = 0; 849 m_completionEventForCommitHeldOnTreeActivation = 0;
849 } 850 }
850 851
851 // Check for a pending compositeAndReadback. 852 // Check for a pending compositeAndReadback.
852 if (m_readbackRequestOnImplThread) { 853 if (m_readbackRequestOnImplThread) {
853 m_readbackRequestOnImplThread->success = false; 854 m_readbackRequestOnImplThread->success = false;
854 if (drawFrame) { 855 if (drawFrame) {
855 m_layerTreeHostImpl->readback(m_readbackRequestOnImplThread->pixels, m_readbackRequestOnImplThread->rect); 856 m_layerTreeHostImpl->readback(m_readbackRequestOnImplThread->pixels, m_readbackRequestOnImplThread->rect);
(...skipping 356 matching lines...) Expand 10 before | Expand all | Expand 10 after
1212 1213
1213 void ThreadProxy::renewTreePriorityOnImplThread() 1214 void ThreadProxy::renewTreePriorityOnImplThread()
1214 { 1215 {
1215 DCHECK(m_renewTreePriorityOnImplThreadPending); 1216 DCHECK(m_renewTreePriorityOnImplThreadPending);
1216 m_renewTreePriorityOnImplThreadPending = false; 1217 m_renewTreePriorityOnImplThreadPending = false;
1217 1218
1218 renewTreePriority(); 1219 renewTreePriority();
1219 } 1220 }
1220 1221
1221 } // namespace cc 1222 } // namespace cc
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698