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

Side by Side Diff: content/common/gpu/gpu_memory_manager_unittest.cc

Issue 11516014: Track managed memory usage in the command buffer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Fix unit test compile error Created 8 years 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 | Annotate | Revision Log
« no previous file with comments | « content/common/gpu/gpu_memory_manager.cc ('k') | content/common/gpu/gpu_memory_tracking.h » ('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 (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_allocation.h" 5 #include "content/common/gpu/gpu_memory_allocation.h"
6 #include "content/common/gpu/gpu_memory_manager.h" 6 #include "content/common/gpu/gpu_memory_manager.h"
7 #include "content/common/gpu/gpu_memory_tracking.h" 7 #include "content/common/gpu/gpu_memory_tracking.h"
8 #include "ui/gfx/size_conversions.h" 8 #include "ui/gfx/size_conversions.h"
9 9
10 #include "testing/gtest/include/gtest/gtest.h" 10 #include "testing/gtest/include/gtest/gtest.h"
11 11
12 class FakeMemoryTracker : public gpu::gles2::MemoryTracker { 12 class FakeMemoryTracker : public gpu::gles2::MemoryTracker {
13 public: 13 public:
14 void TrackMemoryAllocatedChange(size_t old_size, size_t new_size) { 14 void TrackMemoryAllocatedChange(
15 size_t old_size,
16 size_t new_size,
17 gpu::gles2::MemoryTracker::Pool pool) {
15 } 18 }
16 private: 19 private:
17 ~FakeMemoryTracker() { 20 ~FakeMemoryTracker() {
18 } 21 }
19 }; 22 };
20 23
21 namespace content { 24 namespace content {
22 25
23 // This class is used to collect all stub assignments during a 26 // This class is used to collect all stub assignments during a
24 // Manage() call. 27 // Manage() call.
(...skipping 853 matching lines...) Expand 10 before | Expand all | Expand 10 after
878 memmgr_.GetCurrentBackgroundedAvailableGpuMemory()); 881 memmgr_.GetCurrentBackgroundedAvailableGpuMemory());
879 EXPECT_EQ(memmgr_.GetCurrentBackgroundedAvailableGpuMemory(), 882 EXPECT_EQ(memmgr_.GetCurrentBackgroundedAvailableGpuMemory(),
880 stub1.BytesWhenNotVisible()); 883 stub1.BytesWhenNotVisible());
881 EXPECT_EQ(0ul, 884 EXPECT_EQ(0ul,
882 stub2.BytesWhenNotVisible()); 885 stub2.BytesWhenNotVisible());
883 EXPECT_EQ(memmgr_.GetCurrentBackgroundedAvailableGpuMemory(), 886 EXPECT_EQ(memmgr_.GetCurrentBackgroundedAvailableGpuMemory(),
884 stub3.BytesWhenNotVisible()); 887 stub3.BytesWhenNotVisible());
885 } 888 }
886 889
887 } // namespace content 890 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_memory_manager.cc ('k') | content/common/gpu/gpu_memory_tracking.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698