| 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 SkLayerDrawLooper_DEFINED | 8 #ifndef SkLayerDrawLooper_DEFINED |
| 9 #define SkLayerDrawLooper_DEFINED | 9 #define SkLayerDrawLooper_DEFINED |
| 10 | 10 |
| (...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 91 */ | 91 */ |
| 92 void addLayer() { this->addLayer(0, 0); } | 92 void addLayer() { this->addLayer(0, 0); } |
| 93 | 93 |
| 94 /// Similar to addLayer, but adds a layer to the top. | 94 /// Similar to addLayer, but adds a layer to the top. |
| 95 SkPaint* addLayerOnTop(const LayerInfo&); | 95 SkPaint* addLayerOnTop(const LayerInfo&); |
| 96 | 96 |
| 97 virtual SkDrawLooper::Context* createContext(SkCanvas*, void* storage) const
SK_OVERRIDE; | 97 virtual SkDrawLooper::Context* createContext(SkCanvas*, void* storage) const
SK_OVERRIDE; |
| 98 | 98 |
| 99 virtual size_t contextSize() const SK_OVERRIDE { return sizeof(LayerDrawLoop
erContext); } | 99 virtual size_t contextSize() const SK_OVERRIDE { return sizeof(LayerDrawLoop
erContext); } |
| 100 | 100 |
| 101 SK_DEVELOPER_TO_STRING() | 101 SK_TO_STRING_OVERRIDE() |
| 102 | 102 |
| 103 /// Implements Flattenable. | 103 /// Implements Flattenable. |
| 104 virtual Factory getFactory() const SK_OVERRIDE { return CreateProc; } | 104 virtual Factory getFactory() const SK_OVERRIDE { return CreateProc; } |
| 105 static SkFlattenable* CreateProc(SkReadBuffer& buffer); | 105 static SkFlattenable* CreateProc(SkReadBuffer& buffer); |
| 106 | 106 |
| 107 protected: | 107 protected: |
| 108 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; | 108 virtual void flatten(SkWriteBuffer&) const SK_OVERRIDE; |
| 109 | 109 |
| 110 private: | 110 private: |
| 111 struct Rec { | 111 struct Rec { |
| (...skipping 59 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 171 SkLayerDrawLooper* detachLooper(); | 171 SkLayerDrawLooper* detachLooper(); |
| 172 | 172 |
| 173 private: | 173 private: |
| 174 Rec* fRecs; | 174 Rec* fRecs; |
| 175 Rec* fTopRec; | 175 Rec* fTopRec; |
| 176 int fCount; | 176 int fCount; |
| 177 }; | 177 }; |
| 178 }; | 178 }; |
| 179 | 179 |
| 180 #endif | 180 #endif |
| OLD | NEW |