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

Side by Side Diff: cc/layers/nine_patch_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
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 "base/containers/hash_tables.h" 5 #include "base/containers/hash_tables.h"
6 #include "cc/layers/append_quads_data.h" 6 #include "cc/layers/append_quads_data.h"
7 #include "cc/layers/nine_patch_layer_impl.h" 7 #include "cc/layers/nine_patch_layer_impl.h"
8 #include "cc/quads/texture_draw_quad.h" 8 #include "cc/quads/texture_draw_quad.h"
9 #include "cc/resources/ui_resource_bitmap.h" 9 #include "cc/resources/ui_resource_bitmap.h"
10 #include "cc/resources/ui_resource_client.h" 10 #include "cc/resources/ui_resource_client.h"
(...skipping 247 matching lines...) Expand 10 before | Expand all | Expand 10 after
258 LayerTestCommon::VerifyQuadsExactlyCoverRect(impl.quad_list(), gfx::Rect()); 258 LayerTestCommon::VerifyQuadsExactlyCoverRect(impl.quad_list(), gfx::Rect());
259 EXPECT_EQ(impl.quad_list().size(), 0u); 259 EXPECT_EQ(impl.quad_list().size(), 0u);
260 } 260 }
261 261
262 { 262 {
263 SCOPED_TRACE("Partial occlusion"); 263 SCOPED_TRACE("Partial occlusion");
264 gfx::Rect occluded(0, 0, 500, 1000); 264 gfx::Rect occluded(0, 0, 500, 1000);
265 impl.AppendQuadsWithOcclusion(nine_patch_layer_impl, occluded); 265 impl.AppendQuadsWithOcclusion(nine_patch_layer_impl, occluded);
266 266
267 size_t partially_occluded_count = 0; 267 size_t partially_occluded_count = 0;
268 LayerTestCommon::VerifyQuadsCoverRectWithOcclusion( 268 LayerTestCommon::VerifyQuadsAreOccluded(
269 impl.quad_list(), 269 impl.quad_list(), occluded, &partially_occluded_count);
270 gfx::Rect(layer_size),
271 occluded,
272 &partially_occluded_count);
273 // The layer outputs nine quads, three of which are partially occluded, and 270 // The layer outputs nine quads, three of which are partially occluded, and
274 // three fully occluded. 271 // three fully occluded.
275 EXPECT_EQ(6u, impl.quad_list().size()); 272 EXPECT_EQ(6u, impl.quad_list().size());
276 EXPECT_EQ(3u, partially_occluded_count); 273 EXPECT_EQ(3u, partially_occluded_count);
277 } 274 }
278 } 275 }
279 276
280 } // namespace 277 } // namespace
281 } // namespace cc 278 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/io_surface_layer_impl_unittest.cc ('k') | cc/layers/painted_scrollbar_layer_impl_unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698