-
Notifications
You must be signed in to change notification settings - Fork 6.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Synchronous StreamOpener -> Async StreamLoader
An extensive but relatively minor change to the internal interfaces to allow for asynchronous InputStream opening in the ImageManager. This allows us to use async http libraries (like Volley) without forcing us to always start a download and then check the ImageManager cache only after the download completes.
- Loading branch information
Sam Judd
committed
Jul 19, 2013
1 parent
c02e315
commit e13dced
Showing
25 changed files
with
402 additions
and
465 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
83 changes: 0 additions & 83 deletions
83
library/src/com/bumptech/glide/loader/model/BaseModelStreamLoader.java
This file was deleted.
Oops, something went wrong.
25 changes: 0 additions & 25 deletions
25
library/src/com/bumptech/glide/loader/model/DirectModelStreamLoader.java
This file was deleted.
Oops, something went wrong.
26 changes: 26 additions & 0 deletions
26
library/src/com/bumptech/glide/loader/model/FileLoader.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package com.bumptech.glide.loader.model; | ||
|
||
import com.bumptech.glide.loader.stream.FileStreamLoader; | ||
import com.bumptech.glide.loader.stream.StreamLoader; | ||
|
||
import java.io.File; | ||
|
||
/** | ||
* A simple model loader for {@link File} | ||
*/ | ||
public class FileLoader implements ModelLoader<File> { | ||
|
||
@Override | ||
public StreamLoader getStreamOpener(File model, int width, int height) { | ||
return new FileStreamLoader(model); | ||
} | ||
|
||
@Override | ||
public String getId(File model) { | ||
//canonical is better, but also slower | ||
return model.getAbsolutePath(); | ||
} | ||
|
||
@Override | ||
public void clear() { } | ||
} |
26 changes: 0 additions & 26 deletions
26
library/src/com/bumptech/glide/loader/model/FileStreamLoader.java
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.