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

Unified Diff: content/browser/frame_host/render_widget_host_view_child_frame.cc

Issue 2116663002: Test for BrowserPlugin-based WebView Focus (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Address comments. Created 4 years, 5 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/frame_host/render_widget_host_view_child_frame.cc
diff --git a/content/browser/frame_host/render_widget_host_view_child_frame.cc b/content/browser/frame_host/render_widget_host_view_child_frame.cc
index e3a036176bbdbf690e3546a543b0b2c005d3fd63..909c5e15f8223316c9603951ff1e071cd04f34d3 100644
--- a/content/browser/frame_host/render_widget_host_view_child_frame.cc
+++ b/content/browser/frame_host/render_widget_host_view_child_frame.cc
@@ -45,6 +45,7 @@ RenderWidgetHostViewChildFrame::RenderWidgetHostViewChildFrame(
last_output_surface_id_(0),
current_surface_scale_factor_(1.f),
ack_pending_count_(0),
+ surface_frame_count_(0),
frame_connector_(nullptr),
begin_frame_source_(nullptr),
observing_begin_frame_source_(false),
@@ -352,6 +353,9 @@ void RenderWidgetHostViewChildFrame::SurfaceDrawn(uint32_t output_surface_id,
cc::SurfaceDrawStatus drawn) {
cc::CompositorFrameAck ack;
DCHECK_GT(ack_pending_count_, 0U);
+
+ surface_frame_count_++;
+
if (!surface_returned_resources_.empty())
ack.resources.swap(surface_returned_resources_);
if (host_) {
@@ -684,6 +688,7 @@ void RenderWidgetHostViewChildFrame::ClearCompositorSurfaceIfNecessary() {
if (surface_factory_ && !surface_id_.is_null())
surface_factory_->Destroy(surface_id_);
surface_id_ = cc::SurfaceId();
+ surface_frame_count_ = 0;
}
bool RenderWidgetHostViewChildFrame::IsChildFrameForTesting() const {

Powered by Google App Engine
This is Rietveld 408576698