summaryrefslogtreecommitdiffstats
path: root/ppapi/proxy/ppb_graphics_3d_proxy.cc
diff options
context:
space:
mode:
Diffstat (limited to 'ppapi/proxy/ppb_graphics_3d_proxy.cc')
-rw-r--r--ppapi/proxy/ppb_graphics_3d_proxy.cc49
1 files changed, 24 insertions, 25 deletions
diff --git a/ppapi/proxy/ppb_graphics_3d_proxy.cc b/ppapi/proxy/ppb_graphics_3d_proxy.cc
index 81b6a70..06db5af 100644
--- a/ppapi/proxy/ppb_graphics_3d_proxy.cc
+++ b/ppapi/proxy/ppb_graphics_3d_proxy.cc
@@ -5,6 +5,7 @@
#include "ppapi/proxy/ppb_graphics_3d_proxy.h"
#include "base/numerics/safe_conversions.h"
+#include "build/build_config.h"
#include "gpu/command_buffer/client/gles2_implementation.h"
#include "gpu/command_buffer/common/command_buffer.h"
#include "ppapi/c/pp_errors.h"
@@ -26,8 +27,8 @@ namespace proxy {
namespace {
-const int32 kCommandBufferSize = 1024 * 1024;
-const int32 kTransferBufferSize = 1024 * 1024;
+const int32_t kCommandBufferSize = 1024 * 1024;
+const int32_t kTransferBufferSize = 1024 * 1024;
#if !defined(OS_NACL)
base::SharedMemoryHandle TransportSHMHandle(
@@ -121,7 +122,7 @@ gpu::GpuControl* Graphics3D::GetGpuControl() {
return command_buffer_.get();
}
-int32 Graphics3D::DoSwapBuffers() {
+int32_t Graphics3D::DoSwapBuffers() {
gles2_impl()->SwapBuffers();
IPC::Message* msg = new PpapiHostMsg_PPBGraphics3D_SwapBuffers(
API_ID_PPB_GRAPHICS_3D, host_resource());
@@ -228,14 +229,13 @@ bool PPB_Graphics3D_Proxy::OnMessageReceived(const IPC::Message& msg) {
}
#if !defined(OS_NACL)
-void PPB_Graphics3D_Proxy::OnMsgCreate(
- PP_Instance instance,
- HostResource share_context,
- const std::vector<int32_t>& attribs,
- HostResource* result,
- gpu::Capabilities* capabilities,
- SerializedHandle* shared_state,
- uint64* command_buffer_id) {
+void PPB_Graphics3D_Proxy::OnMsgCreate(PP_Instance instance,
+ HostResource share_context,
+ const std::vector<int32_t>& attribs,
+ HostResource* result,
+ gpu::Capabilities* capabilities,
+ SerializedHandle* shared_state,
+ uint64_t* command_buffer_id) {
shared_state->set_null_shmem();
if (attribs.empty() ||
attribs.back() != PP_GRAPHICS3DATTRIB_NONE ||
@@ -262,9 +262,8 @@ void PPB_Graphics3D_Proxy::OnMsgCreate(
}
}
-void PPB_Graphics3D_Proxy::OnMsgSetGetBuffer(
- const HostResource& context,
- int32 transfer_buffer_id) {
+void PPB_Graphics3D_Proxy::OnMsgSetGetBuffer(const HostResource& context,
+ int32_t transfer_buffer_id) {
EnterHostFromHostResource<PPB_Graphics3D_API> enter(context);
if (enter.succeeded())
enter.object()->SetGetBuffer(transfer_buffer_id);
@@ -272,8 +271,8 @@ void PPB_Graphics3D_Proxy::OnMsgSetGetBuffer(
void PPB_Graphics3D_Proxy::OnMsgWaitForTokenInRange(
const HostResource& context,
- int32 start,
- int32 end,
+ int32_t start,
+ int32_t end,
gpu::CommandBuffer::State* state,
bool* success) {
EnterHostFromHostResource<PPB_Graphics3D_API> enter(context);
@@ -287,8 +286,8 @@ void PPB_Graphics3D_Proxy::OnMsgWaitForTokenInRange(
void PPB_Graphics3D_Proxy::OnMsgWaitForGetOffsetInRange(
const HostResource& context,
- int32 start,
- int32 end,
+ int32_t start,
+ int32_t end,
gpu::CommandBuffer::State* state,
bool* success) {
EnterHostFromHostResource<PPB_Graphics3D_API> enter(context);
@@ -301,7 +300,7 @@ void PPB_Graphics3D_Proxy::OnMsgWaitForGetOffsetInRange(
}
void PPB_Graphics3D_Proxy::OnMsgAsyncFlush(const HostResource& context,
- int32 put_offset) {
+ int32_t put_offset) {
EnterHostFromHostResource<PPB_Graphics3D_API> enter(context);
if (enter.succeeded())
enter.object()->Flush(put_offset);
@@ -309,8 +308,8 @@ void PPB_Graphics3D_Proxy::OnMsgAsyncFlush(const HostResource& context,
void PPB_Graphics3D_Proxy::OnMsgCreateTransferBuffer(
const HostResource& context,
- uint32 size,
- int32* id,
+ uint32_t size,
+ int32_t* id,
SerializedHandle* transfer_buffer) {
transfer_buffer->set_null_shmem();
EnterHostFromHostResource<PPB_Graphics3D_API> enter(context);
@@ -332,7 +331,7 @@ void PPB_Graphics3D_Proxy::OnMsgCreateTransferBuffer(
void PPB_Graphics3D_Proxy::OnMsgDestroyTransferBuffer(
const HostResource& context,
- int32 id) {
+ int32_t id) {
EnterHostFromHostResource<PPB_Graphics3D_API> enter(context);
if (enter.succeeded())
enter.object()->DestroyTransferBuffer(id);
@@ -347,7 +346,7 @@ void PPB_Graphics3D_Proxy::OnMsgSwapBuffers(const HostResource& context) {
}
void PPB_Graphics3D_Proxy::OnMsgInsertSyncPoint(const HostResource& context,
- uint32* sync_point) {
+ uint32_t* sync_point) {
*sync_point = 0;
EnterHostFromHostResource<PPB_Graphics3D_API> enter(context);
if (enter.succeeded())
@@ -356,7 +355,7 @@ void PPB_Graphics3D_Proxy::OnMsgInsertSyncPoint(const HostResource& context,
void PPB_Graphics3D_Proxy::OnMsgInsertFutureSyncPoint(
const HostResource& context,
- uint32* sync_point) {
+ uint32_t* sync_point) {
*sync_point = 0;
EnterHostFromHostResource<PPB_Graphics3D_API> enter(context);
if (enter.succeeded())
@@ -364,7 +363,7 @@ void PPB_Graphics3D_Proxy::OnMsgInsertFutureSyncPoint(
}
void PPB_Graphics3D_Proxy::OnMsgRetireSyncPoint(const HostResource& context,
- uint32 sync_point) {
+ uint32_t sync_point) {
EnterHostFromHostResource<PPB_Graphics3D_API> enter(context);
if (enter.succeeded())
enter.object()->RetireSyncPoint(sync_point);