OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef SkImageShader_DEFINED | 8 #ifndef SkImageShader_DEFINED |
9 #define SkImageShader_DEFINED | 9 #define SkImageShader_DEFINED |
10 | 10 |
(...skipping 11 matching lines...) Expand all Loading... |
22 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkImageShader) | 22 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkImageShader) |
23 | 23 |
24 #if SK_SUPPORT_GPU | 24 #if SK_SUPPORT_GPU |
25 sk_sp<GrFragmentProcessor> asFragmentProcessor(const AsFPArgs&) const overri
de; | 25 sk_sp<GrFragmentProcessor> asFragmentProcessor(const AsFPArgs&) const overri
de; |
26 #endif | 26 #endif |
27 | 27 |
28 protected: | 28 protected: |
29 void flatten(SkWriteBuffer&) const override; | 29 void flatten(SkWriteBuffer&) const override; |
30 size_t onContextSize(const ContextRec&) const override; | 30 size_t onContextSize(const ContextRec&) const override; |
31 Context* onCreateContext(const ContextRec&, void* storage) const override; | 31 Context* onCreateContext(const ContextRec&, void* storage) const override; |
| 32 bool onIsABitmap(SkBitmap*, SkMatrix*, TileMode*) const override; |
| 33 SkImage* onIsAImage(SkMatrix*, TileMode*) const override; |
32 | 34 |
33 SkAutoTUnref<const SkImage> fImage; | 35 SkAutoTUnref<const SkImage> fImage; |
34 const TileMode fTileModeX; | 36 const TileMode fTileModeX; |
35 const TileMode fTileModeY; | 37 const TileMode fTileModeY; |
36 | 38 |
37 private: | 39 private: |
38 SkImageShader(const SkImage*, TileMode tx, TileMode ty, const SkMatrix* loca
lMatrix); | 40 SkImageShader(const SkImage*, TileMode tx, TileMode ty, const SkMatrix* loca
lMatrix); |
39 | 41 |
40 typedef SkShader INHERITED; | 42 typedef SkShader INHERITED; |
41 }; | 43 }; |
42 | 44 |
43 #endif | 45 #endif |
OLD | NEW |