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

Side by Side Diff: src/svg/SkSVGDevice.cpp

Issue 2355483002: abstract name of clipping ops, to transtion to a more restricted set (Closed)
Patch Set: no need for ifdef for globals Created 4 years, 3 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
« no previous file with comments | « src/pipe/SkPipeReader.cpp ('k') | src/utils/SkCanvasStack.h » ('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 2015 Google Inc. 2 * Copyright 2015 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 "SkSVGDevice.h" 8 #include "SkSVGDevice.h"
9 9
10 #include "SkBase64.h" 10 #include "SkBase64.h"
(...skipping 712 matching lines...) Expand 10 before | Expand all | Expand 10 after
723 723
724 SkDraw adjustedDraw(draw); 724 SkDraw adjustedDraw(draw);
725 adjustedDraw.fMatrix = &adjustedMatrix; 725 adjustedDraw.fMatrix = &adjustedMatrix;
726 726
727 SkClipStack adjustedClipStack; 727 SkClipStack adjustedClipStack;
728 if (srcOrNull && *srcOrNull != SkRect::Make(bm.bounds())) { 728 if (srcOrNull && *srcOrNull != SkRect::Make(bm.bounds())) {
729 SkRect devClipRect; 729 SkRect devClipRect;
730 draw.fMatrix->mapRect(&devClipRect, dst); 730 draw.fMatrix->mapRect(&devClipRect, dst);
731 731
732 adjustedClipStack = *draw.fClipStack; 732 adjustedClipStack = *draw.fClipStack;
733 adjustedClipStack.clipDevRect(devClipRect, SkRegion::kIntersect_Op, pain t.isAntiAlias()); 733 adjustedClipStack.clipDevRect(devClipRect, SkCanvas::kIntersect_Op, pain t.isAntiAlias());
734 adjustedDraw.fClipStack = &adjustedClipStack; 734 adjustedDraw.fClipStack = &adjustedClipStack;
735 } 735 }
736 736
737 drawBitmapCommon(adjustedDraw, bm, paint); 737 drawBitmapCommon(adjustedDraw, bm, paint);
738 } 738 }
739 739
740 void SkSVGDevice::drawText(const SkDraw& draw, const void* text, size_t len, 740 void SkSVGDevice::drawText(const SkDraw& draw, const void* text, size_t len,
741 SkScalar x, SkScalar y, const SkPaint& paint) { 741 SkScalar x, SkScalar y, const SkPaint& paint) {
742 AutoElement elem("text", fWriter, fResourceBucket, draw, paint); 742 AutoElement elem("text", fWriter, fResourceBucket, draw, paint);
743 elem.addTextAttributes(paint); 743 elem.addTextAttributes(paint);
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after
806 const SkPaint& paint) { 806 const SkPaint& paint) {
807 // todo 807 // todo
808 SkDebugf("unsupported operation: drawVertices()\n"); 808 SkDebugf("unsupported operation: drawVertices()\n");
809 } 809 }
810 810
811 void SkSVGDevice::drawDevice(const SkDraw&, SkBaseDevice*, int x, int y, 811 void SkSVGDevice::drawDevice(const SkDraw&, SkBaseDevice*, int x, int y,
812 const SkPaint&) { 812 const SkPaint&) {
813 // todo 813 // todo
814 SkDebugf("unsupported operation: drawDevice()\n"); 814 SkDebugf("unsupported operation: drawDevice()\n");
815 } 815 }
OLDNEW
« no previous file with comments | « src/pipe/SkPipeReader.cpp ('k') | src/utils/SkCanvasStack.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698