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

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

Issue 463493002: SkCanvas::drawPatch param SkPoint[12] (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Removed GPU headers from GM 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 | « src/pipe/SkGPipeWrite.cpp ('k') | src/utils/SkDumpCanvas.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 /* 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 206 matching lines...) Expand 10 before | Expand all | Expand 10 after
217 size_t len, const SkPath& path, 217 size_t len, const SkPath& path,
218 const SkMatrix* matrix, 218 const SkMatrix* matrix,
219 const SkPaint& paint) SK_OVERRIDE 219 const SkPaint& paint) SK_OVERRIDE
220 {SkASSERT(0);} 220 {SkASSERT(0);}
221 virtual void drawVertices(const SkDraw&, SkCanvas::VertexMode, 221 virtual void drawVertices(const SkDraw&, SkCanvas::VertexMode,
222 int vertexCount, const SkPoint verts[], 222 int vertexCount, const SkPoint verts[],
223 const SkPoint texs[], const SkColor colors[], 223 const SkPoint texs[], const SkColor colors[],
224 SkXfermode* xmode, const uint16_t indices[], 224 SkXfermode* xmode, const uint16_t indices[],
225 int indexCount, const SkPaint& paint) SK_OVERRID E 225 int indexCount, const SkPaint& paint) SK_OVERRID E
226 {SkASSERT(0);} 226 {SkASSERT(0);}
227 virtual void drawPatch(const SkDraw&, const SkPatch& patch, const SkPaint& p aint) SK_OVERRIDE 227 virtual void drawPatch(const SkDraw&, const SkPoint cubics[12], const SkColo r colors[4],
228 const SkPoint texCoords[4], SkXfermode* xmode,
229 const SkPaint& paint) SK_OVERRIDE
228 {SkASSERT(0);} 230 {SkASSERT(0);}
229 virtual void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y, 231 virtual void drawDevice(const SkDraw&, SkBaseDevice*, int x, int y,
230 const SkPaint&) SK_OVERRIDE 232 const SkPaint&) SK_OVERRIDE
231 {SkASSERT(0);} 233 {SkASSERT(0);}
232 234
233 virtual void lockPixels() SK_OVERRIDE {} 235 virtual void lockPixels() SK_OVERRIDE {}
234 virtual void unlockPixels() SK_OVERRIDE {} 236 virtual void unlockPixels() SK_OVERRIDE {}
235 237
236 virtual bool allowImageFilter(const SkImageFilter*) SK_OVERRIDE { 238 virtual bool allowImageFilter(const SkImageFilter*) SK_OVERRIDE {
237 return false; 239 return false;
(...skipping 672 matching lines...) Expand 10 before | Expand all | Expand 10 after
910 const SkPoint texs[], 912 const SkPoint texs[],
911 const SkColor colors[], SkXfermode* xmode, 913 const SkColor colors[], SkXfermode* xmode,
912 const uint16_t indices[], int indexCount, 914 const uint16_t indices[], int indexCount,
913 const SkPaint& paint) { 915 const SkPaint& paint) {
914 AutoImmediateDrawIfNeeded autoDraw(*this, &paint); 916 AutoImmediateDrawIfNeeded autoDraw(*this, &paint);
915 this->drawingCanvas()->drawVertices(vmode, vertexCount, vertices, texs, colo rs, xmode, 917 this->drawingCanvas()->drawVertices(vmode, vertexCount, vertices, texs, colo rs, xmode,
916 indices, indexCount, paint); 918 indices, indexCount, paint);
917 this->recordedDrawCommand(); 919 this->recordedDrawCommand();
918 } 920 }
919 921
920 void SkDeferredCanvas::drawPatch(const SkPatch& patch, const SkPaint& paint) { 922 void SkDeferredCanvas::onDrawPatch(const SkPoint cubics[12], const SkColor color s[4],
923 const SkPoint texCoords[4], SkXfermode* xmode ,
924 const SkPaint& paint) {
921 AutoImmediateDrawIfNeeded autoDraw(*this, &paint); 925 AutoImmediateDrawIfNeeded autoDraw(*this, &paint);
922 this->drawingCanvas()->drawPatch(patch, paint); 926 this->drawingCanvas()->drawPatch(cubics, colors, texCoords, xmode, paint);
923 this->recordedDrawCommand(); 927 this->recordedDrawCommand();
924 } 928 }
925 929
926 SkDrawFilter* SkDeferredCanvas::setDrawFilter(SkDrawFilter* filter) { 930 SkDrawFilter* SkDeferredCanvas::setDrawFilter(SkDrawFilter* filter) {
927 this->drawingCanvas()->setDrawFilter(filter); 931 this->drawingCanvas()->setDrawFilter(filter);
928 this->INHERITED::setDrawFilter(filter); 932 this->INHERITED::setDrawFilter(filter);
929 this->recordedDrawCommand(); 933 this->recordedDrawCommand();
930 return filter; 934 return filter;
931 } 935 }
932 936
933 SkCanvas* SkDeferredCanvas::canvasForDrawIter() { 937 SkCanvas* SkDeferredCanvas::canvasForDrawIter() {
934 return this->drawingCanvas(); 938 return this->drawingCanvas();
935 } 939 }
OLDNEW
« no previous file with comments | « src/pipe/SkGPipeWrite.cpp ('k') | src/utils/SkDumpCanvas.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698