Here is an initial proposal for hardware jpeg decoding in chromium on tegra platform.
In renderer process, skia side changes:
1) Add gl chromium extension or existing API to transfer jpeg encoded buffer to gpu process. Buffer can be copied to shared memory and it can be transferred to service side (gpu thread).
2) Above extension or API can upload or share gl texture to gpu and this texture is used in skia to render image
In gpu process, chromium side changes:
1) Retrieve shared buffer which contains jpeg encoded data.
a. Platform library can be loaded using dlopen and APIs are resolved using dlsym.
b. Mainly read header and decode functions are implemented in this file.
3) Add generic interface class to decode jpeg image in content/common/gpu/media/
a. This interface can be used to create any platform specific jpeg decoder.
4) This class loads and initializes platform specific device class by matching device node or platform library present on device file system.
Open points:
1) Skia side changes, How to integrate gl extension to transfer encoded buffer in skia?
2) Sharing decoder output to gpu. glTexImage2D may not be appropriate as it will again upload buffer which is in hardware memory.
Dma buf extension can be used to share decoded buffer to gpu w/o copy but it uses External_OES texture and may not be supported in skia.
3) How to invoke jpeg decoder in content/comman/gpu/media from gles2_cmd_decoder.cc. Currently there is no method or framework available.
For chromeOS there is already discussion in progress to implement this feature on tegra platform. Need to sync with this.