OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2013 Google Inc. | 3 * Copyright 2013 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 #include "SkDeferredCanvas.h" | 9 #include "SkDeferredCanvas.h" |
10 | 10 |
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
144 } | 144 } |
145 fBlockList.reset(); | 145 fBlockList.reset(); |
146 | 146 |
147 if (fBlock) { | 147 if (fBlock) { |
148 fReader.playback(fBlock, fBytesWritten, flags); | 148 fReader.playback(fBlock, fBytesWritten, flags); |
149 fBlock = NULL; | 149 fBlock = NULL; |
150 } | 150 } |
151 | 151 |
152 // Release all allocated blocks | 152 // Release all allocated blocks |
153 fAllocator.reset(); | 153 fAllocator.reset(); |
| 154 |
| 155 this->purgeCaches(); |
154 } | 156 } |
155 | 157 |
156 //----------------------------------------------------------------------------- | 158 //----------------------------------------------------------------------------- |
157 // SkDeferredDevice | 159 // SkDeferredDevice |
158 //----------------------------------------------------------------------------- | 160 //----------------------------------------------------------------------------- |
159 class SkDeferredDevice : public SkBaseDevice { | 161 class SkDeferredDevice : public SkBaseDevice { |
160 public: | 162 public: |
161 explicit SkDeferredDevice(SkSurface* surface); | 163 explicit SkDeferredDevice(SkSurface* surface); |
162 ~SkDeferredDevice(); | 164 ~SkDeferredDevice(); |
163 | 165 |
(...skipping 818 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
982 SkDrawFilter* SkDeferredCanvas::setDrawFilter(SkDrawFilter* filter) { | 984 SkDrawFilter* SkDeferredCanvas::setDrawFilter(SkDrawFilter* filter) { |
983 this->drawingCanvas()->setDrawFilter(filter); | 985 this->drawingCanvas()->setDrawFilter(filter); |
984 this->INHERITED::setDrawFilter(filter); | 986 this->INHERITED::setDrawFilter(filter); |
985 this->recordedDrawCommand(); | 987 this->recordedDrawCommand(); |
986 return filter; | 988 return filter; |
987 } | 989 } |
988 | 990 |
989 SkCanvas* SkDeferredCanvas::canvasForDrawIter() { | 991 SkCanvas* SkDeferredCanvas::canvasForDrawIter() { |
990 return this->drawingCanvas(); | 992 return this->drawingCanvas(); |
991 } | 993 } |
OLD | NEW |