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

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

Issue 383303004: Added more detailed result codes for CreateViewCommandBuffer. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Deleted commented-out code from test. Created 6 years, 5 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 160 matching lines...) Expand 10 before | Expand all | Expand 10 after
171 } 171 }
172 } 172 }
173 173
174 void GpuChannelManager::OnCreateViewCommandBuffer( 174 void GpuChannelManager::OnCreateViewCommandBuffer(
175 const gfx::GLSurfaceHandle& window, 175 const gfx::GLSurfaceHandle& window,
176 int32 surface_id, 176 int32 surface_id,
177 int32 client_id, 177 int32 client_id,
178 const GPUCreateCommandBufferConfig& init_params, 178 const GPUCreateCommandBufferConfig& init_params,
179 int32 route_id) { 179 int32 route_id) {
180 DCHECK(surface_id); 180 DCHECK(surface_id);
181 bool succeeded = false; 181 CreateCommandBufferResult result = CREATE_COMMAND_BUFFER_FAILED;
182 182
183 GpuChannelMap::const_iterator iter = gpu_channels_.find(client_id); 183 GpuChannelMap::const_iterator iter = gpu_channels_.find(client_id);
184 if (iter != gpu_channels_.end()) { 184 if (iter != gpu_channels_.end()) {
185 succeeded = iter->second->CreateViewCommandBuffer( 185 result = iter->second->CreateViewCommandBuffer(
186 window, surface_id, init_params, route_id); 186 window, surface_id, init_params, route_id);
187 } 187 }
188 188
189 Send(new GpuHostMsg_CommandBufferCreated(succeeded)); 189 Send(new GpuHostMsg_CommandBufferCreated(result));
190 } 190 }
191 191
192 void GpuChannelManager::CreateImage( 192 void GpuChannelManager::CreateImage(
193 gfx::PluginWindowHandle window, int32 client_id, int32 image_id) { 193 gfx::PluginWindowHandle window, int32 client_id, int32 image_id) {
194 gfx::Size size; 194 gfx::Size size;
195 195
196 GpuChannelMap::const_iterator iter = gpu_channels_.find(client_id); 196 GpuChannelMap::const_iterator iter = gpu_channels_.find(client_id);
197 if (iter != gpu_channels_.end()) { 197 if (iter != gpu_channels_.end()) {
198 iter->second->CreateImage(window, image_id, &size); 198 iter->second->CreateImage(window, image_id, &size);
199 } 199 }
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
318 318
319 gfx::GLSurface* GpuChannelManager::GetDefaultOffscreenSurface() { 319 gfx::GLSurface* GpuChannelManager::GetDefaultOffscreenSurface() {
320 if (!default_offscreen_surface_.get()) { 320 if (!default_offscreen_surface_.get()) {
321 default_offscreen_surface_ = 321 default_offscreen_surface_ =
322 gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size()); 322 gfx::GLSurface::CreateOffscreenGLSurface(gfx::Size());
323 } 323 }
324 return default_offscreen_surface_.get(); 324 return default_offscreen_surface_.get();
325 } 325 }
326 326
327 } // namespace content 327 } // 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