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

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

Issue 634083002: gpu: Compositor management of GpuMemoryBuffer instances. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@cc-pre-chromium-image-refactor
Patch Set: rebase Created 6 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
« no previous file with comments | « content/common/gpu/gpu_command_buffer_stub.h ('k') | content/common/gpu/gpu_memory_buffer_factory.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 e66d71335e06be7031c87d53471530707ad8f714..ff7cac0bf53e17716e43a3d089290059f1575264 100644
--- a/content/common/gpu/gpu_command_buffer_stub.cc
+++ b/content/common/gpu/gpu_command_buffer_stub.cc
@@ -271,10 +271,8 @@ bool GpuCommandBufferStub::OnMessageReceived(const IPC::Message& message) {
IPC_MESSAGE_HANDLER(
GpuCommandBufferMsg_SetClientHasMemoryAllocationChangedCallback,
OnSetClientHasMemoryAllocationChangedCallback)
- IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_RegisterGpuMemoryBuffer,
- OnRegisterGpuMemoryBuffer);
- IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_UnregisterGpuMemoryBuffer,
- OnUnregisterGpuMemoryBuffer);
+ IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_CreateImage, OnCreateImage);
+ IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_DestroyImage, OnDestroyImage);
IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_CreateStreamTexture,
OnCreateStreamTexture)
IPC_MESSAGE_UNHANDLED(handled = false)
@@ -943,13 +941,12 @@ void GpuCommandBufferStub::OnSetClientHasMemoryAllocationChangedCallback(
}
}
-void GpuCommandBufferStub::OnRegisterGpuMemoryBuffer(
- int32 id,
- gfx::GpuMemoryBufferHandle handle,
- uint32 width,
- uint32 height,
- uint32 internalformat) {
- TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnRegisterGpuMemoryBuffer");
+void GpuCommandBufferStub::OnCreateImage(int32 id,
+ gfx::GpuMemoryBufferHandle handle,
+ gfx::Size size,
+ gfx::GpuMemoryBuffer::Format format,
+ uint32 internalformat) {
+ TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnCreateImage");
if (!decoder_)
return;
@@ -964,18 +961,15 @@ void GpuCommandBufferStub::OnRegisterGpuMemoryBuffer(
GpuChannelManager* manager = channel_->gpu_channel_manager();
scoped_refptr<gfx::GLImage> image =
manager->gpu_memory_buffer_factory()->CreateImageForGpuMemoryBuffer(
- handle,
- gfx::Size(width, height),
- internalformat,
- channel()->client_id());
+ handle, size, format, internalformat, channel()->client_id());
if (!image.get())
return;
image_manager->AddImage(image.get(), id);
}
-void GpuCommandBufferStub::OnUnregisterGpuMemoryBuffer(int32 id) {
- TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnUnregisterGpuMemoryBuffer");
+void GpuCommandBufferStub::OnDestroyImage(int32 id) {
+ TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnDestroyImage");
if (!decoder_)
return;
« no previous file with comments | « content/common/gpu/gpu_command_buffer_stub.h ('k') | content/common/gpu/gpu_memory_buffer_factory.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698