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/layers/texture_layer.h" | 5 #include "cc/layers/texture_layer.h" |
6 | 6 |
7 #include <stddef.h> | 7 #include <stddef.h> |
8 #include <stdint.h> | 8 #include <stdint.h> |
9 | 9 |
10 #include <algorithm> | 10 #include <algorithm> |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
84 | 84 |
85 MOCK_METHOD0(SetNeedsCommit, void()); | 85 MOCK_METHOD0(SetNeedsCommit, void()); |
86 MOCK_METHOD0(SetNeedsUpdateLayers, void()); | 86 MOCK_METHOD0(SetNeedsUpdateLayers, void()); |
87 MOCK_METHOD0(StartRateLimiter, void()); | 87 MOCK_METHOD0(StartRateLimiter, void()); |
88 MOCK_METHOD0(StopRateLimiter, void()); | 88 MOCK_METHOD0(StopRateLimiter, void()); |
89 | 89 |
90 private: | 90 private: |
91 explicit MockLayerTreeHost(LayerTreeHostInProcess::InitParams* params) | 91 explicit MockLayerTreeHost(LayerTreeHostInProcess::InitParams* params) |
92 : LayerTreeHostInProcess(params, CompositorMode::SINGLE_THREADED) { | 92 : LayerTreeHostInProcess(params, CompositorMode::SINGLE_THREADED) { |
93 InitializeSingleThreaded(&single_thread_client_, | 93 InitializeSingleThreaded(&single_thread_client_, |
94 base::ThreadTaskRunnerHandle::Get(), nullptr); | 94 base::ThreadTaskRunnerHandle::Get()); |
95 } | 95 } |
96 | 96 |
97 StubLayerTreeHostSingleThreadClient single_thread_client_; | 97 StubLayerTreeHostSingleThreadClient single_thread_client_; |
98 }; | 98 }; |
99 | 99 |
100 class FakeTextureLayerClient : public TextureLayerClient { | 100 class FakeTextureLayerClient : public TextureLayerClient { |
101 public: | 101 public: |
102 FakeTextureLayerClient() : mailbox_changed_(true) {} | 102 FakeTextureLayerClient() : mailbox_changed_(true) {} |
103 | 103 |
104 bool PrepareTextureMailbox( | 104 bool PrepareTextureMailbox( |
(...skipping 1348 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1453 base::ThreadChecker main_thread_; | 1453 base::ThreadChecker main_thread_; |
1454 int callback_count_; | 1454 int callback_count_; |
1455 scoped_refptr<Layer> root_; | 1455 scoped_refptr<Layer> root_; |
1456 scoped_refptr<TextureLayer> layer_; | 1456 scoped_refptr<TextureLayer> layer_; |
1457 }; | 1457 }; |
1458 | 1458 |
1459 SINGLE_AND_MULTI_THREAD_TEST_F(TextureLayerWithMailboxImplThreadDeleted); | 1459 SINGLE_AND_MULTI_THREAD_TEST_F(TextureLayerWithMailboxImplThreadDeleted); |
1460 | 1460 |
1461 } // namespace | 1461 } // namespace |
1462 } // namespace cc | 1462 } // namespace cc |
OLD | NEW |