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

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

Issue 584503005: Make scroll offset type of float in cc (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: link crbug to TODO Created 6 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 | « cc/layers/layer_impl_unittest.cc ('k') | cc/layers/picture_layer_impl_perftest.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/layers/layer.h" 5 #include "cc/layers/layer.h"
6 6
7 #include "cc/animation/keyframed_animation_curve.h" 7 #include "cc/animation/keyframed_animation_curve.h"
8 #include "cc/base/math_util.h" 8 #include "cc/base/math_util.h"
9 #include "cc/layers/layer_impl.h" 9 #include "cc/layers/layer_impl.h"
10 #include "cc/resources/layer_painter.h" 10 #include "cc/resources/layer_painter.h"
(...skipping 593 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetOpacity(0.5f)); 604 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetOpacity(0.5f));
605 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetBlendMode(SkXfermode::kHue_Mode)); 605 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetBlendMode(SkXfermode::kHue_Mode));
606 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetIsRootForIsolatedGroup(true)); 606 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetIsRootForIsolatedGroup(true));
607 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetContentsOpaque(true)); 607 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetContentsOpaque(true));
608 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetPosition(gfx::PointF(4.f, 9.f))); 608 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetPosition(gfx::PointF(4.f, 9.f)));
609 // We can use any layer pointer here since we aren't syncing for real. 609 // We can use any layer pointer here since we aren't syncing for real.
610 EXPECT_SET_NEEDS_COMMIT(1, 610 EXPECT_SET_NEEDS_COMMIT(1,
611 test_layer->SetScrollClipLayerId(test_layer->id())); 611 test_layer->SetScrollClipLayerId(test_layer->id()));
612 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetUserScrollable(true, false)); 612 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetUserScrollable(true, false));
613 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetScrollOffset( 613 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetScrollOffset(
614 gfx::Vector2d(10, 10))); 614 gfx::ScrollOffset(10, 10)));
615 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetShouldScrollOnMainThread(true)); 615 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetShouldScrollOnMainThread(true));
616 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetNonFastScrollableRegion( 616 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetNonFastScrollableRegion(
617 Region(gfx::Rect(1, 1, 2, 2)))); 617 Region(gfx::Rect(1, 1, 2, 2))));
618 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetHaveWheelEventHandlers(true)); 618 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetHaveWheelEventHandlers(true));
619 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetHaveScrollEventHandlers(true)); 619 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetHaveScrollEventHandlers(true));
620 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetTransform( 620 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetTransform(
621 gfx::Transform(0.0, 0.0, 0.0, 0.0, 0.0, 0.0))); 621 gfx::Transform(0.0, 0.0, 0.0, 0.0, 0.0, 0.0)));
622 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetDoubleSided(false)); 622 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetDoubleSided(false));
623 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetTouchEventHandlerRegion( 623 EXPECT_SET_NEEDS_COMMIT(1, test_layer->SetTouchEventHandlerRegion(
624 gfx::Rect(10, 10))); 624 gfx::Rect(10, 10)));
(...skipping 620 matching lines...) Expand 10 before | Expand all | Expand 10 after
1245 root_layer->AddChild(becomes_not_draws_content); 1245 root_layer->AddChild(becomes_not_draws_content);
1246 EXPECT_EQ(0, root_layer->NumDescendantsThatDrawContent()); 1246 EXPECT_EQ(0, root_layer->NumDescendantsThatDrawContent());
1247 1247
1248 becomes_draws_content->SetIsDrawable(true); 1248 becomes_draws_content->SetIsDrawable(true);
1249 root_layer->AddChild(becomes_draws_content); 1249 root_layer->AddChild(becomes_draws_content);
1250 EXPECT_EQ(1, root_layer->NumDescendantsThatDrawContent()); 1250 EXPECT_EQ(1, root_layer->NumDescendantsThatDrawContent());
1251 } 1251 }
1252 1252
1253 } // namespace 1253 } // namespace
1254 } // namespace cc 1254 } // namespace cc
OLDNEW
« no previous file with comments | « cc/layers/layer_impl_unittest.cc ('k') | cc/layers/picture_layer_impl_perftest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698