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/debug/test_web_graphics_context_3d.h" | |
8 #include "cc/output/context_provider.h" | 7 #include "cc/output/context_provider.h" |
9 #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" |
10 | 10 |
11 namespace cc { | 11 namespace cc { |
12 | 12 |
13 FakeLayerTreeHostClient::FakeLayerTreeHostClient(RendererOptions options) | 13 FakeLayerTreeHostClient::FakeLayerTreeHostClient(RendererOptions options) |
14 : use_software_rendering_(options == DIRECT_SOFTWARE || | 14 : use_software_rendering_(options == DIRECT_SOFTWARE || |
15 options == DELEGATED_SOFTWARE), | 15 options == DELEGATED_SOFTWARE), |
16 use_delegating_renderer_(options == DELEGATED_3D || | 16 use_delegating_renderer_(options == DELEGATED_3D || |
17 options == DELEGATED_SOFTWARE) {} | 17 options == DELEGATED_SOFTWARE) {} |
18 | 18 |
19 FakeLayerTreeHostClient::~FakeLayerTreeHostClient() {} | 19 FakeLayerTreeHostClient::~FakeLayerTreeHostClient() {} |
(...skipping 17 matching lines...) Expand all Loading... |
37 | 37 |
38 scoped_refptr<ContextProvider> | 38 scoped_refptr<ContextProvider> |
39 FakeLayerTreeHostClient::OffscreenContextProvider() { | 39 FakeLayerTreeHostClient::OffscreenContextProvider() { |
40 if (!offscreen_contexts_.get() || | 40 if (!offscreen_contexts_.get() || |
41 offscreen_contexts_->DestroyedOnMainThread()) | 41 offscreen_contexts_->DestroyedOnMainThread()) |
42 offscreen_contexts_ = TestContextProvider::Create(); | 42 offscreen_contexts_ = TestContextProvider::Create(); |
43 return offscreen_contexts_; | 43 return offscreen_contexts_; |
44 } | 44 } |
45 | 45 |
46 } // namespace cc | 46 } // namespace cc |
OLD | NEW |