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

Side by Side Diff: include/core/SkCanvas.h

Issue 468193003: Start tracking the CTM while filling the BBH in SkRecordDraw. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: rebase Created 6 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 | src/core/SkCanvas.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 2006 The Android Open Source Project 2 * Copyright 2006 The Android Open Source Project
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 #ifndef SkCanvas_DEFINED 8 #ifndef SkCanvas_DEFINED
9 #define SkCanvas_DEFINED 9 #define SkCanvas_DEFINED
10 10
(...skipping 1002 matching lines...) Expand 10 before | Expand all | Expand 10 after
1013 @param indices If not null, array of indices to reference into the 1013 @param indices If not null, array of indices to reference into the
1014 vertex (texs, colors) array. 1014 vertex (texs, colors) array.
1015 @param indexCount number of entries in the indices array (if not null) 1015 @param indexCount number of entries in the indices array (if not null)
1016 @param paint Specifies the shader/texture if present. 1016 @param paint Specifies the shader/texture if present.
1017 */ 1017 */
1018 virtual void drawVertices(VertexMode vmode, int vertexCount, 1018 virtual void drawVertices(VertexMode vmode, int vertexCount,
1019 const SkPoint vertices[], const SkPoint texs[], 1019 const SkPoint vertices[], const SkPoint texs[],
1020 const SkColor colors[], SkXfermode* xmode, 1020 const SkColor colors[], SkXfermode* xmode,
1021 const uint16_t indices[], int indexCount, 1021 const uint16_t indices[], int indexCount,
1022 const SkPaint& paint); 1022 const SkPaint& paint);
1023 1023
1024 /** 1024 /**
1025 Draw a cubic coons patch 1025 Draw a cubic coons patch
1026 1026
1027 @param cubic specifies the 4 bounding cubic bezier curves of a patch with c lockwise order 1027 @param cubic specifies the 4 bounding cubic bezier curves of a patch with c lockwise order
1028 starting at the top left corner. 1028 starting at the top left corner.
1029 @param colors specifies the colors for the corners which will be bilerp acr oss the patch, 1029 @param colors specifies the colors for the corners which will be bilerp acr oss the patch,
1030 their order is clockwise starting at the top left corner. 1030 their order is clockwise starting at the top left corner.
1031 @param texCoords specifies the texture coordinates that will be bilerp acro ss the patch, 1031 @param texCoords specifies the texture coordinates that will be bilerp acro ss the patch,
1032 their order is the same as the colors. 1032 their order is the same as the colors.
1033 @param xmode specifies how are the colors and the textures combined if both of them are 1033 @param xmode specifies how are the colors and the textures combined if both of them are
1034 present. 1034 present.
1035 @param paint Specifies the shader/texture if present. 1035 @param paint Specifies the shader/texture if present.
1036 */ 1036 */
1037 void drawPatch(const SkPoint cubics[12], const SkColor colors[4], 1037 void drawPatch(const SkPoint cubics[12], const SkColor colors[4],
1038 const SkPoint texCoords[4], SkXfermode* xmode, const SkPaint& paint); 1038 const SkPoint texCoords[4], SkXfermode* xmode, const SkPaint& paint);
1039 1039
1040 /** Send a blob of data to the canvas. 1040 /** Send a blob of data to the canvas.
1041 For canvases that draw, this call is effectively a no-op, as the data 1041 For canvases that draw, this call is effectively a no-op, as the data
1042 is not parsed, but just ignored. However, this call exists for 1042 is not parsed, but just ignored. However, this call exists for
1043 subclasses like SkPicture's recording canvas, that can store the data 1043 subclasses like SkPicture's recording canvas, that can store the data
(...skipping 161 matching lines...) Expand 10 before | Expand all | Expand 10 after
1205 enum SaveLayerStrategy { 1205 enum SaveLayerStrategy {
1206 kFullLayer_SaveLayerStrategy, 1206 kFullLayer_SaveLayerStrategy,
1207 kNoLayer_SaveLayerStrategy 1207 kNoLayer_SaveLayerStrategy
1208 }; 1208 };
1209 1209
1210 virtual void willSave() {} 1210 virtual void willSave() {}
1211 virtual SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveF lags) { 1211 virtual SaveLayerStrategy willSaveLayer(const SkRect*, const SkPaint*, SaveF lags) {
1212 return kFullLayer_SaveLayerStrategy; 1212 return kFullLayer_SaveLayerStrategy;
1213 } 1213 }
1214 virtual void willRestore() {} 1214 virtual void willRestore() {}
1215 virtual void didRestore() {}
1215 virtual void didConcat(const SkMatrix&) {} 1216 virtual void didConcat(const SkMatrix&) {}
1216 virtual void didSetMatrix(const SkMatrix&) {} 1217 virtual void didSetMatrix(const SkMatrix&) {}
1217 1218
1218 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&); 1219 virtual void onDrawDRRect(const SkRRect&, const SkRRect&, const SkPaint&);
1219 1220
1220 virtual void onDrawText(const void* text, size_t byteLength, SkScalar x, 1221 virtual void onDrawText(const void* text, size_t byteLength, SkScalar x,
1221 SkScalar y, const SkPaint& paint); 1222 SkScalar y, const SkPaint& paint);
1222 1223
1223 virtual void onDrawPosText(const void* text, size_t byteLength, 1224 virtual void onDrawPosText(const void* text, size_t byteLength,
1224 const SkPoint pos[], const SkPaint& paint); 1225 const SkPoint pos[], const SkPaint& paint);
1225 1226
1226 virtual void onDrawPosTextH(const void* text, size_t byteLength, 1227 virtual void onDrawPosTextH(const void* text, size_t byteLength,
1227 const SkScalar xpos[], SkScalar constY, 1228 const SkScalar xpos[], SkScalar constY,
1228 const SkPaint& paint); 1229 const SkPaint& paint);
1229 1230
1230 virtual void onDrawTextOnPath(const void* text, size_t byteLength, 1231 virtual void onDrawTextOnPath(const void* text, size_t byteLength,
1231 const SkPath& path, const SkMatrix* matrix, 1232 const SkPath& path, const SkMatrix* matrix,
1232 const SkPaint& paint); 1233 const SkPaint& paint);
1233 1234
1234 virtual void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4], 1235 virtual void onDrawPatch(const SkPoint cubics[12], const SkColor colors[4],
1235 const SkPoint texCoords[4], SkXfermode* xmode, const SkPaint& paint); 1236 const SkPoint texCoords[4], SkXfermode* xmode, const SkPaint& paint);
1236 1237
1237 enum ClipEdgeStyle { 1238 enum ClipEdgeStyle {
1238 kHard_ClipEdgeStyle, 1239 kHard_ClipEdgeStyle,
1239 kSoft_ClipEdgeStyle 1240 kSoft_ClipEdgeStyle
1240 }; 1241 };
1241 1242
1242 virtual void onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeStyle e dgeStyle); 1243 virtual void onClipRect(const SkRect& rect, SkRegion::Op op, ClipEdgeStyle e dgeStyle);
1243 virtual void onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdgeStyl e edgeStyle); 1244 virtual void onClipRRect(const SkRRect& rrect, SkRegion::Op op, ClipEdgeStyl e edgeStyle);
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after
1505 1506
1506 class SkCanvasClipVisitor { 1507 class SkCanvasClipVisitor {
1507 public: 1508 public:
1508 virtual ~SkCanvasClipVisitor(); 1509 virtual ~SkCanvasClipVisitor();
1509 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; 1510 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0;
1510 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; 1511 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0;
1511 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; 1512 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0;
1512 }; 1513 };
1513 1514
1514 #endif 1515 #endif
OLDNEW
« no previous file with comments | « no previous file | src/core/SkCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698