Skip to content

Commit

Permalink
Removed old sync points from Ppapi.
Browse files Browse the repository at this point in the history
BUG=514815

Review URL: https://codereview.chromium.org/1609033002

Cr-Commit-Position: refs/heads/master@{#370821}
  • Loading branch information
dyen authored and Commit bot committed Jan 21, 2016
1 parent 6b8f7ed commit d9e65a9
Show file tree
Hide file tree
Showing 7 changed files with 5 additions and 94 deletions.
12 changes: 0 additions & 12 deletions content/renderer/pepper/ppb_graphics_3d_impl.cc
Original file line number Diff line number Diff line change
Expand Up @@ -131,18 +131,6 @@ gpu::CommandBuffer::State PPB_Graphics3D_Impl::WaitForGetOffsetInRange(
return GetCommandBuffer()->GetLastState();
}

uint32_t PPB_Graphics3D_Impl::InsertSyncPoint() {
return command_buffer_->InsertSyncPoint();
}

uint32_t PPB_Graphics3D_Impl::InsertFutureSyncPoint() {
return command_buffer_->InsertFutureSyncPoint();
}

void PPB_Graphics3D_Impl::RetireSyncPoint(uint32_t sync_point) {
return command_buffer_->RetireSyncPoint(sync_point);
}

void PPB_Graphics3D_Impl::EnsureWorkVisible() {
command_buffer_->EnsureWorkVisible();
}
Expand Down
3 changes: 0 additions & 3 deletions content/renderer/pepper/ppb_graphics_3d_impl.h
Original file line number Diff line number Diff line change
Expand Up @@ -46,9 +46,6 @@ class PPB_Graphics3D_Impl : public ppapi::PPB_Graphics3D_Shared {
int32_t end) override;
gpu::CommandBuffer::State WaitForGetOffsetInRange(int32_t start,
int32_t end) override;
uint32_t InsertSyncPoint() override;
uint32_t InsertFutureSyncPoint() override;
void RetireSyncPoint(uint32_t) override;
void EnsureWorkVisible() override;

// Binds/unbinds the graphics of this context with the associated instance.
Expand Down
21 changes: 5 additions & 16 deletions ppapi/proxy/ppapi_command_buffer_proxy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -237,28 +237,17 @@ int32_t PpapiCommandBufferProxy::GetExtraCommandBufferData() const {
}

uint32_t PpapiCommandBufferProxy::InsertSyncPoint() {
uint32_t sync_point = 0;
if (last_state_.error == gpu::error::kNoError) {
Send(new PpapiHostMsg_PPBGraphics3D_InsertSyncPoint(
ppapi::API_ID_PPB_GRAPHICS_3D, resource_, &sync_point));
}
return sync_point;
NOTREACHED();
return 0;
}

uint32_t PpapiCommandBufferProxy::InsertFutureSyncPoint() {
uint32_t sync_point = 0;
if (last_state_.error == gpu::error::kNoError) {
Send(new PpapiHostMsg_PPBGraphics3D_InsertFutureSyncPoint(
ppapi::API_ID_PPB_GRAPHICS_3D, resource_, &sync_point));
}
return sync_point;
NOTREACHED();
return 0;
}

void PpapiCommandBufferProxy::RetireSyncPoint(uint32_t sync_point) {
if (last_state_.error == gpu::error::kNoError) {
Send(new PpapiHostMsg_PPBGraphics3D_RetireSyncPoint(
ppapi::API_ID_PPB_GRAPHICS_3D, resource_, sync_point));
}
NOTREACHED();
}

void PpapiCommandBufferProxy::SignalSyncPoint(uint32_t sync_point,
Expand Down
9 changes: 0 additions & 9 deletions ppapi/proxy/ppapi_messages.h
Original file line number Diff line number Diff line change
Expand Up @@ -1045,15 +1045,6 @@ IPC_SYNC_MESSAGE_ROUTED2_0(PpapiHostMsg_PPBGraphics3D_DestroyTransferBuffer,
IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBGraphics3D_SwapBuffers,
ppapi::HostResource /* graphics_3d */,
gpu::SyncToken /* sync_token */)
IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBGraphics3D_InsertSyncPoint,
ppapi::HostResource /* context */,
uint32_t /* sync_point */)
IPC_SYNC_MESSAGE_ROUTED1_1(PpapiHostMsg_PPBGraphics3D_InsertFutureSyncPoint,
ppapi::HostResource /* context */,
uint32_t /* sync_point */)
IPC_MESSAGE_ROUTED2(PpapiHostMsg_PPBGraphics3D_RetireSyncPoint,
ppapi::HostResource /* context */,
uint32_t /* sync_point */)
IPC_SYNC_MESSAGE_ROUTED1_0(PpapiHostMsg_PPBGraphics3D_EnsureWorkVisible,
ppapi::HostResource /* context */)

Expand Down
44 changes: 0 additions & 44 deletions ppapi/proxy/ppb_graphics_3d_proxy.cc
Original file line number Diff line number Diff line change
Expand Up @@ -101,20 +101,6 @@ gpu::CommandBuffer::State Graphics3D::WaitForGetOffsetInRange(int32_t start,
return GetErrorState();
}

uint32_t Graphics3D::InsertSyncPoint() {
NOTREACHED();
return 0;
}

uint32_t Graphics3D::InsertFutureSyncPoint() {
NOTREACHED();
return 0;
}

void Graphics3D::RetireSyncPoint(uint32_t sync_point) {
NOTREACHED();
}

void Graphics3D::EnsureWorkVisible() {
NOTREACHED();
}
Expand Down Expand Up @@ -226,12 +212,6 @@ bool PPB_Graphics3D_Proxy::OnMessageReceived(const IPC::Message& msg) {
OnMsgDestroyTransferBuffer)
IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBGraphics3D_SwapBuffers,
OnMsgSwapBuffers)
IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBGraphics3D_InsertSyncPoint,
OnMsgInsertSyncPoint)
IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBGraphics3D_InsertFutureSyncPoint,
OnMsgInsertFutureSyncPoint)
IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBGraphics3D_RetireSyncPoint,
OnMsgRetireSyncPoint)
IPC_MESSAGE_HANDLER(PpapiHostMsg_PPBGraphics3D_EnsureWorkVisible,
OnMsgEnsureWorkVisible)
#endif // !defined(OS_NACL)
Expand Down Expand Up @@ -363,30 +343,6 @@ void PPB_Graphics3D_Proxy::OnMsgSwapBuffers(const HostResource& context,
enter.SetResult(enter.object()->SwapBuffers(enter.callback(), sync_token));
}

