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 "SkDeferredCanvas.h" | 8 #include "SkDeferredCanvas.h" |
9 #include "SkDrawable.h" | 9 #include "SkDrawable.h" |
10 #include "SkPath.h" | 10 #include "SkPath.h" |
(...skipping 182 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
193 bounds->offset(rec.fData.fTranslate.x(), rec.fData.fTranslat
e.y()); | 193 bounds->offset(rec.fData.fTranslate.x(), rec.fData.fTranslat
e.y()); |
194 // continue to the next rec | 194 // continue to the next rec |
195 } else { | 195 } else { |
196 goto STOP; | 196 goto STOP; |
197 } | 197 } |
198 break; | 198 break; |
199 case kScaleTrans_Type: | 199 case kScaleTrans_Type: |
200 if (canScale) { | 200 if (canScale) { |
201 SkMatrix m; | 201 SkMatrix m; |
202 rec.getConcat(&m); | 202 rec.getConcat(&m); |
203 *bounds = m.mapRectScaleTranslate(*bounds); | 203 m.mapRectScaleTranslate(bounds, *bounds); |
204 } else { | 204 } else { |
205 goto STOP; | 205 goto STOP; |
206 } | 206 } |
207 break; | 207 break; |
208 } | 208 } |
209 } | 209 } |
210 STOP: | 210 STOP: |
211 this->flush_le(i); | 211 this->flush_le(i); |
212 } | 212 } |
213 | 213 |
(...skipping 322 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
536 return true; | 536 return true; |
537 } | 537 } |
538 return false; | 538 return false; |
539 } | 539 } |
540 SkImageInfo SkDeferredCanvas::onImageInfo() const { return fCanvas->imageInfo();
} | 540 SkImageInfo SkDeferredCanvas::onImageInfo() const { return fCanvas->imageInfo();
} |
541 bool SkDeferredCanvas::onGetProps(SkSurfaceProps* props) const { return fCanvas-
>getProps(props); } | 541 bool SkDeferredCanvas::onGetProps(SkSurfaceProps* props) const { return fCanvas-
>getProps(props); } |
542 void SkDeferredCanvas::onFlush() { | 542 void SkDeferredCanvas::onFlush() { |
543 this->flush_all(); | 543 this->flush_all(); |
544 return fCanvas->flush(); | 544 return fCanvas->flush(); |
545 } | 545 } |
OLD | NEW |