Chromium Code Reviews| 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 virtual bool isOpaque() const SK_OVERRIDE; | 23 virtual bool isOpaque() const SK_OVERRIDE; |
| 24 virtual BitmapType asABitmap(SkBitmap*, SkMatrix*, TileMode*) const SK_OVERR IDE; | 24 virtual BitmapType asABitmap(SkBitmap*, SkMatrix*, TileMode*) const SK_OVERR IDE; |
| 25 | 25 |
| 26 virtual size_t contextSize() const SK_OVERRIDE; | 26 virtual size_t contextSize() const SK_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 #if SK_SUPPORT_GPU | 33 #if SK_SUPPORT_GPU |
|
jvanverth1
2014/06/05 17:36:31
Given that the base class asNewEffect() definition
dandov
2014/06/06 21:50:43
I didn't change this because I wanted to first tes
| |
| 34 GrEffectRef* asNewEffect(GrContext*, const SkPaint&, const SkMatrix*) const SK_OVERRIDE; | 34 bool asNewEffect(GrContext*, const SkPaint&, GrColor*, GrEffectRef**, const SkMatrix*) |
| 35 const SK_OVERRIDE; | |
| 35 #endif | 36 #endif |
| 36 | 37 |
| 37 class BitmapProcShaderContext : public SkShader::Context { | 38 class BitmapProcShaderContext : public SkShader::Context { |
| 38 public: | 39 public: |
| 39 // The context takes ownership of the state. It will call its destructor | 40 // The context takes ownership of the state. It will call its destructor |
| 40 // but will NOT free the memory. | 41 // but will NOT free the memory. |
| 41 BitmapProcShaderContext(const SkBitmapProcShader&, const ContextRec&, Sk BitmapProcState*); | 42 BitmapProcShaderContext(const SkBitmapProcShader&, const ContextRec&, Sk BitmapProcState*); |
| 42 virtual ~BitmapProcShaderContext(); | 43 virtual ~BitmapProcShaderContext(); |
| 43 | 44 |
| 44 virtual void shadeSpan(int x, int y, SkPMColor dstC[], int count) SK_OVE RRIDE; | 45 virtual void shadeSpan(int x, int y, SkPMColor dstC[], int count) SK_OVE RRIDE; |
| (...skipping 27 matching lines...) Expand all Loading... | |
| 72 // Note that some contexts may contain other contexts (e.g. for compose shaders) , but we've not | 73 // Note that some contexts may contain other contexts (e.g. for compose shaders) , but we've not |
| 73 // yet found a situation where the size below isn't big enough. | 74 // yet found a situation where the size below isn't big enough. |
| 74 typedef SkSmallAllocator<3, 768> SkTBlitterAllocator; | 75 typedef SkSmallAllocator<3, 768> SkTBlitterAllocator; |
| 75 | 76 |
| 76 // If alloc is non-NULL, it will be used to allocate the returned SkShader, and MUST outlive | 77 // If alloc is non-NULL, it will be used to allocate the returned SkShader, and MUST outlive |
| 77 // the SkShader. | 78 // the SkShader. |
| 78 SkShader* CreateBitmapShader(const SkBitmap& src, SkShader::TileMode, SkShader:: TileMode, | 79 SkShader* CreateBitmapShader(const SkBitmap& src, SkShader::TileMode, SkShader:: TileMode, |
| 79 const SkMatrix* localMatrix, SkTBlitterAllocator* a lloc); | 80 const SkMatrix* localMatrix, SkTBlitterAllocator* a lloc); |
| 80 | 81 |
| 81 #endif | 82 #endif |
| OLD | NEW |