| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2016 Google Inc. | 2 * Copyright 2016 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 "SkLiteDL.h" | 8 #include "SkLiteDL.h" |
| 9 #include "SkLiteRecorder.h" | 9 #include "SkLiteRecorder.h" |
| 10 #include "SkSurface.h" | 10 #include "SkSurface.h" |
| 11 | 11 |
| 12 SkLiteRecorder::SkLiteRecorder() | 12 SkLiteRecorder::SkLiteRecorder() |
| 13 : SkCanvas({0,0,1,1}, SkCanvas::kConservativeRasterClip_InitFlag) | 13 : SkCanvas({0,0,1,1}, SkCanvas::kConservativeRasterClip_InitFlag) |
| 14 , fDL(nullptr) {} | 14 , fDL(nullptr) {} |
| 15 | 15 |
| 16 void SkLiteRecorder::reset(SkLiteDL* dl) { | 16 void SkLiteRecorder::reset(SkLiteDL* dl) { |
| 17 this->resetForNextPicture(dl->getBounds().roundOut()); | 17 this->resetForNextPicture({0,0,1,1}); |
| 18 fDL = dl; | 18 fDL = dl; |
| 19 } | 19 } |
| 20 | 20 |
| 21 sk_sp<SkSurface> SkLiteRecorder::onNewSurface(const SkImageInfo&, const SkSurfac
eProps&) { | 21 sk_sp<SkSurface> SkLiteRecorder::onNewSurface(const SkImageInfo&, const SkSurfac
eProps&) { |
| 22 return nullptr; | 22 return nullptr; |
| 23 } | 23 } |
| 24 | 24 |
| 25 #ifdef SK_SUPPORT_LEGACY_DRAWFILTER | 25 #ifdef SK_SUPPORT_LEGACY_DRAWFILTER |
| 26 SkDrawFilter* SkLiteRecorder::setDrawFilter(SkDrawFilter* df) { | 26 SkDrawFilter* SkLiteRecorder::setDrawFilter(SkDrawFilter* df) { |
| 27 fDL->setDrawFilter(df); | 27 fDL->setDrawFilter(df); |
| (...skipping 172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 200 | 200 |
| 201 void SkLiteRecorder::didTranslateZ(SkScalar dz) { | 201 void SkLiteRecorder::didTranslateZ(SkScalar dz) { |
| 202 fDL->translateZ(dz); | 202 fDL->translateZ(dz); |
| 203 } | 203 } |
| 204 void SkLiteRecorder::onDrawShadowedPicture(const SkPicture* picture, | 204 void SkLiteRecorder::onDrawShadowedPicture(const SkPicture* picture, |
| 205 const SkMatrix* matrix, | 205 const SkMatrix* matrix, |
| 206 const SkPaint* paint, | 206 const SkPaint* paint, |
| 207 const SkShadowParams& params) { | 207 const SkShadowParams& params) { |
| 208 fDL->drawShadowedPicture(picture, matrix, paint, params); | 208 fDL->drawShadowedPicture(picture, matrix, paint, params); |
| 209 } | 209 } |
| OLD | NEW |