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

Side by Side Diff: ui/compositor/layer_unittest.cc

Issue 11087093: Migrate ui::Transform to gfx::Transform (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Should pass trybots this time Created 8 years, 2 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 | « ui/compositor/layer_animator.cc ('k') | ui/compositor/test/test_layer_animation_delegate.h » ('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 (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 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/basictypes.h" 5 #include "base/basictypes.h"
6 #include "base/compiler_specific.h" 6 #include "base/compiler_specific.h"
7 #include "base/file_path.h" 7 #include "base/file_path.h"
8 #include "base/file_util.h" 8 #include "base/file_util.h"
9 #include "base/memory/scoped_ptr.h" 9 #include "base/memory/scoped_ptr.h"
10 #include "base/path_service.h" 10 #include "base/path_service.h"
(...skipping 892 matching lines...) Expand 10 before | Expand all | Expand 10 after
903 EXPECT_TRUE(observer.notified()); 903 EXPECT_TRUE(observer.notified());
904 904
905 // So should setting the opacity back. 905 // So should setting the opacity back.
906 observer.Reset(); 906 observer.Reset();
907 l2->SetOpacity(1.0f); 907 l2->SetOpacity(1.0f);
908 RunPendingMessages(); 908 RunPendingMessages();
909 EXPECT_TRUE(observer.notified()); 909 EXPECT_TRUE(observer.notified());
910 910
911 // Setting the transform of a layer should alert the observers. 911 // Setting the transform of a layer should alert the observers.
912 observer.Reset(); 912 observer.Reset();
913 Transform transform; 913 gfx::Transform transform;
914 transform.ConcatTranslate(-200, -200); 914 transform.ConcatTranslate(-200, -200);
915 transform.ConcatRotate(90.0f); 915 transform.ConcatRotate(90.0f);
916 transform.ConcatTranslate(200, 200); 916 transform.ConcatTranslate(200, 200);
917 l2->SetTransform(transform); 917 l2->SetTransform(transform);
918 RunPendingMessages(); 918 RunPendingMessages();
919 EXPECT_TRUE(observer.notified()); 919 EXPECT_TRUE(observer.notified());
920 920
921 // A change resulting in an aborted swap buffer should alert the observer 921 // A change resulting in an aborted swap buffer should alert the observer
922 // and also signal an abort. 922 // and also signal an abort.
923 observer.Reset(); 923 observer.Reset();
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
1300 1300
1301 // Resize layer. 1301 // Resize layer.
1302 child->SetBounds(gfx::Rect(200, 200, 400, 400)); 1302 child->SetBounds(gfx::Rect(200, 200, 400, 400));
1303 child->SetVisible(true); 1303 child->SetVisible(true);
1304 EXPECT_TRUE(schedule_draw_invoked_); 1304 EXPECT_TRUE(schedule_draw_invoked_);
1305 DrawTree(root.get()); 1305 DrawTree(root.get());
1306 EXPECT_TRUE(delegate.painted()); 1306 EXPECT_TRUE(delegate.painted());
1307 } 1307 }
1308 1308
1309 } // namespace ui 1309 } // namespace ui
OLDNEW
« no previous file with comments | « ui/compositor/layer_animator.cc ('k') | ui/compositor/test/test_layer_animation_delegate.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698