Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 | 1 |
| 2 /* | 2 /* |
| 3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 Google Inc. |
| 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 #ifndef SkFlattenableBuffers_DEFINED | 9 #ifndef SkFlattenableBuffers_DEFINED |
| 10 #define SkFlattenableBuffers_DEFINED | 10 #define SkFlattenableBuffers_DEFINED |
| (...skipping 135 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 146 | 146 |
| 147 /** This function validates that the isValid input parameter is true | 147 /** This function validates that the isValid input parameter is true |
| 148 * If isValidating() is false, then true is always returned | 148 * If isValidating() is false, then true is always returned |
| 149 * If isValidating() is true, then true is returned until validate() is cal led with isValid | 149 * If isValidating() is true, then true is returned until validate() is cal led with isValid |
| 150 * set to false. When isValid is false, an error flag will be set internall y and, from that | 150 * set to false. When isValid is false, an error flag will be set internall y and, from that |
| 151 * point on, validate() will return false. The error flag cannot be unset. | 151 * point on, validate() will return false. The error flag cannot be unset. |
| 152 * | 152 * |
| 153 * @param isValid result of a test that is expected to be true | 153 * @param isValid result of a test that is expected to be true |
| 154 */ | 154 */ |
| 155 virtual bool validate(bool isValid); | 155 virtual bool validate(bool isValid); |
| 156 virtual bool isValid() const { return true; } | |
|
reed1
2013/12/05 21:35:23
Please add some dox. What is valid? When is it not
sugoi1
2013/12/06 18:39:04
Done.
| |
| 156 | 157 |
| 157 private: | 158 private: |
| 158 template <typename T> T* readFlattenableT(); | 159 template <typename T> T* readFlattenableT(); |
| 159 uint32_t fFlags; | 160 uint32_t fFlags; |
| 160 }; | 161 }; |
| 161 | 162 |
| 162 /////////////////////////////////////////////////////////////////////////////// | 163 /////////////////////////////////////////////////////////////////////////////// |
| 163 | 164 |
| 164 class SkFlattenableWriteBuffer { | 165 class SkFlattenableWriteBuffer { |
| 165 public: | 166 public: |
| (...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 232 } | 233 } |
| 233 | 234 |
| 234 protected: | 235 protected: |
| 235 // A helper function so that each subclass does not have to be a friend of S kFlattenable | 236 // A helper function so that each subclass does not have to be a friend of S kFlattenable |
| 236 void flattenObject(const SkFlattenable* obj, SkFlattenableWriteBuffer& buffe r); | 237 void flattenObject(const SkFlattenable* obj, SkFlattenableWriteBuffer& buffe r); |
| 237 | 238 |
| 238 uint32_t fFlags; | 239 uint32_t fFlags; |
| 239 }; | 240 }; |
| 240 | 241 |
| 241 #endif | 242 #endif |
| OLD | NEW |