Skip to content

Update image filters to use new factory API in engine #40602

@lhkbob

Description

@lhkbob

Skia is beginning to refactor its SkImageFilter codebase. As part of this, we are providing a new set of API factory functions that are accessible from a single header.

engine/lib/ui/painting/image_filter.cc should be updated to use the factory functions exposed in third_party/skia/include/effects/SkImageFilters.h, instead of having to include each image filter's header. Then should be able to replace:

  • SkPictureImageFilter::Make(picture->picture()) with SkImageFilters::Picture(picture->picture())
  • SkBlurImageFilter::Make(sigma_x, sigma_y, nullptr, nullptr, SkBlurImageFilter::kClamp_TileMode) with SkImageFilters::Blur(sigma_x, sigma_y, SkTileMode::kClamp, nullptr)
  • SkImageFilter::MakeMatrixFilter(ToSkMatrix(matrix4), static_cast<SkFilterQuality>(filterQuality), nullptr) with SkImageFilters::MatrixTransform(ToSkMatrix(matrix4), static_cast<SkFilterQuality>(filterQuality), nullptr)

@chinmaygarde
xref: https://bugs.chromium.org/p/skia/issues/detail?id=9310

Metadata

Metadata

Assignees

No one assigned

    Labels

    P3Issues that are less important to the Flutter projectc: proposalA detailed proposal for a change to Flutterdependency: skiaSkia team may need to help usengineflutter/engine related. See also e: labels.good first issueRelatively approachable for first-time contributors

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions