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

Unified Diff: content/common/gpu/client/command_buffer_proxy_impl.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/client/command_buffer_proxy_impl.h
diff --git a/content/common/gpu/client/command_buffer_proxy_impl.h b/content/common/gpu/client/command_buffer_proxy_impl.h
index 39bc76bc316e6856991ce2970e5d47354384dc51..1cf7e6e4a18571189ef974876b981a6732afdd23 100644
--- a/content/common/gpu/client/command_buffer_proxy_impl.h
+++ b/content/common/gpu/client/command_buffer_proxy_impl.h
@@ -135,6 +135,10 @@ class CommandBufferProxyImpl
bool ProduceFrontBuffer(const gpu::Mailbox& mailbox);
void SetContextLostCallback(const base::Closure& callback);
+ typedef base::Callback<void(const gpu::MemoryAllocation&)>
+ MemoryAllocationChangedCallback;
+ void SetMemoryAllocationChangedCallback(
+ const MemoryAllocationChangedCallback& callback);
void AddDeletionObserver(DeletionObserver* observer);
void RemoveDeletionObserver(DeletionObserver* observer);
@@ -190,6 +194,7 @@ class CommandBufferProxyImpl
void OnDestroyed(gpu::error::ContextLostReason reason,
gpu::error::Error error);
void OnConsoleMessage(const GPUCommandBufferConsoleMessage& message);
+ void OnSetMemoryAllocation(const gpu::MemoryAllocation& allocation);
void OnSignalAck(uint32 id);
void OnSwapBuffersCompleted(const std::vector<ui::LatencyInfo>& latency_info,
gfx::SwapResult result);
@@ -240,6 +245,8 @@ class CommandBufferProxyImpl
base::Closure context_lost_callback_;
+ MemoryAllocationChangedCallback memory_allocation_changed_callback_;
+
GpuConsoleMessageCallback console_message_callback_;
// Tasks to be invoked in SignalSyncPoint responses.

Powered by Google App Engine
This is Rietveld 408576698