Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 /* | 1 /* |
| 2 * Copyright 2012 Google Inc. | 2 * Copyright 2012 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 SkSurface_DEFINED | 8 #ifndef SkSurface_DEFINED |
| 9 #define SkSurface_DEFINED | 9 #define SkSurface_DEFINED |
| 10 | 10 |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 72 * surface. Each time the content is changed changed, either by drawing | 72 * surface. Each time the content is changed changed, either by drawing |
| 73 * into this surface, or explicitly calling notifyContentChanged()) this | 73 * into this surface, or explicitly calling notifyContentChanged()) this |
| 74 * method will return a new value. | 74 * method will return a new value. |
| 75 * | 75 * |
| 76 * If this surface is empty (i.e. has a zero-dimention), this will return | 76 * If this surface is empty (i.e. has a zero-dimention), this will return |
| 77 * 0. | 77 * 0. |
| 78 */ | 78 */ |
| 79 uint32_t generationID(); | 79 uint32_t generationID(); |
| 80 | 80 |
| 81 /** | 81 /** |
| 82 * Call this if the contents have changed. This will (lazily) force a new | 82 * Call this if the contents are about to change. This will (lazily) force a new |
| 83 * value to be returned from generationID() when it is called next. | 83 * value to be returned from generationID() when it is called next. |
| 84 * @param canDiscardContents Should be true if upcoming changes will clear | |
| 85 * or occlude prior contents, thus making them discardable. | |
| 84 */ | 86 */ |
|
reed1
2013/04/18 14:48:33
Perhaps an enum or bit-field, so at the call-site
| |
| 85 void notifyContentChanged(); | 87 void notifyContentWillChange(bool canDiscardContents); |
| 86 | 88 |
| 87 /** | 89 /** |
| 88 * Return a canvas that will draw into this surface. This will always | 90 * Return a canvas that will draw into this surface. This will always |
| 89 * return the same canvas for a given surface, and is manged/owned by the | 91 * return the same canvas for a given surface, and is manged/owned by the |
| 90 * surface. It should not be used when its parent surface has gone out of | 92 * surface. It should not be used when its parent surface has gone out of |
| 91 * scope. | 93 * scope. |
| 92 */ | 94 */ |
| 93 SkCanvas* getCanvas(); | 95 SkCanvas* getCanvas(); |
| 94 | 96 |
| 95 /** | 97 /** |
| (...skipping 37 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 133 | 135 |
| 134 private: | 136 private: |
| 135 const int fWidth; | 137 const int fWidth; |
| 136 const int fHeight; | 138 const int fHeight; |
| 137 uint32_t fGenerationID; | 139 uint32_t fGenerationID; |
| 138 | 140 |
| 139 typedef SkRefCnt INHERITED; | 141 typedef SkRefCnt INHERITED; |
| 140 }; | 142 }; |
| 141 | 143 |
| 142 #endif | 144 #endif |
| OLD | NEW |