@samitouri / QOS-React / commits / 737dac4f03

areChildrenOffscreen -> shouldDeprioritizeSubtree

Andrew Clark committed Feb 28, 2017 at 12:31 UTC 737dac4f03433ff6e08bc18116ec59566d668c94
7 files changed +9 -9
src/renderers/art/ReactARTFiber.js
+1 -1
@@ -503,7 +503,7 @@ const ARTRenderer = ReactFiberReconciler({
503 // Noop
504 },
505
506 - areChildrenOffscreen(type, props) {
506 + shouldDeprioritizeSubtree(type, props) {
507 return false;
508 },
509
src/renderers/dom/fiber/ReactDOMFiber.js
+1 -1
@@ -287,7 +287,7 @@ var DOMRenderer = ReactFiberReconciler({
287 domElement.textContent = '';
288 },
289
290 - areChildrenOffscreen(type : string, props : Props) : boolean {
290 + shouldDeprioritizeSubtree(type : string, props : Props) : boolean {
291 return Boolean(props.hidden);
292 },
293
src/renderers/native/ReactNativeFiber.js
+1 -1
@@ -343,7 +343,7 @@ const NativeRenderer = ReactFiberReconciler({
343 // Noop
344 },
345
346 - areChildrenOffscreen(type : string, props : Props) : boolean {
346 + shouldDeprioritizeSubtree(type : string, props : Props) : boolean {
347 return false;
348 },
349
src/renderers/noop/ReactNoop.js
+1 -1
@@ -101,7 +101,7 @@ var NoopRenderer = ReactFiberReconciler({
101
102 resetTextContent(instance : Instance) : void {},
103
104 - areChildrenOffscreen(type : string, props : Props) : boolean {
104 + shouldDeprioritizeSubtree(type : string, props : Props) : boolean {
105 return Boolean(props.hidden);
106 },
107
src/renderers/shared/fiber/ReactFiberBeginWork.js
+3 -3
@@ -77,7 +77,7 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(
77 getPriorityContext : () => PriorityLevel,
78 ) {
79
80 - const { shouldSetTextContent, useSyncScheduling, areChildrenOffscreen } = config;
80 + const { shouldSetTextContent, useSyncScheduling, shouldDeprioritizeSubtree } = config;
81
82 const {
83 pushHostContext,
@@ -358,7 +358,7 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(
358 }
359 } else if (nextProps === null || memoizedProps === nextProps) {
360 if (!useSyncScheduling &&
361 - areChildrenOffscreen(workInProgress.type, memoizedProps) &&
361 + shouldDeprioritizeSubtree(workInProgress.type, memoizedProps) &&
362 workInProgress.pendingWorkPriority !== OffscreenPriority) {
363 // This subtree still has work, but it should be deprioritized so we need
364 // to bail out and not do any work yet.
@@ -400,7 +400,7 @@ module.exports = function<T, P, I, TI, PI, C, CX, PL>(
400 markRef(current, workInProgress);
401
402 if (!useSyncScheduling &&
403 - areChildrenOffscreen(workInProgress.type, nextProps) &&
403 + shouldDeprioritizeSubtree(workInProgress.type, nextProps) &&
404 workInProgress.pendingWorkPriority !== OffscreenPriority) {
405 // If this host component is hidden, we can bail out on the children.
406 // We'll rerender the children later at the lower priority.
src/renderers/shared/fiber/ReactFiberReconciler.js
+1 -1
@@ -83,7 +83,7 @@ export type HostConfig<T, P, I, TI, PI, C, CX, PL> = {
83
84 shouldSetTextContent(props : P) : boolean,
85 resetTextContent(instance : I) : void,
86 - areChildrenOffscreen(type : T, props : P) : boolean,
86 + shouldDeprioritizeSubtree(type : T, props : P) : boolean,
87
88 createTextInstance(
89 text : string,
src/renderers/testing/ReactTestRendererFiber.js
+1 -1
@@ -150,7 +150,7 @@ var TestRenderer = ReactFiberReconciler({
150 // noop
151 },
152
153 - areChildrenOffscreen(type: string, props : Props) : boolean {
153 + shouldDeprioritizeSubtree(type: string, props : Props) : boolean {
154 return false;
155 },
156