OLD | NEW |
1 // Copyright 2012 The Chromium Authors. All rights reserved. | 1 // Copyright 2012 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 | 5 |
6 #ifndef CC_OUTPUT_RENDER_SURFACE_FILTERS_H_ | 6 #ifndef CC_OUTPUT_RENDER_SURFACE_FILTERS_H_ |
7 #define CC_OUTPUT_RENDER_SURFACE_FILTERS_H_ | 7 #define CC_OUTPUT_RENDER_SURFACE_FILTERS_H_ |
8 | 8 |
9 #include "base/basictypes.h" | 9 #include "base/basictypes.h" |
10 #include "cc/base/cc_export.h" | 10 #include "cc/base/cc_export.h" |
| 11 #include "skia/ext/refptr.h" |
11 | 12 |
12 class GrContext; | 13 class GrContext; |
13 class SkBitmap; | 14 class SkBitmap; |
| 15 class SkImageFilter; |
14 | 16 |
15 namespace gfx { | 17 namespace gfx { |
16 class SizeF; | 18 class SizeF; |
17 } | 19 } |
18 | 20 |
19 namespace cc { | 21 namespace cc { |
20 | 22 |
21 class FilterOperations; | 23 class FilterOperations; |
22 | 24 |
23 class CC_EXPORT RenderSurfaceFilters { | 25 class CC_EXPORT RenderSurfaceFilters { |
24 public: | 26 public: |
25 static SkBitmap Apply(const FilterOperations& filters, | 27 static SkBitmap Apply(const FilterOperations& filters, |
26 unsigned texture_id, | 28 unsigned texture_id, |
27 gfx::SizeF size, | 29 gfx::SizeF size, |
28 GrContext* gr_context); | 30 GrContext* gr_context); |
29 static FilterOperations Optimize(const FilterOperations& filters); | 31 static FilterOperations Optimize(const FilterOperations& filters); |
30 | 32 |
| 33 static skia::RefPtr<SkImageFilter> BuildImageFilter( |
| 34 const FilterOperations& filters, |
| 35 gfx::SizeF size); |
| 36 |
31 private: | 37 private: |
32 DISALLOW_IMPLICIT_CONSTRUCTORS(RenderSurfaceFilters); | 38 DISALLOW_IMPLICIT_CONSTRUCTORS(RenderSurfaceFilters); |
33 }; | 39 }; |
34 | 40 |
35 } // namespace cc | 41 } // namespace cc |
36 | 42 |
37 #endif // CC_OUTPUT_RENDER_SURFACE_FILTERS_H_ | 43 #endif // CC_OUTPUT_RENDER_SURFACE_FILTERS_H_ |
OLD | NEW |