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 "base/memory/scoped_ptr.h" | 5 #include "base/memory/scoped_ptr.h" |
6 #include "cc/test/fake_picture_pile_impl.h" | 6 #include "cc/test/fake_picture_pile_impl.h" |
7 #include "cc/test/fake_rendering_stats_instrumentation.h" | 7 #include "cc/test/fake_rendering_stats_instrumentation.h" |
8 #include "cc/test/skia_common.h" | 8 #include "cc/test/skia_common.h" |
9 #include "skia/ext/refptr.h" | 9 #include "skia/ext/refptr.h" |
10 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
11 #include "third_party/skia/include/core/SkPixelRef.h" | 11 #include "third_party/skia/include/core/SkPixelRef.h" |
12 #include "third_party/skia/include/core/SkShader.h" | 12 #include "third_party/skia/include/core/SkShader.h" |
13 #include "ui/gfx/rect.h" | 13 #include "ui/gfx/geometry/rect.h" |
14 #include "ui/gfx/size_conversions.h" | 14 #include "ui/gfx/geometry/size_conversions.h" |
15 | 15 |
16 namespace cc { | 16 namespace cc { |
17 namespace { | 17 namespace { |
18 | 18 |
19 TEST(PicturePileImplTest, AnalyzeIsSolidUnscaled) { | 19 TEST(PicturePileImplTest, AnalyzeIsSolidUnscaled) { |
20 gfx::Size tile_size(100, 100); | 20 gfx::Size tile_size(100, 100); |
21 gfx::Size layer_bounds(400, 400); | 21 gfx::Size layer_bounds(400, 400); |
22 | 22 |
23 scoped_refptr<FakePicturePileImpl> pile = | 23 scoped_refptr<FakePicturePileImpl> pile = |
24 FakePicturePileImpl::CreateFilledPile(tile_size, layer_bounds); | 24 FakePicturePileImpl::CreateFilledPile(tile_size, layer_bounds); |
(...skipping 858 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
883 EXPECT_TRUE(iterator); | 883 EXPECT_TRUE(iterator); |
884 EXPECT_TRUE(*iterator == discardable_bitmap[1].pixelRef()); | 884 EXPECT_TRUE(*iterator == discardable_bitmap[1].pixelRef()); |
885 EXPECT_TRUE(++iterator); | 885 EXPECT_TRUE(++iterator); |
886 EXPECT_TRUE(*iterator == discardable_bitmap[2].pixelRef()); | 886 EXPECT_TRUE(*iterator == discardable_bitmap[2].pixelRef()); |
887 EXPECT_FALSE(++iterator); | 887 EXPECT_FALSE(++iterator); |
888 } | 888 } |
889 } | 889 } |
890 | 890 |
891 } // namespace | 891 } // namespace |
892 } // namespace cc | 892 } // namespace cc |
OLD | NEW |