| 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 "mojo/aura/context_factory_mojo.h" | 5 #include "mojo/aura/context_factory_mojo.h" |
| 6 | 6 |
| 7 #include "cc/output/output_surface.h" | 7 #include "cc/output/output_surface.h" |
| 8 #include "mojo/aura/window_tree_host_mojo.h" | 8 #include "mojo/aura/window_tree_host_mojo.h" |
| 9 #include "mojo/cc/context_provider_mojo.h" | 9 #include "mojo/cc/context_provider_mojo.h" |
| 10 #include "ui/compositor/reflector.h" | 10 #include "ui/compositor/reflector.h" |
| 11 #include "ui/gl/gl_implementation.h" | 11 #include "ui/gl/gl_implementation.h" |
| 12 #include "ui/gl/gl_surface.h" | 12 #include "ui/gl/gl_surface.h" |
| 13 #include "webkit/common/gpu/context_provider_in_process.h" | 13 #include "webkit/common/gpu/context_provider_in_process.h" |
| 14 #include "webkit/common/gpu/grcontext_for_webgraphicscontext3d.h" | 14 #include "webkit/common/gpu/grcontext_for_webgraphicscontext3d.h" |
| 15 #include "webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.
h" | 15 #include "webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.
h" |
| 16 | 16 |
| 17 namespace mojo { | 17 namespace mojo { |
| 18 | 18 |
| 19 ContextFactoryMojo::ContextFactoryMojo(ScopedMessagePipeHandle gles2_handle) | 19 ContextFactoryMojo::ContextFactoryMojo( |
| 20 : gles2_handle_(gles2_handle.Pass()) { | 20 ScopedMessagePipeHandle command_buffer_handle) |
| 21 : command_buffer_handle_(command_buffer_handle.Pass()) { |
| 21 } | 22 } |
| 22 | 23 |
| 23 ContextFactoryMojo::~ContextFactoryMojo() { | 24 ContextFactoryMojo::~ContextFactoryMojo() { |
| 24 } | 25 } |
| 25 | 26 |
| 26 scoped_ptr<cc::OutputSurface> ContextFactoryMojo::CreateOutputSurface( | 27 scoped_ptr<cc::OutputSurface> ContextFactoryMojo::CreateOutputSurface( |
| 27 ui::Compositor* compositor, bool software_fallback) { | 28 ui::Compositor* compositor, bool software_fallback) { |
| 28 return make_scoped_ptr(new cc::OutputSurface( | 29 return make_scoped_ptr( |
| 29 new ContextProviderMojo(gles2_handle_.Pass()))); | 30 new cc::OutputSurface( |
| 31 new ContextProviderMojo(command_buffer_handle_.Pass()))); |
| 30 } | 32 } |
| 31 | 33 |
| 32 scoped_refptr<ui::Reflector> ContextFactoryMojo::CreateReflector( | 34 scoped_refptr<ui::Reflector> ContextFactoryMojo::CreateReflector( |
| 33 ui::Compositor* mirroed_compositor, | 35 ui::Compositor* mirroed_compositor, |
| 34 ui::Layer* mirroring_layer) { | 36 ui::Layer* mirroring_layer) { |
| 35 return NULL; | 37 return NULL; |
| 36 } | 38 } |
| 37 | 39 |
| 38 void ContextFactoryMojo::RemoveReflector( | 40 void ContextFactoryMojo::RemoveReflector( |
| 39 scoped_refptr<ui::Reflector> reflector) { | 41 scoped_refptr<ui::Reflector> reflector) { |
| (...skipping 21 matching lines...) Expand all Loading... |
| 61 | 63 |
| 62 cc::SharedBitmapManager* ContextFactoryMojo::GetSharedBitmapManager() { | 64 cc::SharedBitmapManager* ContextFactoryMojo::GetSharedBitmapManager() { |
| 63 return NULL; | 65 return NULL; |
| 64 } | 66 } |
| 65 | 67 |
| 66 base::MessageLoopProxy* ContextFactoryMojo::GetCompositorMessageLoop() { | 68 base::MessageLoopProxy* ContextFactoryMojo::GetCompositorMessageLoop() { |
| 67 return NULL; | 69 return NULL; |
| 68 } | 70 } |
| 69 | 71 |
| 70 } // namespace mojo | 72 } // namespace mojo |
| OLD | NEW |