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

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

Issue 268783004: Revert "Remove kLogPluginMessages flag as part of flag cleanup." (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 6 years, 7 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
« no previous file with comments | « content/common/gpu/gpu_channel.h ('k') | content/plugin/plugin_channel.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: content/common/gpu/gpu_channel.cc
diff --git a/content/common/gpu/gpu_channel.cc b/content/common/gpu/gpu_channel.cc
index 3f123e17d7011209750f9dd2dad54290551d1156..75a18e92c9cb8a2c727cac16f1a332596a7d3e7a 100644
--- a/content/common/gpu/gpu_channel.cc
+++ b/content/common/gpu/gpu_channel.cc
@@ -12,6 +12,7 @@
#include <vector>
#include "base/bind.h"
+#include "base/command_line.h"
#include "base/debug/trace_event.h"
#include "base/message_loop/message_loop_proxy.h"
#include "base/strings/string_util.h"
@@ -20,6 +21,7 @@
#include "content/common/gpu/gpu_channel_manager.h"
#include "content/common/gpu/gpu_messages.h"
#include "content/common/gpu/sync_point_manager.h"
+#include "content/public/common/content_switches.h"
#include "gpu/command_buffer/common/mailbox.h"
#include "gpu/command_buffer/service/gpu_scheduler.h"
#include "gpu/command_buffer/service/image_manager.h"
@@ -405,6 +407,8 @@ GpuChannel::GpuChannel(GpuChannelManager* gpu_channel_manager,
DCHECK(client_id);
channel_id_ = IPC::Channel::GenerateVerifiedChannelID("gpu");
+ const CommandLine* command_line = CommandLine::ForCurrentProcess();
+ log_messages_ = command_line->HasSwitch(switches::kLogPluginMessages);
}
@@ -449,6 +453,11 @@ int GpuChannel::TakeRendererFileDescriptor() {
#endif // defined(OS_POSIX)
bool GpuChannel::OnMessageReceived(const IPC::Message& message) {
+ if (log_messages_) {
+ DVLOG(1) << "received message @" << &message << " on channel @" << this
+ << " with type " << message.type();
+ }
+
if (message.type() == GpuCommandBufferMsg_WaitForTokenInRange::ID ||
message.type() == GpuCommandBufferMsg_WaitForGetOffsetInRange::ID) {
// Move Wait commands to the head of the queue, so the renderer
@@ -471,6 +480,10 @@ bool GpuChannel::Send(IPC::Message* message) {
// The GPU process must never send a synchronous IPC message to the renderer
// process. This could result in deadlock.
DCHECK(!message->is_sync());
+ if (log_messages_) {
+ DVLOG(1) << "sending message @" << message << " on channel @" << this
+ << " with type " << message->type();
+ }
if (!channel_) {
delete message;
« no previous file with comments | « content/common/gpu/gpu_channel.h ('k') | content/plugin/plugin_channel.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698