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

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

Issue 235563002: gpu: Separate GpuControlService from GpuControl (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: unregister Created 6 years, 8 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.cc
diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/gpu_command_buffer_stub.cc
index abb6288e1685d775398e49a6f61e88b0dffe060e..e358408b7baf5cb22dda5dd65cf1497054b6054a 100644
--- a/content/common/gpu/gpu_command_buffer_stub.cc
+++ b/content/common/gpu/gpu_command_buffer_stub.cc
@@ -539,12 +539,10 @@ void GpuCommandBufferStub::OnInitialize(
return;
}
- gpu_control_.reset(
+ gpu_control_service_.reset(
new gpu::GpuControlService(context_group_->image_manager(),
- NULL,
context_group_->mailbox_manager(),
- NULL,
- decoder_->GetCapabilities()));
+ NULL));
if (CommandLine::ForCurrentProcess()->HasSwitch(
switches::kEnableGPUServiceLogging)) {
@@ -588,7 +586,7 @@ void GpuCommandBufferStub::OnInitialize(
shared_state_shm.Pass(), kSharedStateSize));
GpuCommandBufferMsg_Initialize::WriteReplyParams(
- reply_message, true, gpu_control_->GetCapabilities());
+ reply_message, true, decoder_->GetCapabilities());
Send(reply_message);
if (handle_.is_null() && !active_url_.is_empty()) {
@@ -956,19 +954,16 @@ void GpuCommandBufferStub::OnRegisterGpuMemoryBuffer(
return;
}
#endif
- if (gpu_control_) {
- gpu_control_->RegisterGpuMemoryBuffer(id,
- gpu_memory_buffer,
- width,
- height,
- internalformat);
+ if (gpu_control_service_) {
+ gpu_control_service_->RegisterGpuMemoryBuffer(
+ id, gpu_memory_buffer, width, height, internalformat);
}
}
void GpuCommandBufferStub::OnDestroyGpuMemoryBuffer(int32 id) {
TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnDestroyGpuMemoryBuffer");
- if (gpu_control_)
- gpu_control_->DestroyGpuMemoryBuffer(id);
+ if (gpu_control_service_)
+ gpu_control_service_->UnregisterGpuMemoryBuffer(id);
}
void GpuCommandBufferStub::SendConsoleMessage(

Powered by Google App Engine
This is Rietveld 408576698