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

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

Issue 1412923004: Revert of Move gpu memory calculations to Compositor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: rebase Created 5 years, 2 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: content/common/gpu/gpu_command_buffer_stub.h
diff --git a/content/common/gpu/gpu_command_buffer_stub.h b/content/common/gpu/gpu_command_buffer_stub.h
index 910cd91b322e457037d536ec82b0e2acbb540ef5..08daf26c6d8bc180466afab784a5e7e0e7a2c064 100644
--- a/content/common/gpu/gpu_command_buffer_stub.h
+++ b/content/common/gpu/gpu_command_buffer_stub.h
@@ -101,6 +101,7 @@ class GpuCommandBufferStub
// GpuMemoryManagerClient implementation:
gfx::Size GetSurfaceSize() const override;
gpu::gles2::MemoryTracker* GetMemoryTracker() const override;
+ void SetMemoryAllocation(const gpu::MemoryAllocation& allocation) override;
void SuggestHaveFrontBuffer(bool suggest_have_frontbuffer) override;
bool GetTotalGpuMemory(uint64* bytes) override;
@@ -214,6 +215,8 @@ class GpuCommandBufferStub
uint64_t command_buffer_id,
uint64_t release);
+ void OnSetClientHasMemoryAllocationChangedCallback(bool has_callback);
+
void OnCreateImage(int32 id,
gfx::GpuMemoryBufferHandle handle,
gfx::Size size,
@@ -282,6 +285,12 @@ class GpuCommandBufferStub
scoped_ptr<gpu::SyncPointClient> sync_point_client_;
scoped_refptr<gfx::GLSurface> surface_;
+ scoped_ptr<GpuMemoryManagerClientState> memory_manager_client_state_;
+ // The last memory allocation received from the GpuMemoryManager (used to
+ // elide redundant work).
+ bool last_memory_allocation_valid_;
+ gpu::MemoryAllocation last_memory_allocation_;
+
GpuWatchdog* watchdog_;
base::ObserverList<DestructionObserver> destruction_observers_;
« no previous file with comments | « content/common/gpu/client/context_provider_command_buffer.cc ('k') | content/common/gpu/gpu_command_buffer_stub.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698