DescriptionTeach Skia to use discardable memory
Using discardable memory in Skia requires the following changes:
1. Use of SkDiscardablePixelRef.
2. Implementation of SkImageGenerator to decode an image.
This change implements items above by reusing existing infrastructure
in ImageFrameGenerator and DeferredImageDecoder. ImageFrameGenerator
performs the actual decoding. DeferredImageDecoder is responsible for
generating SkBitmap backed by SkDiscardablePixelRef.
There are some limitations of this implementations:
1. Decoder does not write directly to the memory provided by Skia.
memcpy() is required.
2. Decoding allocates heap memory as output buffer.
3. ImageDecodingStore is still in use and manages a pool of cache.
Since the deferred image decoding is still used by Android the two code
paths will coexist until the transition is complete. Upcoming changes
will loosen up the above limitations.
BUG=318490
Committed: https://src.chromium.org/viewvc/blink?view=rev&revision=163743
Patch Set 1 #
Total comments: 6
Patch Set 2 : nits #Patch Set 3 : merged #Patch Set 4 : merged #Patch Set 5 : merged and discardable #Patch Set 6 : merged and label #Patch Set 7 : merged and discardable #
Total comments: 1
Messages
Total messages: 22 (0 generated)
|