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

Unified Diff: components/view_manager/gles2/gpu_memory_tracker.h

Issue 1245683004: Mandoline: Merge Surfaces and Views apps (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebased Created 5 years, 4 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
Index: components/view_manager/gles2/gpu_memory_tracker.h
diff --git a/components/view_manager/gles2/gpu_memory_tracker.h b/components/view_manager/gles2/gpu_memory_tracker.h
new file mode 100644
index 0000000000000000000000000000000000000000..7300472aabd79e4f094aa417b6b9b51773cbec6b
--- /dev/null
+++ b/components/view_manager/gles2/gpu_memory_tracker.h
@@ -0,0 +1,35 @@
+// Copyright 2015 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 COMPONENTS_VIEW_MANAGER_GLES2_GPU_MEMORY_TRACKER_H_
+#define COMPONENTS_VIEW_MANAGER_GLES2_GPU_MEMORY_TRACKER_H_
+
+#include "gpu/command_buffer/service/memory_tracking.h"
+
+namespace gles2 {
+
+// TODO(fsamuel, rjkroege): This is a stub implementation that needs to be
+// completed for proper memory tracking.
+class GpuMemoryTracker : public gpu::gles2::MemoryTracker {
+ public:
+ GpuMemoryTracker();
+
+ // gpu::gles2::MemoryTracker implementation:
+ void TrackMemoryAllocatedChange(
+ size_t old_size,
+ size_t new_size,
+ gpu::gles2::MemoryTracker::Pool pool) override;
+ bool EnsureGPUMemoryAvailable(size_t size_needed) override;
+ uint64_t ClientTracingId() const override;
+ int ClientId() const override;
+
+ private:
+ ~GpuMemoryTracker() override;
+
+ DISALLOW_COPY_AND_ASSIGN(GpuMemoryTracker);
+};
+
+} // namespace gles2
+
+#endif // COMPONENTS_VIEW_MANAGER_GLES2_GPU_MEMORY_TRACKER_H_

Powered by Google App Engine
This is Rietveld 408576698