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

Side by Side 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: Upon receving ViewHostMsg_CompositorSurfaceBuffersSwapped, CHECK LatencyInfo list size 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 // Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 // Represents the browser side of the browser <--> renderer communication 5 // Represents the browser side of the browser <--> renderer communication
6 // channel. There will be one RenderProcessHost per renderer process. 6 // channel. There will be one RenderProcessHost per renderer process.
7 7
8 #include "content/browser/renderer_host/render_process_host_impl.h" 8 #include "content/browser/renderer_host/render_process_host_impl.h"
9 9
10 #include <algorithm> 10 #include <algorithm>
(...skipping 144 matching lines...) Expand 10 before | Expand all | Expand 10 after
155 155
156 #include "third_party/skia/include/core/SkBitmap.h" 156 #include "third_party/skia/include/core/SkBitmap.h"
157 157
158 extern bool g_exited_main_message_loop; 158 extern bool g_exited_main_message_loop;
159 159
160 static const char* kSiteProcessMapKeyName = "content_site_process_map"; 160 static const char* kSiteProcessMapKeyName = "content_site_process_map";
161 161
162 namespace content { 162 namespace content {
163 namespace { 163 namespace {
164 164
165 // Maximal number of LatencyInfo that can be contained in
166 // ViewHostMsg_CompositorSurfaceBuffersSwapped_Params.
167 const unsigned int kMaxLatencyInfoNumber = 100;
168
165 void CacheShaderInfo(int32 id, base::FilePath path) { 169 void CacheShaderInfo(int32 id, base::FilePath path) {
166 ShaderCacheFactory::GetInstance()->SetCacheInfo(id, path); 170 ShaderCacheFactory::GetInstance()->SetCacheInfo(id, path);
167 } 171 }
168 172
169 void RemoveShaderInfo(int32 id) { 173 void RemoveShaderInfo(int32 id) {
170 ShaderCacheFactory::GetInstance()->RemoveCacheInfo(id); 174 ShaderCacheFactory::GetInstance()->RemoveCacheInfo(id);
171 } 175 }
172 176
173 net::URLRequestContext* GetRequestContext( 177 net::URLRequestContext* GetRequestContext(
174 scoped_refptr<net::URLRequestContextGetter> request_context, 178 scoped_refptr<net::URLRequestContextGetter> request_context,
(...skipping 1805 matching lines...) Expand 10 before | Expand all | Expand 10 after
1980 } 1984 }
1981 1985
1982 void RenderProcessHostImpl::OnSavedPageAsMHTML(int job_id, int64 data_size) { 1986 void RenderProcessHostImpl::OnSavedPageAsMHTML(int job_id, int64 data_size) {
1983 MHTMLGenerationManager::GetInstance()->MHTMLGenerated(job_id, data_size); 1987 MHTMLGenerationManager::GetInstance()->MHTMLGenerated(job_id, data_size);
1984 } 1988 }
1985 1989
1986 void RenderProcessHostImpl::OnCompositorSurfaceBuffersSwappedNoHost( 1990 void RenderProcessHostImpl::OnCompositorSurfaceBuffersSwappedNoHost(
1987 const ViewHostMsg_CompositorSurfaceBuffersSwapped_Params& params) { 1991 const ViewHostMsg_CompositorSurfaceBuffersSwapped_Params& params) {
1988 TRACE_EVENT0("renderer_host", 1992 TRACE_EVENT0("renderer_host",
1989 "RenderWidgetHostImpl::OnCompositorSurfaceBuffersSwappedNoHost"); 1993 "RenderWidgetHostImpl::OnCompositorSurfaceBuffersSwappedNoHost");
1994 CHECK(params.latency_info.size() < kMaxLatencyInfoNumber);
jln (very slow on Chromium) 2014/01/14 00:32:51 The problem with this approach is that is gives a
Yufeng Shen (Slow to review) 2014/01/14 00:47:14 Done.
1990 AcceleratedSurfaceMsg_BufferPresented_Params ack_params; 1995 AcceleratedSurfaceMsg_BufferPresented_Params ack_params;
1991 ack_params.sync_point = 0; 1996 ack_params.sync_point = 0;
1992 RenderWidgetHostImpl::AcknowledgeBufferPresent(params.route_id, 1997 RenderWidgetHostImpl::AcknowledgeBufferPresent(params.route_id,
1993 params.gpu_process_host_id, 1998 params.gpu_process_host_id,
1994 ack_params); 1999 ack_params);
1995 } 2000 }
1996 2001
1997 void RenderProcessHostImpl::OnGpuSwitching() { 2002 void RenderProcessHostImpl::OnGpuSwitching() {
1998 // We are updating all widgets including swapped out ones. 2003 // We are updating all widgets including swapped out ones.
1999 scoped_ptr<RenderWidgetHostIterator> widgets( 2004 scoped_ptr<RenderWidgetHostIterator> widgets(
(...skipping 18 matching lines...) Expand all
2018 return; 2023 return;
2019 Send(new MediaStreamMsg_EnableAecDump(file_for_transit)); 2024 Send(new MediaStreamMsg_EnableAecDump(file_for_transit));
2020 } 2025 }
2021 2026
2022 void RenderProcessHostImpl::SendDisableAecDumpToRenderer() { 2027 void RenderProcessHostImpl::SendDisableAecDumpToRenderer() {
2023 Send(new MediaStreamMsg_DisableAecDump()); 2028 Send(new MediaStreamMsg_DisableAecDump());
2024 } 2029 }
2025 #endif 2030 #endif
2026 2031
2027 } // namespace content 2032 } // namespace content
OLDNEW
« no previous file with comments | « content/browser/renderer_host/compositing_iosurface_mac.mm ('k') | content/browser/renderer_host/render_widget_host_impl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698