| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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_factory_impl
.h" | 5 #include "content/browser/android/in_process/synchronous_compositor_factory_impl
.h" |
| 6 | 6 |
| 7 #include "base/observer_list.h" | 7 #include "base/observer_list.h" |
| 8 #include "content/browser/android/in_process/synchronous_compositor_external_beg
in_frame_source.h" |
| 8 #include "content/browser/android/in_process/synchronous_compositor_output_surfa
ce.h" | 9 #include "content/browser/android/in_process/synchronous_compositor_output_surfa
ce.h" |
| 9 #include "content/public/browser/browser_thread.h" | 10 #include "content/public/browser/browser_thread.h" |
| 10 #include "content/renderer/gpu/frame_swap_message_queue.h" | 11 #include "content/renderer/gpu/frame_swap_message_queue.h" |
| 11 #include "gpu/command_buffer/client/gl_in_process_context.h" | 12 #include "gpu/command_buffer/client/gl_in_process_context.h" |
| 12 #include "gpu/command_buffer/common/gles2_cmd_utils.h" | 13 #include "gpu/command_buffer/common/gles2_cmd_utils.h" |
| 13 #include "ui/gl/android/surface_texture.h" | 14 #include "ui/gl/android/surface_texture.h" |
| 14 #include "ui/gl/gl_surface.h" | 15 #include "ui/gl/gl_surface.h" |
| 15 #include "ui/gl/gl_surface_stub.h" | 16 #include "ui/gl/gl_surface_stub.h" |
| 16 #include "webkit/common/gpu/context_provider_in_process.h" | 17 #include "webkit/common/gpu/context_provider_in_process.h" |
| 17 #include "webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.
h" | 18 #include "webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.
h" |
| (...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 182 new SynchronousCompositorOutputSurface(routing_id, | 183 new SynchronousCompositorOutputSurface(routing_id, |
| 183 frame_swap_message_queue)); | 184 frame_swap_message_queue)); |
| 184 return output_surface.Pass(); | 185 return output_surface.Pass(); |
| 185 } | 186 } |
| 186 | 187 |
| 187 InputHandlerManagerClient* | 188 InputHandlerManagerClient* |
| 188 SynchronousCompositorFactoryImpl::GetInputHandlerManagerClient() { | 189 SynchronousCompositorFactoryImpl::GetInputHandlerManagerClient() { |
| 189 return synchronous_input_event_filter(); | 190 return synchronous_input_event_filter(); |
| 190 } | 191 } |
| 191 | 192 |
| 193 scoped_ptr<cc::BeginFrameSource> |
| 194 SynchronousCompositorFactoryImpl::CreateExternalBeginFrameSource( |
| 195 int routing_id) { |
| 196 return make_scoped_ptr( |
| 197 new SynchronousCompositorExternalBeginFrameSource(routing_id)); |
| 198 } |
| 199 |
| 192 scoped_refptr<ContextProviderWebContext> | 200 scoped_refptr<ContextProviderWebContext> |
| 193 SynchronousCompositorFactoryImpl::CreateOffscreenContextProvider( | 201 SynchronousCompositorFactoryImpl::CreateOffscreenContextProvider( |
| 194 const blink::WebGraphicsContext3D::Attributes& attributes, | 202 const blink::WebGraphicsContext3D::Attributes& attributes, |
| 195 const std::string& debug_name) { | 203 const std::string& debug_name) { |
| 196 scoped_ptr<gpu::GLInProcessContext> context = | 204 scoped_ptr<gpu::GLInProcessContext> context = |
| 197 CreateOffscreenContext(attributes); | 205 CreateOffscreenContext(attributes); |
| 198 return webkit::gpu::ContextProviderInProcess::Create( | 206 return webkit::gpu::ContextProviderInProcess::Create( |
| 199 WrapContext(context.Pass()), debug_name); | 207 WrapContext(context.Pass()), debug_name); |
| 200 } | 208 } |
| 201 | 209 |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 289 DCHECK(!service_.get()); | 297 DCHECK(!service_.get()); |
| 290 service_ = service; | 298 service_ = service; |
| 291 } | 299 } |
| 292 | 300 |
| 293 void SynchronousCompositorFactoryImpl::SetRecordFullDocument( | 301 void SynchronousCompositorFactoryImpl::SetRecordFullDocument( |
| 294 bool record_full_document) { | 302 bool record_full_document) { |
| 295 record_full_layer_ = record_full_document; | 303 record_full_layer_ = record_full_document; |
| 296 } | 304 } |
| 297 | 305 |
| 298 } // namespace content | 306 } // namespace content |
| OLD | NEW |