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

Unified Diff: content/common/gpu/gpu_channel.cc

Issue 165393003: gpu: Generate mailboxes on client side (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: rebase Created 6 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 side-by-side diff with in-line comments
Download patch
Index: content/common/gpu/gpu_channel.cc
diff --git a/content/common/gpu/gpu_channel.cc b/content/common/gpu/gpu_channel.cc
index 6ddebc4f65035a69f755d5a2fd74304909b041dc..5bbaea897ea5d35a4f972e84294673716988b19c 100644
--- a/content/common/gpu/gpu_channel.cc
+++ b/content/common/gpu/gpu_channel.cc
@@ -23,7 +23,6 @@
#include "content/common/gpu/media/gpu_video_encode_accelerator.h"
#include "content/common/gpu/sync_point_manager.h"
#include "content/public/common/content_switches.h"
-#include "crypto/random.h"
#include "gpu/command_buffer/common/mailbox.h"
#include "gpu/command_buffer/service/gpu_scheduler.h"
#include "gpu/command_buffer/service/image_manager.h"
@@ -99,18 +98,11 @@ class GpuChannelMessageFilter : public IPC::ChannelProxy::MessageFilter {
virtual bool OnMessageReceived(const IPC::Message& message) OVERRIDE {
DCHECK(channel_);
- bool handled = true;
- IPC_BEGIN_MESSAGE_MAP(GpuChannelMessageFilter, message)
- IPC_MESSAGE_HANDLER(GpuChannelMsg_GenerateMailboxNames,
- OnGenerateMailboxNames)
- IPC_MESSAGE_HANDLER(GpuChannelMsg_GenerateMailboxNamesAsync,
- OnGenerateMailboxNamesAsync)
- IPC_MESSAGE_UNHANDLED(handled = false)
- IPC_END_MESSAGE_MAP()
-
+ bool handled = false;
if (message.type() == GpuCommandBufferMsg_RetireSyncPoint::ID) {
// This message should not be sent explicitly by the renderer.
- NOTREACHED();
+ DLOG(ERROR) << "Client should not send "
+ "GpuCommandBufferMsg_RetireSyncPoint message";
handled = true;
}
@@ -168,22 +160,6 @@ class GpuChannelMessageFilter : public IPC::ChannelProxy::MessageFilter {
}
private:
- // Message handlers.
- void OnGenerateMailboxNames(unsigned num, std::vector<gpu::Mailbox>* result) {
- TRACE_EVENT1("gpu", "OnGenerateMailboxNames", "num", num);
-
- result->resize(num);
-
- for (unsigned i = 0; i < num; ++i)
- crypto::RandBytes((*result)[i].name, sizeof((*result)[i].name));
- }
-
- void OnGenerateMailboxNamesAsync(unsigned num) {
- std::vector<gpu::Mailbox> names;
- OnGenerateMailboxNames(num, &names);
- Send(new GpuChannelMsg_GenerateMailboxNamesReply(names));
- }
-
enum PreemptionState {
// Either there's no other channel to preempt, there are no messages
// pending processing, or we just finished preempting and have to wait

Powered by Google App Engine
This is Rietveld 408576698