cc: Replace SkImageFilter with PaintFilter in paint recordings.

Add PaintFilter to be a cc/paint equivalent for SkImageFilter, stored in
PaintRecords. The purpose of PaintFilter is to provide a transparent
filter type that can be safely used for cross-process transport during
OOP raster. PaintFilters cache the parameters used to build
corresponding skia filters, which can be serialized and used to recreate
the filter graph on the GPU service.

A tricky bit here is cc::FilterOperation. FilterOperations are
converted to an SkImageFilter which can subsequently be used during
raster or on PaintFlags in a recording. In order to completely eliminate
SkImageFilter usage in recordings, this change switches FilterOperation
to use a PaintFilter. However, these operations can be present on
CompositorFrames and are currently serialized to the browser process, by
serializing SkImageFilters[1]. Since this change doesn't add PaintFilter
serialization, in the interim we still use SkImageFilters when
serializing FilterOperations.

[1] Note that this serialization respects the security constraint to
disable SkPictureImageFilters, since SkPictures are not safe to
serialize cross-process. Going forward this will be eliminated with
PaintFilters which uses PaintRecord backed filters instead.

[email protected], [email protected], [email protected]
[email protected]

Bug: 777636
Cq-Include-Trybots: master.tryserver.blink:linux_trusty_blink_rel;master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_layout_tests_slimming_paint_v2
Change-Id: Ic790b80e088771f4186eaec62da959c4dd107572
Reviewed-on: https://chromium-review.googlesource.com/770522
Commit-Queue: Khushal <[email protected]>
Reviewed-by: vmpstr <[email protected]>
Reviewed-by: Tom Sepez <[email protected]>
Reviewed-by: David Trainor <[email protected]>
Reviewed-by: enne <[email protected]>
Reviewed-by: Philip Rogers <[email protected]>
Reviewed-by: Antoine Labour <[email protected]>
Cr-Commit-Position: refs/heads/master@{#518517}
137 files changed