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

Side by Side Diff: cc/output/delegating_renderer_unittest.cc

Issue 411643002: Early wait on texture resource sync points in gl_renderer. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix missing calls to WaitSyncPointIfNeeded in ResourceProvider tests. Created 6 years, 4 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 | « no previous file | cc/output/direct_renderer.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/output/delegating_renderer.h" 5 #include "cc/output/delegating_renderer.h"
6 6
7 #include "cc/test/fake_output_surface.h" 7 #include "cc/test/fake_output_surface.h"
8 #include "cc/test/layer_tree_test.h" 8 #include "cc/test/layer_tree_test.h"
9 #include "cc/test/render_pass_test_common.h" 9 #include "cc/test/render_pass_test_common.h"
10 #include "cc/test/render_pass_test_utils.h" 10 #include "cc/test/render_pass_test_utils.h"
(...skipping 108 matching lines...) Expand 10 before | Expand all | Expand 10 after
119 119
120 virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl, 120 virtual void SwapBuffersOnThread(LayerTreeHostImpl* host_impl,
121 bool result) OVERRIDE { 121 bool result) OVERRIDE {
122 EXPECT_TRUE(result); 122 EXPECT_TRUE(result);
123 EXPECT_EQ(1u, output_surface_->num_sent_frames()); 123 EXPECT_EQ(1u, output_surface_->num_sent_frames());
124 124
125 const CompositorFrame& last_frame = output_surface_->last_sent_frame(); 125 const CompositorFrame& last_frame = output_surface_->last_sent_frame();
126 ASSERT_TRUE(last_frame.delegated_frame_data); 126 ASSERT_TRUE(last_frame.delegated_frame_data);
127 127
128 EXPECT_EQ(2u, last_frame.delegated_frame_data->render_pass_list.size()); 128 EXPECT_EQ(2u, last_frame.delegated_frame_data->render_pass_list.size());
129 // Each render pass has 10 resources in it. And the root render pass has a 129 // Each render pass has 11 resources in it. And the root render pass has a
130 // mask resource used when drawing the child render pass, as well as its 130 // mask resource used when drawing the child render pass, as well as its
131 // replica (it's added twice). The number 10 may change if 131 // replica (it's added twice). The number 11 may change if
132 // AppendOneOfEveryQuadType() is updated, and the value here should be 132 // AppendOneOfEveryQuadType() is updated, and the value here should be
133 // updated accordingly. 133 // updated accordingly.
134 EXPECT_EQ( 134 EXPECT_EQ(24u, last_frame.delegated_frame_data->resource_list.size());
135 22u, last_frame.delegated_frame_data->resource_list.size());
136 135
137 EndTest(); 136 EndTest();
138 } 137 }
139 }; 138 };
140 139
141 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F( 140 SINGLE_AND_MULTI_THREAD_DELEGATING_RENDERER_TEST_F(
142 DelegatingRendererTestResources); 141 DelegatingRendererTestResources);
143 142
144 } // namespace cc 143 } // namespace cc
OLDNEW
« no previous file with comments | « no previous file | cc/output/direct_renderer.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698