| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2014 Google Inc. | 3 * Copyright 2014 Google Inc. |
| 4 * | 4 * |
| 5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
| 6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
| 7 */ | 7 */ |
| 8 | 8 |
| 9 #ifndef SkPictureShader_DEFINED | 9 #ifndef SkPictureShader_DEFINED |
| 10 #define SkPictureShader_DEFINED | 10 #define SkPictureShader_DEFINED |
| 11 | 11 |
| 12 #include "SkShader.h" | 12 #include "SkShader.h" |
| 13 | 13 |
| 14 class SkBitmap; | 14 class SkBitmap; |
| 15 class SkPicture; | 15 class SkPicture; |
| 16 | 16 |
| 17 /* | 17 /* |
| 18 * An SkPictureShader can be used to draw SkPicture-based patterns. | 18 * An SkPictureShader can be used to draw SkPicture-based patterns. |
| 19 * | 19 * |
| 20 * The SkPicture is first rendered into a tile, which is then used to shade the
area according | 20 * The SkPicture is first rendered into a tile, which is then used to shade the
area according |
| 21 * to specified tiling rules. | 21 * to specified tiling rules. |
| 22 */ | 22 */ |
| 23 class SkPictureShader : public SkShader { | 23 class SkPictureShader : public SkShader { |
| 24 public: | 24 public: |
| 25 static SkShader* Create(const SkPicture*, TileMode, TileMode, const SkMatrix
*, | 25 static SkShader* Create(const SkPicture*, TileMode, TileMode, const SkMatrix
*, |
| 26 const SkRect*); | 26 const SkRect*); |
| 27 | 27 |
| 28 size_t contextSize() const override; | 28 size_t contextSize(const ContextRec&) 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 #if SK_SUPPORT_GPU |
| 34 const GrFragmentProcessor* asFragmentProcessor(GrContext*, | 34 const GrFragmentProcessor* asFragmentProcessor(GrContext*, |
| 35 const SkMatrix& viewM, | 35 const SkMatrix& viewM, |
| 36 const SkMatrix*, | 36 const SkMatrix*, |
| 37 SkFilterQuality) const overri
de; | 37 SkFilterQuality) const overri
de; |
| 38 #endif | 38 #endif |
| (...skipping 31 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 70 SkShader::Context* fBitmapShaderContext; | 70 SkShader::Context* fBitmapShaderContext; |
| 71 void* fBitmapShaderContextStorage; | 71 void* fBitmapShaderContextStorage; |
| 72 | 72 |
| 73 typedef SkShader::Context INHERITED; | 73 typedef SkShader::Context INHERITED; |
| 74 }; | 74 }; |
| 75 | 75 |
| 76 typedef SkShader INHERITED; | 76 typedef SkShader INHERITED; |
| 77 }; | 77 }; |
| 78 | 78 |
| 79 #endif // SkPictureShader_DEFINED | 79 #endif // SkPictureShader_DEFINED |
| OLD | NEW |