DescriptionAlways store pixels of mutable bitmaps when recording a SkPicture.
Prior to this CL mutable bitmaps only saved a copy of their pixels
if a flag was set at recording time. That flag has been removed
and the default behavior when recording a mutable bitmap is to
make a copy of it's pixels. This is the only way to ensure that
the pixels are not manipulated before we playback their contents.
However, enabling this behavior breaks the recording of extracted
bitmaps in SkPicture. This is because we currently cache bitmaps
within a picture based only on their pixelRef. This results in
false positive cache hit when drawing an extracted bitmap as it
shares a pixelRef with its orginating bitmap. Therefore we must
update the index of the bitmap cache to be both the pixelRef AND
the size and offset of the bitmap using those pixels.
BUG=
TEST=extractbitmap.cpp
Committed: https://code.google.com/p/skia/source/detail?r=4809
Patch Set 1 #
Total comments: 6
Patch Set 2 : remove getter from SkPicture #Patch Set 3 : remove DeferredCanvas code #
MessagesTotal messages: 11
|