OLD | NEW |
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/bind.h" | 7 #include "base/bind.h" |
8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
9 #include "cc/delay_based_time_source.h" | 9 #include "cc/delay_based_time_source.h" |
10 #include "cc/draw_quad.h" | 10 #include "cc/draw_quad.h" |
(...skipping 234 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
245 } | 245 } |
246 | 246 |
247 void ThreadProxy::renderingStats(RenderingStats* stats) | 247 void ThreadProxy::renderingStats(RenderingStats* stats) |
248 { | 248 { |
249 DCHECK(isMainThread()); | 249 DCHECK(isMainThread()); |
250 | 250 |
251 DebugScopedSetMainThreadBlocked mainThreadBlocked(this); | 251 DebugScopedSetMainThreadBlocked mainThreadBlocked(this); |
252 CompletionEvent completion; | 252 CompletionEvent completion; |
253 Proxy::implThread()->postTask(base::Bind(&ThreadProxy::renderingStatsOnImplT
hread, | 253 Proxy::implThread()->postTask(base::Bind(&ThreadProxy::renderingStatsOnImplT
hread, |
254 m_implThreadWeakPtr, &completion,
stats)); | 254 m_implThreadWeakPtr, &completion,
stats)); |
255 stats->totalCommitTimeInSeconds = m_totalCommitTime.InSecondsF(); | 255 stats->totalCommitTime = m_totalCommitTime; |
256 stats->totalCommitCount = m_totalCommitCount; | 256 stats->totalCommitCount = m_totalCommitCount; |
257 | 257 |
258 completion.wait(); | 258 completion.wait(); |
259 } | 259 } |
260 | 260 |
261 const RendererCapabilities& ThreadProxy::rendererCapabilities() const | 261 const RendererCapabilities& ThreadProxy::rendererCapabilities() const |
262 { | 262 { |
263 DCHECK(m_rendererInitialized); | 263 DCHECK(m_rendererInitialized); |
264 return m_RendererCapabilitiesMainThreadCopy; | 264 return m_RendererCapabilitiesMainThreadCopy; |
265 } | 265 } |
(...skipping 776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1042 } | 1042 } |
1043 | 1043 |
1044 void ThreadProxy::capturePictureOnImplThread(CompletionEvent* completion, skia::
RefPtr<SkPicture>* picture) | 1044 void ThreadProxy::capturePictureOnImplThread(CompletionEvent* completion, skia::
RefPtr<SkPicture>* picture) |
1045 { | 1045 { |
1046 DCHECK(isImplThread()); | 1046 DCHECK(isImplThread()); |
1047 *picture = m_layerTreeHostImpl->capturePicture(); | 1047 *picture = m_layerTreeHostImpl->capturePicture(); |
1048 completion->signal(); | 1048 completion->signal(); |
1049 } | 1049 } |
1050 | 1050 |
1051 } // namespace cc | 1051 } // namespace cc |
OLD | NEW |