| 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/single_thread_proxy.h" | 5 #include "cc/single_thread_proxy.h" |
| 6 | 6 |
| 7 #include "base/auto_reset.h" | 7 #include "base/auto_reset.h" |
| 8 #include "base/debug/trace_event.h" | 8 #include "base/debug/trace_event.h" |
| 9 #include "cc/context_provider.h" | 9 #include "cc/context_provider.h" |
| 10 #include "cc/draw_quad.h" | 10 #include "cc/draw_quad.h" |
| (...skipping 361 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 372 | 372 |
| 373 void SingleThreadProxy::forceSerializeOnSwapBuffers() | 373 void SingleThreadProxy::forceSerializeOnSwapBuffers() |
| 374 { | 374 { |
| 375 { | 375 { |
| 376 DebugScopedSetImplThread impl(this); | 376 DebugScopedSetImplThread impl(this); |
| 377 if (m_rendererInitialized) | 377 if (m_rendererInitialized) |
| 378 m_layerTreeHostImpl->renderer()->doNoOp(); | 378 m_layerTreeHostImpl->renderer()->doNoOp(); |
| 379 } | 379 } |
| 380 } | 380 } |
| 381 | 381 |
| 382 void SingleThreadProxy::onSwapBuffersCompleteOnImplThread() | |
| 383 { | |
| 384 NOTREACHED(); | |
| 385 } | |
| 386 | |
| 387 bool SingleThreadProxy::commitAndComposite() | 382 bool SingleThreadProxy::commitAndComposite() |
| 388 { | 383 { |
| 389 DCHECK(Proxy::isMainThread()); | 384 DCHECK(Proxy::isMainThread()); |
| 390 | 385 |
| 391 if (!m_layerTreeHost->initializeRendererIfNeeded()) | 386 if (!m_layerTreeHost->initializeRendererIfNeeded()) |
| 392 return false; | 387 return false; |
| 393 | 388 |
| 394 scoped_refptr<cc::ContextProvider> offscreenContextProvider; | 389 scoped_refptr<cc::ContextProvider> offscreenContextProvider; |
| 395 if (m_RendererCapabilitiesForMainThread.usingOffscreenContext3d && m_layerTr
eeHost->needsOffscreenContext()) { | 390 if (m_RendererCapabilitiesForMainThread.usingOffscreenContext3d && m_layerTr
eeHost->needsOffscreenContext()) { |
| 396 offscreenContextProvider = m_layerTreeHost->client()->OffscreenContextPr
oviderForMainThread(); | 391 offscreenContextProvider = m_layerTreeHost->client()->OffscreenContextPr
oviderForMainThread(); |
| (...skipping 68 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 465 } | 460 } |
| 466 | 461 |
| 467 skia::RefPtr<SkPicture> SingleThreadProxy::capturePicture() | 462 skia::RefPtr<SkPicture> SingleThreadProxy::capturePicture() |
| 468 { | 463 { |
| 469 // Requires impl-side painting, which is only supported in threaded composit
ing. | 464 // Requires impl-side painting, which is only supported in threaded composit
ing. |
| 470 NOTREACHED(); | 465 NOTREACHED(); |
| 471 return skia::RefPtr<SkPicture>(); | 466 return skia::RefPtr<SkPicture>(); |
| 472 } | 467 } |
| 473 | 468 |
| 474 } // namespace cc | 469 } // namespace cc |
| OLD | NEW |