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

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

Issue 424663006: SkCanvas interface for drawing a patch. (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Fixed implicit casting in patch.cpp 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 | « gyp/utils.gypi ('k') | include/core/SkDevice.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 * 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
11 #include "SkTypes.h" 11 #include "SkTypes.h"
12 #include "SkBitmap.h" 12 #include "SkBitmap.h"
13 #include "SkDeque.h" 13 #include "SkDeque.h"
14 #include "SkClipStack.h" 14 #include "SkClipStack.h"
15 #include "SkPaint.h" 15 #include "SkPaint.h"
16 #include "SkRefCnt.h" 16 #include "SkRefCnt.h"
17 #include "SkPatch.h"
17 #include "SkPath.h" 18 #include "SkPath.h"
18 #include "SkRegion.h" 19 #include "SkRegion.h"
19 #include "SkXfermode.h" 20 #include "SkXfermode.h"
20 21
21 #ifdef SK_SUPPORT_LEGACY_DRAWTEXT_VIRTUAL 22 #ifdef SK_SUPPORT_LEGACY_DRAWTEXT_VIRTUAL
22 #define SK_LEGACY_DRAWTEXT_VIRTUAL virtual 23 #define SK_LEGACY_DRAWTEXT_VIRTUAL virtual
23 #else 24 #else
24 #define SK_LEGACY_DRAWTEXT_VIRTUAL 25 #define SK_LEGACY_DRAWTEXT_VIRTUAL
25 #endif 26 #endif
26 27
(...skipping 972 matching lines...) Expand 10 before | Expand all | Expand 10 after
999 @param indices If not null, array of indices to reference into the 1000 @param indices If not null, array of indices to reference into the
1000 vertex (texs, colors) array. 1001 vertex (texs, colors) array.
1001 @param indexCount number of entries in the indices array (if not null) 1002 @param indexCount number of entries in the indices array (if not null)
1002 @param paint Specifies the shader/texture if present. 1003 @param paint Specifies the shader/texture if present.
1003 */ 1004 */
1004 virtual void drawVertices(VertexMode vmode, int vertexCount, 1005 virtual void drawVertices(VertexMode vmode, int vertexCount,
1005 const SkPoint vertices[], const SkPoint texs[], 1006 const SkPoint vertices[], const SkPoint texs[],
1006 const SkColor colors[], SkXfermode* xmode, 1007 const SkColor colors[], SkXfermode* xmode,
1007 const uint16_t indices[], int indexCount, 1008 const uint16_t indices[], int indexCount,
1008 const SkPaint& paint); 1009 const SkPaint& paint);
1010
1011 virtual void drawPatch(const SkPatch& patch, const SkPaint& paint);
1009 1012
1010 /** Send a blob of data to the canvas. 1013 /** Send a blob of data to the canvas.
1011 For canvases that draw, this call is effectively a no-op, as the data 1014 For canvases that draw, this call is effectively a no-op, as the data
1012 is not parsed, but just ignored. However, this call exists for 1015 is not parsed, but just ignored. However, this call exists for
1013 subclasses like SkPicture's recording canvas, that can store the data 1016 subclasses like SkPicture's recording canvas, that can store the data
1014 and then play it back later (via another call to drawData). 1017 and then play it back later (via another call to drawData).
1015 */ 1018 */
1016 virtual void drawData(const void* data, size_t length) { 1019 virtual void drawData(const void* data, size_t length) {
1017 // do nothing. Subclasses may do something with the data 1020 // do nothing. Subclasses may do something with the data
1018 } 1021 }
(...skipping 453 matching lines...) Expand 10 before | Expand all | Expand 10 after
1472 1475
1473 class SkCanvasClipVisitor { 1476 class SkCanvasClipVisitor {
1474 public: 1477 public:
1475 virtual ~SkCanvasClipVisitor(); 1478 virtual ~SkCanvasClipVisitor();
1476 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0; 1479 virtual void clipRect(const SkRect&, SkRegion::Op, bool antialias) = 0;
1477 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0; 1480 virtual void clipRRect(const SkRRect&, SkRegion::Op, bool antialias) = 0;
1478 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0; 1481 virtual void clipPath(const SkPath&, SkRegion::Op, bool antialias) = 0;
1479 }; 1482 };
1480 1483
1481 #endif 1484 #endif
OLDNEW
« no previous file with comments | « gyp/utils.gypi ('k') | include/core/SkDevice.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698