Skip to content

Commit

Permalink
Default on animated webp decoding in Glide on P+
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 430741092
  • Loading branch information
sjudd authored and glide-copybara-robot committed Feb 24, 2022
1 parent 67350cd commit ad35f5e
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 13 deletions.
10 changes: 0 additions & 10 deletions library/src/main/java/com/bumptech/glide/GlideBuilder.java
Original file line number Diff line number Diff line change
Expand Up @@ -487,14 +487,6 @@ public GlideBuilder setImageDecoderEnabledForBitmaps(boolean isEnabled) {
return this;
}

/** This is an experimental method, it may be removed or changed at any future version. */
public GlideBuilder setEnableImageDecoderForAnimatedWebp(
boolean enableImageDecoderForAnimatedWebp) {
glideExperimentsBuilder.update(
new EnableImageDecoderForAnimatedWebp(), enableImageDecoderForAnimatedWebp);
return this;
}

void setRequestManagerFactory(@Nullable RequestManagerFactory factory) {
this.requestManagerFactory = factory;
}
Expand Down Expand Up @@ -606,8 +598,6 @@ private WaitForFramesAfterTrimMemory() {}

static final class EnableImageDecoderForBitmaps implements Experiment {}

static final class EnableImageDecoderForAnimatedWebp implements Experiment {}

/** See {@link #setLogRequestOrigins(boolean)}. */
public static final class LogRequestOrigins implements Experiment {}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,6 @@
import android.os.ParcelFileDescriptor;
import androidx.annotation.Nullable;
import androidx.tracing.Trace;
import com.bumptech.glide.GlideBuilder.EnableImageDecoderForAnimatedWebp;
import com.bumptech.glide.GlideBuilder.EnableImageDecoderForBitmaps;
import com.bumptech.glide.gifdecoder.GifDecoder;
import com.bumptech.glide.load.ImageHeaderParser;
Expand Down Expand Up @@ -164,8 +163,7 @@ private static void initializeDefaults(
streamBitmapDecoder = new StreamBitmapDecoder(downsampler, arrayPool);
}

if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P
&& experiments.isEnabled(EnableImageDecoderForAnimatedWebp.class)) {
if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
registry.append(
Registry.BUCKET_ANIMATION,
InputStream.class,
Expand Down

0 comments on commit ad35f5e

Please sign in to comment.