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 "base/bind.h" | 7 #include "base/bind.h" |
8 #include "base/command_line.h" | 8 #include "base/command_line.h" |
9 #include "base/threading/thread.h" | 9 #include "base/threading/thread.h" |
10 #include "cc/output/compositor_frame.h" | 10 #include "cc/output/compositor_frame.h" |
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
101 attribs.bind_generates_resource = false; | 101 attribs.bind_generates_resource = false; |
102 bool lose_context_when_out_of_memory = true; | 102 bool lose_context_when_out_of_memory = true; |
103 | 103 |
104 scoped_refptr<InProcessContextProvider> context_provider = | 104 scoped_refptr<InProcessContextProvider> context_provider = |
105 InProcessContextProvider::Create(attribs, lose_context_when_out_of_memory, | 105 InProcessContextProvider::Create(attribs, lose_context_when_out_of_memory, |
106 compositor->widget(), "UICompositor"); | 106 compositor->widget(), "UICompositor"); |
107 | 107 |
108 if (use_test_surface_) { | 108 if (use_test_surface_) { |
109 bool flipped_output_surface = false; | 109 bool flipped_output_surface = false; |
110 compositor->SetOutputSurface(make_scoped_ptr(new cc::PixelTestOutputSurface( | 110 compositor->SetOutputSurface(make_scoped_ptr(new cc::PixelTestOutputSurface( |
111 context_provider, flipped_output_surface))); | 111 context_provider, nullptr, flipped_output_surface))); |
112 } else { | 112 } else { |
113 compositor->SetOutputSurface( | 113 compositor->SetOutputSurface( |
114 make_scoped_ptr(new DirectOutputSurface(context_provider))); | 114 make_scoped_ptr(new DirectOutputSurface(context_provider))); |
115 } | 115 } |
116 } | 116 } |
117 | 117 |
118 scoped_refptr<Reflector> InProcessContextFactory::CreateReflector( | 118 scoped_refptr<Reflector> InProcessContextFactory::CreateReflector( |
119 Compositor* mirroed_compositor, | 119 Compositor* mirroed_compositor, |
120 Layer* mirroring_layer) { | 120 Layer* mirroring_layer) { |
121 return new Reflector(); | 121 return new Reflector(); |
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
165 InProcessContextFactory::CreateSurfaceIdAllocator() { | 165 InProcessContextFactory::CreateSurfaceIdAllocator() { |
166 return make_scoped_ptr( | 166 return make_scoped_ptr( |
167 new cc::SurfaceIdAllocator(next_surface_id_namespace_++)); | 167 new cc::SurfaceIdAllocator(next_surface_id_namespace_++)); |
168 } | 168 } |
169 | 169 |
170 void InProcessContextFactory::ResizeDisplay(ui::Compositor* compositor, | 170 void InProcessContextFactory::ResizeDisplay(ui::Compositor* compositor, |
171 const gfx::Size& size) { | 171 const gfx::Size& size) { |
172 } | 172 } |
173 | 173 |
174 } // namespace ui | 174 } // namespace ui |
OLD | NEW |