OLD | NEW |
| (Empty) |
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 | |
3 // found in the LICENSE file. | |
4 | |
5 | |
6 #ifndef CC_OUTPUT_RENDER_SURFACE_FILTERS_H_ | |
7 #define CC_OUTPUT_RENDER_SURFACE_FILTERS_H_ | |
8 | |
9 #include "base/macros.h" | |
10 #include "cc/base/cc_export.h" | |
11 #include "third_party/skia/include/core/SkRefCnt.h" | |
12 #include "ui/gfx/geometry/vector2d_f.h" | |
13 | |
14 class GrContext; | |
15 class SkBitmap; | |
16 class SkImageFilter; | |
17 | |
18 namespace gfx { | |
19 class SizeF; | |
20 } | |
21 | |
22 namespace cc { | |
23 | |
24 class FilterOperations; | |
25 | |
26 class CC_EXPORT RenderSurfaceFilters { | |
27 public: | |
28 static SkBitmap Apply(const FilterOperations& filters, | |
29 unsigned texture_id, | |
30 const gfx::SizeF& size, | |
31 GrContext* gr_context); | |
32 static FilterOperations Optimize(const FilterOperations& filters); | |
33 | |
34 static sk_sp<SkImageFilter> BuildImageFilter( | |
35 const FilterOperations& filters, | |
36 const gfx::SizeF& size, | |
37 const gfx::Vector2dF& offset = gfx::Vector2dF(0, 0)); | |
38 | |
39 private: | |
40 DISALLOW_IMPLICIT_CONSTRUCTORS(RenderSurfaceFilters); | |
41 }; | |
42 | |
43 } // namespace cc | |
44 | |
45 #endif // CC_OUTPUT_RENDER_SURFACE_FILTERS_H_ | |
OLD | NEW |