OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 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 "cc/test/fake_layer_tree_host_client.h" | 5 #include "cc/test/fake_layer_tree_host_client.h" |
6 | 6 |
7 #include "cc/output/context_provider.h" | 7 #include "cc/output/context_provider.h" |
8 #include "cc/test/fake_output_surface.h" | 8 #include "cc/test/fake_output_surface.h" |
9 #include "cc/test/test_web_graphics_context_3d.h" | 9 #include "cc/test/test_web_graphics_context_3d.h" |
10 | 10 |
(...skipping 17 matching lines...) Expand all Loading... |
28 | 28 |
29 return FakeOutputSurface::CreateSoftware( | 29 return FakeOutputSurface::CreateSoftware( |
30 make_scoped_ptr(new SoftwareOutputDevice)).PassAs<OutputSurface>(); | 30 make_scoped_ptr(new SoftwareOutputDevice)).PassAs<OutputSurface>(); |
31 } | 31 } |
32 | 32 |
33 if (use_delegating_renderer_) | 33 if (use_delegating_renderer_) |
34 return FakeOutputSurface::CreateDelegating3d().PassAs<OutputSurface>(); | 34 return FakeOutputSurface::CreateDelegating3d().PassAs<OutputSurface>(); |
35 return FakeOutputSurface::Create3d().PassAs<OutputSurface>(); | 35 return FakeOutputSurface::Create3d().PassAs<OutputSurface>(); |
36 } | 36 } |
37 | 37 |
38 scoped_refptr<ContextProvider> | |
39 FakeLayerTreeHostClient::OffscreenContextProvider() { | |
40 if (!offscreen_contexts_.get() || | |
41 offscreen_contexts_->DestroyedOnMainThread()) | |
42 offscreen_contexts_ = TestContextProvider::Create(); | |
43 return offscreen_contexts_; | |
44 } | |
45 | |
46 } // namespace cc | 38 } // namespace cc |
OLD | NEW |