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

Unified Diff: content/common/gpu/gpu_memory_manager_client.h

Issue 1420533009: Cleanup GpuMemoryManager and helpers. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: more cleanup. Created 5 years, 1 month 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 | « content/common/gpu/gpu_memory_manager.cc ('k') | content/common/gpu/gpu_memory_manager_client.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/gpu_memory_manager_client.h
diff --git a/content/common/gpu/gpu_memory_manager_client.h b/content/common/gpu/gpu_memory_manager_client.h
deleted file mode 100644
index ae06053d334db44be364e218de5ccdc5f6532dba..0000000000000000000000000000000000000000
--- a/content/common/gpu/gpu_memory_manager_client.h
+++ /dev/null
@@ -1,86 +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 CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_CLIENT_H_
-#define CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_CLIENT_H_
-
-#include <list>
-
-#include "base/basictypes.h"
-#include "content/common/content_export.h"
-#include "gpu/command_buffer/common/gpu_memory_allocation.h"
-#include "gpu/command_buffer/service/memory_tracking.h"
-#include "ui/gfx/geometry/size.h"
-
-namespace content {
-
-class GpuMemoryManager;
-class GpuMemoryTrackingGroup;
-
-// The interface that the GPU memory manager uses to manipulate a client (to
-// send it allocation information and query its properties).
-class CONTENT_EXPORT GpuMemoryManagerClient {
- public:
- virtual ~GpuMemoryManagerClient() {}
-
- // Returns surface size.
- virtual gfx::Size GetSurfaceSize() const = 0;
-
- // Returns the memory tracker for this stub.
- virtual gpu::gles2::MemoryTracker* GetMemoryTracker() const = 0;
-
- virtual void SuggestHaveFrontBuffer(bool suggest_have_frontbuffer) = 0;
-
- // Returns in bytes the total amount of GPU memory for the GPU which this
- // context is currently rendering on. Returns false if no extension exists
- // to get the exact amount of GPU memory.
- virtual bool GetTotalGpuMemory(uint64* bytes) = 0;
-};
-
-// The state associated with a GPU memory manager client. This acts as the
-// handle through which the client interacts with the GPU memory manager.
-class CONTENT_EXPORT GpuMemoryManagerClientState {
- public:
- ~GpuMemoryManagerClientState();
- void SetVisible(bool visible);
-
- private:
- friend class GpuMemoryManager;
-
- GpuMemoryManagerClientState(GpuMemoryManager* memory_manager,
- GpuMemoryManagerClient* client,
- GpuMemoryTrackingGroup* tracking_group,
- bool has_surface,
- bool visible);
-
- // The memory manager this client is hanging off of.
- GpuMemoryManager* memory_manager_;
-
- // The client to send allocations to.
- GpuMemoryManagerClient* client_;
-
- // The tracking group for this client.
- GpuMemoryTrackingGroup* tracking_group_;
-
- // Offscreen commandbuffers will not have a surface.
- const bool has_surface_;
-
- // Whether or not this client is visible.
- bool visible_;
-
- // If the client has a surface, then this is an iterator in the
- // clients_visible_mru_ if this client is visible and
- // clients_nonvisible_mru_ if this is non-visible. Otherwise this is an
- // iterator in clients_nonsurface_.
- std::list<GpuMemoryManagerClientState*>::iterator list_iterator_;
- bool list_iterator_valid_;
-
- // Set to disable allocating a frontbuffer or to disable allocations
- // for clients that don't have surfaces.
- bool hibernated_;
-};
-
-} // namespace content
-
-#endif // CONTENT_COMMON_GPU_GPU_MEMORY_MANAGER_CLIENT_H_
« no previous file with comments | « content/common/gpu/gpu_memory_manager.cc ('k') | content/common/gpu/gpu_memory_manager_client.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698