[go: nahoru, domu]

Make cc/paint have concrete types

This changes PaintCanvas, PaintFlags, PaintSurface, and PaintRecorder
to all be real types (that forward to Skia types internally).  PaintShader
is left as-is for now.  This will force callers to use the correct
types in the rest of Chromium as the internals of these classes are
rewritten in future patches.

This code also changes a number of callers elsewhere in the codebase
that want to wrap an SkCanvas in a PaintCanvas.  As SkCanvas has no
constructor that takes an SkCanvas*, this change had to wait for this
final conversion patch.

In general, if code wants to raster directly into a bitmap with local
code, it should use Skia directly.  If code wants to raster into a bitmap
with paint callers, it can wrap that bitmap in a PaintCanvas.  Similarly,
if code wants to go into an accelerated SkSurface, it should wrap that
surface's canvas in a PaintCanvas (as blink html canvas code does).

BUG=671433

CQ_INCLUDE_TRYBOTS=master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2

Review-Url: https://codereview.chromium.org/2690583002
Cr-Commit-Position: refs/heads/master@{#455840}
35 files changed