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

Unified Diff: content/renderer/render_widget.h

Issue 2707243005: Discard compositor frames from unloaded web content (Closed)
Patch Set: Review comment addressed Created 3 years, 10 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/renderer/render_widget.h
diff --git a/content/renderer/render_widget.h b/content/renderer/render_widget.h
index e808bcc2e254bca5dbfc8b95f3bd051bcf25b37f..99048fb1f9b1e53460ca8ace2fb3888f8c6c63b8 100644
--- a/content/renderer/render_widget.h
+++ b/content/renderer/render_widget.h
@@ -414,6 +414,9 @@ class CONTENT_EXPORT RenderWidget
virtual void TransferActiveWheelFlingAnimation(
const blink::WebActiveWheelFlingParameters& params) {}
+ uint32_t GetContentSourceId();
+ void IncrementContentSourceId();
+
protected:
// Friend RefCounted so that the dtor can be non-public. Using this class
// without ref-counting is an error.
@@ -847,6 +850,16 @@ class CONTENT_EXPORT RenderWidget
bool time_to_first_active_paint_recorded_;
base::TimeTicks was_shown_time_;
+ // This is initialized to zero and is incremented on each non-same-page
+ // navigation commit by RenderFrameImpl. At that time it is sent to the
Charlie Reis 2017/03/01 20:13:29 Please clarify that this is only incremented and c
kenrb 2017/03/02 17:08:17 Correct, both in the renderer and browser we ignor
+ // compositor so that it can tag compositor frames, and RenderFrameImpl is
+ // responsible for sending it to the browser process to be used to match
+ // each compositor frame to the most recent page navigation before it was
+ // generated.
+ // TODO(kenrb, fsamuel): This should be removed when SurfaceIDs can be used
+ // to replace it. See https://crbug.com/695579.
+ uint32_t current_content_source_id_;
+
base::WeakPtrFactory<RenderWidget> weak_ptr_factory_;
DISALLOW_COPY_AND_ASSIGN(RenderWidget);

Powered by Google App Engine
This is Rietveld 408576698