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

Side by Side Diff: cc/layers/ui_resource_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/tiled_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 "cc/layers/append_quads_data.h" 5 #include "cc/layers/append_quads_data.h"
6 #include "cc/layers/ui_resource_layer_impl.h" 6 #include "cc/layers/ui_resource_layer_impl.h"
7 #include "cc/quads/draw_quad.h" 7 #include "cc/quads/draw_quad.h"
8 #include "cc/resources/ui_resource_bitmap.h" 8 #include "cc/resources/ui_resource_bitmap.h"
9 #include "cc/resources/ui_resource_client.h" 9 #include "cc/resources/ui_resource_client.h"
10 #include "cc/test/fake_impl_proxy.h" 10 #include "cc/test/fake_impl_proxy.h"
(...skipping 177 matching lines...) Expand 10 before | Expand all | Expand 10 after
188 LayerTestCommon::VerifyQuadsExactlyCoverRect(impl.quad_list(), gfx::Rect()); 188 LayerTestCommon::VerifyQuadsExactlyCoverRect(impl.quad_list(), gfx::Rect());
189 EXPECT_EQ(impl.quad_list().size(), 0u); 189 EXPECT_EQ(impl.quad_list().size(), 0u);
190 } 190 }
191 191
192 { 192 {
193 SCOPED_TRACE("Partial occlusion"); 193 SCOPED_TRACE("Partial occlusion");
194 gfx::Rect occluded(200, 0, 800, 1000); 194 gfx::Rect occluded(200, 0, 800, 1000);
195 impl.AppendQuadsWithOcclusion(ui_resource_layer_impl, occluded); 195 impl.AppendQuadsWithOcclusion(ui_resource_layer_impl, occluded);
196 196
197 size_t partially_occluded_count = 0; 197 size_t partially_occluded_count = 0;
198 LayerTestCommon::VerifyQuadsCoverRectWithOcclusion( 198 LayerTestCommon::VerifyQuadsAreOccluded(
199 impl.quad_list(), 199 impl.quad_list(), occluded, &partially_occluded_count);
200 gfx::Rect(layer_size),
201 occluded,
202 &partially_occluded_count);
203 // The layer outputs one quad, which is partially occluded. 200 // The layer outputs one quad, which is partially occluded.
204 EXPECT_EQ(1u, impl.quad_list().size()); 201 EXPECT_EQ(1u, impl.quad_list().size());
205 EXPECT_EQ(1u, partially_occluded_count); 202 EXPECT_EQ(1u, partially_occluded_count);
206 } 203 }
207 } 204 }
208 205
209 } // namespace 206 } // namespace
210 } // namespace cc 207 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/tiled_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