OLD | NEW |
| (Empty) |
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 SkImageFilterUtils_DEFINED | |
9 #define SkImageFilterUtils_DEFINED | |
10 | |
11 #if SK_SUPPORT_GPU | |
12 | |
13 #include "SkImageFilter.h" | |
14 | |
15 class SkBitmap; | |
16 class GrTexture; | |
17 class SkImageFilter; | |
18 | |
19 class SK_API SkImageFilterUtils { | |
20 public: | |
21 /** | |
22 * Wrap the given texture in a texture-backed SkBitmap. | |
23 */ | |
24 static bool WrapTexture(GrTexture* texture, int width, int height, SkBitmap*
result); | |
25 | |
26 /** | |
27 * Recursively evaluate the given filter on the GPU. If filter is NULL, | |
28 * this function returns src. If the filter has no GPU implementation, it | |
29 * will be processed in software and uploaded to the GPU. | |
30 */ | |
31 static bool GetInputResultGPU(const SkImageFilter* filter, SkImageFilter::Pr
oxy* proxy, | |
32 const SkBitmap& src, const SkMatrix& ctm, SkBi
tmap* result, | |
33 SkIPoint* offset); | |
34 }; | |
35 | |
36 #endif | |
37 | |
38 #endif | |
OLD | NEW |