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

Unified Diff: gpu/ipc/service/gpu_memory_manager.h

Issue 1846253003: Revert of Refactor content/common/gpu into gpu/ipc/service (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 9 months 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « gpu/ipc/service/gpu_memory_buffer_factory_test_template.h ('k') | gpu/ipc/service/gpu_memory_manager.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gpu/ipc/service/gpu_memory_manager.h
diff --git a/gpu/ipc/service/gpu_memory_manager.h b/gpu/ipc/service/gpu_memory_manager.h
deleted file mode 100644
index 5d1569a067d432069604b980eebaa4f719c701a7..0000000000000000000000000000000000000000
--- a/gpu/ipc/service/gpu_memory_manager.h
+++ /dev/null
@@ -1,78 +0,0 @@
-// Copyright (c) 2012 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef GPU_IPC_SERVICE_GPU_MEMORY_MANAGER_H_
-#define GPU_IPC_SERVICE_GPU_MEMORY_MANAGER_H_
-
-#include <stdint.h>
-
-#include <list>
-#include <map>
-
-#include "base/cancelable_callback.h"
-#include "base/containers/hash_tables.h"
-#include "base/gtest_prod_util.h"
-#include "base/macros.h"
-#include "base/memory/weak_ptr.h"
-#include "gpu/command_buffer/common/gpu_memory_allocation.h"
-#include "gpu/command_buffer/service/memory_tracking.h"
-#include "gpu/gpu_export.h"
-
-namespace gpu {
-
-class GpuChannelManager;
-class GpuMemoryTrackingGroup;
-struct VideoMemoryUsageStats;
-
-class GPU_EXPORT GpuMemoryManager :
- public base::SupportsWeakPtr<GpuMemoryManager> {
- public:
- explicit GpuMemoryManager(GpuChannelManager* channel_manager);
- ~GpuMemoryManager();
-
- // Retrieve GPU Resource consumption statistics for the task manager
- void GetVideoMemoryUsageStats(
- VideoMemoryUsageStats* video_memory_usage_stats) const;
-
- GpuMemoryTrackingGroup* CreateTrackingGroup(
- base::ProcessId pid, gles2::MemoryTracker* memory_tracker);
-
- uint64_t GetTrackerMemoryUsage(gles2::MemoryTracker* tracker) const;
-
- private:
- friend class GpuMemoryManagerTest;
- friend class GpuMemoryTrackingGroup;
- friend class GpuMemoryManagerClientState;
-
- typedef std::map<gles2::MemoryTracker*, GpuMemoryTrackingGroup*>
- TrackingGroupMap;
-
- // Send memory usage stats to the browser process.
- void SendUmaStatsToHost();
-
- // Get the current number of bytes allocated.
- uint64_t GetCurrentUsage() const { return bytes_allocated_current_; }
-
- // GpuMemoryTrackingGroup interface
- void TrackMemoryAllocatedChange(GpuMemoryTrackingGroup* tracking_group,
- uint64_t old_size,
- uint64_t new_size);
- void OnDestroyTrackingGroup(GpuMemoryTrackingGroup* tracking_group);
- bool EnsureGPUMemoryAvailable(uint64_t size_needed);
-
- GpuChannelManager* channel_manager_;
-
- // All context groups' tracking structures
- TrackingGroupMap tracking_groups_;
-
- // The current total memory usage, and historical maximum memory usage
- uint64_t bytes_allocated_current_;
- uint64_t bytes_allocated_historical_max_;
-
- DISALLOW_COPY_AND_ASSIGN(GpuMemoryManager);
-};
-
-} // namespace gpu
-
-#endif // GPU_IPC_SERVICE_GPU_MEMORY_MANAGER_H_
« no previous file with comments | « gpu/ipc/service/gpu_memory_buffer_factory_test_template.h ('k') | gpu/ipc/service/gpu_memory_manager.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698