| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 "SkPDFDevice.h" | 8 #include "SkPDFDevice.h" |
| 9 | 9 |
| 10 #include "SkAnnotation.h" | 10 #include "SkAnnotation.h" |
| (...skipping 386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 397 | 397 |
| 398 const SkClipStack::Element* clipEntry; | 398 const SkClipStack::Element* clipEntry; |
| 399 SkClipStack::Iter iter; | 399 SkClipStack::Iter iter; |
| 400 iter.reset(clipStack, SkClipStack::Iter::kBottom_IterStart); | 400 iter.reset(clipStack, SkClipStack::Iter::kBottom_IterStart); |
| 401 for (clipEntry = iter.next(); clipEntry; clipEntry = iter.next()) { | 401 for (clipEntry = iter.next(); clipEntry; clipEntry = iter.next()) { |
| 402 SkPath entryPath; | 402 SkPath entryPath; |
| 403 if (SkClipStack::Element::kEmpty_Type == clipEntry->getType()) { | 403 if (SkClipStack::Element::kEmpty_Type == clipEntry->getType()) { |
| 404 outClipPath->reset(); | 404 outClipPath->reset(); |
| 405 outClipPath->setFillType(SkPath::kInverseWinding_FillType); | 405 outClipPath->setFillType(SkPath::kInverseWinding_FillType); |
| 406 continue; | 406 continue; |
| 407 } else if (SkClipStack::Element::kRect_Type == clipEntry->getType()) { | 407 } else { |
| 408 entryPath.addRect(clipEntry->getRect()); | 408 clipEntry->asPath(&entryPath); |
| 409 } else if (SkClipStack::Element::kPath_Type == clipEntry->getType()) { | |
| 410 entryPath = clipEntry->getPath(); | |
| 411 } | 409 } |
| 412 entryPath.transform(transform); | 410 entryPath.transform(transform); |
| 413 | 411 |
| 414 if (SkRegion::kReplace_Op == clipEntry->getOp()) { | 412 if (SkRegion::kReplace_Op == clipEntry->getOp()) { |
| 415 *outClipPath = entryPath; | 413 *outClipPath = entryPath; |
| 416 } else { | 414 } else { |
| 417 SkPathOp op = region_op_to_pathops_op(clipEntry->getOp()); | 415 SkPathOp op = region_op_to_pathops_op(clipEntry->getOp()); |
| 418 if (!Op(*outClipPath, entryPath, op, outClipPath)) { | 416 if (!Op(*outClipPath, entryPath, op, outClipPath)) { |
| 419 return false; | 417 return false; |
| 420 } | 418 } |
| (...skipping 1901 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2322 } | 2320 } |
| 2323 | 2321 |
| 2324 bool SkPDFDevice::onReadPixels(const SkBitmap& bitmap, int x, int y, | 2322 bool SkPDFDevice::onReadPixels(const SkBitmap& bitmap, int x, int y, |
| 2325 SkCanvas::Config8888) { | 2323 SkCanvas::Config8888) { |
| 2326 return false; | 2324 return false; |
| 2327 } | 2325 } |
| 2328 | 2326 |
| 2329 bool SkPDFDevice::allowImageFilter(const SkImageFilter*) { | 2327 bool SkPDFDevice::allowImageFilter(const SkImageFilter*) { |
| 2330 return false; | 2328 return false; |
| 2331 } | 2329 } |
| OLD | NEW |