Support fade for remote images in React with nodes.

Summary:
Support fade for DrawImageWithPipeline so that images are faded in
when they are remotely fetched.

Differential Revision: D2804997
This commit is contained in:
Ahmed El-Helw
2016-01-28 17:06:17 -08:00
parent 74c72111f1
commit d854a17d2a
5 changed files with 69 additions and 13 deletions

View File

@@ -32,6 +32,7 @@ import android.graphics.Canvas;
@Override
public final void draw(FlatViewGroup parent, Canvas canvas) {
onPreDraw(parent, canvas);
if (shouldClip()) {
canvas.save();
canvas.clipRect(mClipLeft, mClipTop, mClipRight, mClipBottom);
@@ -42,6 +43,9 @@ import android.graphics.Canvas;
}
}
protected void onPreDraw(FlatViewGroup parent, Canvas canvas) {
}
/**
* Updates boundaries of the AbstractDrawCommand and freezes it.
* Will return a frozen copy if the current AbstractDrawCommand cannot be mutated.