Cleanup SchedulerDelegate interface

Summary: This diff removes the "isLayoutable" parameter from SchedulerDelegate.schedulerDidRequestPreliminaryViewAllocation. This now can be infered from the shadowView parameter

Reviewed By: shergin

Differential Revision: D14296481

fbshipit-source-id: b200504f9c2bef41f0a70257f1f5a274fbe97cbb
This commit is contained in:
David Vacca
2019-03-03 15:51:32 -08:00
committed by Facebook Github Bot
parent e93522b14b
commit 747d1f7029
5 changed files with 7 additions and 14 deletions
@@ -467,10 +467,11 @@ void Binding::setPixelDensity(float pointScaleFactor) {
void Binding::schedulerDidRequestPreliminaryViewAllocation(
const SurfaceId surfaceId,
bool isLayoutable,
const ShadowView &shadowView) {
if (isLayoutable) {
bool isLayoutableShadowNode = shadowView.layoutMetrics != EmptyLayoutMetrics;
if (isLayoutableShadowNode) {
static auto preallocateView =
jni::findClassStatic(UIManagerJavaDescriptor)
->getMethod<void(jint, jint, jstring, ReadableMap::javaobject)>("preallocateView");
@@ -64,7 +64,6 @@ class Binding : public jni::HybridClass<Binding>, public SchedulerDelegate {
void schedulerDidRequestPreliminaryViewAllocation(
const SurfaceId surfaceId,
bool isLayoutable,
const ShadowView &shadowView);
void setPixelDensity(float pointScaleFactor);