| OLD | NEW |
| 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/output/filter_operations.h" | 5 #include "cc/output/filter_operations.h" |
| 6 #include "skia/ext/refptr.h" | 6 #include "skia/ext/refptr.h" |
| 7 #include "testing/gtest/include/gtest/gtest.h" | 7 #include "testing/gtest/include/gtest/gtest.h" |
| 8 #include "third_party/skia/include/effects/SkBlurImageFilter.h" | 8 #include "third_party/skia/include/effects/SkBlurImageFilter.h" |
| 9 #include "ui/gfx/point.h" | 9 #include "ui/gfx/geometry/point.h" |
| 10 | 10 |
| 11 namespace cc { | 11 namespace cc { |
| 12 namespace { | 12 namespace { |
| 13 | 13 |
| 14 TEST(FilterOperationsTest, GetOutsetsBlur) { | 14 TEST(FilterOperationsTest, GetOutsetsBlur) { |
| 15 FilterOperations ops; | 15 FilterOperations ops; |
| 16 ops.Append(FilterOperation::CreateBlurFilter(20)); | 16 ops.Append(FilterOperation::CreateBlurFilter(20)); |
| 17 int top, right, bottom, left; | 17 int top, right, bottom, left; |
| 18 top = right = bottom = left = 0; | 18 top = right = bottom = left = 0; |
| 19 ops.GetOutsets(&top, &right, &bottom, &left); | 19 ops.GetOutsets(&top, &right, &bottom, &left); |
| (...skipping 674 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 694 blended = to.Blend(from, -0.75); | 694 blended = to.Blend(from, -0.75); |
| 695 EXPECT_EQ(to, blended); | 695 EXPECT_EQ(to, blended); |
| 696 blended = to.Blend(from, 0.75); | 696 blended = to.Blend(from, 0.75); |
| 697 EXPECT_EQ(to, blended); | 697 EXPECT_EQ(to, blended); |
| 698 blended = to.Blend(from, 1.5); | 698 blended = to.Blend(from, 1.5); |
| 699 EXPECT_EQ(to, blended); | 699 EXPECT_EQ(to, blended); |
| 700 } | 700 } |
| 701 | 701 |
| 702 } // namespace | 702 } // namespace |
| 703 } // namespace cc | 703 } // namespace cc |
| OLD | NEW |