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

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

Issue 11145005: Migrate ui::Transform to gfx::Transform (Closed) Base URL: http://git.chromium.org/chromium/src.git@master
Patch Set: Hopefully should work 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 891 matching lines...) Expand 10 before | Expand all | Expand 10 after
902 EXPECT_TRUE(observer.notified()); 902 EXPECT_TRUE(observer.notified());
903 903
904 // So should setting the opacity back. 904 // So should setting the opacity back.
905 observer.Reset(); 905 observer.Reset();
906 l2->SetOpacity(1.0f); 906 l2->SetOpacity(1.0f);
907 RunPendingMessages(); 907 RunPendingMessages();
908 EXPECT_TRUE(observer.notified()); 908 EXPECT_TRUE(observer.notified());
909 909
910 // Setting the transform of a layer should alert the observers. 910 // Setting the transform of a layer should alert the observers.
911 observer.Reset(); 911 observer.Reset();
912 Transform transform; 912 gfx::Transform transform;
913 transform.ConcatTranslate(-200, -200); 913 transform.ConcatTranslate(-200, -200);
914 transform.ConcatRotate(90.0f); 914 transform.ConcatRotate(90.0f);
915 transform.ConcatTranslate(200, 200); 915 transform.ConcatTranslate(200, 200);
916 l2->SetTransform(transform); 916 l2->SetTransform(transform);
917 RunPendingMessages(); 917 RunPendingMessages();
918 EXPECT_TRUE(observer.notified()); 918 EXPECT_TRUE(observer.notified());
919 919
920 // A change resulting in an aborted swap buffer should alert the observer 920 // A change resulting in an aborted swap buffer should alert the observer
921 // and also signal an abort. 921 // and also signal an abort.
922 observer.Reset(); 922 observer.Reset();
(...skipping 376 matching lines...) Expand 10 before | Expand all | Expand 10 after
1299 1299
1300 // Resize layer. 1300 // Resize layer.
1301 child->SetBounds(gfx::Rect(200, 200, 400, 400)); 1301 child->SetBounds(gfx::Rect(200, 200, 400, 400));
1302 child->SetVisible(true); 1302 child->SetVisible(true);
1303 EXPECT_TRUE(schedule_draw_invoked_); 1303 EXPECT_TRUE(schedule_draw_invoked_);
1304 DrawTree(root.get()); 1304 DrawTree(root.get());
1305 EXPECT_TRUE(delegate.painted()); 1305 EXPECT_TRUE(delegate.painted());
1306 } 1306 }
1307 1307
1308 } // namespace ui 1308 } // 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