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

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

Issue 166313003: Make PDF clip code handle rrects. (Closed) Base URL: https://skia.googlecode.com/svn/trunk
Patch Set: Created 6 years, 10 months 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 | « no previous file | no next file » | 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 485 matching lines...) Expand 10 before | Expand all | Expand 10 after
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
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 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698