-
Notifications
You must be signed in to change notification settings - Fork 1.6k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
WASM WebpDecoder #91
WASM WebpDecoder #91
Conversation
src/codecs/decoders.ts
Outdated
browserPNG, | ||
browserJPEG, | ||
browserWebP, | ||
wasmWebP, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are tested in order. So if you want the wasm decoder to take precedence over the browser-native one, just move it up a line :)
src/codecs/webp/decoder.ts
Outdated
@@ -0,0 +1,16 @@ | |||
import { blobToArrayBuffer, imageDataToBitmap } from '../../lib/util'; | |||
import DecoderWorker from './DecoderWorker'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the file needs to be called Decoder.worker.ts
in order to be workerified
src/codecs/decoders.ts
Outdated
[ | ||
browserPNG, | ||
browserJPEG, | ||
wasmWebP, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is just so the wasm decoder takes precedence of the native one for testing purposes. Will remove before merging.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Or rather: will move it back down before merging.
So the problem is with the identity decoder in FF. If I use any other encoder, it works fine. I am wondering if FF transfers the data buffer and neuters it where Chrome doesn’t. |
@developit I’m assigning this to you as I have no idea what exactly is going on. I have switched to FF stable and figured out that the exception is thrown when stepping from line 14473 to 14476, which is really odd. My gut says that FF is GC’ing something that shouldn’t be GC’d, but that’s just a hunch. Can you take a look? I am not sure if this in an FF bug, a preact bug or me being dumb. |
Investigating again. |
I burned a few hours on this and I have nothing. We're seeing this bug: I've attempted a myriad of workarounds and nothing works. As best I can tell, |
src/codecs/browser-jpeg/decoder.ts
Outdated
|
||
export function isSupported(): Promise<boolean> { | ||
return canDecode(jpegFile); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Part of me likes the robustness here, but I think it's overkill. If our target browsers are all capable of decoding a particular format, I don't think we need a feature test for it.
I haven't looked at the rest of the PR yet, so this may be nonsense, but I figured the pattern would be:
- Look at the first n bytes of the file. (I think this is the best method rather than looking at type or extension. It's certainly what the browser does).
- If it's a type that isn't universally supported by our target browsers, then:
- If this browser doesn't support decoding natively, then return the result of decoding it using the relevant WASM decoder.
- Return the result of giving it to the native decoder.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In terms of the sniffing, all WebPs start with bytes RIFF
followed by 4 bytes that can be anything, then bytes WEBPVP8
(including the space at the end).
This is what Chrome uses: https://cs.chromium.org/chromium/src/net/base/mime_sniffer.cc?gsn=mask&l=155
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That sounds like a good idea - I don't think Firefox even reports a mimetype for webp files when we grab the value from the input.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems like this logic should sit in fileToBitmap
.
src/codecs/browser-webp/decoder.ts
Outdated
} | ||
|
||
// tslint:disable-next-line:max-line-length It’s a data URL. Whatcha gonna do? | ||
const webpFile = 'data:image/webp;base64,UklGRkAAAABXRUJQVlA4WAoAAAAQAAAAAAAAAAAAQUxQSAIAAAAAAFZQOCAYAAAAMAEAnQEqAQABAAFAJiWkAANwAP79NmgA'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This one from Modernizr seems smaller: 'data:image/webp;base64,UklGRh4AAABXRUJQVlA4TBEAAAAvAAAAAAfQ//73v/+BiOh/AAA='
.
src/codecs/webp/Decoder.worker.ts
Outdated
}, | ||
onRuntimeInitialized() { | ||
// An Emscripten is a then-able that, for some reason, `then()`s itself, | ||
// causing an infite loop when you wrap it in a real promise. Deleten the `then` |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Deleting"?
src/codecs/webp/decoder.ts
Outdated
} | ||
|
||
export async function isSupported(): Promise<boolean> { | ||
// TODO(@surma): Should we do wasm detection here or something? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nah. WASM is part of our baseline. If we want to feature-detect this, it'll be right at the start of the app where we may choose to display a helpful message to unsupported browsers.
src/lib/util.ts
Outdated
|
||
export function fileToBitmap(file: File): Promise<ImageBitmap> { | ||
return createImageBitmap(file); | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This seems weird, but I think it's worth keeping as I don't think createImageBitmap
is supported on our target browsers. So, we'll eventually expand this method to fall back to img + canvas or whatever.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That was the point behind this function
src/lib/util.ts
Outdated
@@ -64,3 +79,26 @@ export async function canvasEncode(data: ImageData, type: string, quality?: numb | |||
if (!blob) throw Error('Encoding failed'); | |||
return blob; | |||
} | |||
|
|||
export function canDecode(data: string): Promise<boolean> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: canDecodeImage
?
src/components/app/index.tsx
Outdated
@@ -233,7 +249,7 @@ export default class App extends Component<Props, State> { | |||
loadedCounter: loadingCounter, | |||
}; | |||
|
|||
this.setState({ images, error: '' }); | |||
this.setState({ images }); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not clearing the previous error?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this got merged into master in the meantime... I don’t remember removing it myself
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's still there on master
src/components/app/index.tsx
Outdated
if(!decoder) { | ||
throw new Error('Can’t find a decoder for the given file'); | ||
} | ||
console.log(`Decoding using ${decoder.name}`); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Remove in final PR.
@jakearchibald @developit PTAL |
src/codecs/browser-webp/decoder.ts
Outdated
import { canDecodeImage, createImageBitmapPolyfill } from '../../lib/util'; | ||
|
||
export const name = 'Browser WebP Decoder'; | ||
export const supportedMimeTypes = ['image/webp']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we need this? Doesn't sniffing make this redundant? Update: Ah it's used within this module, fair enough.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is exported, but not used anywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It’s used outside this module for the sniffing to find the appropriate codec
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Where? I'm having trouble finding it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah no, never mind, it’s not used outside anymore :D
src/lib/util.ts
Outdated
]); | ||
|
||
export async function sniffMimeType(blob: Blob): Promise<string | undefined> { | ||
const firstChunk = await blobToArrayBuffer(blob.slice(0, 1024)); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
1024
is a lot. Looks like we don't need more than 15
.
src/lib/util.ts
Outdated
[/^RIFF....WEBPVP8 /, 'image/webp'], | ||
]); | ||
|
||
export async function sniffMimeType(blob: Blob): Promise<string | undefined> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: Better to return ''
right? Then you don't get issues checking result.startsWith('image/')
etc.
src/lib/util.ts
Outdated
const firstChunk = await blobToArrayBuffer(blob.slice(0, 1024)); | ||
const firstChunkString = Array.from( | ||
new Uint8Array(firstChunk)).map(v => String.fromCodePoint(v), | ||
).join(''); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The indenting in the lines above is messing with my head. It looks like new Uint8Array(firstChunk)).map(v => String.fromCodePoint(v)
is the arg to Array.from
but it isn't. As in, I see the parenthesis at the end of 133, and think the one at the start of 135 is corresponding.
Should this be:
const firstChunkString = Array.from(new Uint8Array(firstChunk))
.map(v => String.fromCodePoint(v))
.join('');
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My bad
@@ -0,0 +1,18 @@ | |||
import { canDecodeImage, createImageBitmapPolyfill } from '../../lib/util'; | |||
|
|||
export const name = 'Browser WebP Decoder'; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is exported, but not used anywhere (except for a console log).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we should keep it exported for easier debugging (doesn’t cost anything right?).
src/codecs/browser-webp/decoder.ts
Outdated
|
||
export const name = 'Browser WebP Decoder'; | ||
export const supportedMimeTypes = ['image/webp']; | ||
export async function decode(file: File): Promise<ImageBitmap> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Does this need to be File
or will Blob
do?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still an issue.
src/codecs/decoders.ts
Outdated
'image/gif', | ||
]; | ||
|
||
export async function decodeFile(file: File): Promise<ImageBitmap> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think Blob
is enough.
src/codecs/decoders.ts
Outdated
if (nativelySupportedMimeTypes.includes(mimeType)) { | ||
return createImageBitmapPolyfill(file); | ||
} | ||
const decoder = await findDecoder(file); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're sniffing the file twice. Maybe findDecoder
should take a mime type?
src/codecs/decoders.ts
Outdated
if (!mimeType) { | ||
throw new Error('Could not determine mime type'); | ||
} | ||
if (nativelySupportedMimeTypes.includes(mimeType)) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I still think we're doing this backwards. Instead of whitelisting supported types, we should have a list of types we have wasm decoders for. If the incoming image is one of those types, throw it at that decoder (which may just throw it at the browser's decoder), otherwise, throw it at the browser's decoder.
That means we can support types only supported by particular browsers without effort. Right now this PR prevents loading jpeg2000 even though at least Safari supports that format.
Happy to take a stab at it if I'm explaining badly.
[/^BM/, 'image/bmp'], | ||
[/^I I/, 'image/tiff'], | ||
[/^II*/, 'image/tiff'], | ||
[/^MM\x00*/, 'image/tiff'], |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fun fact: \x00
could be just \0
— it is not an octal escape sequence in JS!
@jakearchibald PTAL |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Almost there. Just a couple of nits.
src/codecs/decoders.ts
Outdated
// values here. | ||
).then(list => list.filter(item => !!item)) as any as Promise<Decoder[]>; | ||
|
||
export async function findDecodersByMimeType(mimeType: string): Promise<Decoder[]> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is exported, but I can't see it used anywhere.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yeah, exported it for completeness sake. Is exporting considered expensive?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think it prevents the name being mangled, but it also increases complexity. If I need to make changes to something that's exported, I need to consider its usage across the project. If it's scoped to a single module, I only need to look at that one file.
Same argument for public/private. If it weren't a burden, we'd export everything and make everything public.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mangling is a good argument. Will un-export
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is still exported.
src/codecs/webp/decoder.ts
Outdated
import DecoderWorker from './Decoder.worker'; | ||
|
||
export const name = 'WASM WebP Decoder'; | ||
export const supportedMimeTypes = ['image/webp']; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Exported, but doesn't look like it's used elsewhere.
src/codecs/webp/decoder.ts
Outdated
|
||
export const name = 'WASM WebP Decoder'; | ||
export const supportedMimeTypes = ['image/webp']; | ||
export async function decode(file: File): Promise<ImageBitmap> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Blob rather than File?
src/lib/util.ts
Outdated
[/^RIFF....WEBPVP8 /, 'image/webp'], | ||
]); | ||
|
||
export async function sniffMimeType(blob: Blob): Promise<string | ''> { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
''
is also a string right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
My point is that string | ''
is redundant compared to just string
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know. I just don’t like being exposed for the idiot that I am
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
😀 it's one of those mistakes that looks stupid, but given the evolution of the code you can see how it happened. Someone once pulled me up on some code like this:
const result: boolean = whatever();
if (result) {
return true;
} else {
return false;
}
"Why not just return the result of whatever()
" haha yeah oops, I was doing stuff in that if
until a refactor.
@jakearchibald PTAL |
src/lib/util.ts
Outdated
Array.from(new Uint8Array(firstChunk)) | ||
.map(v => String.fromCodePoint(v)) | ||
.join(''); | ||
for (const [detector, mimeType] of magicNumberToMimeType.entries()) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nit: .entries()
isn't needed, it's the default iterator.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix those last couple of nits & hit merge 😀
🎉 🎉 🎉 🎉 🎉 🎉 🎉 |
I learned being a thorough dickhead from Anne in spec reviews 😀 |
…oder WASM WebpDecoder
# This is the 1st commit message: Add position reset button and update zoom interaction. (GoogleChromeLabs#292) (GoogleChromeLabs#345) # The commit message GoogleChromeLabs#2 will be skipped: # 1.2.3 # The commit message GoogleChromeLabs#3 will be skipped: # Prevent both sides sharing a download URL. (GoogleChromeLabs#369) # # The commit message GoogleChromeLabs#4 will be skipped: # Add basic history handling (GoogleChromeLabs#288) (GoogleChromeLabs#309) # # * Add basic history handling (GoogleChromeLabs#288) # # * Move history management to Compress component # # * Remove unused pathname property from history # # * Rename history listener functions # # * Use history.back instead of history.replace # # * Support going forward in history. Persist last selected file in runtime # # * Add netlify redirects file # # * Use 301 status code for redirect # # * Cleanup _redirects file # # * Use 200 status code for redirects # # * Simplify onPopState function # # * Always redirect to 301 with url rewrite # # * Remove redundant history function # # * Remove file check on render. Call openEditor synchronously # # * Use pushState only if user is on the initial screen. Mount history listener in constructor # # * Simplify openEditor condition # # * Update early return condition # # * Rolling abstractions back into the main component # The commit message GoogleChromeLabs#5 will be skipped: # 1.3.0 # The commit message GoogleChromeLabs#6 will be skipped: # Add renovate.json # The commit message GoogleChromeLabs#7 will be skipped: # Merge pull request GoogleChromeLabs#373 from GoogleChromeLabs/renovate/configure # # Configure Renovate # The commit message GoogleChromeLabs#8 will be skipped: # Pin dependencies # The commit message GoogleChromeLabs#9 will be skipped: # Merge pull request GoogleChromeLabs#374 from GoogleChromeLabs/renovate/pin-dependencies # # Pin dependencies # The commit message GoogleChromeLabs#10 will be skipped: # Update dependency mini-css-extract-plugin to v0.5.0 # The commit message GoogleChromeLabs#11 will be skipped: # Merge pull request GoogleChromeLabs#380 from GoogleChromeLabs/renovate/mini-css-extract-plugin-0.x # # Update dependency mini-css-extract-plugin to v0.5.0 # The commit message GoogleChromeLabs#12 will be skipped: # Update dependency @types/node to v10.12.14 # The commit message GoogleChromeLabs#13 will be skipped: # Merge pull request GoogleChromeLabs#376 from GoogleChromeLabs/renovate/node-10.x # # Update dependency @types/node to v10.12.14 # The commit message GoogleChromeLabs#14 will be skipped: # Update dependency @types/node to v10.12.15 # The commit message GoogleChromeLabs#15 will be skipped: # Merge pull request GoogleChromeLabs#384 from GoogleChromeLabs/renovate/node-10.x # # Update dependency @types/node to v10.12.15 # The commit message GoogleChromeLabs#16 will be skipped: # Update dependency comlink to v3.1.1 # The commit message GoogleChromeLabs#17 will be skipped: # Merge pull request GoogleChromeLabs#377 from GoogleChromeLabs/renovate/comlink-3.x # # Update dependency comlink to v3.1.1 # The commit message GoogleChromeLabs#18 will be skipped: # Update dependency @types/webassembly-js-api to v0.0.2 # The commit message GoogleChromeLabs#19 will be skipped: # Merge pull request GoogleChromeLabs#375 from GoogleChromeLabs/renovate/webassembly-js-api-0.x # # Update dependency @types/webassembly-js-api to v0.0.2 # The commit message GoogleChromeLabs#20 will be skipped: # Update dependency critters-webpack-plugin to v2.1.1 # The commit message GoogleChromeLabs#21 will be skipped: # Merge pull request GoogleChromeLabs#378 from GoogleChromeLabs/renovate/critters-webpack-plugin-2.x # # Update dependency critters-webpack-plugin to v2.1.1 # The commit message GoogleChromeLabs#22 will be skipped: # Update dependency husky to v1.2.1 # The commit message GoogleChromeLabs#23 will be skipped: # Merge pull request GoogleChromeLabs#379 from GoogleChromeLabs/renovate/husky-1.x # # Update dependency husky to v1.2.1 # The commit message GoogleChromeLabs#24 will be skipped: # Update dependency preact to v8.4.2 # The commit message GoogleChromeLabs#25 will be skipped: # Merge pull request GoogleChromeLabs#381 from GoogleChromeLabs/renovate/preact-8.x # # Update dependency preact to v8.4.2 # The commit message GoogleChromeLabs#26 will be skipped: # Update dependency ts-loader to v5.3.1 # The commit message GoogleChromeLabs#27 will be skipped: # Merge pull request GoogleChromeLabs#382 from GoogleChromeLabs/renovate/ts-loader-5.x # # Update dependency ts-loader to v5.3.1 # The commit message GoogleChromeLabs#28 will be skipped: # Update dependency tslint-config-airbnb to v5.11.1 # The commit message GoogleChromeLabs#29 will be skipped: # Merge pull request GoogleChromeLabs#383 from GoogleChromeLabs/renovate/tslint-config-airbnb-5.x # # Update dependency tslint-config-airbnb to v5.11.1 # The commit message GoogleChromeLabs#30 will be skipped: # Update dependency webpack to v4.27.1 # The commit message GoogleChromeLabs#31 will be skipped: # Merge pull request GoogleChromeLabs#386 from GoogleChromeLabs/renovate/webpack-4.x # # Update dependency webpack to v4.27.1 # The commit message GoogleChromeLabs#32 will be skipped: # Update dependency raw-loader to v1 # The commit message GoogleChromeLabs#33 will be skipped: # Merge pull request GoogleChromeLabs#388 from GoogleChromeLabs/renovate/raw-loader-1.x # # Update dependency raw-loader to v1 # The commit message GoogleChromeLabs#34 will be skipped: # Update dependency worker-plugin to v3 # The commit message GoogleChromeLabs#35 will be skipped: # Merge pull request GoogleChromeLabs#390 from GoogleChromeLabs/renovate/worker-plugin-3.x # # Update dependency worker-plugin to v3 # The commit message GoogleChromeLabs#36 will be skipped: # Fixing sharp & preprocess settings # The commit message GoogleChromeLabs#37 will be skipped: # Using use_argb conditionally # The commit message GoogleChromeLabs#38 will be skipped: # Merge pull request GoogleChromeLabs#393 from GoogleChromeLabs/webp-sharp-fix # # Fixing sharp & preprocess settings. Fixes GoogleChromeLabs#392. # The commit message GoogleChromeLabs#39 will be skipped: # Debouncing input. Fixes GoogleChromeLabs#277 (GoogleChromeLabs#394) # # * Debouncing input # # * Clarifying comment # # * More comments and clarifications # The commit message GoogleChromeLabs#40 will be skipped: # Update dependency typescript to v3.2.2 # The commit message GoogleChromeLabs#41 will be skipped: # Fix typings for TypeScript v3.2 # The commit message GoogleChromeLabs#42 will be skipped: # Merge pull request GoogleChromeLabs#385 from GoogleChromeLabs/renovate/typescript-3.x # # Update dependency typescript to v3.2.2 # The commit message GoogleChromeLabs#43 will be skipped: # Preventing zoom in iOS Safari. (GoogleChromeLabs#395) # # The commit message GoogleChromeLabs#44 will be skipped: # Update README.md # # closes GoogleChromeLabs#367 # updating incorrect URL # The commit message GoogleChromeLabs#45 will be skipped: # Merge pull request GoogleChromeLabs#396 from GoogleChromeLabs/kosamari-patch-2 # # Update README.md for OptiPNG # The commit message GoogleChromeLabs#46 will be skipped: # 1.3.1 # The commit message GoogleChromeLabs#47 will be skipped: # Update dependency tslint to v5.12.0 # The commit message GoogleChromeLabs#48 will be skipped: # Merge pull request GoogleChromeLabs#398 from GoogleChromeLabs/renovate/tslint-5.x # # Update dependency tslint to v5.12.0 # The commit message GoogleChromeLabs#49 will be skipped: # Update dependency husky to v1.3.0 # The commit message GoogleChromeLabs#50 will be skipped: # Merge pull request GoogleChromeLabs#399 from GoogleChromeLabs/renovate/husky-1.x # # Update dependency husky to v1.3.0 # The commit message GoogleChromeLabs#51 will be skipped: # Update dependency @types/node to v10.12.17 # The commit message GoogleChromeLabs#52 will be skipped: # Merge pull request GoogleChromeLabs#400 from GoogleChromeLabs/renovate/node-10.x # # Update dependency @types/node to v10.12.17 # The commit message GoogleChromeLabs#53 will be skipped: # Update dependency webpack to v4.28.0 # The commit message GoogleChromeLabs#54 will be skipped: # Merge pull request GoogleChromeLabs#402 from GoogleChromeLabs/renovate/webpack-4.x # # Update dependency webpack to v4.28.0 # The commit message GoogleChromeLabs#55 will be skipped: # Update dependency @types/node to v10.12.18 # The commit message GoogleChromeLabs#56 will be skipped: # Merge pull request GoogleChromeLabs#403 from GoogleChromeLabs/renovate/node-10.x # # Update dependency @types/node to v10.12.18 # The commit message GoogleChromeLabs#57 will be skipped: # Update dependency file-loader to v3 # The commit message GoogleChromeLabs#58 will be skipped: # Merge pull request GoogleChromeLabs#404 from GoogleChromeLabs/renovate/file-loader-3.x # # Update dependency file-loader to v3 # The commit message GoogleChromeLabs#59 will be skipped: # Update dependency ts-loader to v5.3.2 # The commit message GoogleChromeLabs#60 will be skipped: # Merge pull request GoogleChromeLabs#406 from GoogleChromeLabs/renovate/ts-loader-5.x # # Update dependency ts-loader to v5.3.2 # The commit message GoogleChromeLabs#61 will be skipped: # Update dependency webpack-dev-server to v3.1.11 # The commit message GoogleChromeLabs#62 will be skipped: # Merge pull request GoogleChromeLabs#407 from GoogleChromeLabs/renovate/webpack-dev-server-3.x # # Update dependency webpack-dev-server to v3.1.11 # The commit message GoogleChromeLabs#63 will be skipped: # Update dependency webpack-dev-server to v3.1.12 # The commit message GoogleChromeLabs#64 will be skipped: # Merge pull request GoogleChromeLabs#408 from GoogleChromeLabs/renovate/webpack-dev-server-3.x # # Update dependency webpack-dev-server to v3.1.12 # The commit message GoogleChromeLabs#65 will be skipped: # Update dependency terser-webpack-plugin to v1.2.0 # The commit message GoogleChromeLabs#66 will be skipped: # Merge pull request GoogleChromeLabs#409 from GoogleChromeLabs/renovate/terser-webpack-plugin-1.x # # Update dependency terser-webpack-plugin to v1.2.0 # The commit message GoogleChromeLabs#67 will be skipped: # Update dependency webpack-dev-server to v3.1.13 # The commit message GoogleChromeLabs#68 will be skipped: # Merge pull request GoogleChromeLabs#410 from GoogleChromeLabs/renovate/webpack-dev-server-3.x # # Update dependency webpack-dev-server to v3.1.13 # The commit message GoogleChromeLabs#69 will be skipped: # Update dependency webpack-dev-server to v3.1.14 # The commit message GoogleChromeLabs#70 will be skipped: # Merge pull request GoogleChromeLabs#411 from GoogleChromeLabs/renovate/webpack-dev-server-3.x # # Update dependency webpack-dev-server to v3.1.14 # The commit message GoogleChromeLabs#71 will be skipped: # Update dependency loader-utils to v1.2.0 # The commit message GoogleChromeLabs#72 will be skipped: # Merge pull request GoogleChromeLabs#412 from GoogleChromeLabs/renovate/loader-utils-1.x # # Update dependency loader-utils to v1.2.0 # The commit message GoogleChromeLabs#73 will be skipped: # Update dependency terser-webpack-plugin to v1.2.1 # The commit message GoogleChromeLabs#74 will be skipped: # Merge pull request GoogleChromeLabs#414 from GoogleChromeLabs/renovate/terser-webpack-plugin-1.x # # Update dependency terser-webpack-plugin to v1.2.1 # The commit message GoogleChromeLabs#75 will be skipped: # Update dependency husky to v1.3.1 # The commit message GoogleChromeLabs#76 will be skipped: # Merge pull request GoogleChromeLabs#418 from GoogleChromeLabs/renovate/husky-1.x # # Update dependency husky to v1.3.1 # The commit message GoogleChromeLabs#77 will be skipped: # Update dependency webpack-cli to v3.2.0 # The commit message GoogleChromeLabs#78 will be skipped: # Merge pull request GoogleChromeLabs#421 from GoogleChromeLabs/renovate/webpack-cli-3.x # # Update dependency webpack-cli to v3.2.0 # The commit message GoogleChromeLabs#79 will be skipped: # Update dependency @webpack-cli/serve to v0.1.3 # The commit message GoogleChromeLabs#80 will be skipped: # Merge pull request GoogleChromeLabs#420 from GoogleChromeLabs/renovate/webpack-cli-serve-0.x # # Update dependency @webpack-cli/serve to v0.1.3 # The commit message GoogleChromeLabs#81 will be skipped: # Update dependency critters-webpack-plugin to v2.1.2 # The commit message GoogleChromeLabs#82 will be skipped: # Merge pull request GoogleChromeLabs#415 from GoogleChromeLabs/renovate/critters-webpack-plugin-2.x # # Update dependency critters-webpack-plugin to v2.1.2 # The commit message GoogleChromeLabs#83 will be skipped: # Update dependency ts-loader to v5.3.3 # The commit message GoogleChromeLabs#84 will be skipped: # Merge pull request GoogleChromeLabs#423 from GoogleChromeLabs/renovate/ts-loader-5.x # # Update dependency ts-loader to v5.3.3 # The commit message GoogleChromeLabs#85 will be skipped: # Update dependency critters-webpack-plugin to v2.1.3 # The commit message GoogleChromeLabs#86 will be skipped: # Merge pull request GoogleChromeLabs#422 from GoogleChromeLabs/renovate/critters-webpack-plugin-2.x # # Update dependency critters-webpack-plugin to v2.1.3 # The commit message GoogleChromeLabs#87 will be skipped: # Update dependency webpack-cli to v3.2.1 # The commit message GoogleChromeLabs#88 will be skipped: # Merge pull request GoogleChromeLabs#424 from GoogleChromeLabs/renovate/webpack-cli-3.x # # Update dependency webpack-cli to v3.2.1 # The commit message GoogleChromeLabs#89 will be skipped: # Update dependency tslint to v5.12.1 # The commit message GoogleChromeLabs#90 will be skipped: # Merge pull request GoogleChromeLabs#427 from GoogleChromeLabs/renovate/tslint-5.x # # Update dependency tslint to v5.12.1 # The commit message GoogleChromeLabs#91 will be skipped: # Update dependency typescript to v3.2.4 # The commit message GoogleChromeLabs#92 will be skipped: # Merge pull request GoogleChromeLabs#431 from GoogleChromeLabs/renovate/typescript-3.x # # Update dependency typescript to v3.2.4 # The commit message GoogleChromeLabs#93 will be skipped: # Update dependency critters-webpack-plugin to v2.2.0 # The commit message GoogleChromeLabs#94 will be skipped: # Merge pull request GoogleChromeLabs#432 from GoogleChromeLabs/renovate/critters-webpack-plugin-2.x # # Update dependency critters-webpack-plugin to v2.2.0 # The commit message GoogleChromeLabs#95 will be skipped: # Update dependency clean-webpack-plugin to v1.0.1 # The commit message GoogleChromeLabs#96 will be skipped: # Merge pull request GoogleChromeLabs#434 from GoogleChromeLabs/renovate/clean-webpack-plugin-1.x # # Update dependency clean-webpack-plugin to v1.0.1 # The commit message GoogleChromeLabs#97 will be skipped: # Update dependency progress-bar-webpack-plugin to v1.12.0 # The commit message GoogleChromeLabs#98 will be skipped: # Merge pull request GoogleChromeLabs#435 from GoogleChromeLabs/renovate/progress-bar-webpack-plugin-1.x # # Update dependency progress-bar-webpack-plugin to v1.12.0 # The commit message GoogleChromeLabs#99 will be skipped: # Add rotate user timing # The commit message GoogleChromeLabs#100 will be skipped: # Use Uint32Array to copy an entire pixel per op # The commit message GoogleChromeLabs#101 will be skipped: # Revert "Add rotate user timing" # # This reverts commit 887db67. # The commit message GoogleChromeLabs#102 will be skipped: # Remove unused bpp # The commit message GoogleChromeLabs#103 will be skipped: # Merge pull request GoogleChromeLabs#436 from GoogleChromeLabs/optimize-rotate # # Optimize rotate # The commit message GoogleChromeLabs#104 will be skipped: # Update dependency @types/node to v10.12.19 # The commit message GoogleChromeLabs#105 will be skipped: # Merge pull request GoogleChromeLabs#441 from GoogleChromeLabs/renovate/node-10.x # # Update dependency @types/node to v10.12.19 # The commit message GoogleChromeLabs#106 will be skipped: # Update dependency progress-bar-webpack-plugin to v1.12.1 # The commit message GoogleChromeLabs#107 will be skipped: # Merge pull request GoogleChromeLabs#442 from GoogleChromeLabs/renovate/progress-bar-webpack-plugin-1.x # # Update dependency progress-bar-webpack-plugin to v1.12.1 # The commit message GoogleChromeLabs#108 will be skipped: # Update dependency @types/node to v10.12.20 # The commit message GoogleChromeLabs#109 will be skipped: # Merge pull request GoogleChromeLabs#443 from GoogleChromeLabs/renovate/node-10.x # # Update dependency @types/node to v10.12.20 # The commit message GoogleChromeLabs#110 will be skipped: # Update dependency @types/node to v10.12.21 # The commit message GoogleChromeLabs#111 will be skipped: # Merge pull request GoogleChromeLabs#445 from GoogleChromeLabs/renovate/node-10.x # # Update dependency @types/node to v10.12.21 # The commit message GoogleChromeLabs#112 will be skipped: # This fixes GoogleChromeLabs#446 and sometimes it's best not to ask too many questions. (GoogleChromeLabs#447) # # The commit message GoogleChromeLabs#113 will be skipped: # Update dependency terser-webpack-plugin to v1.2.2 # The commit message GoogleChromeLabs#114 will be skipped: # Merge pull request GoogleChromeLabs#448 from GoogleChromeLabs/renovate/terser-webpack-plugin-1.x # # Update dependency terser-webpack-plugin to v1.2.2 # The commit message GoogleChromeLabs#115 will be skipped: # # This is a combination of 20 commits. # # This is the 1st commit message: # Merge from upstream/master branch # # # This is the commit message GoogleChromeLabs#2: # # Update zoom and positioning behaviours # # # This is the commit message GoogleChromeLabs#3: # # Merge branch 'master' into update-zoom-interaction # # # This is the commit message GoogleChromeLabs#4: # # Merge branch 'master' into update-zoom-interaction # # # This is the commit message GoogleChromeLabs#5: # # Merge branch 'master' into update-zoom-interaction # # # This is the commit message GoogleChromeLabs#6: # # Merge branch 'master' into update-zoom-interaction # # # This is the commit message GoogleChromeLabs#7: # # Merge branch 'master' into update-zoom-interaction # # # This is the commit message GoogleChromeLabs#8: # # Merge branch 'master' into update-zoom-interaction # # # This is the commit message GoogleChromeLabs#9: # # Merge branch 'master' into update-zoom-interaction # # # This is the commit message GoogleChromeLabs#10: # # Merge branch 'master' into update-zoom-interaction # # # This is the commit message GoogleChromeLabs#11: # # Merge from remote branch # # # This is the commit message GoogleChromeLabs#12: # # Merge from upstream/master # # # This is the commit message GoogleChromeLabs#13: # # Lazy-load the intersection-observer polyfill and optionally control wheel event # # # This is the commit message GoogleChromeLabs#14: # # Fix threshold handling issue # # # This is the commit message GoogleChromeLabs#15: # # merge remote-tracking branch 'upstream/master' into update-zoom-interaction # # # This is the commit message GoogleChromeLabs#16: # # merge remote-tracking branch 'upstream/master' into update-zoom-interaction # # # This is the commit message GoogleChromeLabs#17: # # Update double click listener and position reset behaviour # # # This is the commit message GoogleChromeLabs#18: # # Change back the indentations # # # This is the commit message GoogleChromeLabs#19: # # Update double click listener and position reset behaviour # # # This is the commit message GoogleChromeLabs#20: # # Change back the indentations # The commit message GoogleChromeLabs#116 will be skipped: # Merge from upstream/master branch # The commit message GoogleChromeLabs#117 will be skipped: # Update zoom and positioning behaviours # The commit message GoogleChromeLabs#118 will be skipped: # Merge branch 'master' into update-zoom-interaction # The commit message GoogleChromeLabs#119 will be skipped: # Merge branch 'master' into update-zoom-interaction # The commit message GoogleChromeLabs#120 will be skipped: # Merge branch 'master' into update-zoom-interaction # The commit message GoogleChromeLabs#121 will be skipped: # Merge branch 'master' into update-zoom-interaction # The commit message GoogleChromeLabs#122 will be skipped: # Merge branch 'master' into update-zoom-interaction # The commit message GoogleChromeLabs#123 will be skipped: # Merge branch 'master' into update-zoom-interaction # The commit message GoogleChromeLabs#124 will be skipped: # Merge branch 'master' into update-zoom-interaction # The commit message GoogleChromeLabs#125 will be skipped: # Merge branch 'master' into update-zoom-interaction # The commit message GoogleChromeLabs#126 will be skipped: # Merge from remote branch # The commit message GoogleChromeLabs#127 will be skipped: # Update dependency webpack-cli to v3.2.3 # The commit message GoogleChromeLabs#128 will be skipped: # Merge pull request GoogleChromeLabs#449 from GoogleChromeLabs/renovate/webpack-cli-3.x # # Update dependency webpack-cli to v3.2.3 # The commit message GoogleChromeLabs#129 will be skipped: # Update libwebp to 1.0.2 (GoogleChromeLabs#439) # # * Update package.json # # * Update package.json # # * Update README.md # # * Update README.md # # * Use cmake for libwebp # # * Minimize libwebp # The commit message GoogleChromeLabs#130 will be skipped: # Update dependency chokidar to v2.1.0 # The commit message GoogleChromeLabs#131 will be skipped: # Merge pull request GoogleChromeLabs#451 from GoogleChromeLabs/renovate/chokidar-2.x # # Update dependency chokidar to v2.1.0 # The commit message GoogleChromeLabs#132 will be skipped: # Update dependency loader-utils to v1.2.3 # The commit message GoogleChromeLabs#133 will be skipped: # Merge pull request GoogleChromeLabs#413 from GoogleChromeLabs/renovate/loader-utils-1.x # # Update dependency loader-utils to v1.2.3 # The commit message GoogleChromeLabs#134 will be skipped: # Update dependency @types/node to v10.12.23 # The commit message GoogleChromeLabs#135 will be skipped: # Merge pull request GoogleChromeLabs#453 from GoogleChromeLabs/renovate/node-10.x # # Update dependency @types/node to v10.12.23 # The commit message GoogleChromeLabs#136 will be skipped: # Merge from upstream/master # The commit message GoogleChromeLabs#137 will be skipped: # Lazy-load the intersection-observer polyfill and optionally control wheel event # The commit message GoogleChromeLabs#138 will be skipped: # Fix threshold handling issue # The commit message GoogleChromeLabs#139 will be skipped: # Adding CI step to compare build size to previous master build. (GoogleChromeLabs#450) # # The commit message GoogleChromeLabs#140 will be skipped: # no one must know I did this, or that it got through review. # The commit message GoogleChromeLabs#141 will be skipped: # Pin dependencies (GoogleChromeLabs#456) # # The commit message GoogleChromeLabs#142 will be skipped: # Switching to 1.4x rather than 140% # The commit message GoogleChromeLabs#143 will be skipped: # Rotate implementation in Rust # The commit message GoogleChromeLabs#144 will be skipped: # Reuse rotate instance and calculate pages correctly # The commit message GoogleChromeLabs#145 will be skipped: # Update wasm build # The commit message GoogleChromeLabs#146 will be skipped: # Merge pull request GoogleChromeLabs#438 from GoogleChromeLabs/rust-rotate # # Rotate implementation in Rust # The commit message GoogleChromeLabs#147 will be skipped: # Fix buffer size/offset calculations in rotate/processor.ts # The commit message GoogleChromeLabs#148 will be skipped: # Merge pull request GoogleChromeLabs#458 from jviide/rust-rotate # # Fix buffer offset/size calculations in rotate/processor.ts # The commit message GoogleChromeLabs#149 will be skipped: # 1.3.2 # The commit message GoogleChromeLabs#150 will be skipped: # Update dependency webpack-bundle-analyzer to v3.0.4 # The commit message GoogleChromeLabs#151 will be skipped: # Merge pull request GoogleChromeLabs#459 from GoogleChromeLabs/renovate/webpack-bundle-analyzer-3.x # # Update dependency webpack-bundle-analyzer to v3.0.4 # The commit message GoogleChromeLabs#152 will be skipped: # Update dependency @types/node to v10.12.25 # The commit message GoogleChromeLabs#153 will be skipped: # Merge pull request GoogleChromeLabs#455 from GoogleChromeLabs/renovate/node-10.x # # Update dependency @types/node to v10.12.25 # The commit message GoogleChromeLabs#154 will be skipped: # Update dependency chokidar to v2.1.1 # The commit message GoogleChromeLabs#155 will be skipped: # Merge pull request GoogleChromeLabs#457 from GoogleChromeLabs/renovate/chokidar-2.x # # Update dependency chokidar to v2.1.1 # The commit message GoogleChromeLabs#156 will be skipped: # Update dependency @types/node to v10.12.26 # The commit message GoogleChromeLabs#157 will be skipped: # Merge pull request GoogleChromeLabs#461 from GoogleChromeLabs/renovate/node-10.x # # Update dependency @types/node to v10.12.26 # The commit message GoogleChromeLabs#158 will be skipped: # Updating package lock to fix Netlify # The commit message GoogleChromeLabs#159 will be skipped: # Make Rust rotate code smaller (GoogleChromeLabs#462) # # * Make Rust rotate code smaller # # * Back on the rust happy path # The commit message GoogleChromeLabs#160 will be skipped: # 1.3.3 # The commit message GoogleChromeLabs#161 will be skipped: # Update dependency chokidar to v2.1.2 # The commit message GoogleChromeLabs#162 will be skipped: # Merge pull request GoogleChromeLabs#467 from GoogleChromeLabs/renovate/chokidar-2.x # # Update dependency chokidar to v2.1.2 # The commit message GoogleChromeLabs#163 will be skipped: # merge remote-tracking branch 'upstream/master' into update-zoom-interaction # The commit message GoogleChromeLabs#164 will be skipped: # Update double click listener and position reset behaviour # The commit message GoogleChromeLabs#165 will be skipped: # Change back the indentations # The commit message GoogleChromeLabs#166 will be skipped: # Update double click listener and position reset behaviour # The commit message GoogleChromeLabs#167 will be skipped: # Change back the indentations
This PR adds general decoder infrastructure, but also integrates the wasmified WebP decoder.
Works brilliantly in Chrome. Running into issues with FF, where
await new DecoderWorker()
doesn’t seem to return. @developit plz halp?But the architecture is ready to review either way :)
Closes #75