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

Side by Side Diff: src/core/SkRecordDraw.cpp

Issue 1256853004: Fixing src rect constraint support for drawImage with SkPicture (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 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 | « 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 2014 Google Inc. 2 * Copyright 2014 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 "SkLayerInfo.h" 8 #include "SkLayerInfo.h"
9 #include "SkRecordDraw.h" 9 #include "SkRecordDraw.h"
10 #include "SkPatchUtils.h" 10 #include "SkPatchUtils.h"
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
91 DRAW(DrawBitmapRect, 91 DRAW(DrawBitmapRect,
92 drawBitmapRect(r.bitmap.shallowCopy(), r.src, r.dst, r.paint, 92 drawBitmapRect(r.bitmap.shallowCopy(), r.src, r.dst, r.paint,
93 SkCanvas::kStrict_SrcRectConstraint)); 93 SkCanvas::kStrict_SrcRectConstraint));
94 DRAW(DrawBitmapRectFast, 94 DRAW(DrawBitmapRectFast,
95 drawBitmapRect(r.bitmap.shallowCopy(), r.src, r.dst, r.paint, 95 drawBitmapRect(r.bitmap.shallowCopy(), r.src, r.dst, r.paint,
96 SkCanvas::kFast_SrcRectConstraint)); 96 SkCanvas::kFast_SrcRectConstraint));
97 DRAW(DrawBitmapRectFixedSize, 97 DRAW(DrawBitmapRectFixedSize,
98 drawBitmapRect(r.bitmap.shallowCopy(), &r.src, r.dst, &r.paint, r.constr aint)); 98 drawBitmapRect(r.bitmap.shallowCopy(), &r.src, r.dst, &r.paint, r.constr aint));
99 DRAW(DrawDRRect, drawDRRect(r.outer, r.inner, r.paint)); 99 DRAW(DrawDRRect, drawDRRect(r.outer, r.inner, r.paint));
100 DRAW(DrawImage, drawImage(r.image, r.left, r.top, r.paint)); 100 DRAW(DrawImage, drawImage(r.image, r.left, r.top, r.paint));
101 DRAW(DrawImageRect, drawImageRect(r.image, r.src, r.dst, r.paint)); 101 DRAW(DrawImageRect, drawImageRect(r.image, r.src, r.dst, r.paint, r.constraint)) ;
102 DRAW(DrawImageNine, drawImageNine(r.image, r.center, r.dst, r.paint)); 102 DRAW(DrawImageNine, drawImageNine(r.image, r.center, r.dst, r.paint));
103 DRAW(DrawOval, drawOval(r.oval, r.paint)); 103 DRAW(DrawOval, drawOval(r.oval, r.paint));
104 DRAW(DrawPaint, drawPaint(r.paint)); 104 DRAW(DrawPaint, drawPaint(r.paint));
105 DRAW(DrawPath, drawPath(r.path, r.paint)); 105 DRAW(DrawPath, drawPath(r.path, r.paint));
106 DRAW(DrawPatch, drawPatch(r.cubics, r.colors, r.texCoords, r.xmode, r.paint)); 106 DRAW(DrawPatch, drawPatch(r.cubics, r.colors, r.texCoords, r.xmode, r.paint));
107 DRAW(DrawPicture, drawPicture(r.picture, &r.matrix, r.paint)); 107 DRAW(DrawPicture, drawPicture(r.picture, &r.matrix, r.paint));
108 DRAW(DrawPoints, drawPoints(r.mode, r.count, r.pts, r.paint)); 108 DRAW(DrawPoints, drawPoints(r.mode, r.count, r.pts, r.paint));
109 DRAW(DrawPosText, drawPosText(r.text, r.byteLength, r.pos, r.paint)); 109 DRAW(DrawPosText, drawPosText(r.text, r.byteLength, r.pos, r.paint));
110 DRAW(DrawPosTextH, drawPosTextH(r.text, r.byteLength, r.xpos, r.y, r.paint)); 110 DRAW(DrawPosTextH, drawPosTextH(r.text, r.byteLength, r.xpos, r.y, r.paint));
111 DRAW(DrawRRect, drawRRect(r.rrect, r.paint)); 111 DRAW(DrawRRect, drawRRect(r.rrect, r.paint));
(...skipping 697 matching lines...) Expand 10 before | Expand all | Expand 10 after
809 SkRecords::CollectLayers visitor(cullRect, record, pictList, data); 809 SkRecords::CollectLayers visitor(cullRect, record, pictList, data);
810 810
811 for (unsigned curOp = 0; curOp < record.count(); curOp++) { 811 for (unsigned curOp = 0; curOp < record.count(); curOp++) {
812 visitor.setCurrentOp(curOp); 812 visitor.setCurrentOp(curOp);
813 record.visit<void>(curOp, visitor); 813 record.visit<void>(curOp, visitor);
814 } 814 }
815 815
816 visitor.cleanUp(bbh); 816 visitor.cleanUp(bbh);
817 } 817 }
818 818
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