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 "base/memory/ptr_util.h" | |
8 #include "cc/output/context_provider.h" | |
9 #include "cc/test/fake_output_surface.h" | 7 #include "cc/test/fake_output_surface.h" |
10 #include "cc/test/test_web_graphics_context_3d.h" | |
11 #include "cc/trees/layer_tree_host.h" | 8 #include "cc/trees/layer_tree_host.h" |
12 | 9 |
13 namespace cc { | 10 namespace cc { |
14 | 11 |
15 FakeLayerTreeHostClient::FakeLayerTreeHostClient() = default; | 12 FakeLayerTreeHostClient::FakeLayerTreeHostClient() = default; |
16 FakeLayerTreeHostClient::~FakeLayerTreeHostClient() = default; | 13 FakeLayerTreeHostClient::~FakeLayerTreeHostClient() = default; |
17 | 14 |
18 void FakeLayerTreeHostClient::RequestNewOutputSurface() { | 15 void FakeLayerTreeHostClient::RequestNewOutputSurface() { |
19 DCHECK(host_); | 16 DCHECK(host_); |
20 host_->SetOutputSurface(FakeOutputSurface::CreateDelegating3d()); | 17 host_->SetOutputSurface(FakeOutputSurface::CreateDelegating3d()); |
21 } | 18 } |
22 | 19 |
23 void FakeLayerTreeHostClient::DidFailToInitializeOutputSurface() { | 20 void FakeLayerTreeHostClient::DidFailToInitializeOutputSurface() { |
24 RequestNewOutputSurface(); | 21 RequestNewOutputSurface(); |
25 } | 22 } |
26 | 23 |
27 } // namespace cc | 24 } // namespace cc |
OLD | NEW |