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

Side by Side Diff: content/common/gpu/gpu_channel_manager.cc

Issue 1656433002: Sample code: IPC Transport object for GPU Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: GpuMemoryBufferService + Transport object. TODO: Eliminate ChildThreadImpl dependency Created 4 years, 10 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
« no previous file with comments | « content/common/gpu/gpu_channel_manager.h ('k') | content/common/gpu/gpu_command_buffer_stub.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 <algorithm> 7 #include <algorithm>
8 #include <utility> 8 #include <utility>
9 9
10 #include "base/bind.h" 10 #include "base/bind.h"
(...skipping 181 matching lines...) Expand 10 before | Expand all | Expand 10 after
192 if (it->second->channel_id() == channel_handle.name) { 192 if (it->second->channel_id() == channel_handle.name) {
193 gpu_channels_.erase(it); 193 gpu_channels_.erase(it);
194 return; 194 return;
195 } 195 }
196 } 196 }
197 } 197 }
198 198
199 void GpuChannelManager::OnCreateViewCommandBuffer( 199 void GpuChannelManager::OnCreateViewCommandBuffer(
200 const gfx::GLSurfaceHandle& window, 200 const gfx::GLSurfaceHandle& window,
201 int32_t client_id, 201 int32_t client_id,
202 const GPUCreateCommandBufferConfig& init_params, 202 const GpuCreateCommandBufferConfig& init_params,
203 int32_t route_id) { 203 int32_t route_id) {
204 CreateCommandBufferResult result = CREATE_COMMAND_BUFFER_FAILED; 204 CreateCommandBufferResult result = CREATE_COMMAND_BUFFER_FAILED;
205 205
206 auto it = gpu_channels_.find(client_id); 206 auto it = gpu_channels_.find(client_id);
207 if (it != gpu_channels_.end()) { 207 if (it != gpu_channels_.end()) {
208 result = it->second->CreateViewCommandBuffer(window, init_params, route_id); 208 result = it->second->CreateViewCommandBuffer(window, init_params, route_id);
209 } 209 }
210 210
211 Send(new GpuHostMsg_CommandBufferCreated(result)); 211 Send(new GpuHostMsg_CommandBufferCreated(result));
212 } 212 }
(...skipping 127 matching lines...) Expand 10 before | Expand all | Expand 10 after
340 } 340 }
341 } 341 }
342 if (!stub || !stub->decoder()->MakeCurrent()) 342 if (!stub || !stub->decoder()->MakeCurrent())
343 return; 343 return;
344 glFinish(); 344 glFinish();
345 DidAccessGpu(); 345 DidAccessGpu();
346 } 346 }
347 #endif 347 #endif
348 348
349 } // namespace content 349 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_channel_manager.h ('k') | content/common/gpu/gpu_command_buffer_stub.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698