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-02-08 03:38:32 +0000
committerpiman@chromium.org <piman@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-02-08 03:38:32 +0000
commitaba551b39d0760e68f53ceecf5fe0ec513837e0c (patch)
tree66e72c3d19829b390f11e4b5f9a7f0dcc04ec918 /content/common/gpu/gpu_command_buffer_stub.cc
parentefbd7fbe653f4567dc25abd982e58e1aea21ca5a (diff)
downloadchromium_src-aba551b39d0760e68f53ceecf5fe0ec513837e0c.zip
chromium_src-aba551b39d0760e68f53ceecf5fe0ec513837e0c.tar.gz
chromium_src-aba551b39d0760e68f53ceecf5fe0ec513837e0c.tar.bz2
Stop using HMAC for gpu mailboxes
For a long time, we've been using HMAC to sign the mailbox names on the GPU process. However, we don't actually need the mailbox names to be guaranteed to be generated by the GPU process, we only need to ensure they're unguessable. The HMAC signature and verification has several costs: - the cost to sign the mailbox - the cost to verify the mailbox - the initialization cost (e.g. starting NSS in the GPU process) We can actually save all that cost, by just making the mailbox names (crypto-)random. BUG=311259 Review URL: https://codereview.chromium.org/157243002 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@249922 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.cc7
1 files changed, 4 insertions, 3 deletions
diff --git a/content/common/gpu/gpu_command_buffer_stub.cc b/content/common/gpu/gpu_command_buffer_stub.cc
index ad048c6..13b7b22 100644
--- a/content/common/gpu/gpu_command_buffer_stub.cc
+++ b/content/common/gpu/gpu_command_buffer_stub.cc
@@ -608,11 +608,12 @@ void GpuCommandBufferStub::OnSetGetBuffer(int32 shm_id,
void GpuCommandBufferStub::OnProduceFrontBuffer(const gpu::Mailbox& mailbox) {
TRACE_EVENT0("gpu", "GpuCommandBufferStub::OnProduceFrontBuffer");
- if (!decoder_)
+ if (!decoder_) {
LOG(ERROR) << "Can't produce front buffer before initialization.";
+ return;
+ }
- if (!decoder_->ProduceFrontBuffer(mailbox))
- LOG(ERROR) << "Failed to produce front buffer.";
+ decoder_->ProduceFrontBuffer(mailbox);
}
void GpuCommandBufferStub::OnGetState(IPC::Message* reply_message) {