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

Side by Side Diff: cc/trees/layer_tree_host_unittest.cc

Issue 13285002: cc: Consolidate LayerList types. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 7 years, 8 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/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/layer_tree_host_unittest_video.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 2011 The Chromium Authors. All rights reserved. 1 // Copyright 2011 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/trees/layer_tree_host.h" 5 #include "cc/trees/layer_tree_host.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 8
9 #include "base/synchronization/lock.h" 9 #include "base/synchronization/lock.h"
10 #include "cc/animation/timing_function.h" 10 #include "cc/animation/timing_function.h"
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
690 690
691 // Positions remain in layout pixels. 691 // Positions remain in layout pixels.
692 EXPECT_EQ(gfx::Point(0, 0), root->position()); 692 EXPECT_EQ(gfx::Point(0, 0), root->position());
693 EXPECT_EQ(gfx::Point(2, 2), child->position()); 693 EXPECT_EQ(gfx::Point(2, 2), child->position());
694 694
695 // Compute all the layer transforms for the frame. 695 // Compute all the layer transforms for the frame.
696 LayerTreeHostImpl::FrameData frame_data; 696 LayerTreeHostImpl::FrameData frame_data;
697 impl->PrepareToDraw(&frame_data); 697 impl->PrepareToDraw(&frame_data);
698 impl->DidDrawAllLayers(frame_data); 698 impl->DidDrawAllLayers(frame_data);
699 699
700 const LayerTreeHostImpl::LayerList& render_surface_layer_list = 700 const LayerImplList& render_surface_layer_list =
701 *frame_data.render_surface_layer_list; 701 *frame_data.render_surface_layer_list;
702 702
703 // Both layers should be drawing into the root render surface. 703 // Both layers should be drawing into the root render surface.
704 ASSERT_EQ(1u, render_surface_layer_list.size()); 704 ASSERT_EQ(1u, render_surface_layer_list.size());
705 ASSERT_EQ(root->render_surface(), 705 ASSERT_EQ(root->render_surface(),
706 render_surface_layer_list[0]->render_surface()); 706 render_surface_layer_list[0]->render_surface());
707 ASSERT_EQ(2u, root->render_surface()->layer_list().size()); 707 ASSERT_EQ(2u, root->render_surface()->layer_list().size());
708 708
709 // The root render surface is the size of the viewport. 709 // The root render surface is the size of the viewport.
710 EXPECT_RECT_EQ(gfx::Rect(0, 0, 60, 60), 710 EXPECT_RECT_EQ(gfx::Rect(0, 0, 60, 60),
(...skipping 1461 matching lines...) Expand 10 before | Expand all | Expand 10 after
2172 } 2172 }
2173 2173
2174 private: 2174 private:
2175 base::TimeTicks frame_time_; 2175 base::TimeTicks frame_time_;
2176 }; 2176 };
2177 2177
2178 MULTI_THREAD_TEST_F(LayerTreeHostTestVSyncNotification); 2178 MULTI_THREAD_TEST_F(LayerTreeHostTestVSyncNotification);
2179 2179
2180 } // namespace 2180 } // namespace
2181 } // namespace cc 2181 } // namespace cc
OLDNEW
« no previous file with comments | « cc/trees/layer_tree_host_impl_unittest.cc ('k') | cc/trees/layer_tree_host_unittest_video.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698