Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(35)

Side by Side Diff: cc/trees/layer_tree_host_unittest_delegated.cc

Issue 13637017: Delete layout_viewport_size. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix Android Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « cc/trees/layer_tree_host_unittest_damage.cc ('k') | cc/trees/layer_tree_impl.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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
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
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
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_unittest_damage.cc ('k') | cc/trees/layer_tree_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698