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

Side by Side Diff: content/renderer/render_view_impl.cc

Issue 2185823005: Make RenderViewImpl::OnForceRedraw more robust (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 4 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 #include "content/renderer/render_view_impl.h" 5 #include "content/renderer/render_view_impl.h"
6 6
7 #include <algorithm> 7 #include <algorithm>
8 #include <cmath> 8 #include <cmath>
9 #include <memory> 9 #include <memory>
10 10
(...skipping 19 matching lines...) Expand all
30 #include "base/strings/string_piece.h" 30 #include "base/strings/string_piece.h"
31 #include "base/strings/string_split.h" 31 #include "base/strings/string_split.h"
32 #include "base/strings/string_util.h" 32 #include "base/strings/string_util.h"
33 #include "base/strings/sys_string_conversions.h" 33 #include "base/strings/sys_string_conversions.h"
34 #include "base/strings/utf_string_conversions.h" 34 #include "base/strings/utf_string_conversions.h"
35 #include "base/threading/thread_task_runner_handle.h" 35 #include "base/threading/thread_task_runner_handle.h"
36 #include "base/time/time.h" 36 #include "base/time/time.h"
37 #include "base/trace_event/trace_event.h" 37 #include "base/trace_event/trace_event.h"
38 #include "build/build_config.h" 38 #include "build/build_config.h"
39 #include "cc/base/switches.h" 39 #include "cc/base/switches.h"
40 #include "cc/output/latency_info_swap_promise.h"
40 #include "content/child/appcache/appcache_dispatcher.h" 41 #include "content/child/appcache/appcache_dispatcher.h"
41 #include "content/child/appcache/web_application_cache_host_impl.h" 42 #include "content/child/appcache/web_application_cache_host_impl.h"
42 #include "content/child/child_shared_bitmap_manager.h" 43 #include "content/child/child_shared_bitmap_manager.h"
43 #include "content/child/request_extra_data.h" 44 #include "content/child/request_extra_data.h"
44 #include "content/child/v8_value_converter_impl.h" 45 #include "content/child/v8_value_converter_impl.h"
45 #include "content/child/webmessageportchannel_impl.h" 46 #include "content/child/webmessageportchannel_impl.h"
46 #include "content/common/content_constants_internal.h" 47 #include "content/common/content_constants_internal.h"
47 #include "content/common/content_switches_internal.h" 48 #include "content/common/content_switches_internal.h"
48 #include "content/common/dom_storage/dom_storage_types.h" 49 #include "content/common/dom_storage/dom_storage_types.h"
49 #include "content/common/drag_messages.h" 50 #include "content/common/drag_messages.h"
(...skipping 1409 matching lines...) Expand 10 before | Expand all | Expand 10 after
1459 frames_with_pending_state_.clear(); 1460 frames_with_pending_state_.clear();
1460 } 1461 }
1461 1462
1462 void RenderViewImpl::ApplyWebPreferencesInternal( 1463 void RenderViewImpl::ApplyWebPreferencesInternal(
1463 const WebPreferences& prefs, 1464 const WebPreferences& prefs,
1464 blink::WebView* web_view, 1465 blink::WebView* web_view,
1465 CompositorDependencies* compositor_deps) { 1466 CompositorDependencies* compositor_deps) {
1466 ApplyWebPreferences(prefs, web_view); 1467 ApplyWebPreferences(prefs, web_view);
1467 } 1468 }
1468 1469
1469 void RenderViewImpl::OnForceRedraw(int id) { 1470 void RenderViewImpl::OnForceRedraw(const ui::LatencyInfo& latency_info) {
1470 ui::LatencyInfo latency_info;
1471 if (id) {
1472 latency_info.AddLatencyNumber(ui::WINDOW_SNAPSHOT_FRAME_NUMBER_COMPONENT,
1473 0,
1474 id);
1475 }
1476 std::unique_ptr<cc::SwapPromiseMonitor> latency_info_swap_promise_monitor; 1471 std::unique_ptr<cc::SwapPromiseMonitor> latency_info_swap_promise_monitor;
1477 if (RenderWidgetCompositor* rwc = compositor()) { 1472 if (RenderWidgetCompositor* rwc = compositor()) {
1473 auto copied_latency_info = latency_info;
1478 latency_info_swap_promise_monitor = 1474 latency_info_swap_promise_monitor =
1479 rwc->CreateLatencyInfoSwapPromiseMonitor(&latency_info); 1475 rwc->CreateLatencyInfoSwapPromiseMonitor(&copied_latency_info);
1480 } 1476 }
1481 ScheduleCompositeWithForcedRedraw(); 1477 ScheduleCompositeWithForcedRedraw();
1482 } 1478 }
1483 1479
1484 // blink::WebViewClient ------------------------------------------------------ 1480 // blink::WebViewClient ------------------------------------------------------
1485 1481
1486 WebView* RenderViewImpl::createView(WebLocalFrame* creator, 1482 WebView* RenderViewImpl::createView(WebLocalFrame* creator,
1487 const WebURLRequest& request, 1483 const WebURLRequest& request,
1488 const WebWindowFeatures& features, 1484 const WebWindowFeatures& features,
1489 const WebString& frame_name, 1485 const WebString& frame_name,
(...skipping 1611 matching lines...) Expand 10 before | Expand all | Expand 10 after
3101 return render_frame->focused_pepper_plugin(); 3097 return render_frame->focused_pepper_plugin();
3102 } 3098 }
3103 frame = frame->traverseNext(false); 3099 frame = frame->traverseNext(false);
3104 } 3100 }
3105 3101
3106 return nullptr; 3102 return nullptr;
3107 } 3103 }
3108 #endif 3104 #endif
3109 3105
3110 } // namespace content 3106 } // namespace content
OLDNEW
« cc/trees/swap_promise_monitor.h ('K') | « content/renderer/render_view_impl.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698