| 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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 | 92 // static |
| 93 void SynchronousCompositor::DisableRecordFullLayer() { | 93 void SynchronousCompositor::SetRecordFullDocument(bool record_full_document) { |
| 94 g_factory.Get().DisableRecordFullLayer(); | 94 g_factory.Get().SetRecordFullDocument(record_full_document); |
| 95 } | 95 } |
| 96 | 96 |
| 97 bool SynchronousCompositorImpl::InitializeHwDraw() { | 97 bool SynchronousCompositorImpl::InitializeHwDraw() { |
| 98 DCHECK(CalledOnValidThread()); | 98 DCHECK(CalledOnValidThread()); |
| 99 DCHECK(output_surface_); | 99 DCHECK(output_surface_); |
| 100 | 100 |
| 101 scoped_refptr<cc::ContextProvider> onscreen_context = | 101 scoped_refptr<cc::ContextProvider> onscreen_context = |
| 102 g_factory.Get().CreateOnscreenContextProviderForCompositorThread(); | 102 g_factory.Get().CreateOnscreenContextProviderForCompositorThread(); |
| 103 | 103 |
| 104 bool success = output_surface_->InitializeHwDraw(onscreen_context); | 104 bool success = output_surface_->InitializeHwDraw(onscreen_context); |
| (...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 g_factory.Get(); // Ensure it's initialized. | 289 g_factory.Get(); // Ensure it's initialized. |
| 290 SynchronousCompositorImpl::CreateForWebContents(contents); | 290 SynchronousCompositorImpl::CreateForWebContents(contents); |
| 291 } | 291 } |
| 292 if (SynchronousCompositorImpl* instance = | 292 if (SynchronousCompositorImpl* instance = |
| 293 SynchronousCompositorImpl::FromWebContents(contents)) { | 293 SynchronousCompositorImpl::FromWebContents(contents)) { |
| 294 instance->SetClient(client); | 294 instance->SetClient(client); |
| 295 } | 295 } |
| 296 } | 296 } |
| 297 | 297 |
| 298 } // namespace content | 298 } // namespace content |
| OLD | NEW |