OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 SkPictureShader_DEFINED | 8 #ifndef SkPictureShader_DEFINED |
9 #define SkPictureShader_DEFINED | 9 #define SkPictureShader_DEFINED |
10 | 10 |
11 #include "SkShader.h" | 11 #include "SkShader.h" |
12 | 12 |
13 class SkBitmap; | 13 class SkBitmap; |
14 class SkPicture; | 14 class SkPicture; |
15 | 15 |
16 /* | 16 /* |
17 * An SkPictureShader can be used to draw SkPicture-based patterns. | 17 * An SkPictureShader can be used to draw SkPicture-based patterns. |
18 * | 18 * |
19 * The SkPicture is first rendered into a tile, which is then used to shade the
area according | 19 * The SkPicture is first rendered into a tile, which is then used to shade the
area according |
20 * to specified tiling rules. | 20 * to specified tiling rules. |
21 */ | 21 */ |
22 class SkPictureShader : public SkShader { | 22 class SkPictureShader : public SkShader { |
23 public: | 23 public: |
24 static SkPictureShader* Create(const SkPicture*, TileMode, TileMode, const S
kMatrix*, | 24 static SkShader* Create(const SkPicture*, TileMode, TileMode, const SkMatrix
*, |
25 const SkRect*); | 25 const SkRect*); |
26 virtual ~SkPictureShader(); | 26 virtual ~SkPictureShader(); |
27 | 27 |
28 size_t contextSize() const override; | 28 size_t contextSize() const override; |
29 | 29 |
30 SK_TO_STRING_OVERRIDE() | 30 SK_TO_STRING_OVERRIDE() |
31 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPictureShader) | 31 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkPictureShader) |
32 | 32 |
33 bool asFragmentProcessor(GrContext*, const SkPaint&, const SkMatrix& viewM,
const SkMatrix*, | 33 bool asFragmentProcessor(GrContext*, const SkPaint&, const SkMatrix& viewM,
const SkMatrix*, |
34 GrColor*, GrFragmentProcessor**) const override; | 34 GrColor*, GrFragmentProcessor**) const override; |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
67 SkShader::Context* fBitmapShaderContext; | 67 SkShader::Context* fBitmapShaderContext; |
68 void* fBitmapShaderContextStorage; | 68 void* fBitmapShaderContextStorage; |
69 | 69 |
70 typedef SkShader::Context INHERITED; | 70 typedef SkShader::Context INHERITED; |
71 }; | 71 }; |
72 | 72 |
73 typedef SkShader INHERITED; | 73 typedef SkShader INHERITED; |
74 }; | 74 }; |
75 | 75 |
76 #endif // SkPictureShader_DEFINED | 76 #endif // SkPictureShader_DEFINED |
OLD | NEW |