| 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 485 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 496 const SkClipStack::Element* clipEntry; | 496 const SkClipStack::Element* clipEntry; |
| 497 for (clipEntry = iter.next(); clipEntry; clipEntry = iter.next()) { | 497 for (clipEntry = iter.next(); clipEntry; clipEntry = iter.next()) { |
| 498 SkASSERT(clipEntry->getOp() == SkRegion::kIntersect_Op); | 498 SkASSERT(clipEntry->getOp() == SkRegion::kIntersect_Op); |
| 499 switch (clipEntry->getType()) { | 499 switch (clipEntry->getType()) { |
| 500 case SkClipStack::Element::kRect_Type: { | 500 case SkClipStack::Element::kRect_Type: { |
| 501 SkRect translatedClip; | 501 SkRect translatedClip; |
| 502 transform.mapRect(&translatedClip, clipEntry->getRect()); | 502 transform.mapRect(&translatedClip, clipEntry->getRect()); |
| 503 emit_clip(NULL, &translatedClip, fContentStream); | 503 emit_clip(NULL, &translatedClip, fContentStream); |
| 504 break; | 504 break; |
| 505 } | 505 } |
| 506 case SkClipStack::Element::kPath_Type: { | 506 default: { |
| 507 SkPath translatedPath; | 507 SkPath translatedPath; |
| 508 clipEntry->getPath().transform(transform, &translatedPath); | 508 clipEntry->asPath(&translatedPath); |
| 509 translatedPath.transform(transform, &translatedPath); |
| 509 emit_clip(&translatedPath, NULL, fContentStream); | 510 emit_clip(&translatedPath, NULL, fContentStream); |
| 510 break; | 511 break; |
| 511 } | 512 } |
| 512 default: | |
| 513 SkASSERT(false); | |
| 514 } | 513 } |
| 515 } | 514 } |
| 516 } | 515 } |
| 517 } | 516 } |
| 518 | 517 |
| 519 void GraphicStackState::updateMatrix(const SkMatrix& matrix) { | 518 void GraphicStackState::updateMatrix(const SkMatrix& matrix) { |
| 520 if (matrix == currentEntry()->fMatrix) { | 519 if (matrix == currentEntry()->fMatrix) { |
| 521 return; | 520 return; |
| 522 } | 521 } |
| 523 | 522 |
| (...skipping 1796 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2320 } | 2319 } |
| 2321 | 2320 |
| 2322 bool SkPDFDevice::onReadPixels(const SkBitmap& bitmap, int x, int y, | 2321 bool SkPDFDevice::onReadPixels(const SkBitmap& bitmap, int x, int y, |
| 2323 SkCanvas::Config8888) { | 2322 SkCanvas::Config8888) { |
| 2324 return false; | 2323 return false; |
| 2325 } | 2324 } |
| 2326 | 2325 |
| 2327 bool SkPDFDevice::allowImageFilter(const SkImageFilter*) { | 2326 bool SkPDFDevice::allowImageFilter(const SkImageFilter*) { |
| 2328 return false; | 2327 return false; |
| 2329 } | 2328 } |
| OLD | NEW |