| 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 "ui/compositor/test/in_process_context_factory.h" | 5 #include "ui/compositor/test/in_process_context_factory.h" |
| 6 | 6 |
| 7 #include "cc/output/output_surface.h" | 7 #include "cc/output/output_surface.h" |
| 8 #include "cc/test/test_shared_bitmap_manager.h" |
| 8 #include "ui/compositor/reflector.h" | 9 #include "ui/compositor/reflector.h" |
| 9 #include "ui/gl/gl_implementation.h" | 10 #include "ui/gl/gl_implementation.h" |
| 10 #include "ui/gl/gl_surface.h" | 11 #include "ui/gl/gl_surface.h" |
| 11 #include "webkit/common/gpu/context_provider_in_process.h" | 12 #include "webkit/common/gpu/context_provider_in_process.h" |
| 12 #include "webkit/common/gpu/grcontext_for_webgraphicscontext3d.h" | 13 #include "webkit/common/gpu/grcontext_for_webgraphicscontext3d.h" |
| 13 #include "webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.
h" | 14 #include "webkit/common/gpu/webgraphicscontext3d_in_process_command_buffer_impl.
h" |
| 14 | 15 |
| 15 namespace ui { | 16 namespace ui { |
| 16 | 17 |
| 17 InProcessContextFactory::InProcessContextFactory() { | 18 InProcessContextFactory::InProcessContextFactory() |
| 19 : shared_bitmap_manager_(new cc::TestSharedBitmapManager()) { |
| 18 DCHECK_NE(gfx::GetGLImplementation(), gfx::kGLImplementationNone); | 20 DCHECK_NE(gfx::GetGLImplementation(), gfx::kGLImplementationNone); |
| 19 } | 21 } |
| 20 | 22 |
| 21 InProcessContextFactory::~InProcessContextFactory() {} | 23 InProcessContextFactory::~InProcessContextFactory() {} |
| 22 | 24 |
| 23 scoped_ptr<cc::OutputSurface> InProcessContextFactory::CreateOutputSurface( | 25 scoped_ptr<cc::OutputSurface> InProcessContextFactory::CreateOutputSurface( |
| 24 Compositor* compositor, | 26 Compositor* compositor, |
| 25 bool software_fallback) { | 27 bool software_fallback) { |
| 26 DCHECK(!software_fallback); | 28 DCHECK(!software_fallback); |
| 27 blink::WebGraphicsContext3D::Attributes attrs; | 29 blink::WebGraphicsContext3D::Attributes attrs; |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 67 !shared_main_thread_contexts_->BindToCurrentThread()) | 69 !shared_main_thread_contexts_->BindToCurrentThread()) |
| 68 shared_main_thread_contexts_ = NULL; | 70 shared_main_thread_contexts_ = NULL; |
| 69 | 71 |
| 70 return shared_main_thread_contexts_; | 72 return shared_main_thread_contexts_; |
| 71 } | 73 } |
| 72 | 74 |
| 73 void InProcessContextFactory::RemoveCompositor(Compositor* compositor) {} | 75 void InProcessContextFactory::RemoveCompositor(Compositor* compositor) {} |
| 74 | 76 |
| 75 bool InProcessContextFactory::DoesCreateTestContexts() { return false; } | 77 bool InProcessContextFactory::DoesCreateTestContexts() { return false; } |
| 76 | 78 |
| 79 cc::SharedBitmapManager* InProcessContextFactory::GetSharedBitmapManager() { |
| 80 return shared_bitmap_manager_.get(); |
| 81 } |
| 82 |
| 77 } // namespace ui | 83 } // namespace ui |
| OLD | NEW |