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

Side by Side Diff: cc/layers/ui_resource_layer_impl_unittest.cc

Issue 2402583005: Split picture layer quads to allow removing more occluded area. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: fix test Created 3 years, 6 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/layers/texture_layer_impl_unittest.cc ('k') | cc/layers/video_layer_impl_unittest.cc » ('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 <stddef.h> 5 #include <stddef.h>
6 6
7 #include "cc/layers/append_quads_data.h" 7 #include "cc/layers/append_quads_data.h"
8 #include "cc/layers/ui_resource_layer_impl.h" 8 #include "cc/layers/ui_resource_layer_impl.h"
9 #include "cc/quads/draw_quad.h" 9 #include "cc/quads/draw_quad.h"
10 #include "cc/resources/ui_resource_bitmap.h" 10 #include "cc/resources/ui_resource_bitmap.h"
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 LayerTestCommon::VerifyQuadsExactlyCoverRect(impl.quad_list(), gfx::Rect()); 210 LayerTestCommon::VerifyQuadsExactlyCoverRect(impl.quad_list(), gfx::Rect());
211 EXPECT_EQ(impl.quad_list().size(), 0u); 211 EXPECT_EQ(impl.quad_list().size(), 0u);
212 } 212 }
213 213
214 { 214 {
215 SCOPED_TRACE("Partial occlusion"); 215 SCOPED_TRACE("Partial occlusion");
216 gfx::Rect occluded(200, 0, 800, 1000); 216 gfx::Rect occluded(200, 0, 800, 1000);
217 impl.AppendQuadsWithOcclusion(ui_resource_layer_impl, occluded); 217 impl.AppendQuadsWithOcclusion(ui_resource_layer_impl, occluded);
218 218
219 size_t partially_occluded_count = 0; 219 size_t partially_occluded_count = 0;
220 LayerTestCommon::VerifyQuadsAreOccluded( 220 LayerTestCommon::VerifyQuadsAreOccluded(impl.quad_list(), occluded, false,
221 impl.quad_list(), occluded, &partially_occluded_count); 221 &partially_occluded_count);
222 // The layer outputs one quad, which is partially occluded. 222 // The layer outputs one quad, which is partially occluded.
223 EXPECT_EQ(1u, impl.quad_list().size()); 223 EXPECT_EQ(1u, impl.quad_list().size());
224 EXPECT_EQ(1u, partially_occluded_count); 224 EXPECT_EQ(1u, partially_occluded_count);
225 } 225 }
226 } 226 }
227 227
228 } // namespace 228 } // namespace
229 } // namespace cc 229 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/texture_layer_impl_unittest.cc ('k') | cc/layers/video_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698