[Webkit-unassigned] [Bug 99785] [chromium] Improve cached image indexing in ImageDecodingStore

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Oct 18 18:16:28 PDT 2012


https://bugs.webkit.org/show_bug.cgi?id=99785





--- Comment #1 from Hin-Chung Lam <hclam at google.com>  2012-10-18 18:17:23 PST ---
Let's start the discussion here for the details of patching ImageDecodingStore.

Problem 1 - Decouple ImageFrameGenerator from ImageDecodingStore

ImageDecodingStore::lockPixels() take a pointer to ImageFrameGenerator. This means lockPixel() does two functions 1) lookup for scaled image fragment 2) generation of image fragment as needed.

These two tasks should be better isolated. Which means we should have a cache lookup function in ImageDecodingStore such that LazyDecodingPixelRef can call, and then a function to save a scaled image fragment to the cache. Something like:

SkBitmap ImageDecodingStore::cacheLookup(int imageId, SkISize scaledSize, SkIRect scaledFragment);
void ImageDecodingStore::saveImageFragment(int imageId, SkISize, SkIRect, SkBitmap);

Attention needs to be taken such that there can be only one SkBitmap being locked. This should be the case as this code is running on a single thread.

Problem 2 - Efficient cache lookup

This problem is the choice of data structure, key for indexing the data structure and what to cache.

ImageDecodingStore now always save the full size image to the cache. We should investigate whether to cache the entire scaled image or just the fragment. And then decide data structure (like map) to store image fragments.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list