| 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 25 matching lines...) Expand all Loading... |
| 36 protected: | 36 protected: |
| 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 SkShader&, const ContextRec&, SkBitmapProc
State*); | 41 BitmapProcShaderContext(const SkShader&, const ContextRec&, SkBitmapProc
State*); |
| 42 ~BitmapProcShaderContext() override; | 42 ~BitmapProcShaderContext() override; |
| 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; |
| 46 void shadeSpan16(int x, int y, uint16_t dstC[], int count) override; | |
| 47 | 46 |
| 48 uint32_t getFlags() const override { return fFlags; } | 47 uint32_t getFlags() const override { return fFlags; } |
| 49 | 48 |
| 50 private: | 49 private: |
| 51 SkBitmapProcState* fState; | 50 SkBitmapProcState* fState; |
| 52 uint32_t fFlags; | 51 uint32_t fFlags; |
| 53 | 52 |
| 54 typedef SkShader::Context INHERITED; | 53 typedef SkShader::Context INHERITED; |
| 55 }; | 54 }; |
| 56 | 55 |
| (...skipping 20 matching lines...) Expand all Loading... |
| 77 // Note that some contexts may contain other contexts (e.g. for compose shaders)
, but we've not | 76 // Note that some contexts may contain other contexts (e.g. for compose shaders)
, but we've not |
| 78 // yet found a situation where the size below isn't big enough. | 77 // yet found a situation where the size below isn't big enough. |
| 79 typedef SkSmallAllocator<3, 1160> SkTBlitterAllocator; | 78 typedef SkSmallAllocator<3, 1160> SkTBlitterAllocator; |
| 80 | 79 |
| 81 // If alloc is non-nullptr, it will be used to allocate the returned SkShader, a
nd MUST outlive | 80 // If alloc is non-nullptr, it will be used to allocate the returned SkShader, a
nd MUST outlive |
| 82 // the SkShader. | 81 // the SkShader. |
| 83 SkShader* SkCreateBitmapShader(const SkBitmap& src, SkShader::TileMode, SkShader
::TileMode, | 82 SkShader* SkCreateBitmapShader(const SkBitmap& src, SkShader::TileMode, SkShader
::TileMode, |
| 84 const SkMatrix* localMatrix, SkTBlitterAllocator*
alloc); | 83 const SkMatrix* localMatrix, SkTBlitterAllocator*
alloc); |
| 85 | 84 |
| 86 #endif | 85 #endif |
| OLD | NEW |