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

Side by Side Diff: content/renderer/render_thread_impl.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
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/renderer/render_thread_impl.h" 5 #include "content/renderer/render_thread_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <limits> 8 #include <limits>
9 #include <map> 9 #include <map>
10 #include <vector> 10 #include <vector>
(...skipping 1197 matching lines...) Expand 10 before | Expand all | Expand 10 after
1208 scoped_refptr<base::MessageLoopProxy> RenderThreadImpl::GetIOLoopProxy() { 1208 scoped_refptr<base::MessageLoopProxy> RenderThreadImpl::GetIOLoopProxy() {
1209 return io_message_loop_proxy_; 1209 return io_message_loop_proxy_;
1210 } 1210 }
1211 1211
1212 scoped_ptr<base::SharedMemory> RenderThreadImpl::AllocateSharedMemory( 1212 scoped_ptr<base::SharedMemory> RenderThreadImpl::AllocateSharedMemory(
1213 size_t size) { 1213 size_t size) {
1214 return scoped_ptr<base::SharedMemory>( 1214 return scoped_ptr<base::SharedMemory>(
1215 HostAllocateSharedMemoryBuffer(size)); 1215 HostAllocateSharedMemoryBuffer(size));
1216 } 1216 }
1217 1217
1218 bool RenderThreadImpl::CreateViewCommandBuffer( 1218 CreateCommandBufferResult RenderThreadImpl::CreateViewCommandBuffer(
1219 int32 surface_id, 1219 int32 surface_id,
1220 const GPUCreateCommandBufferConfig& init_params, 1220 const GPUCreateCommandBufferConfig& init_params,
1221 int32 route_id) { 1221 int32 route_id) {
1222 TRACE_EVENT1("gpu", 1222 TRACE_EVENT1("gpu",
1223 "RenderThreadImpl::CreateViewCommandBuffer", 1223 "RenderThreadImpl::CreateViewCommandBuffer",
1224 "surface_id", 1224 "surface_id",
1225 surface_id); 1225 surface_id);
1226 1226
1227 bool succeeded = false; 1227 CreateCommandBufferResult result;
1228 IPC::Message* message = new GpuHostMsg_CreateViewCommandBuffer( 1228 IPC::Message* message = new GpuHostMsg_CreateViewCommandBuffer(
1229 surface_id, 1229 surface_id,
1230 init_params, 1230 init_params,
1231 route_id, 1231 route_id,
1232 &succeeded); 1232 &result);
1233 1233
1234 // Allow calling this from the compositor thread. 1234 // Allow calling this from the compositor thread.
1235 thread_safe_sender()->Send(message); 1235 thread_safe_sender()->Send(message);
1236 1236
1237 return succeeded; 1237 return result;
1238 } 1238 }
1239 1239
1240 void RenderThreadImpl::CreateImage( 1240 void RenderThreadImpl::CreateImage(
1241 gfx::PluginWindowHandle window, 1241 gfx::PluginWindowHandle window,
1242 int32 image_id, 1242 int32 image_id,
1243 const CreateImageCallback& callback) { 1243 const CreateImageCallback& callback) {
1244 NOTREACHED(); 1244 NOTREACHED();
1245 } 1245 }
1246 1246
1247 void RenderThreadImpl::DeleteImage(int32 image_id, int32 sync_point) { 1247 void RenderThreadImpl::DeleteImage(int32 image_id, int32 sync_point) {
(...skipping 360 matching lines...) Expand 10 before | Expand all | Expand 10 after
1608 hidden_widget_count_--; 1608 hidden_widget_count_--;
1609 1609
1610 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) { 1610 if (!GetContentClient()->renderer()->RunIdleHandlerWhenWidgetsHidden()) {
1611 return; 1611 return;
1612 } 1612 }
1613 1613
1614 ScheduleIdleHandler(kLongIdleHandlerDelayMs); 1614 ScheduleIdleHandler(kLongIdleHandlerDelayMs);
1615 } 1615 }
1616 1616
1617 } // namespace content 1617 } // namespace content
OLDNEW
« no previous file with comments | « content/renderer/render_thread_impl.h ('k') | content/test/data/gpu/webgl_with_select_element.html » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698