OLD | NEW |
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2012 Google Inc. | 3 * Copyright 2012 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 "SkBBoxRecord.h" | 9 #include "SkBBoxRecord.h" |
10 | 10 |
(...skipping 14 matching lines...) Expand all Loading... |
25 INHERITED::drawRect(rect, paint); | 25 INHERITED::drawRect(rect, paint); |
26 } | 26 } |
27 } | 27 } |
28 | 28 |
29 void SkBBoxRecord::drawPath(const SkPath& path, const SkPaint& paint) { | 29 void SkBBoxRecord::drawPath(const SkPath& path, const SkPaint& paint) { |
30 if (path.isInverseFillType()) { | 30 if (path.isInverseFillType()) { |
31 // If path is inverse filled, use the current clip bounds as the | 31 // If path is inverse filled, use the current clip bounds as the |
32 // path's device-space bounding box. | 32 // path's device-space bounding box. |
33 SkIRect clipBounds; | 33 SkIRect clipBounds; |
34 if (this->getClipDeviceBounds(&clipBounds)) { | 34 if (this->getClipDeviceBounds(&clipBounds)) { |
35 this->handleBBox(SkRect::MakeFromIRect(clipBounds)); | 35 this->handleBBox(SkRect::Make(clipBounds)); |
36 INHERITED::drawPath(path, paint); | 36 INHERITED::drawPath(path, paint); |
37 } | 37 } |
38 } else if (this->transformBounds(path.getBounds(), &paint)) { | 38 } else if (this->transformBounds(path.getBounds(), &paint)) { |
39 INHERITED::drawPath(path, paint); | 39 INHERITED::drawPath(path, paint); |
40 } | 40 } |
41 } | 41 } |
42 | 42 |
43 void SkBBoxRecord::drawPoints(PointMode mode, size_t count, const SkPoint pts[], | 43 void SkBBoxRecord::drawPoints(PointMode mode, size_t count, const SkPoint pts[], |
44 const SkPaint& paint) { | 44 const SkPaint& paint) { |
45 SkRect bbox; | 45 SkRect bbox; |
(...skipping 240 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
286 } | 286 } |
287 | 287 |
288 if (!outBounds.isEmpty() && !this->quickReject(outBounds)) { | 288 if (!outBounds.isEmpty() && !this->quickReject(outBounds)) { |
289 this->getTotalMatrix().mapRect(&outBounds); | 289 this->getTotalMatrix().mapRect(&outBounds); |
290 this->handleBBox(outBounds); | 290 this->handleBBox(outBounds); |
291 return true; | 291 return true; |
292 } | 292 } |
293 | 293 |
294 return false; | 294 return false; |
295 } | 295 } |
OLD | NEW |