Optimization of memory and draw operations, and proper treatment of filled…

Optimization of memory and draw operations, and proper treatment of filled regions (as far as we can infer from the specs)
parent 0c49b81b
......@@ -15,9 +15,6 @@
*/
package com.google.android.exoplayer2.text.dvbsubs;
import android.graphics.Bitmap;
import com.google.android.exoplayer2.C;
import com.google.android.exoplayer2.text.Cue;
import com.google.android.exoplayer2.text.Subtitle;
......@@ -28,12 +25,11 @@ import java.util.List;
final class DvbSubsSubtitle implements Subtitle {
private final List<Cue> cues;
public DvbSubsSubtitle(Bitmap data) {
if (data == null) {
public DvbSubsSubtitle(List<Cue> cues) {
if (cues == null) {
this.cues = Collections.emptyList();
} else {
Cue cue = new Cue(data, 0, Cue.ANCHOR_TYPE_START, 0, Cue.ANCHOR_TYPE_START, 1, (float) data.getWidth()/data.getHeight());
this.cues = Collections.singletonList(cue);
this.cues = cues;
}
}
......
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 sign in to comment