Chromium Code Reviews| OLD | NEW |
|---|---|
| (Empty) | |
| 1 // Copyright 2015 The Chromium Authors. All rights reserved. | |
| 2 // Use of this source code is governed by a BSD-style license that can be | |
| 3 // found in the LICENSE file. | |
| 4 | |
| 5 #include "config.h" | |
| 6 #include "platform/graphics/InterceptingCanvas.h" | |
| 7 | |
| 8 namespace blink { | |
| 9 | |
| 10 void InterceptingCanvasBase::unrollDrawPicture(const SkPicture* picture, const S kMatrix* matrix, const SkPaint* paint, SkPicture::AbortCallback* abortCallback) | |
| 11 { | |
| 12 int saveCount = this->getSaveCount(); | |
| 13 if (paint) { | |
| 14 SkRect newBounds = picture->cullRect(); | |
|
f(malita)
2015/06/17 18:20:56
Nit: the 'bounds' saveLayer arg is optional, so I
caseq
2015/06/17 18:29:47
Would it be the same performance-wise? I was think
f(malita)
2015/06/17 18:41:56
It defaults to using the current clip bounds, but
| |
| 15 if (matrix) | |
| 16 matrix->mapRect(&newBounds); | |
| 17 this->saveLayer(&newBounds, paint); | |
| 18 } else if (matrix) { | |
| 19 this->save(); | |
| 20 } | |
| 21 if (matrix) | |
| 22 this->concat(*matrix); | |
| 23 | |
| 24 picture->playback(this, abortCallback); | |
| 25 | |
| 26 this->restoreToCount(saveCount); | |
| 27 } | |
| 28 | |
| 29 } // namespace blink | |
| OLD | NEW |