Chromium Code Reviews| Index: ui/compositor/test/in_process_context_factory.cc |
| diff --git a/ui/compositor/test/in_process_context_factory.cc b/ui/compositor/test/in_process_context_factory.cc |
| index fa2380fc242a7f9c2e188ecc5a4e0137358c9f70..e8fda28e03d973344483f3d85ef59028beb6998a 100644 |
| --- a/ui/compositor/test/in_process_context_factory.cc |
| +++ b/ui/compositor/test/in_process_context_factory.cc |
| @@ -7,6 +7,7 @@ |
| #include "base/command_line.h" |
| #include "base/threading/thread.h" |
| #include "cc/output/output_surface.h" |
| +#include "cc/surfaces/surface_id_allocator.h" |
| #include "cc/test/test_shared_bitmap_manager.h" |
| #include "ui/compositor/compositor_switches.h" |
| #include "ui/compositor/reflector.h" |
| @@ -19,7 +20,8 @@ |
| namespace ui { |
| InProcessContextFactory::InProcessContextFactory() |
| - : shared_bitmap_manager_(new cc::TestSharedBitmapManager()) { |
| + : shared_bitmap_manager_(new cc::TestSharedBitmapManager()), |
| + next_surface_id_namespace_(0) { |
|
jamesr
2014/09/25 23:23:47
why does this one start at 0 but the mojo one star
|
| DCHECK_NE(gfx::GetGLImplementation(), gfx::kGLImplementationNone) |
| << "If running tests, ensure that main() is calling " |
| << "gfx::GLSurface::InitializeOneOffForTests()"; |
| @@ -102,4 +104,10 @@ base::MessageLoopProxy* InProcessContextFactory::GetCompositorMessageLoop() { |
| return compositor_thread_->message_loop_proxy().get(); |
| } |
| +scoped_ptr<cc::SurfaceIdAllocator> |
| +InProcessContextFactory::CreateSurfaceIdAllocator() { |
| + return make_scoped_ptr( |
| + new cc::SurfaceIdAllocator(next_surface_id_namespace_++)); |
| +} |
| + |
| } // namespace ui |