OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2014 Google Inc. | 2 * Copyright 2014 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 #include "SkRecorder.h" | 8 #include "SkRecorder.h" |
9 #include "SkPatchUtils.h" | 9 #include "SkPatchUtils.h" |
10 #include "SkPicture.h" | 10 #include "SkPicture.h" |
(...skipping 277 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
288 | 288 |
289 void SkRecorder::didRestore() { | 289 void SkRecorder::didRestore() { |
290 SkBool8 saveLayer; | 290 SkBool8 saveLayer; |
291 fSaveIsSaveLayer.pop(&saveLayer); | 291 fSaveIsSaveLayer.pop(&saveLayer); |
292 if (saveLayer) { | 292 if (saveLayer) { |
293 fSaveLayerCount--; | 293 fSaveLayerCount--; |
294 } | 294 } |
295 APPEND(Restore, this->devBounds(), this->getTotalMatrix()); | 295 APPEND(Restore, this->devBounds(), this->getTotalMatrix()); |
296 } | 296 } |
297 | 297 |
298 void SkRecorder::onPushCull(const SkRect& rect) { | |
299 APPEND(PushCull, rect); | |
300 } | |
301 | |
302 void SkRecorder::onPopCull() { | |
303 APPEND(PopCull); | |
304 } | |
305 | |
306 void SkRecorder::didConcat(const SkMatrix& matrix) { | 298 void SkRecorder::didConcat(const SkMatrix& matrix) { |
307 this->didSetMatrix(this->getTotalMatrix()); | 299 this->didSetMatrix(this->getTotalMatrix()); |
308 } | 300 } |
309 | 301 |
310 void SkRecorder::didSetMatrix(const SkMatrix& matrix) { | 302 void SkRecorder::didSetMatrix(const SkMatrix& matrix) { |
311 SkDEVCODE(if (matrix != this->getTotalMatrix()) { | 303 SkDEVCODE(if (matrix != this->getTotalMatrix()) { |
312 matrix.dump(); | 304 matrix.dump(); |
313 this->getTotalMatrix().dump(); | 305 this->getTotalMatrix().dump(); |
314 SkASSERT(matrix == this->getTotalMatrix()); | 306 SkASSERT(matrix == this->getTotalMatrix()); |
315 }) | 307 }) |
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
351 APPEND(EndCommentGroup); | 343 APPEND(EndCommentGroup); |
352 } | 344 } |
353 | 345 |
354 bool SkRecorder::isDrawingToLayer() const { | 346 bool SkRecorder::isDrawingToLayer() const { |
355 return fSaveLayerCount > 0; | 347 return fSaveLayerCount > 0; |
356 } | 348 } |
357 | 349 |
358 void SkRecorder::drawData(const void* data, size_t length) { | 350 void SkRecorder::drawData(const void* data, size_t length) { |
359 APPEND(DrawData, copy((const char*)data), length); | 351 APPEND(DrawData, copy((const char*)data), length); |
360 } | 352 } |
OLD | NEW |