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

Unified Diff: content/common/gpu/client/context_provider_command_buffer.cc

Issue 1324413003: Move gpu memory calculations to Compositor. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: remove more memory alloc codes. Created 5 years, 3 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/context_provider_command_buffer.cc
diff --git a/content/common/gpu/client/context_provider_command_buffer.cc b/content/common/gpu/client/context_provider_command_buffer.cc
index ba9f0ebfbed6a6f75196c29a7bf89da933557773..8111186f210a7b095d27ebf8bdd6e15d26eeb219 100644
--- a/content/common/gpu/client/context_provider_command_buffer.cc
+++ b/content/common/gpu/client/context_provider_command_buffer.cc
@@ -67,8 +67,6 @@ ContextProviderCommandBuffer::~ContextProviderCommandBuffer() {
// Destroy references to the context3d_ before leaking it.
if (context3d_->GetCommandBufferProxy()) {
context3d_->GetCommandBufferProxy()->SetLock(nullptr);
- context3d_->GetCommandBufferProxy()->SetMemoryAllocationChangedCallback(
- CommandBufferProxyImpl::MemoryAllocationChangedCallback());
}
lost_context_callback_proxy_.reset();
}
@@ -232,19 +230,4 @@ void ContextProviderCommandBuffer::SetLostContextCallback(
lost_context_callback_ = lost_context_callback;
}
-void ContextProviderCommandBuffer::SetMemoryPolicyChangedCallback(
- const MemoryPolicyChangedCallback& memory_policy_changed_callback) {
- DCHECK(context_thread_checker_.CalledOnValidThread());
- DCHECK(memory_policy_changed_callback_.is_null() ||
- memory_policy_changed_callback.is_null());
- memory_policy_changed_callback_ = memory_policy_changed_callback;
-
- if (!memory_policy_changed_callback_.is_null()) {
- DCHECK(context3d_->GetCommandBufferProxy());
- context3d_->GetCommandBufferProxy()->SetMemoryAllocationChangedCallback(
- base::Bind(&ContextProviderCommandBuffer::OnMemoryAllocationChanged,
- base::Unretained(this)));
- }
-}
-
} // namespace content

Powered by Google App Engine
This is Rietveld 408576698