| OLD | NEW |
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2006 The Android Open Source Project | 3 * Copyright 2006 The Android Open Source Project |
| 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 | 9 |
| 10 #ifndef SkBitmapProcShader_DEFINED | 10 #ifndef SkBitmapProcShader_DEFINED |
| (...skipping 14 matching lines...) Expand all Loading... |
| 25 | 25 |
| 26 size_t contextSize() const override; | 26 size_t contextSize() const override; |
| 27 | 27 |
| 28 static bool CanDo(const SkBitmap&, TileMode tx, TileMode ty); | 28 static bool CanDo(const SkBitmap&, TileMode tx, TileMode ty); |
| 29 | 29 |
| 30 SK_TO_STRING_OVERRIDE() | 30 SK_TO_STRING_OVERRIDE() |
| 31 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkBitmapProcShader) | 31 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkBitmapProcShader) |
| 32 | 32 |
| 33 | 33 |
| 34 bool asFragmentProcessor(GrContext*, const SkPaint&, const SkMatrix& viewM,
const SkMatrix*, | 34 bool asFragmentProcessor(GrContext*, const SkPaint&, const SkMatrix& viewM,
const SkMatrix*, |
| 35 GrColor*, GrFragmentProcessor**) const override; | 35 GrColor*, GrShaderDataManager*, GrFragmentProcessor
**) const override; |
| 36 | 36 |
| 37 class BitmapProcShaderContext : public SkShader::Context { | 37 class BitmapProcShaderContext : public SkShader::Context { |
| 38 public: | 38 public: |
| 39 // The context takes ownership of the state. It will call its destructor | 39 // The context takes ownership of the state. It will call its destructor |
| 40 // but will NOT free the memory. | 40 // but will NOT free the memory. |
| 41 BitmapProcShaderContext(const SkBitmapProcShader&, const ContextRec&, Sk
BitmapProcState*); | 41 BitmapProcShaderContext(const SkBitmapProcShader&, const ContextRec&, Sk
BitmapProcState*); |
| 42 virtual ~BitmapProcShaderContext(); | 42 virtual ~BitmapProcShaderContext(); |
| 43 | 43 |
| 44 void shadeSpan(int x, int y, SkPMColor dstC[], int count) override; | 44 void shadeSpan(int x, int y, SkPMColor dstC[], int count) override; |
| 45 ShadeProc asAShadeProc(void** ctx) override; | 45 ShadeProc asAShadeProc(void** ctx) override; |
| (...skipping 25 matching lines...) Expand all Loading... |
| 71 // Note that some contexts may contain other contexts (e.g. for compose shaders)
, but we've not | 71 // Note that some contexts may contain other contexts (e.g. for compose shaders)
, but we've not |
| 72 // yet found a situation where the size below isn't big enough. | 72 // yet found a situation where the size below isn't big enough. |
| 73 typedef SkSmallAllocator<3, 1024> SkTBlitterAllocator; | 73 typedef SkSmallAllocator<3, 1024> SkTBlitterAllocator; |
| 74 | 74 |
| 75 // If alloc is non-NULL, it will be used to allocate the returned SkShader, and
MUST outlive | 75 // If alloc is non-NULL, it will be used to allocate the returned SkShader, and
MUST outlive |
| 76 // the SkShader. | 76 // the SkShader. |
| 77 SkShader* SkCreateBitmapShader(const SkBitmap& src, SkShader::TileMode, SkShader
::TileMode, | 77 SkShader* SkCreateBitmapShader(const SkBitmap& src, SkShader::TileMode, SkShader
::TileMode, |
| 78 const SkMatrix* localMatrix, SkTBlitterAllocator*
alloc); | 78 const SkMatrix* localMatrix, SkTBlitterAllocator*
alloc); |
| 79 | 79 |
| 80 #endif | 80 #endif |
| OLD | NEW |