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

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

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_command_buffer_stub.h ('k') | content/common/gpu/gpu_memory_manager.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/gpu_command_buffer_stub.cc
diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/gpu_command_buffer_stub.cc
index a26854f692ad3349b18e50a6f9498fdf04e7f163..8af995f922d87b9b12b4fabf60732153d08038c7 100644
--- a/content/common/gpu/gpu_command_buffer_stub.cc
+++ b/content/common/gpu/gpu_command_buffer_stub.cc
@@ -149,10 +149,6 @@ DevToolsChannelData::CreateForChannel(GpuChannel* channel) {
scoped_ptr<base::DictionaryValue> res(new base::DictionaryValue);
res->SetInteger("renderer_pid", channel->GetClientPID());
res->SetDouble("used_bytes", channel->GetMemoryUsage());
- res->SetDouble("limit_bytes",
- channel->gpu_channel_manager()
- ->gpu_memory_manager()
- ->GetMaximumClientAllocation());
return new DevToolsChannelData(res.release());
}
@@ -209,8 +205,7 @@ GpuCommandBufferStub::GpuCommandBufferStub(
waiting_for_sync_point_(false),
previous_processed_num_(0),
preemption_flag_(preempt_by_flag),
- active_url_(active_url),
- total_gpu_memory_(0) {
+ active_url_(active_url) {
active_url_hash_ = base::Hash(active_url.possibly_invalid_spec());
FastSetActiveURL(active_url_, active_url_hash_);
@@ -611,9 +606,6 @@ void GpuCommandBufferStub::OnInitialize(
new gpu::GLStateRestorerImpl(decoder_->AsWeakPtr()));
}
- if (!context->GetTotalGpuMemory(&total_gpu_memory_))
- total_gpu_memory_ = 0;
-
if (!context_group_->has_program_cache() &&
!context_group_->feature_info()->workarounds().disable_program_cache) {
context_group_->set_program_cache(
@@ -1199,17 +1191,6 @@ void GpuCommandBufferStub::RemoveDestructionObserver(
destruction_observers_.RemoveObserver(observer);
}
-bool GpuCommandBufferStub::GetTotalGpuMemory(uint64* bytes) {
- *bytes = total_gpu_memory_;
- return !!total_gpu_memory_;
-}
-
-gfx::Size GpuCommandBufferStub::GetSurfaceSize() const {
- if (!surface_.get())
- return gfx::Size();
- return surface_->GetSize();
-}
-
const gpu::gles2::FeatureInfo* GpuCommandBufferStub::GetFeatureInfo() const {
return context_group_->feature_info();
}
@@ -1218,14 +1199,6 @@ gpu::gles2::MemoryTracker* GpuCommandBufferStub::GetMemoryTracker() const {
return context_group_->memory_tracker();
}
-void GpuCommandBufferStub::SuggestHaveFrontBuffer(
- bool suggest_have_frontbuffer) {
- // This can be called outside of OnMessageReceived, so the context needs
- // to be made current before calling methods on the surface.
- if (surface_.get() && MakeCurrent())
- surface_->SetFrontbufferAllocation(suggest_have_frontbuffer);
-}
-
bool GpuCommandBufferStub::CheckContextLost() {
DCHECK(command_buffer_);
gpu::CommandBuffer::State state = command_buffer_->GetLastState();
« no previous file with comments | « content/common/gpu/gpu_command_buffer_stub.h ('k') | content/common/gpu/gpu_memory_manager.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698