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

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

Issue 295193002: Get rid of graphics layer anchor points, and replace with transform origin. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix nit. Created 6 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 | Annotate | Revision Log
« no previous file with comments | « cc/layers/tiled_layer_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/resources/ui_resource_bitmap.h" 7 #include "cc/resources/ui_resource_bitmap.h"
8 #include "cc/resources/ui_resource_client.h" 8 #include "cc/resources/ui_resource_client.h"
9 #include "cc/test/fake_impl_proxy.h" 9 #include "cc/test/fake_impl_proxy.h"
10 #include "cc/test/fake_layer_tree_host_impl.h" 10 #include "cc/test/fake_layer_tree_host_impl.h"
(...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after
152 152
153 SkBitmap sk_bitmap; 153 SkBitmap sk_bitmap;
154 sk_bitmap.allocN32Pixels(10, 10); 154 sk_bitmap.allocN32Pixels(10, 10);
155 sk_bitmap.setImmutable(); 155 sk_bitmap.setImmutable();
156 UIResourceId uid = 5; 156 UIResourceId uid = 5;
157 UIResourceBitmap bitmap(sk_bitmap); 157 UIResourceBitmap bitmap(sk_bitmap);
158 impl.host_impl()->CreateUIResource(uid, bitmap); 158 impl.host_impl()->CreateUIResource(uid, bitmap);
159 159
160 UIResourceLayerImpl* ui_resource_layer_impl = 160 UIResourceLayerImpl* ui_resource_layer_impl =
161 impl.AddChildToRoot<UIResourceLayerImpl>(); 161 impl.AddChildToRoot<UIResourceLayerImpl>();
162 ui_resource_layer_impl->SetAnchorPoint(gfx::PointF());
163 ui_resource_layer_impl->SetBounds(layer_size); 162 ui_resource_layer_impl->SetBounds(layer_size);
164 ui_resource_layer_impl->SetContentBounds(layer_size); 163 ui_resource_layer_impl->SetContentBounds(layer_size);
165 ui_resource_layer_impl->SetDrawsContent(true); 164 ui_resource_layer_impl->SetDrawsContent(true);
166 ui_resource_layer_impl->SetUIResourceId(uid); 165 ui_resource_layer_impl->SetUIResourceId(uid);
167 166
168 impl.CalcDrawProps(viewport_size); 167 impl.CalcDrawProps(viewport_size);
169 168
170 { 169 {
171 SCOPED_TRACE("No occlusion"); 170 SCOPED_TRACE("No occlusion");
172 gfx::Rect occluded; 171 gfx::Rect occluded;
(...skipping 25 matching lines...) Expand all
198 occluded, 197 occluded,
199 &partially_occluded_count); 198 &partially_occluded_count);
200 // The layer outputs one quad, which is partially occluded. 199 // The layer outputs one quad, which is partially occluded.
201 EXPECT_EQ(1u, impl.quad_list().size()); 200 EXPECT_EQ(1u, impl.quad_list().size());
202 EXPECT_EQ(1u, partially_occluded_count); 201 EXPECT_EQ(1u, partially_occluded_count);
203 } 202 }
204 } 203 }
205 204
206 } // namespace 205 } // namespace
207 } // namespace cc 206 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/tiled_layer_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