Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(1)

Side by Side Diff: src/pdf/SkPDFDevice.cpp

Issue 51033004: add SK_ATTR_DEPRECATED -- will need to disable for chrome, since it triggers a warning (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/images/SkImageEncoder_argb.cpp ('k') | src/pdf/SkPDFImage.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 1589 matching lines...) Expand 10 before | Expand all | Expand 10 after
1600 1600
1601 bool SkPDFDevice::handleRectAnnotation(const SkRect& r, const SkMatrix& matrix, 1601 bool SkPDFDevice::handleRectAnnotation(const SkRect& r, const SkMatrix& matrix,
1602 const SkPaint& p) { 1602 const SkPaint& p) {
1603 SkAnnotation* annotationInfo = p.getAnnotation(); 1603 SkAnnotation* annotationInfo = p.getAnnotation();
1604 if (!annotationInfo) { 1604 if (!annotationInfo) {
1605 return false; 1605 return false;
1606 } 1606 }
1607 SkData* urlData = annotationInfo->find(SkAnnotationKeys::URL_Key()); 1607 SkData* urlData = annotationInfo->find(SkAnnotationKeys::URL_Key());
1608 if (urlData) { 1608 if (urlData) {
1609 handleLinkToURL(urlData, r, matrix); 1609 handleLinkToURL(urlData, r, matrix);
1610 return p.isNoDrawAnnotation(); 1610 return p.getAnnotation() != NULL;
1611 } 1611 }
1612 SkData* linkToName = annotationInfo->find( 1612 SkData* linkToName = annotationInfo->find(
1613 SkAnnotationKeys::Link_Named_Dest_Key()); 1613 SkAnnotationKeys::Link_Named_Dest_Key());
1614 if (linkToName) { 1614 if (linkToName) {
1615 handleLinkToNamedDest(linkToName, r, matrix); 1615 handleLinkToNamedDest(linkToName, r, matrix);
1616 return p.isNoDrawAnnotation(); 1616 return p.getAnnotation() != NULL;
1617 } 1617 }
1618 return false; 1618 return false;
1619 } 1619 }
1620 1620
1621 bool SkPDFDevice::handlePointAnnotation(const SkPoint* points, size_t count, 1621 bool SkPDFDevice::handlePointAnnotation(const SkPoint* points, size_t count,
1622 const SkMatrix& matrix, 1622 const SkMatrix& matrix,
1623 const SkPaint& paint) { 1623 const SkPaint& paint) {
1624 SkAnnotation* annotationInfo = paint.getAnnotation(); 1624 SkAnnotation* annotationInfo = paint.getAnnotation();
1625 if (!annotationInfo) { 1625 if (!annotationInfo) {
1626 return false; 1626 return false;
1627 } 1627 }
1628 SkData* nameData = annotationInfo->find( 1628 SkData* nameData = annotationInfo->find(
1629 SkAnnotationKeys::Define_Named_Dest_Key()); 1629 SkAnnotationKeys::Define_Named_Dest_Key());
1630 if (nameData) { 1630 if (nameData) {
1631 for (size_t i = 0; i < count; i++) { 1631 for (size_t i = 0; i < count; i++) {
1632 defineNamedDestination(nameData, points[i], matrix); 1632 defineNamedDestination(nameData, points[i], matrix);
1633 } 1633 }
1634 return paint.isNoDrawAnnotation(); 1634 return paint.getAnnotation() != NULL;
1635 } 1635 }
1636 return false; 1636 return false;
1637 } 1637 }
1638 1638
1639 SkPDFDict* SkPDFDevice::createLinkAnnotation(const SkRect& r, 1639 SkPDFDict* SkPDFDevice::createLinkAnnotation(const SkRect& r,
1640 const SkMatrix& matrix) { 1640 const SkMatrix& matrix) {
1641 SkMatrix transform = matrix; 1641 SkMatrix transform = matrix;
1642 transform.postConcat(fInitialTransform); 1642 transform.postConcat(fInitialTransform);
1643 SkRect translatedRect; 1643 SkRect translatedRect;
1644 transform.mapRect(&translatedRect, r); 1644 transform.mapRect(&translatedRect, r);
(...skipping 622 matching lines...) Expand 10 before | Expand all | Expand 10 after
2267 } 2267 }
2268 2268
2269 bool SkPDFDevice::onReadPixels(const SkBitmap& bitmap, int x, int y, 2269 bool SkPDFDevice::onReadPixels(const SkBitmap& bitmap, int x, int y,
2270 SkCanvas::Config8888) { 2270 SkCanvas::Config8888) {
2271 return false; 2271 return false;
2272 } 2272 }
2273 2273
2274 bool SkPDFDevice::allowImageFilter(SkImageFilter*) { 2274 bool SkPDFDevice::allowImageFilter(SkImageFilter*) {
2275 return false; 2275 return false;
2276 } 2276 }
OLDNEW
« no previous file with comments | « src/images/SkImageEncoder_argb.cpp ('k') | src/pdf/SkPDFImage.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698