| 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 SkPictureStateTree_DEFINED | 9 #ifndef SkPictureStateTree_DEFINED |
| 10 #define SkPictureStateTree_DEFINED | 10 #define SkPictureStateTree_DEFINED |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 75 class Iterator { | 75 class Iterator { |
| 76 public: | 76 public: |
| 77 /** Returns the next op offset needed to create the drawing state | 77 /** Returns the next op offset needed to create the drawing state |
| 78 required by the queued up draw operation or the offset of the queued
| 78 required by the queued up draw operation or the offset of the queued
|
| 79 up draw operation itself. In the latter case, the next draw operatio
n | 79 up draw operation itself. In the latter case, the next draw operatio
n |
| 80 will move into the queued up slot. | 80 will move into the queued up slot. |
| 81 It retuns kDrawComplete when done. | 81 It retuns kDrawComplete when done. |
| 82 TODO: this might be better named nextOp | 82 TODO: this might be better named nextOp |
| 83 */ | 83 */ |
| 84 uint32_t nextDraw(); | 84 uint32_t nextDraw(); |
| 85 /** Peek at the currently queued up draw op's offset. Note that this can | |
| 86 be different then what 'nextDraw' would return b.c. it is | |
| 87 the offset of the next _draw_ op while 'nextDraw' can return | |
| 88 the offsets to saveLayer and clip ops while it is creating the prope
r | |
| 89 drawing context for the queued up draw op. | |
| 90 */ | |
| 91 uint32_t peekDraw(); | |
| 92 /** Stop trying to create the drawing context for the currently queued | |
| 93 up _draw_ operation and queue up the next one. This call returns | |
| 94 the offset of the skipped _draw_ operation. Obviously (since the | |
| 95 correct drawing context has not been established), the skipped | |
| 96 _draw_ operation should not be issued. Returns kDrawComplete if | |
| 97 the end of the draw operations is reached. | |
| 98 */ | |
| 99 uint32_t skipDraw(); | |
| 100 static const uint32_t kDrawComplete = SK_MaxU32; | 85 static const uint32_t kDrawComplete = SK_MaxU32; |
| 101 Iterator() : fPlaybackMatrix(), fValid(false) { } | 86 Iterator() : fPlaybackMatrix(), fValid(false) { } |
| 102 bool isValid() const { return fValid; } | 87 bool isValid() const { return fValid; } |
| 103 | 88 |
| 104 private: | 89 private: |
| 105 Iterator(const SkTDArray<void*>& draws, SkCanvas* canvas, Node* root); | 90 Iterator(const SkTDArray<void*>& draws, SkCanvas* canvas, Node* root); |
| 106 | 91 |
| 107 void setCurrentMatrix(const SkMatrix*); | 92 void setCurrentMatrix(const SkMatrix*); |
| 108 | 93 |
| 109 // The draws this iterator is associated with | 94 // The draws this iterator is associated with |
| (...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 166 }; | 151 }; |
| 167 }; | 152 }; |
| 168 | 153 |
| 169 Node fRoot; | 154 Node fRoot; |
| 170 SkMatrix fRootMatrix; | 155 SkMatrix fRootMatrix; |
| 171 | 156 |
| 172 typedef SkRefCnt INHERITED; | 157 typedef SkRefCnt INHERITED; |
| 173 }; | 158 }; |
| 174 | 159 |
| 175 #endif | 160 #endif |
| OLD | NEW |