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

Side by Side Diff: content/common/gpu/gpu_channel_manager.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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "content/common/gpu/gpu_channel_manager.h" 5 #include "content/common/gpu/gpu_channel_manager.h"
6 6
7 #include "base/bind.h" 7 #include "base/bind.h"
8 #include "base/command_line.h" 8 #include "base/command_line.h"
9 #include "content/common/gpu/gpu_channel.h" 9 #include "content/common/gpu/gpu_channel.h"
10 #include "content/common/gpu/gpu_memory_buffer_factory.h" 10 #include "content/common/gpu/gpu_memory_buffer_factory.h"
(...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after
49 IPC_MESSAGE_UNHANDLED(handled = false) 49 IPC_MESSAGE_UNHANDLED(handled = false)
50 IPC_END_MESSAGE_MAP() 50 IPC_END_MESSAGE_MAP()
51 return handled; 51 return handled;
52 } 52 }
53 53
54 protected: 54 protected:
55 virtual ~GpuChannelManagerMessageFilter() {} 55 virtual ~GpuChannelManagerMessageFilter() {}
56 56
57 void OnCreateGpuMemoryBuffer(const gfx::GpuMemoryBufferHandle& handle, 57 void OnCreateGpuMemoryBuffer(const gfx::GpuMemoryBufferHandle& handle,
58 const gfx::Size& size, 58 const gfx::Size& size,
59 unsigned internalformat, 59 gfx::GpuMemoryBuffer::Format format,
60 unsigned usage) { 60 gfx::GpuMemoryBuffer::Usage usage) {
61 TRACE_EVENT2("gpu", 61 TRACE_EVENT2("gpu",
62 "GpuChannelManagerMessageFilter::OnCreateGpuMemoryBuffer", 62 "GpuChannelManagerMessageFilter::OnCreateGpuMemoryBuffer",
63 "primary_id", 63 "primary_id",
64 handle.global_id.primary_id, 64 handle.global_id.primary_id,
65 "secondary_id", 65 "secondary_id",
66 handle.global_id.secondary_id); 66 handle.global_id.secondary_id);
67 sender_->Send(new GpuHostMsg_GpuMemoryBufferCreated( 67 sender_->Send(new GpuHostMsg_GpuMemoryBufferCreated(
68 gpu_memory_buffer_factory_->CreateGpuMemoryBuffer( 68 gpu_memory_buffer_factory_->CreateGpuMemoryBuffer(
69 handle, size, internalformat, usage))); 69 handle, size, format, usage)));
70 } 70 }
71 71
72 IPC::Sender* sender_; 72 IPC::Sender* sender_;
73 GpuMemoryBufferFactory* gpu_memory_buffer_factory_; 73 GpuMemoryBufferFactory* gpu_memory_buffer_factory_;
74 }; 74 };
75 75
76 } // namespace 76 } // namespace
77 77
78 GpuChannelManager::GpuChannelManager(MessageRouter* router, 78 GpuChannelManager::GpuChannelManager(MessageRouter* router,
79 GpuWatchdog* watchdog, 79 GpuWatchdog* watchdog,
(...skipping 224 matching lines...) Expand 10 before | Expand all | Expand 10 after
304 304
305 gfx::GLSurface* GpuChannelManager::GetDefaultOffscreenSurface() { 305 gfx::GLSurface* GpuChannelManager::GetDefaultOffscreenSurface() {
306 if (!default_offscreen_surface_.get()) { 306 if (!default_offscreen_surface_.get()) {
307 default_offscreen_surface_ = 307 default_offscreen_surface_ =
308 gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size()); 308 gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size());
309 } 309 }
310 return default_offscreen_surface_.get(); 310 return default_offscreen_surface_.get();
311 } 311 }
312 312
313 } // namespace content 313 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/client/gpu_memory_buffer_impl_win.cc ('k') | content/common/gpu/gpu_command_buffer_stub.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698