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

Unified Diff: content/browser/renderer_host/render_process_host_impl.cc

Issue 123563002: Remove gpu side LatencyInfo merging (Closed) Base URL: http://git.chromium.org/chromium/src.git@gpu-per-event-latency-6-small
Patch Set: adding check at more places for GpuHostMsg_AcceleratedSurfaceBuffersSwapped/PostBuffer Created 6 years, 11 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/browser/renderer_host/render_process_host_impl.cc
diff --git a/content/browser/renderer_host/render_process_host_impl.cc b/content/browser/renderer_host/render_process_host_impl.cc
index fd3a7f22fe71ae0b451b6bf898700cf56445627f..163a8bac4ce805f25d2929a00b6b8c38bc7f3f3b 100644
--- a/content/browser/renderer_host/render_process_host_impl.cc
+++ b/content/browser/renderer_host/render_process_host_impl.cc
@@ -162,6 +162,10 @@ static const char* kSiteProcessMapKeyName = "content_site_process_map";
namespace content {
namespace {
+// Maximal number of LatencyInfo that can be contained in
+// ViewHostMsg_CompositorSurfaceBuffersSwapped_Params.
+const unsigned int kMaxLatencyInfoNumber = 100;
+
void CacheShaderInfo(int32 id, base::FilePath path) {
ShaderCacheFactory::GetInstance()->SetCacheInfo(id, path);
}
@@ -1987,6 +1991,11 @@ void RenderProcessHostImpl::OnCompositorSurfaceBuffersSwappedNoHost(
const ViewHostMsg_CompositorSurfaceBuffersSwapped_Params& params) {
TRACE_EVENT0("renderer_host",
"RenderWidgetHostImpl::OnCompositorSurfaceBuffersSwappedNoHost");
+ if (params.latency_info.size() > kMaxLatencyInfoNumber) {
+ LOG(ERROR) << "ViewHostMsg_CompositorSurfaceBuffersSwapped LatencyInfo"
+ << " size " << params.latency_info.size() << " is too big.";
+ return;
+ }
AcceleratedSurfaceMsg_BufferPresented_Params ack_params;
ack_params.sync_point = 0;
RenderWidgetHostImpl::AcknowledgeBufferPresent(params.route_id,

Powered by Google App Engine
This is Rietveld 408576698