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 |
(...skipping 12 matching lines...) Expand all Loading... |
23 public: | 23 public: |
24 static SkShader* Create(const SkPicture*, TileMode, TileMode, const SkMatrix
*, | 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 #if SK_SUPPORT_GPU | 33 bool asFragmentProcessor(GrContext*, const SkPaint&, const SkMatrix& viewM,
const SkMatrix*, |
34 const GrFragmentProcessor* asFragmentProcessor(GrContext*, const SkMatrix& v
iewM, | 34 GrColor*, GrProcessorDataManager*, |
35 const SkMatrix*, SkFilterQuality, GrProcessorDataManager*) const overrid
e; | 35 GrFragmentProcessor**) const override; |
36 #endif | |
37 | 36 |
38 protected: | 37 protected: |
39 SkPictureShader(SkReadBuffer&); | 38 SkPictureShader(SkReadBuffer&); |
40 void flatten(SkWriteBuffer&) const override; | 39 void flatten(SkWriteBuffer&) const override; |
41 Context* onCreateContext(const ContextRec&, void* storage) const override; | 40 Context* onCreateContext(const ContextRec&, void* storage) const override; |
42 | 41 |
43 private: | 42 private: |
44 SkPictureShader(const SkPicture*, TileMode, TileMode, const SkMatrix*, const
SkRect*); | 43 SkPictureShader(const SkPicture*, TileMode, TileMode, const SkMatrix*, const
SkRect*); |
45 | 44 |
46 SkShader* refBitmapShader(const SkMatrix&, const SkMatrix* localMatrix, cons
t int maxTextureSize = 0) const; | 45 SkShader* refBitmapShader(const SkMatrix&, const SkMatrix* localMatrix, cons
t int maxTextureSize = 0) const; |
(...skipping 22 matching lines...) Expand all Loading... |
69 SkShader::Context* fBitmapShaderContext; | 68 SkShader::Context* fBitmapShaderContext; |
70 void* fBitmapShaderContextStorage; | 69 void* fBitmapShaderContextStorage; |
71 | 70 |
72 typedef SkShader::Context INHERITED; | 71 typedef SkShader::Context INHERITED; |
73 }; | 72 }; |
74 | 73 |
75 typedef SkShader INHERITED; | 74 typedef SkShader INHERITED; |
76 }; | 75 }; |
77 | 76 |
78 #endif // SkPictureShader_DEFINED | 77 #endif // SkPictureShader_DEFINED |
OLD | NEW |