Commit 0c97e4f1 authored by Dan Harrington's avatar Dan Harrington Committed by Commit Bot

Delay loading Xsurface

We were loading xsurface at startup when FeedV2 was enabled.
Now it's only loaded when the feed surface is created.
This change shouldn't even affect normal startup when the NTP is
loading, because the startup() function is typically called after
creation of the feed surface in that case.

Bug: 1130677
Change-Id: If5edaa35fc387e92530b01e2421e1eef4b6ced82
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2422690Reviewed-by: default avatarCathy Li <chili@chromium.org>
Commit-Queue: Dan H <harringtond@chromium.org>
Cr-Commit-Position: refs/heads/master@{#811416}
parent c5f8c777
......@@ -152,7 +152,6 @@ public class FeedStreamSurface implements SurfaceActionsHandler, FeedActionsHand
if (sStartupCalled) return;
sStartupCalled = true;
FeedServiceBridge.startup();
xSurfaceProcessScope();
if (sSurfaces != null) {
for (FeedStreamSurface surface : sSurfaces) {
surface.updateSurfaceOpenState();
......@@ -933,6 +932,7 @@ public class FeedStreamSurface implements SurfaceActionsHandler, FeedActionsHand
assert (mStreamContentVisible);
// No feed content should exist.
assert (mContentManager.getItemCount() == mHeaderCount);
mOpened = true;
FeedStreamSurfaceJni.get().surfaceOpened(mNativeFeedStreamSurface, FeedStreamSurface.this);
mHybridListRenderer.onSurfaceOpened();
......
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