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

Side by Side Diff: src/utils/SkProxyCanvas.cpp

Issue 835913002: Revert of move remaining virtual draw methods to onDraw (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 11 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/utils/SkNWayCanvas.cpp ('k') | src/utils/debugger/SkDebugCanvas.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 /* 2 /*
3 * Copyright 2011 Google Inc. 3 * Copyright 2011 Google Inc.
4 * 4 *
5 * Use of this source code is governed by a BSD-style license that can be 5 * Use of this source code is governed by a BSD-style license that can be
6 * found in the LICENSE file. 6 * found in the LICENSE file.
7 */ 7 */
8 #include "SkProxyCanvas.h" 8 #include "SkProxyCanvas.h"
9 9
10 SkProxyCanvas::SkProxyCanvas(SkCanvas* proxy) : fProxy(proxy) { 10 SkProxyCanvas::SkProxyCanvas(SkCanvas* proxy) : fProxy(proxy) {
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 } 58 }
59 59
60 void SkProxyCanvas::onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyl e edgeStyle) { 60 void SkProxyCanvas::onClipPath(const SkPath& path, SkRegion::Op op, ClipEdgeStyl e edgeStyle) {
61 fProxy->clipPath(path, op, kSoft_ClipEdgeStyle == edgeStyle); 61 fProxy->clipPath(path, op, kSoft_ClipEdgeStyle == edgeStyle);
62 } 62 }
63 63
64 void SkProxyCanvas::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) { 64 void SkProxyCanvas::onClipRegion(const SkRegion& deviceRgn, SkRegion::Op op) {
65 fProxy->clipRegion(deviceRgn, op); 65 fProxy->clipRegion(deviceRgn, op);
66 } 66 }
67 67
68 void SkProxyCanvas::onDrawPaint(const SkPaint& paint) { 68 void SkProxyCanvas::drawPaint(const SkPaint& paint) {
69 fProxy->drawPaint(paint); 69 fProxy->drawPaint(paint);
70 } 70 }
71 71
72 void SkProxyCanvas::onDrawPoints(PointMode mode, size_t count, 72 void SkProxyCanvas::drawPoints(PointMode mode, size_t count,
73 const SkPoint pts[], const SkPaint& paint) { 73 const SkPoint pts[], const SkPaint& paint) {
74 fProxy->drawPoints(mode, count, pts, paint); 74 fProxy->drawPoints(mode, count, pts, paint);
75 } 75 }
76 76
77 void SkProxyCanvas::onDrawOval(const SkRect& rect, const SkPaint& paint) { 77 void SkProxyCanvas::drawOval(const SkRect& rect, const SkPaint& paint) {
78 fProxy->drawOval(rect, paint); 78 fProxy->drawOval(rect, paint);
79 } 79 }
80 80
81 void SkProxyCanvas::onDrawRect(const SkRect& rect, const SkPaint& paint) { 81 void SkProxyCanvas::drawRect(const SkRect& rect, const SkPaint& paint) {
82 fProxy->drawRect(rect, paint); 82 fProxy->drawRect(rect, paint);
83 } 83 }
84 84
85 void SkProxyCanvas::onDrawRRect(const SkRRect& rrect, const SkPaint& paint) { 85 void SkProxyCanvas::drawRRect(const SkRRect& rrect, const SkPaint& paint) {
86 fProxy->drawRRect(rrect, paint); 86 fProxy->drawRRect(rrect, paint);
87 } 87 }
88 88
89 void SkProxyCanvas::onDrawDRRect(const SkRRect& outer, const SkRRect& inner, 89 void SkProxyCanvas::onDrawDRRect(const SkRRect& outer, const SkRRect& inner,
90 const SkPaint& paint) { 90 const SkPaint& paint) {
91 fProxy->drawDRRect(outer, inner, paint); 91 fProxy->drawDRRect(outer, inner, paint);
92 } 92 }
93 93
94 void SkProxyCanvas::onDrawPath(const SkPath& path, const SkPaint& paint) { 94 void SkProxyCanvas::drawPath(const SkPath& path, const SkPaint& paint) {
95 fProxy->drawPath(path, paint); 95 fProxy->drawPath(path, paint);
96 } 96 }
97 97
98 void SkProxyCanvas::onDrawImage(const SkImage* image, SkScalar left, SkScalar to p, 98 void SkProxyCanvas::drawImage(const SkImage* image, SkScalar left, SkScalar top,
99 const SkPaint* paint) { 99 const SkPaint* paint) {
100 fProxy->drawImage(image, left, top, paint); 100 fProxy->drawImage(image, left, top, paint);
101 } 101 }
102 102
103 void SkProxyCanvas::onDrawImageRect(const SkImage* image, const SkRect* src, con st SkRect& dst, 103 void SkProxyCanvas::drawImageRect(const SkImage* image, const SkRect* src,
104 const SkPaint* paint) { 104 const SkRect& dst,
105 const SkPaint* paint) {
105 fProxy->drawImageRect(image, src, dst, paint); 106 fProxy->drawImageRect(image, src, dst, paint);
106 } 107 }
107 108
108 void SkProxyCanvas::onDrawBitmap(const SkBitmap& bitmap, SkScalar x, SkScalar y, 109 void SkProxyCanvas::drawBitmap(const SkBitmap& bitmap, SkScalar x, SkScalar y,
109 const SkPaint* paint) { 110 const SkPaint* paint) {
110 fProxy->drawBitmap(bitmap, x, y, paint); 111 fProxy->drawBitmap(bitmap, x, y, paint);
111 } 112 }
112 113
113 void SkProxyCanvas::onDrawBitmapRect(const SkBitmap& bitmap, const SkRect* src, const SkRect& dst, 114 void SkProxyCanvas::drawBitmapRectToRect(const SkBitmap& bitmap, const SkRect* s rc,
114 const SkPaint* paint, DrawBitmapRectFlags f lags) { 115 const SkRect& dst, const SkPaint* paint,
116 DrawBitmapRectFlags flags) {
115 fProxy->drawBitmapRectToRect(bitmap, src, dst, paint, flags); 117 fProxy->drawBitmapRectToRect(bitmap, src, dst, paint, flags);
116 } 118 }
117 119
118 void SkProxyCanvas::onDrawBitmapNine(const SkBitmap& bitmap, const SkIRect& cent er, 120 void SkProxyCanvas::drawSprite(const SkBitmap& bitmap, int x, int y,
119 const SkRect& dst, const SkPaint* paint) { 121 const SkPaint* paint) {
120 fProxy->drawBitmapNine(bitmap, center, dst, paint);
121 }
122
123 void SkProxyCanvas::onDrawSprite(const SkBitmap& bitmap, int x, int y, const SkP aint* paint) {
124 fProxy->drawSprite(bitmap, x, y, paint); 122 fProxy->drawSprite(bitmap, x, y, paint);
125 } 123 }
126 124
127 void SkProxyCanvas::onDrawText(const void* text, size_t byteLength, SkScalar x, SkScalar y, 125 void SkProxyCanvas::onDrawText(const void* text, size_t byteLength, SkScalar x, SkScalar y,
128 const SkPaint& paint) { 126 const SkPaint& paint) {
129 fProxy->drawText(text, byteLength, x, y, paint); 127 fProxy->drawText(text, byteLength, x, y, paint);
130 } 128 }
131 129
132 void SkProxyCanvas::onDrawPosText(const void* text, size_t byteLength, const SkP oint pos[], 130 void SkProxyCanvas::onDrawPosText(const void* text, size_t byteLength, const SkP oint pos[],
133 const SkPaint& paint) { 131 const SkPaint& paint) {
(...skipping 13 matching lines...) Expand all
147 void SkProxyCanvas::onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y, 145 void SkProxyCanvas::onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScalar y,
148 const SkPaint& paint) { 146 const SkPaint& paint) {
149 fProxy->drawTextBlob(blob, x, y, paint); 147 fProxy->drawTextBlob(blob, x, y, paint);
150 } 148 }
151 149
152 void SkProxyCanvas::onDrawPicture(const SkPicture* picture, const SkMatrix* matr ix, 150 void SkProxyCanvas::onDrawPicture(const SkPicture* picture, const SkMatrix* matr ix,
153 const SkPaint* paint) { 151 const SkPaint* paint) {
154 fProxy->drawPicture(picture, matrix, paint); 152 fProxy->drawPicture(picture, matrix, paint);
155 } 153 }
156 154
157 void SkProxyCanvas::onDrawVertices(VertexMode vmode, int vertexCount, 155 void SkProxyCanvas::drawVertices(VertexMode vmode, int vertexCount,
158 const SkPoint vertices[], const SkPoint texs[ ], 156 const SkPoint vertices[], const SkPoint texs[],
159 const SkColor colors[], SkXfermode* xmode, 157 const SkColor colors[], SkXfermode* xmode,
160 const uint16_t indices[], int indexCount, 158 const uint16_t indices[], int indexCount,
161 const SkPaint& paint) { 159 const SkPaint& paint) {
162 fProxy->drawVertices(vmode, vertexCount, vertices, texs, colors, 160 fProxy->drawVertices(vmode, vertexCount, vertices, texs, colors,
163 xmode, indices, indexCount, paint); 161 xmode, indices, indexCount, paint);
164 } 162 }
165 163
166 void SkProxyCanvas::onDrawPatch(const SkPoint cubics[12], const SkColor colors[4 ], 164 void SkProxyCanvas::onDrawPatch(const SkPoint cubics[12], const SkColor colors[4 ],
167 const SkPoint texCoords[4], SkXfermode* xmode, 165 const SkPoint texCoords[4], SkXfermode* xmode,
168 const SkPaint& paint) { 166 const SkPaint& paint) {
169 fProxy->drawPatch(cubics, colors, texCoords, xmode, paint); 167 fProxy->drawPatch(cubics, colors, texCoords, xmode, paint);
170 } 168 }
171 169
172 void SkProxyCanvas::beginCommentGroup(const char* description) { 170 void SkProxyCanvas::beginCommentGroup(const char* description) {
173 fProxy->beginCommentGroup(description); 171 fProxy->beginCommentGroup(description);
174 } 172 }
175 173
176 void SkProxyCanvas::addComment(const char* kywd, const char* value) { 174 void SkProxyCanvas::addComment(const char* kywd, const char* value) {
177 fProxy->addComment(kywd, value); 175 fProxy->addComment(kywd, value);
178 } 176 }
179 177
180 void SkProxyCanvas::endCommentGroup() { 178 void SkProxyCanvas::endCommentGroup() {
181 fProxy->endCommentGroup(); 179 fProxy->endCommentGroup();
182 } 180 }
183 181
184 SkDrawFilter* SkProxyCanvas::setDrawFilter(SkDrawFilter* filter) { 182 SkDrawFilter* SkProxyCanvas::setDrawFilter(SkDrawFilter* filter) {
185 return fProxy->setDrawFilter(filter); 183 return fProxy->setDrawFilter(filter);
186 } 184 }
OLDNEW
« no previous file with comments | « src/utils/SkNWayCanvas.cpp ('k') | src/utils/debugger/SkDebugCanvas.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698