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

Side by Side Diff: ppapi/proxy/ppb_graphics_3d_proxy.cc

Issue 467303005: Remove implicit conversions from scoped_refptr to T* in ppapi/ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 6 years, 3 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 "ppapi/proxy/ppb_graphics_3d_proxy.h" 5 #include "ppapi/proxy/ppb_graphics_3d_proxy.h"
6 6
7 #include "gpu/command_buffer/client/gles2_implementation.h" 7 #include "gpu/command_buffer/client/gles2_implementation.h"
8 #include "gpu/command_buffer/common/command_buffer.h" 8 #include "gpu/command_buffer/common/command_buffer.h"
9 #include "ppapi/c/pp_errors.h" 9 #include "ppapi/c/pp_errors.h"
10 #include "ppapi/proxy/enter_proxy.h" 10 #include "ppapi/proxy/enter_proxy.h"
(...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after
283 void PPB_Graphics3D_Proxy::OnMsgCreateTransferBuffer( 283 void PPB_Graphics3D_Proxy::OnMsgCreateTransferBuffer(
284 const HostResource& context, 284 const HostResource& context,
285 uint32 size, 285 uint32 size,
286 int32* id, 286 int32* id,
287 ppapi::proxy::SerializedHandle* transfer_buffer) { 287 ppapi::proxy::SerializedHandle* transfer_buffer) {
288 transfer_buffer->set_null_shmem(); 288 transfer_buffer->set_null_shmem();
289 EnterHostFromHostResource<PPB_Graphics3D_API> enter(context); 289 EnterHostFromHostResource<PPB_Graphics3D_API> enter(context);
290 if (enter.succeeded()) { 290 if (enter.succeeded()) {
291 scoped_refptr<gpu::Buffer> buffer = 291 scoped_refptr<gpu::Buffer> buffer =
292 enter.object()->CreateTransferBuffer(size, id); 292 enter.object()->CreateTransferBuffer(size, id);
293 if (!buffer) 293 if (!buffer.get())
294 return; 294 return;
295 gpu::SharedMemoryBufferBacking* backing = 295 gpu::SharedMemoryBufferBacking* backing =
296 static_cast<gpu::SharedMemoryBufferBacking*>(buffer->backing()); 296 static_cast<gpu::SharedMemoryBufferBacking*>(buffer->backing());
297 DCHECK(backing && backing->shared_memory()); 297 DCHECK(backing && backing->shared_memory());
298 transfer_buffer->set_shmem( 298 transfer_buffer->set_shmem(
299 TransportSHMHandle(dispatcher(), backing->shared_memory()), 299 TransportSHMHandle(dispatcher(), backing->shared_memory()),
300 buffer->size()); 300 buffer->size());
301 } else { 301 } else {
302 *id = -1; 302 *id = -1;
303 } 303 }
(...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after
356 int32_t result, 356 int32_t result,
357 const HostResource& context) { 357 const HostResource& context) {
358 dispatcher()->Send(new PpapiMsg_PPBGraphics3D_SwapBuffersACK( 358 dispatcher()->Send(new PpapiMsg_PPBGraphics3D_SwapBuffersACK(
359 API_ID_PPB_GRAPHICS_3D, context, result)); 359 API_ID_PPB_GRAPHICS_3D, context, result));
360 } 360 }
361 #endif // !defined(OS_NACL) 361 #endif // !defined(OS_NACL)
362 362
363 } // namespace proxy 363 } // namespace proxy
364 } // namespace ppapi 364 } // namespace ppapi
365 365
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698