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

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

Issue 440203002: Merge 283085 "Added more detailed result codes for CreateViewCom..." (Closed) Base URL: svn://svn.chromium.org/chrome/branches/2062/src/
Patch Set: Created 6 years, 4 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 | Annotate | Revision Log
« no previous file with comments | « content/common/gpu/gpu_channel.cc ('k') | content/common/gpu/gpu_messages.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 "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_manager.h" 10 #include "content/common/gpu/gpu_memory_manager.h"
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 } 164 }
165 } 165 }
166 166
167 void GpuChannelManager::OnCreateViewCommandBuffer( 167 void GpuChannelManager::OnCreateViewCommandBuffer(
168 const gfx::GLSurfaceHandle& window, 168 const gfx::GLSurfaceHandle& window,
169 int32 surface_id, 169 int32 surface_id,
170 int32 client_id, 170 int32 client_id,
171 const GPUCreateCommandBufferConfig& init_params, 171 const GPUCreateCommandBufferConfig& init_params,
172 int32 route_id) { 172 int32 route_id) {
173 DCHECK(surface_id); 173 DCHECK(surface_id);
174 bool succeeded = false; 174 CreateCommandBufferResult result = CREATE_COMMAND_BUFFER_FAILED;
175 175
176 GpuChannelMap::const_iterator iter = gpu_channels_.find(client_id); 176 GpuChannelMap::const_iterator iter = gpu_channels_.find(client_id);
177 if (iter != gpu_channels_.end()) { 177 if (iter != gpu_channels_.end()) {
178 succeeded = iter->second->CreateViewCommandBuffer( 178 result = iter->second->CreateViewCommandBuffer(
179 window, surface_id, init_params, route_id); 179 window, surface_id, init_params, route_id);
180 } 180 }
181 181
182 Send(new GpuHostMsg_CommandBufferCreated(succeeded)); 182 Send(new GpuHostMsg_CommandBufferCreated(result));
183 } 183 }
184 184
185 void GpuChannelManager::CreateImage( 185 void GpuChannelManager::CreateImage(
186 gfx::PluginWindowHandle window, int32 client_id, int32 image_id) { 186 gfx::PluginWindowHandle window, int32 client_id, int32 image_id) {
187 gfx::Size size; 187 gfx::Size size;
188 188
189 GpuChannelMap::const_iterator iter = gpu_channels_.find(client_id); 189 GpuChannelMap::const_iterator iter = gpu_channels_.find(client_id);
190 if (iter != gpu_channels_.end()) { 190 if (iter != gpu_channels_.end()) {
191 iter->second->CreateImage(window, image_id, &size); 191 iter->second->CreateImage(window, image_id, &size);
192 } 192 }
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
311 311
312 gfx::GLSurface* GpuChannelManager::GetDefaultOffscreenSurface() { 312 gfx::GLSurface* GpuChannelManager::GetDefaultOffscreenSurface() {
313 if (!default_offscreen_surface_.get()) { 313 if (!default_offscreen_surface_.get()) {
314 default_offscreen_surface_ = 314 default_offscreen_surface_ =
315 gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size()); 315 gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size());
316 } 316 }
317 return default_offscreen_surface_.get(); 317 return default_offscreen_surface_.get();
318 } 318 }
319 319
320 } // namespace content 320 } // namespace content
OLDNEW
« no previous file with comments | « content/common/gpu/gpu_channel.cc ('k') | content/common/gpu/gpu_messages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698