Chromium Code Reviews| Index: cc/trees/single_thread_proxy.cc |
| diff --git a/cc/trees/single_thread_proxy.cc b/cc/trees/single_thread_proxy.cc |
| index dcd4cf679b74500ee3ad7fa901d675f6700de710..eba9eefa82ad970d85a7195a3e5743b779b2eb4d 100644 |
| --- a/cc/trees/single_thread_proxy.cc |
| +++ b/cc/trees/single_thread_proxy.cc |
| @@ -147,11 +147,7 @@ void SingleThreadProxy::CreateAndInitializeOutputSurface() { |
| DCHECK(output_surface); |
| initialized = layer_tree_host_impl_->InitializeRenderer( |
| output_surface.Pass()); |
| - if (initialized) { |
| - renderer_capabilities_for_main_thread_ = |
| - layer_tree_host_impl_->GetRendererCapabilities() |
| - .MainThreadCapabilities(); |
| - } else if (offscreen_context_provider.get()) { |
| + if (!initialized && offscreen_context_provider.get()) { |
| offscreen_context_provider->VerifyContexts(); |
| offscreen_context_provider = NULL; |
| } |
| @@ -174,7 +170,6 @@ void SingleThreadProxy::OnOutputSurfaceInitializeAttempted(bool success) { |
| const RendererCapabilities& SingleThreadProxy::GetRendererCapabilities() const { |
| DCHECK(Proxy::IsMainThread()); |
| - DCHECK(!layer_tree_host_->output_surface_lost()); |
| return renderer_capabilities_for_main_thread_; |
| } |
| @@ -370,6 +365,16 @@ void SingleThreadProxy::SendManagedMemoryStats() { |
| bool SingleThreadProxy::IsInsideDraw() { return inside_draw_; } |
| +void SingleThreadProxy::UpdateRendererCapabilitiesOnImplThread() { |
| + DCHECK(IsImplThread()); |
| + renderer_capabilities_for_main_thread_ = |
| + layer_tree_host_impl_->GetRendererCapabilities().MainThreadCapabilities(); |
| + { |
| + DebugScopedSetMainThread main(this); |
| + layer_tree_host_->RendererCapabilitiesChanged(); |
|
enne (OOO)
2014/02/14 23:57:32
Should this check the previous ones and only call
boliu
2014/02/14 23:59:14
This was explicit choice too. Webview doesn't run
enne (OOO)
2014/02/15 00:00:15
Why don't we want the check?
|
| + } |
| +} |
| + |
| void SingleThreadProxy::DidLoseOutputSurfaceOnImplThread() { |
| TRACE_EVENT0("cc", "SingleThreadProxy::DidLoseOutputSurfaceOnImplThread"); |
| // Cause a commit so we can notice the lost context. |