| 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/resources/tile.h" | 5 #include "cc/resources/tile.h" |
| 6 #include "cc/test/fake_tile_manager.h" | 6 #include "cc/test/fake_tile_manager.h" |
| 7 #include "cc/test/fake_tile_manager_client.h" | 7 #include "cc/test/fake_tile_manager_client.h" |
| 8 #include "testing/gtest/include/gtest/gtest.h" | 8 #include "testing/gtest/include/gtest/gtest.h" |
| 9 | 9 |
| 10 namespace cc { | 10 namespace cc { |
| 11 namespace { | 11 namespace { |
| 12 | 12 |
| 13 class FakePicturePileImpl : public PicturePileImpl { | 13 class FakePicturePileImpl : public PicturePileImpl { |
| 14 public: | 14 public: |
| 15 FakePicturePileImpl() : PicturePileImpl(false) { | 15 FakePicturePileImpl() : PicturePileImpl(false) { |
| 16 gfx::Size size(std::numeric_limits<int>::max(), | 16 gfx::Size size(std::numeric_limits<int>::max(), |
| 17 std::numeric_limits<int>::max()); | 17 std::numeric_limits<int>::max()); |
| 18 Resize(size); | 18 Resize(size); |
| 19 recorded_region_ = Region(gfx::Rect(size)); | 19 recorded_region_ = Region(gfx::Rect(size)); |
| 20 } | 20 } |
| 21 | 21 |
| 22 protected: | 22 protected: |
| 23 ~FakePicturePileImpl() {} | 23 virtual ~FakePicturePileImpl() {} |
| 24 }; | 24 }; |
| 25 | 25 |
| 26 class TilePriorityForEventualBin : public TilePriority { | 26 class TilePriorityForEventualBin : public TilePriority { |
| 27 public: | 27 public: |
| 28 TilePriorityForEventualBin() : TilePriority( | 28 TilePriorityForEventualBin() : TilePriority( |
| 29 NON_IDEAL_RESOLUTION, | 29 NON_IDEAL_RESOLUTION, |
| 30 1.0, | 30 1.0, |
| 31 315.0) { } | 31 315.0) { } |
| 32 }; | 32 }; |
| 33 | 33 |
| (...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 94 | 94 |
| 95 // Check if pending tiles get memory | 95 // Check if pending tiles get memory |
| 96 for (TileVector::const_iterator it = tiles_on_pending_tree.begin(); | 96 for (TileVector::const_iterator it = tiles_on_pending_tree.begin(); |
| 97 it != tiles_on_pending_tree.end() ; ++it) { | 97 it != tiles_on_pending_tree.end() ; ++it) { |
| 98 EXPECT_TRUE((*it)->IsAssignedGpuMemory()); | 98 EXPECT_TRUE((*it)->IsAssignedGpuMemory()); |
| 99 } | 99 } |
| 100 } | 100 } |
| 101 | 101 |
| 102 } // namespace | 102 } // namespace |
| 103 } // namespace cc | 103 } // namespace cc |
| OLD | NEW |