1/*
2 * Copyright 2013 The Android Open Source Project
3 *
4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file.
6 */
7
8#ifndef SkPictureImageFilter_DEFINED
9#define SkPictureImageFilter_DEFINED
10
11#include "include/core/SkImageFilter.h"
12
13class SkPicture;
14
15// DEPRECATED: Use include/effects/SkImageFilters::Picture
16class SK_API SkPictureImageFilter {
17public:
18 /**
19 * Refs the passed-in picture.
20 */
21 static sk_sp<SkImageFilter> Make(sk_sp<SkPicture> picture);
22
23 /**
24 * Refs the passed-in picture. cropRect can be used to crop or expand the destination rect when
25 * the picture is drawn. (No scaling is implied by the dest rect; only the CTM is applied.)
26 */
27 static sk_sp<SkImageFilter> Make(sk_sp<SkPicture> picture, const SkRect& cropRect);
28
29 static void RegisterFlattenables();
30
31private:
32 SkPictureImageFilter() = delete;
33};
34
35#endif
36