OLD | NEW |
---|---|
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2013 Google Inc. | 3 * Copyright 2013 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 | 8 |
9 #include "SkDeferredCanvas.h" | 9 #include "SkDeferredCanvas.h" |
10 | 10 |
(...skipping 191 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
202 virtual void drawSprite(const SkDraw&, const SkBitmap& bitmap, | 202 virtual void drawSprite(const SkDraw&, const SkBitmap& bitmap, |
203 int x, int y, const SkPaint& paint) SK_OVERRIDE | 203 int x, int y, const SkPaint& paint) SK_OVERRIDE |
204 {SkASSERT(0);} | 204 {SkASSERT(0);} |
205 virtual void drawText(const SkDraw&, const void* text, size_t len, | 205 virtual void drawText(const SkDraw&, const void* text, size_t len, |
206 SkScalar x, SkScalar y, const SkPaint& paint) SK_OVE RRIDE | 206 SkScalar x, SkScalar y, const SkPaint& paint) SK_OVE RRIDE |
207 {SkASSERT(0);} | 207 {SkASSERT(0);} |
208 virtual void drawPosText(const SkDraw&, const void* text, size_t len, | 208 virtual void drawPosText(const SkDraw&, const void* text, size_t len, |
209 const SkScalar pos[], int scalarsPerPos, | 209 const SkScalar pos[], int scalarsPerPos, |
210 const SkPoint& offset, const SkPaint& paint) SK_OVE RRIDE | 210 const SkPoint& offset, const SkPaint& paint) SK_OVE RRIDE |
211 {SkASSERT(0);} | 211 {SkASSERT(0);} |
212 virtual void drawTextOnPath(const SkDraw&, const void* text, | 212 virtual void drawTextOnPath(const SkDraw&, const void* text, size_t len, con st SkPath& path, |
213 size_t len, const SkPath& path, | 213 const SkMatrix* matrix, SK_SUPPORT_LEGACY_DRAWTE XTONPATH_PARAM |
214 const SkMatrix* matrix, | |
215 const SkPaint& paint) SK_OVERRIDE | 214 const SkPaint& paint) SK_OVERRIDE |
216 {SkASSERT(0);} | 215 {SkASSERT(0);} |
217 virtual void drawVertices(const SkDraw&, SkCanvas::VertexMode, | 216 virtual void drawVertices(const SkDraw&, SkCanvas::VertexMode, |
218 int vertexCount, const SkPoint verts[], | 217 int vertexCount, const SkPoint verts[], |
219 const SkPoint texs[], const SkColor colors[], | 218 const SkPoint texs[], const SkColor colors[], |
220 SkXfermode* xmode, const uint16_t indices[], | 219 SkXfermode* xmode, const uint16_t indices[], |
221 int indexCount, const SkPaint& paint) SK_OVERRID E | 220 int indexCount, const SkPaint& paint) SK_OVERRID E |
222 {SkASSERT(0);} | 221 {SkASSERT(0);} |
223 virtual void drawPatch(const SkDraw&, const SkPoint cubics[12], const SkColo r colors[4], | 222 virtual void drawPatch(const SkDraw&, const SkPoint cubics[12], const SkColo r colors[4], |
224 const SkPoint texCoords[4], SkXfermode* xmode, | 223 const SkPoint texCoords[4], SkXfermode* xmode, |
(...skipping 660 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
885 } | 884 } |
886 | 885 |
887 void SkDeferredCanvas::onDrawPosTextH(const void* text, size_t byteLength, const SkScalar xpos[], | 886 void SkDeferredCanvas::onDrawPosTextH(const void* text, size_t byteLength, const SkScalar xpos[], |
888 SkScalar constY, const SkPaint& paint) { | 887 SkScalar constY, const SkPaint& paint) { |
889 AutoImmediateDrawIfNeeded autoDraw(*this, &paint); | 888 AutoImmediateDrawIfNeeded autoDraw(*this, &paint); |
890 this->drawingCanvas()->drawPosTextH(text, byteLength, xpos, constY, paint); | 889 this->drawingCanvas()->drawPosTextH(text, byteLength, xpos, constY, paint); |
891 this->recordedDrawCommand(); | 890 this->recordedDrawCommand(); |
892 } | 891 } |
893 | 892 |
894 void SkDeferredCanvas::onDrawTextOnPath(const void* text, size_t byteLength, con st SkPath& path, | 893 void SkDeferredCanvas::onDrawTextOnPath(const void* text, size_t byteLength, con st SkPath& path, |
895 const SkMatrix* matrix, const SkPaint& p aint) { | 894 const SkMatrix* matrix, |
895 SK_SUPPORT_LEGACY_DRAWTEXTONPATH_PARAM con st SkPaint& paint) { | |
f(malita)
2015/02/16 15:31:50
indentation
| |
896 AutoImmediateDrawIfNeeded autoDraw(*this, &paint); | 896 AutoImmediateDrawIfNeeded autoDraw(*this, &paint); |
897 this->drawingCanvas()->drawTextOnPath(text, byteLength, path, matrix, paint) ; | 897 this->drawingCanvas()->drawTextOnPath(text, byteLength, path, matrix, |
898 SK_SUPPORT_LEGACY_DRAWTEXTONPATH_ARG p aint); | |
898 this->recordedDrawCommand(); | 899 this->recordedDrawCommand(); |
899 } | 900 } |
900 | 901 |
901 void SkDeferredCanvas::onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScal ar y, | 902 void SkDeferredCanvas::onDrawTextBlob(const SkTextBlob* blob, SkScalar x, SkScal ar y, |
902 const SkPaint& paint) { | 903 const SkPaint& paint) { |
903 AutoImmediateDrawIfNeeded autoDraw(*this, &paint); | 904 AutoImmediateDrawIfNeeded autoDraw(*this, &paint); |
904 this->drawingCanvas()->drawTextBlob(blob, x, y, paint); | 905 this->drawingCanvas()->drawTextBlob(blob, x, y, paint); |
905 this->recordedDrawCommand(); | 906 this->recordedDrawCommand(); |
906 } | 907 } |
907 | 908 |
(...skipping 26 matching lines...) Expand all Loading... | |
934 SkDrawFilter* SkDeferredCanvas::setDrawFilter(SkDrawFilter* filter) { | 935 SkDrawFilter* SkDeferredCanvas::setDrawFilter(SkDrawFilter* filter) { |
935 this->drawingCanvas()->setDrawFilter(filter); | 936 this->drawingCanvas()->setDrawFilter(filter); |
936 this->INHERITED::setDrawFilter(filter); | 937 this->INHERITED::setDrawFilter(filter); |
937 this->recordedDrawCommand(); | 938 this->recordedDrawCommand(); |
938 return filter; | 939 return filter; |
939 } | 940 } |
940 | 941 |
941 SkCanvas* SkDeferredCanvas::canvasForDrawIter() { | 942 SkCanvas* SkDeferredCanvas::canvasForDrawIter() { |
942 return this->drawingCanvas(); | 943 return this->drawingCanvas(); |
943 } | 944 } |
OLD | NEW |