void PPB_Graphics3D_Proxy::OnMsgInsertSyncPoint(const HostResource& context,
uint32_t* sync_point) {
*sync_point = 0;
EnterHostFromHostResource<PPB_Graphics3D_API> enter(context);
if (enter.succeeded())
*sync_point = enter.object()->InsertSyncPoint();
}

void PPB_Graphics3D_Proxy::OnMsgInsertFutureSyncPoint(
const HostResource& context,
uint32_t* sync_point) {
*sync_point = 0;
EnterHostFromHostResource<PPB_Graphics3D_API> enter(context);
if (enter.succeeded())
*sync_point = enter.object()->InsertFutureSyncPoint();
}

void PPB_Graphics3D_Proxy::OnMsgRetireSyncPoint(const HostResource& context,
uint32_t sync_point) {
EnterHostFromHostResource<PPB_Graphics3D_API> enter(context);
if (enter.succeeded())
enter.object()->RetireSyncPoint(sync_point);
}

void PPB_Graphics3D_Proxy::OnMsgEnsureWorkVisible(const HostResource& context) {
EnterHostFromHostResource<PPB_Graphics3D_API> enter(context);
if (enter.succeeded())
Expand Down
7 changes: 0 additions & 7 deletions ppapi/proxy/ppb_graphics_3d_proxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -53,9 +53,6 @@ class PPAPI_PROXY_EXPORT Graphics3D : public PPB_Graphics3D_Shared {
int32_t end) override;
gpu::CommandBuffer::State WaitForGetOffsetInRange(int32_t start,
int32_t end) override;
uint32_t InsertSyncPoint() override;
uint32_t InsertFutureSyncPoint() override;
void RetireSyncPoint(uint32_t sync_point) override;
void EnsureWorkVisible() override;

private:
Expand Down Expand Up @@ -112,10 +109,6 @@ class PPB_Graphics3D_Proxy : public InterfaceProxy {
void OnMsgDestroyTransferBuffer(const HostResource& context, int32_t id);
void OnMsgSwapBuffers(const HostResource& context,
const gpu::SyncToken& sync_token);
void OnMsgInsertSyncPoint(const HostResource& context, uint32_t* sync_point);
void OnMsgInsertFutureSyncPoint(const HostResource& context,
uint32_t* sync_point);
void OnMsgRetireSyncPoint(const HostResource& context, uint32_t sync_point);
void OnMsgEnsureWorkVisible(const HostResource& context);
// Renderer->plugin message handlers.
void OnMsgSwapBuffersACK(const HostResource& context,
Expand Down
3 changes: 0 additions & 3 deletions ppapi/thunk/ppb_graphics_3d_api.h
Original file line number Diff line number Diff line change
Expand Up @@ -59,9 +59,6 @@ class PPAPI_THUNK_EXPORT PPB_Graphics3D_API {
GLenum access) = 0;
virtual void UnmapTexSubImage2DCHROMIUM(const void* mem) = 0;

virtual uint32_t InsertSyncPoint() = 0;
virtual uint32_t InsertFutureSyncPoint() = 0;
virtual void RetireSyncPoint(uint32_t sync_point) = 0;
virtual void EnsureWorkVisible() = 0;
};

Expand Down

0 comments on commit d9e65a9

Please sign in to comment.