summaryrefslogtreecommitdiffstats
path: root/content/common/gpu/gpu_command_buffer_stub.cc
diff options
context:
space:
mode:
authorpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-30 01:26:33 +0000
committerpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-04-30 01:26:33 +0000
commit68957916094e7d2eabaccab37ca70da3aff44499 (patch)
tree744b90667b6a884291144adaba9e18fad694ed92 /content/common/gpu/gpu_command_buffer_stub.cc
parent292b1692914b12c4427784a923de0d0615e57d2d (diff)
downloadchromium_src-68957916094e7d2eabaccab37ca70da3aff44499.zip
chromium_src-68957916094e7d2eabaccab37ca70da3aff44499.tar.gz
chromium_src-68957916094e7d2eabaccab37ca70da3aff44499.tar.bz2
Remove CommandBuffer::GetState
https://codereview.chromium.org/220243003 removed the last client-side caller. Service-side implementation of GetState is identical to GetLastState. So replace all instances of GetState by GetLastState and remove the former. BUG=None Review URL: https://codereview.chromium.org/253943002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@267027 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'content/common/gpu/gpu_command_buffer_stub.cc')
-rw-r--r--content/common/gpu/gpu_command_buffer_stub.cc24
1 files changed, 5 insertions, 19 deletions
diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/gpu_command_buffer_stub.cc
index abb6288..6f72157 100644
--- a/content/common/gpu/gpu_command_buffer_stub.cc
+++ b/content/common/gpu/gpu_command_buffer_stub.cc
@@ -210,7 +210,6 @@ bool GpuCommandBufferStub::OnMessageReceived(const IPC::Message& message) {
IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_ProduceFrontBuffer,
OnProduceFrontBuffer);
IPC_MESSAGE_HANDLER(GpuCommandBufferMsg_Echo, OnEcho);
- IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_GetState, OnGetState);
IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_WaitForTokenInRange,
OnWaitForTokenInRange);
IPC_MESSAGE_HANDLER_DELAY_REPLY(GpuCommandBufferMsg_WaitForGetOffsetInRange,
@@ -394,7 +393,7 @@ void GpuCommandBufferStub::Destroy() {
bool have_context = false;
if (decoder_ && command_buffer_ &&
- command_buffer_->GetState().error != gpu::error::kLostContext)
+ command_buffer_->GetLastState().error != gpu::error::kLostContext)
have_context = decoder_->MakeCurrent();
FOR_EACH_OBSERVER(DestructionObserver,
destruction_observers_,
@@ -651,23 +650,10 @@ void GpuCommandBufferStub::OnProduceFrontBuffer(const gpu::Mailbox& mailbox) {
decoder_->ProduceFrontBuffer(mailbox);
}
-void GpuCommandBufferStub::OnGetState(IPC::Message* reply_message) {
- TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnGetState");
- if (command_buffer_) {
- gpu::CommandBuffer::State state = command_buffer_->GetState();
- CheckContextLost();
- GpuCommandBufferMsg_GetState::WriteReplyParams(reply_message, state);
- } else {
- DLOG(ERROR) << "no command_buffer.";
- reply_message->set_reply_error();
- }
- Send(reply_message);
-}
-
void GpuCommandBufferStub::OnParseError() {
TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnParseError");
DCHECK(command_buffer_.get());
- gpu::CommandBuffer::State state = command_buffer_->GetState();
+ gpu::CommandBuffer::State state = command_buffer_->GetLastState();
IPC::Message* msg = new GpuCommandBufferMsg_Destroyed(
route_id_, state.context_lost_reason);
msg->set_unblock(true);
@@ -714,7 +700,7 @@ void GpuCommandBufferStub::OnWaitForGetOffsetInRange(
void GpuCommandBufferStub::CheckCompleteWaits() {
if (wait_for_token_ || wait_for_get_offset_) {
- gpu::CommandBuffer::State state = command_buffer_->GetState();
+ gpu::CommandBuffer::State state = command_buffer_->GetLastState();
if (wait_for_token_ &&
(gpu::CommandBuffer::InRange(
wait_for_token_->start, wait_for_token_->end, state.token) ||
@@ -1042,7 +1028,7 @@ void GpuCommandBufferStub::SuggestHaveFrontBuffer(
bool GpuCommandBufferStub::CheckContextLost() {
DCHECK(command_buffer_);
- gpu::CommandBuffer::State state = command_buffer_->GetState();
+ gpu::CommandBuffer::State state = command_buffer_->GetLastState();
bool was_lost = state.error == gpu::error::kLostContext;
// Lose all other contexts if the reset was triggered by the robustness
// extension instead of being synthetic.
@@ -1056,7 +1042,7 @@ bool GpuCommandBufferStub::CheckContextLost() {
void GpuCommandBufferStub::MarkContextLost() {
if (!command_buffer_ ||
- command_buffer_->GetState().error == gpu::error::kLostContext)
+ command_buffer_->GetLastState().error == gpu::error::kLostContext)
return;
command_buffer_->SetContextLostReason(gpu::error::kUnknown);