OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 Google Inc. |
3 * | 3 * |
4 * Use of this source code is governed by a BSD-style license that can be | 4 * Use of this source code is governed by a BSD-style license that can be |
5 * found in the LICENSE file. | 5 * found in the LICENSE file. |
6 */ | 6 */ |
7 | 7 |
8 #ifndef SkEmptyShader_DEFINED | 8 #ifndef SkEmptyShader_DEFINED |
9 #define SkEmptyShader_DEFINED | 9 #define SkEmptyShader_DEFINED |
10 | 10 |
(...skipping 16 matching lines...) Expand all Loading... |
27 } | 27 } |
28 | 28 |
29 SK_TO_STRING_OVERRIDE() | 29 SK_TO_STRING_OVERRIDE() |
30 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkEmptyShader) | 30 SK_DECLARE_PUBLIC_FLATTENABLE_DESERIALIZATION_PROCS(SkEmptyShader) |
31 | 31 |
32 protected: | 32 protected: |
33 SkShader::Context* onCreateContext(const ContextRec&, void*) const override
{ | 33 SkShader::Context* onCreateContext(const ContextRec&, void*) const override
{ |
34 return NULL; | 34 return NULL; |
35 } | 35 } |
36 | 36 |
| 37 void flatten(SkWriteBuffer& buffer) const override { |
| 38 // Do nothing. |
| 39 // We just don't want to fall through to SkShader::flatten(), |
| 40 // which will write data we don't care to serialize or decode. |
| 41 } |
| 42 |
37 private: | 43 private: |
38 typedef SkShader INHERITED; | 44 typedef SkShader INHERITED; |
39 }; | 45 }; |
40 | 46 |
41 #endif | 47 #endif |
OLD | NEW |