OLD | NEW |
1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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 "content/browser/android/in_process/synchronous_compositor_impl.h" | 5 #include "content/browser/android/in_process/synchronous_compositor_impl.h" |
6 | 6 |
7 #include "base/lazy_instance.h" | 7 #include "base/lazy_instance.h" |
8 #include "base/message_loop/message_loop.h" | 8 #include "base/message_loop/message_loop.h" |
9 #include "cc/input/input_handler.h" | 9 #include "cc/input/input_handler.h" |
10 #include "content/browser/android/in_process/synchronous_compositor_factory_impl
.h" | 10 #include "content/browser/android/in_process/synchronous_compositor_factory_impl
.h" |
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
82 DCHECK(CalledOnValidThread()); | 82 DCHECK(CalledOnValidThread()); |
83 compositor_client_ = compositor_client; | 83 compositor_client_ = compositor_client; |
84 } | 84 } |
85 | 85 |
86 // static | 86 // static |
87 void SynchronousCompositor::SetGpuService( | 87 void SynchronousCompositor::SetGpuService( |
88 scoped_refptr<gpu::InProcessCommandBuffer::Service> service) { | 88 scoped_refptr<gpu::InProcessCommandBuffer::Service> service) { |
89 g_factory.Get().SetDeferredGpuService(service); | 89 g_factory.Get().SetDeferredGpuService(service); |
90 } | 90 } |
91 | 91 |
| 92 // static |
| 93 void SynchronousCompositor::DisableRecordFullLayer() { |
| 94 g_factory.Get().DisableRecordFullLayer(); |
| 95 } |
| 96 |
92 bool SynchronousCompositorImpl::InitializeHwDraw() { | 97 bool SynchronousCompositorImpl::InitializeHwDraw() { |
93 DCHECK(CalledOnValidThread()); | 98 DCHECK(CalledOnValidThread()); |
94 DCHECK(output_surface_); | 99 DCHECK(output_surface_); |
95 | 100 |
96 scoped_refptr<cc::ContextProvider> onscreen_context = | 101 scoped_refptr<cc::ContextProvider> onscreen_context = |
97 g_factory.Get().CreateOnscreenContextProviderForCompositorThread(); | 102 g_factory.Get().CreateOnscreenContextProviderForCompositorThread(); |
98 | 103 |
99 bool success = output_surface_->InitializeHwDraw(onscreen_context); | 104 bool success = output_surface_->InitializeHwDraw(onscreen_context); |
100 | 105 |
101 if (success) | 106 if (success) |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
284 g_factory.Get(); // Ensure it's initialized. | 289 g_factory.Get(); // Ensure it's initialized. |
285 SynchronousCompositorImpl::CreateForWebContents(contents); | 290 SynchronousCompositorImpl::CreateForWebContents(contents); |
286 } | 291 } |
287 if (SynchronousCompositorImpl* instance = | 292 if (SynchronousCompositorImpl* instance = |
288 SynchronousCompositorImpl::FromWebContents(contents)) { | 293 SynchronousCompositorImpl::FromWebContents(contents)) { |
289 instance->SetClient(client); | 294 instance->SetClient(client); |
290 } | 295 } |
291 } | 296 } |
292 | 297 |
293 } // namespace content | 298 } // namespace content |
OLD | NEW |