OLD | NEW |
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 "content/common/gpu/gpu_memory_manager.h" | 5 #include "content/common/gpu/gpu_memory_manager.h" |
| 6 |
6 #include "content/common/gpu/gpu_memory_manager_client.h" | 7 #include "content/common/gpu/gpu_memory_manager_client.h" |
7 #include "content/common/gpu/gpu_memory_tracking.h" | 8 #include "content/common/gpu/gpu_memory_tracking.h" |
8 #include "gpu/command_buffer/common/gpu_memory_allocation.h" | 9 #include "gpu/command_buffer/common/gpu_memory_allocation.h" |
9 #include "ui/gfx/size_conversions.h" | |
10 | |
11 #include "testing/gtest/include/gtest/gtest.h" | 10 #include "testing/gtest/include/gtest/gtest.h" |
| 11 #include "ui/gfx/geometry/size_conversions.h" |
12 | 12 |
13 using gpu::MemoryAllocation; | 13 using gpu::MemoryAllocation; |
14 | 14 |
15 class FakeMemoryTracker : public gpu::gles2::MemoryTracker { | 15 class FakeMemoryTracker : public gpu::gles2::MemoryTracker { |
16 public: | 16 public: |
17 void TrackMemoryAllocatedChange( | 17 void TrackMemoryAllocatedChange( |
18 size_t /* old_size */, | 18 size_t /* old_size */, |
19 size_t /* new_size */, | 19 size_t /* new_size */, |
20 gpu::gles2::MemoryTracker::Pool /* pool */) override {} | 20 gpu::gles2::MemoryTracker::Pool /* pool */) override {} |
21 bool EnsureGPUMemoryAvailable(size_t /* size_needed */) override { | 21 bool EnsureGPUMemoryAvailable(size_t /* size_needed */) override { |
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
394 stub_ignore_c.SetVisible(true); | 394 stub_ignore_c.SetVisible(true); |
395 stub_ignore_c.SetVisible(false); | 395 stub_ignore_c.SetVisible(false); |
396 Manage(); | 396 Manage(); |
397 EXPECT_TRUE(IsAllocationHibernatedForSurfaceYes(stub1.allocation_)); | 397 EXPECT_TRUE(IsAllocationHibernatedForSurfaceYes(stub1.allocation_)); |
398 EXPECT_TRUE(IsAllocationHibernatedForSurfaceYes(stub2.allocation_)); | 398 EXPECT_TRUE(IsAllocationHibernatedForSurfaceYes(stub2.allocation_)); |
399 EXPECT_TRUE(IsAllocationHibernatedForSurfaceNo(stub3.allocation_)); | 399 EXPECT_TRUE(IsAllocationHibernatedForSurfaceNo(stub3.allocation_)); |
400 EXPECT_TRUE(IsAllocationHibernatedForSurfaceNo(stub4.allocation_)); | 400 EXPECT_TRUE(IsAllocationHibernatedForSurfaceNo(stub4.allocation_)); |
401 } | 401 } |
402 | 402 |
403 } // namespace content | 403 } // namespace content |
OLD | NEW |