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

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

Issue 546993002: Apply the correct transform_to_root_target DelegatedRendererLayerImpl::AppendRenderPassQuads(). (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: review Created 6 years, 3 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/ui_resource_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 2012 The Chromium Authors. All rights reserved. 1 // Copyright 2012 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/layers/tiled_layer_impl.h" 5 #include "cc/layers/tiled_layer_impl.h"
6 6
7 #include "cc/layers/append_quads_data.h" 7 #include "cc/layers/append_quads_data.h"
8 #include "cc/quads/tile_draw_quad.h" 8 #include "cc/quads/tile_draw_quad.h"
9 #include "cc/resources/layer_tiling_data.h" 9 #include "cc/resources/layer_tiling_data.h"
10 #include "cc/test/fake_impl_proxy.h" 10 #include "cc/test/fake_impl_proxy.h"
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
358 LayerTestCommon::VerifyQuadsExactlyCoverRect(impl.quad_list(), gfx::Rect()); 358 LayerTestCommon::VerifyQuadsExactlyCoverRect(impl.quad_list(), gfx::Rect());
359 EXPECT_EQ(impl.quad_list().size(), 0u); 359 EXPECT_EQ(impl.quad_list().size(), 0u);
360 } 360 }
361 361
362 { 362 {
363 SCOPED_TRACE("Partial occlusion"); 363 SCOPED_TRACE("Partial occlusion");
364 gfx::Rect occluded(150, 0, 200, 1000); 364 gfx::Rect occluded(150, 0, 200, 1000);
365 impl.AppendQuadsWithOcclusion(tiled_layer, occluded); 365 impl.AppendQuadsWithOcclusion(tiled_layer, occluded);
366 366
367 size_t partially_occluded_count = 0; 367 size_t partially_occluded_count = 0;
368 LayerTestCommon::VerifyQuadsCoverRectWithOcclusion( 368 LayerTestCommon::VerifyQuadsAreOccluded(
369 impl.quad_list(), 369 impl.quad_list(), occluded, &partially_occluded_count);
370 gfx::Rect(layer_bounds),
371 occluded,
372 &partially_occluded_count);
373 // The layer outputs one quad, which is partially occluded. 370 // The layer outputs one quad, which is partially occluded.
374 EXPECT_EQ(100u - 10u, impl.quad_list().size()); 371 EXPECT_EQ(100u - 10u, impl.quad_list().size());
375 EXPECT_EQ(10u + 10u, partially_occluded_count); 372 EXPECT_EQ(10u + 10u, partially_occluded_count);
376 } 373 }
377 } 374 }
378 375
379 } // namespace 376 } // namespace
380 } // namespace cc 377 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/texture_layer_impl_unittest.cc ('k') | cc/layers/ui_resource_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698