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_proxy.h" | 5 #include "cc/test/fake_proxy.h" |
6 | 6 |
7 namespace cc { | 7 namespace cc { |
8 | 8 |
9 void FakeProxy::SetLayerTreeHost(LayerTreeHost* host) { | 9 void FakeProxy::SetLayerTreeHost(LayerTreeHost* host) { |
10 layer_tree_host_ = host; | 10 layer_tree_host_ = host; |
11 } | 11 } |
12 | 12 |
13 bool FakeProxy::IsStarted() const { return true; } | 13 bool FakeProxy::IsStarted() const { return true; } |
14 | 14 |
15 void FakeProxy::CreateAndInitializeOutputSurface() { | |
16 DCHECK(layer_tree_host_); | |
17 layer_tree_host_->OnCreateAndInitializeOutputSurfaceAttempted(true); | |
18 } | |
19 | |
20 const RendererCapabilities& FakeProxy::GetRendererCapabilities() const { | 15 const RendererCapabilities& FakeProxy::GetRendererCapabilities() const { |
21 return capabilities_; | 16 return capabilities_; |
22 } | 17 } |
23 | 18 |
24 RendererCapabilities& FakeProxy::GetRendererCapabilities() { | 19 RendererCapabilities& FakeProxy::GetRendererCapabilities() { |
25 return capabilities_; | 20 return capabilities_; |
26 } | 21 } |
27 | 22 |
28 bool FakeProxy::BeginMainFrameRequested() const { return false; } | 23 bool FakeProxy::BeginMainFrameRequested() const { return false; } |
29 | 24 |
30 bool FakeProxy::CommitRequested() const { return false; } | 25 bool FakeProxy::CommitRequested() const { return false; } |
31 | 26 |
32 size_t FakeProxy::MaxPartialTextureUpdates() const { | 27 size_t FakeProxy::MaxPartialTextureUpdates() const { |
33 return max_partial_texture_updates_; | 28 return max_partial_texture_updates_; |
34 } | 29 } |
35 | 30 |
36 void FakeProxy::SetMaxPartialTextureUpdates(size_t max) { | 31 void FakeProxy::SetMaxPartialTextureUpdates(size_t max) { |
37 max_partial_texture_updates_ = max; | 32 max_partial_texture_updates_ = max; |
38 } | 33 } |
39 | 34 |
40 bool FakeProxy::CommitPendingForTesting() { return false; } | 35 bool FakeProxy::CommitPendingForTesting() { return false; } |
41 | 36 |
42 scoped_ptr<base::Value> FakeProxy::AsValue() const { | 37 scoped_ptr<base::Value> FakeProxy::AsValue() const { |
43 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); | 38 scoped_ptr<base::DictionaryValue> state(new base::DictionaryValue()); |
44 return state.PassAs<base::Value>(); | 39 return state.PassAs<base::Value>(); |
45 } | 40 } |
46 | 41 |
47 } // namespace cc | 42 } // namespace cc |
OLD | NEW |