| OLD | NEW |
| 1 // Copyright 2013 The Chromium Authors. All rights reserved. | 1 // Copyright 2013 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/trees/layer_tree_host.h" | 5 #include "cc/trees/layer_tree_host.h" |
| 6 | 6 |
| 7 #include "cc/layers/delegated_renderer_layer.h" | 7 #include "cc/layers/delegated_renderer_layer.h" |
| 8 #include "cc/layers/delegated_renderer_layer_impl.h" | 8 #include "cc/layers/delegated_renderer_layer_impl.h" |
| 9 #include "cc/output/delegated_frame_data.h" | 9 #include "cc/output/delegated_frame_data.h" |
| 10 #include "cc/quads/shared_quad_state.h" | 10 #include "cc/quads/shared_quad_state.h" |
| (...skipping 1016 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1027 virtual void AfterTest() OVERRIDE {} | 1027 virtual void AfterTest() OVERRIDE {} |
| 1028 }; | 1028 }; |
| 1029 | 1029 |
| 1030 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostDelegatedTestDontLeakResource); | 1030 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostDelegatedTestDontLeakResource); |
| 1031 | 1031 |
| 1032 class LayerTreeHostDelegatedTestResourceSentToParent | 1032 class LayerTreeHostDelegatedTestResourceSentToParent |
| 1033 : public LayerTreeHostDelegatedTestCaseSingleDelegatedLayer { | 1033 : public LayerTreeHostDelegatedTestCaseSingleDelegatedLayer { |
| 1034 public: | 1034 public: |
| 1035 virtual void BeginTest() OVERRIDE { | 1035 virtual void BeginTest() OVERRIDE { |
| 1036 // Prevent drawing with resources that are sent to the grandparent. | 1036 // Prevent drawing with resources that are sent to the grandparent. |
| 1037 layer_tree_host()->SetViewportSize(gfx::Size(10, 10), gfx::Size()); | 1037 layer_tree_host()->SetViewportSize(gfx::Size()); |
| 1038 PostSetNeedsCommitToMainThread(); | 1038 PostSetNeedsCommitToMainThread(); |
| 1039 } | 1039 } |
| 1040 | 1040 |
| 1041 virtual void DidCommit() OVERRIDE { | 1041 virtual void DidCommit() OVERRIDE { |
| 1042 scoped_ptr<DelegatedFrameData> frame; | 1042 scoped_ptr<DelegatedFrameData> frame; |
| 1043 TransferableResourceArray resources; | 1043 TransferableResourceArray resources; |
| 1044 | 1044 |
| 1045 int next_source_frame_number = layer_tree_host()->commit_number(); | 1045 int next_source_frame_number = layer_tree_host()->commit_number(); |
| 1046 switch (next_source_frame_number) { | 1046 switch (next_source_frame_number) { |
| 1047 case 1: | 1047 case 1: |
| (...skipping 94 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1142 virtual void AfterTest() OVERRIDE {} | 1142 virtual void AfterTest() OVERRIDE {} |
| 1143 }; | 1143 }; |
| 1144 | 1144 |
| 1145 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostDelegatedTestResourceSentToParent); | 1145 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostDelegatedTestResourceSentToParent); |
| 1146 | 1146 |
| 1147 class LayerTreeHostDelegatedTestCommitWithoutTake | 1147 class LayerTreeHostDelegatedTestCommitWithoutTake |
| 1148 : public LayerTreeHostDelegatedTestCaseSingleDelegatedLayer { | 1148 : public LayerTreeHostDelegatedTestCaseSingleDelegatedLayer { |
| 1149 public: | 1149 public: |
| 1150 virtual void BeginTest() OVERRIDE { | 1150 virtual void BeginTest() OVERRIDE { |
| 1151 // Prevent drawing with resources that are sent to the grandparent. | 1151 // Prevent drawing with resources that are sent to the grandparent. |
| 1152 layer_tree_host()->SetViewportSize(gfx::Size(10, 10), gfx::Size()); | 1152 layer_tree_host()->SetViewportSize(gfx::Size()); |
| 1153 PostSetNeedsCommitToMainThread(); | 1153 PostSetNeedsCommitToMainThread(); |
| 1154 } | 1154 } |
| 1155 | 1155 |
| 1156 virtual void DidCommit() OVERRIDE { | 1156 virtual void DidCommit() OVERRIDE { |
| 1157 scoped_ptr<DelegatedFrameData> frame; | 1157 scoped_ptr<DelegatedFrameData> frame; |
| 1158 TransferableResourceArray resources; | 1158 TransferableResourceArray resources; |
| 1159 | 1159 |
| 1160 int next_source_frame_number = layer_tree_host()->commit_number(); | 1160 int next_source_frame_number = layer_tree_host()->commit_number(); |
| 1161 switch (next_source_frame_number) { | 1161 switch (next_source_frame_number) { |
| 1162 case 1: | 1162 case 1: |
| (...skipping 75 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1238 } | 1238 } |
| 1239 } | 1239 } |
| 1240 | 1240 |
| 1241 virtual void AfterTest() OVERRIDE {} | 1241 virtual void AfterTest() OVERRIDE {} |
| 1242 }; | 1242 }; |
| 1243 | 1243 |
| 1244 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostDelegatedTestCommitWithoutTake); | 1244 SINGLE_AND_MULTI_THREAD_TEST_F(LayerTreeHostDelegatedTestCommitWithoutTake); |
| 1245 | 1245 |
| 1246 } // namespace | 1246 } // namespace |
| 1247 } // namespace cc | 1247 } // namespace cc |
| OLD | NEW |