| 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 12 matching lines...) Expand all Loading... |
| 23 | 23 |
| 24 bool isOpaque() const override; | 24 bool isOpaque() const override; |
| 25 | 25 |
| 26 size_t contextSize() const override { return ContextSize(); } | 26 size_t contextSize() const override { return ContextSize(); } |
| 27 | 27 |
| 28 SK_TO_STRING_OVERRIDE() | 28 SK_TO_STRING_OVERRIDE() |
| 29 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkBitmapProcShader) | 29 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkBitmapProcShader) |
| 30 | 30 |
| 31 #if SK_SUPPORT_GPU | 31 #if SK_SUPPORT_GPU |
| 32 const GrFragmentProcessor* asFragmentProcessor(GrContext*, const SkMatrix& v
iewM, | 32 const GrFragmentProcessor* asFragmentProcessor(GrContext*, const SkMatrix& v
iewM, |
| 33 const SkMatrix*, SkFilterQual
ity, | 33 const SkMatrix*, SkFilterQual
ity) const override; |
| 34 GrProcessorDataManager*) cons
t override; | |
| 35 #endif | 34 #endif |
| 36 | 35 |
| 37 protected: | 36 protected: |
| 38 class BitmapProcShaderContext : public SkShader::Context { | 37 class BitmapProcShaderContext : public SkShader::Context { |
| 39 public: | 38 public: |
| 40 // 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 |
| 41 // but will NOT free the memory. | 40 // but will NOT free the memory. |
| 42 BitmapProcShaderContext(const SkShader&, const ContextRec&, SkBitmapProc
State*); | 41 BitmapProcShaderContext(const SkShader&, const ContextRec&, SkBitmapProc
State*); |
| 43 ~BitmapProcShaderContext() override; | 42 ~BitmapProcShaderContext() override; |
| 44 | 43 |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 78 // Note that some contexts may contain other contexts (e.g. for compose shaders)
, but we've not | 77 // Note that some contexts may contain other contexts (e.g. for compose shaders)
, but we've not |
| 79 // yet found a situation where the size below isn't big enough. | 78 // yet found a situation where the size below isn't big enough. |
| 80 typedef SkSmallAllocator<3, 1160> SkTBlitterAllocator; | 79 typedef SkSmallAllocator<3, 1160> SkTBlitterAllocator; |
| 81 | 80 |
| 82 // If alloc is non-nullptr, it will be used to allocate the returned SkShader, a
nd MUST outlive | 81 // If alloc is non-nullptr, it will be used to allocate the returned SkShader, a
nd MUST outlive |
| 83 // the SkShader. | 82 // the SkShader. |
| 84 SkShader* SkCreateBitmapShader(const SkBitmap& src, SkShader::TileMode, SkShader
::TileMode, | 83 SkShader* SkCreateBitmapShader(const SkBitmap& src, SkShader::TileMode, SkShader
::TileMode, |
| 85 const SkMatrix* localMatrix, SkTBlitterAllocator*
alloc); | 84 const SkMatrix* localMatrix, SkTBlitterAllocator*
alloc); |
| 86 | 85 |
| 87 #endif | 86 #endif |
| OLD | NEW |