| OLD | NEW |
| 1 // Copyright 2014 The Chromium Authors. All rights reserved. | 1 // Copyright 2014 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 "base/message_loop/message_loop_proxy.h" | 5 #include "base/message_loop/message_loop_proxy.h" |
| 6 #include "base/threading/simple_thread.h" | 6 #include "base/threading/simple_thread.h" |
| 7 #include "cc/layers/delegated_frame_provider.h" | 7 #include "cc/layers/delegated_frame_provider.h" |
| 8 #include "cc/layers/delegated_frame_resource_collection.h" | 8 #include "cc/layers/delegated_frame_resource_collection.h" |
| 9 #include "cc/layers/delegated_renderer_layer.h" | 9 #include "cc/layers/delegated_renderer_layer.h" |
| 10 #include "cc/layers/layer.h" | 10 #include "cc/layers/layer.h" |
| (...skipping 95 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 106 did_commit_ = false; | 106 did_commit_ = false; |
| 107 did_commit_and_draw_frame_ = false; | 107 did_commit_and_draw_frame_ = false; |
| 108 layer_tree_host_->Composite(gfx::FrameTime::Now()); | 108 layer_tree_host_->Composite(gfx::FrameTime::Now()); |
| 109 EXPECT_TRUE(did_initialize_output_surface_); | 109 EXPECT_TRUE(did_initialize_output_surface_); |
| 110 EXPECT_TRUE(did_commit_); | 110 EXPECT_TRUE(did_commit_); |
| 111 EXPECT_TRUE(did_commit_and_draw_frame_); | 111 EXPECT_TRUE(did_commit_and_draw_frame_); |
| 112 } | 112 } |
| 113 | 113 |
| 114 void TearDownLayerTreeHost() { | 114 void TearDownLayerTreeHost() { |
| 115 // Explicit teardown to make failures easier to debug. | 115 // Explicit teardown to make failures easier to debug. |
| 116 layer_tree_host_.reset(); | 116 layer_tree_host_ = nullptr; |
| 117 root_layer_ = NULL; | 117 root_layer_ = nullptr; |
| 118 } | 118 } |
| 119 | 119 |
| 120 // All protected member variables are accessed only on |no_loop_thread_|. | 120 // All protected member variables are accessed only on |no_loop_thread_|. |
| 121 scoped_ptr<LayerTreeHost> layer_tree_host_; | 121 scoped_ptr<LayerTreeHost> layer_tree_host_; |
| 122 scoped_refptr<Layer> root_layer_; | 122 scoped_refptr<Layer> root_layer_; |
| 123 | 123 |
| 124 bool did_initialize_output_surface_; | 124 bool did_initialize_output_surface_; |
| 125 bool did_commit_; | 125 bool did_commit_; |
| 126 bool did_commit_and_draw_frame_; | 126 bool did_commit_and_draw_frame_; |
| 127 gfx::Size size_; | 127 gfx::Size size_; |
| (...skipping 99 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 227 scoped_refptr<DelegatedFrameProvider> frame_provider_; | 227 scoped_refptr<DelegatedFrameProvider> frame_provider_; |
| 228 scoped_refptr<DelegatedRendererLayer> delegated_layer_; | 228 scoped_refptr<DelegatedRendererLayer> delegated_layer_; |
| 229 }; | 229 }; |
| 230 | 230 |
| 231 TEST_F(LayerTreeHostNoMessageLoopDelegatedLayer, SingleDelegatedLayer) { | 231 TEST_F(LayerTreeHostNoMessageLoopDelegatedLayer, SingleDelegatedLayer) { |
| 232 RunTest(); | 232 RunTest(); |
| 233 } | 233 } |
| 234 | 234 |
| 235 } // namespace | 235 } // namespace |
| 236 } // namespace cc | 236 } // namespace cc |
| OLD | NEW |