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

Unified Diff: ipc/ipc_channel_posix.cc

Issue 1835303002: Implementation of the GreenWeb language extensions. Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Change GreenWeb-related CSS property names such that they apply in the desired order at runtime. Created 4 years, 9 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 | « ipc/DEPS ('k') | ipc/ipc_channel_reader.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: ipc/ipc_channel_posix.cc
diff --git a/ipc/ipc_channel_posix.cc b/ipc/ipc_channel_posix.cc
index 85f4475c7ab761d8d747a134833e5857c9f41081..f8f7ac531936a389122791bfa8f4774bfe67ebb9 100644
--- a/ipc/ipc_channel_posix.cc
+++ b/ipc/ipc_channel_posix.cc
@@ -22,6 +22,7 @@
#endif
#include <algorithm>
+#include <iostream>
#include <map>
#include <string>
@@ -39,6 +40,7 @@
#include "base/stl_util.h"
#include "base/strings/string_util.h"
#include "base/synchronization/lock.h"
+#include "content/renderer/greenweb_latency_tracking.h"
#include "ipc/attachment_broker.h"
#include "ipc/ipc_descriptors.h"
#include "ipc/ipc_listener.h"
@@ -711,10 +713,26 @@ bool ChannelPosix::ProcessMessageForDelivery(Message* message) {
Logging::GetInstance()->OnSendMessage(message, "");
#endif // IPC_MESSAGE_LOG_ENABLED
- TRACE_EVENT_WITH_FLOW0(TRACE_DISABLED_BY_DEFAULT("ipc.flow"),
+ // Ideally we want to send a dedicated to communicate the qos_type and
+ // ebs_enabled info from the main thread to the GPU thread just once.
+ // As a simple hack, we send them along with each message! The implication
+ // of this simplification is that we need to make sure that we do not
+ // overwrite the values in the main thread when we receive an IPC message
+ // from other processes (see the implementation of
+ // |ChannelReader::EmitLogBeforeDispatch| in ipc_channel_reader.cc).
+ message->set_qos_type(g_qos_type);
+ message->set_qos_target(g_qos_target);
+ message->set_ebs_enabled(g_ebs_enabled);
+ dbg_ipc_cout("Send" << ": g_ebs_enabled: " << g_ebs_enabled <<
+ ", g_qos_type: " << g_qos_type <<
+ ", g_qos_target" << g_qos_target);
+
+ TRACE_EVENT_WITH_FLOW1(TRACE_DISABLED_BY_DEFAULT("ipc.flow"),
"ChannelPosix::Send",
message->flags(),
- TRACE_EVENT_FLAG_FLOW_OUT);
+ TRACE_EVENT_FLAG_FLOW_OUT,
+ "QoS Type",
+ message->qos_type());
// |output_queue_| takes ownership of |message|.
OutputElement* element = new OutputElement(message);
« no previous file with comments | « ipc/DEPS ('k') | ipc/ipc_channel_reader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698