Chromium Code Reviews
DescriptionMake CanvasPainter raster directly to an SkBitmap
This refactoring is removing a dependency where code wants to raster
a DisplayItemList into a gfx::Canvas / cc::PaintCanvas.
Currently, gfx::Canvas is backed by a cc::PaintCanvas instead of an
SkCanvas. DisplayItemList can only raster into an SkCanvas and not into
a cc::PaintCanvas interface. This works currently because PaintCanvas
is-a SkCanvas (via a typedef), but will break once they become
different concrete types.
It doesn't seem desirable to make DisplayItemList and cc::PaintRecord to
have duplicate Raster functions for both SkCanvas and PaintCanvas.
Therefore, instead make ui::CanvasPainter raster directly from
DisplayItemList into an SkBitmap without a gfx::Canvas or PaintCanvas
intermediary. This means that CanvasPainter needs to grow a tiny bit of
logic from both gfx::Canvas, but this is smaller than the alternative.
BUG=671433
Review-Url: https://codereview.chromium.org/2694023003
Cr-Commit-Position: refs/heads/master@{#450594}
Committed: https://chromium.googlesource.com/chromium/src/+/ed75029a4736960aef2fe37cefb1f7ccc8417d83
Patch Set 1 #Patch Set 2 : Remove mac changes #Patch Set 3 : Replace CanvasPainter rect with size #
Total comments: 8
Patch Set 4 : danakj review #
Total comments: 13
Patch Set 5 : tapted review #
Messages
Total messages: 29 (20 generated)
|
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||