Commit df9f8d87 authored by Jonathan Ross's avatar Jonathan Ross Committed by Commit Bot

Reduce DelegatedFrameHost NOTIMPLEMENTED Calls

RenderWidgetHostViewMac explicitly sets NeedsBeginFrames upon startup.
This was setup to address some race condition.

However this is not handled by the browser process when Viz Display
Compositor is enabled. DelegatedFrameHost is spamming debug logs with
NOTIMPLEMENTED messages as a result.

All other paths to this is already checking the Viz status and not
calling in. Once Viz has launched we'll remove this legacy path.

This change updates RenderWidgetHostViewMac to not explicitly set
NeedsBeginFrames upon startup when Viz Display Compositor is
enabled.

Bug: 907246
Change-Id: I9a584c4bedcdb1da897f8155eb151ff63ef3c8b2
Reviewed-on: https://chromium-review.googlesource.com/c/1355479Reviewed-by: default avatarKenneth Russell <kbr@chromium.org>
Reviewed-by: default avatarccameron <ccameron@chromium.org>
Commit-Queue: Jonathan Ross <jonross@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612386}
parent dfe266e2
...@@ -11,6 +11,7 @@ ...@@ -11,6 +11,7 @@
#include "base/bind.h" #include "base/bind.h"
#include "base/command_line.h" #include "base/command_line.h"
#include "base/feature_list.h"
#include "base/logging.h" #include "base/logging.h"
#include "base/mac/mac_util.h" #include "base/mac/mac_util.h"
#include "base/mac/scoped_cftyperef.h" #include "base/mac/scoped_cftyperef.h"
...@@ -18,6 +19,7 @@ ...@@ -18,6 +19,7 @@
#include "base/strings/sys_string_conversions.h" #include "base/strings/sys_string_conversions.h"
#include "base/strings/utf_string_conversions.h" #include "base/strings/utf_string_conversions.h"
#include "base/time/time.h" #include "base/time/time.h"
#include "components/viz/common/features.h"
#include "components/viz/common/switches.h" #include "components/viz/common/switches.h"
#import "content/browser/accessibility/browser_accessibility_cocoa.h" #import "content/browser/accessibility/browser_accessibility_cocoa.h"
#import "content/browser/accessibility/browser_accessibility_mac.h" #import "content/browser/accessibility/browser_accessibility_mac.h"
...@@ -225,6 +227,9 @@ RenderWidgetHostViewMac::RenderWidgetHostViewMac(RenderWidgetHost* widget, ...@@ -225,6 +227,9 @@ RenderWidgetHostViewMac::RenderWidgetHostViewMac(RenderWidgetHost* widget,
if (GetTextInputManager()) if (GetTextInputManager())
GetTextInputManager()->AddObserver(this); GetTextInputManager()->AddObserver(this);
// When Viz Display Compositor is not active, RenderWidgetHostViewMac is
// responsible for handling BeginFrames.
//
// Because of the way Mac pumps messages during resize, SetNeedsBeginFrame // Because of the way Mac pumps messages during resize, SetNeedsBeginFrame
// messages are not delayed on Mac. This leads to creation-time raciness // messages are not delayed on Mac. This leads to creation-time raciness
// where renderer sends a SetNeedsBeginFrame(true) before the renderer host is // where renderer sends a SetNeedsBeginFrame(true) before the renderer host is
...@@ -233,8 +238,10 @@ RenderWidgetHostViewMac::RenderWidgetHostViewMac(RenderWidgetHost* widget, ...@@ -233,8 +238,10 @@ RenderWidgetHostViewMac::RenderWidgetHostViewMac(RenderWidgetHost* widget,
// Any renderer that will produce frames needs to have begin frames sent to // Any renderer that will produce frames needs to have begin frames sent to
// it. So unless it is never visible, start this value at true here to avoid // it. So unless it is never visible, start this value at true here to avoid
// startup raciness and decrease latency. // startup raciness and decrease latency.
needs_begin_frames_ = needs_begin_frames; if (!base::FeatureList::IsEnabled(features::kVizDisplayCompositor)) {
UpdateNeedsBeginFramesInternal(); needs_begin_frames_ = needs_begin_frames;
UpdateNeedsBeginFramesInternal();
}
} }
RenderWidgetHostViewMac::~RenderWidgetHostViewMac() { RenderWidgetHostViewMac::~RenderWidgetHostViewMac() {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment