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

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

Issue 915403003: Enable size_t to int truncation warnings in PPAPI (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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
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 297 matching lines...) Expand 10 before | Expand all | Expand 10 after
308 if (enter.succeeded()) { 308 if (enter.succeeded()) {
309 scoped_refptr<gpu::Buffer> buffer = 309 scoped_refptr<gpu::Buffer> buffer =
310 enter.object()->CreateTransferBuffer(size, id); 310 enter.object()->CreateTransferBuffer(size, id);
311 if (!buffer.get()) 311 if (!buffer.get())
312 return; 312 return;
313 gpu::SharedMemoryBufferBacking* backing = 313 gpu::SharedMemoryBufferBacking* backing =
314 static_cast<gpu::SharedMemoryBufferBacking*>(buffer->backing()); 314 static_cast<gpu::SharedMemoryBufferBacking*>(buffer->backing());
315 DCHECK(backing && backing->shared_memory()); 315 DCHECK(backing && backing->shared_memory());
316 transfer_buffer->set_shmem( 316 transfer_buffer->set_shmem(
317 TransportSHMHandle(dispatcher(), backing->shared_memory()->handle()), 317 TransportSHMHandle(dispatcher(), backing->shared_memory()->handle()),
318 buffer->size()); 318 static_cast<uint32_t>(buffer->size()));
319 } else { 319 } else {
320 *id = -1; 320 *id = -1;
321 } 321 }
322 } 322 }
323 323
324 void PPB_Graphics3D_Proxy::OnMsgDestroyTransferBuffer( 324 void PPB_Graphics3D_Proxy::OnMsgDestroyTransferBuffer(
325 const HostResource& context, 325 const HostResource& context,
326 int32 id) { 326 int32 id) {
327 EnterHostFromHostResource<PPB_Graphics3D_API> enter(context); 327 EnterHostFromHostResource<PPB_Graphics3D_API> enter(context);
328 if (enter.succeeded()) 328 if (enter.succeeded())
(...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after
373 void PPB_Graphics3D_Proxy::SendSwapBuffersACKToPlugin( 373 void PPB_Graphics3D_Proxy::SendSwapBuffersACKToPlugin(
374 int32_t result, 374 int32_t result,
375 const HostResource& context) { 375 const HostResource& context) {
376 dispatcher()->Send(new PpapiMsg_PPBGraphics3D_SwapBuffersACK( 376 dispatcher()->Send(new PpapiMsg_PPBGraphics3D_SwapBuffersACK(
377 API_ID_PPB_GRAPHICS_3D, context, result)); 377 API_ID_PPB_GRAPHICS_3D, context, result));
378 } 378 }
379 #endif // !defined(OS_NACL) 379 #endif // !defined(OS_NACL)
380 380
381 } // namespace proxy 381 } // namespace proxy
382 } // namespace ppapi 382 } // namespace ppapi
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698