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

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

Issue 189963004: Fix the rendering error of SkDraw::drawVertices in gpu path for solid color (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: code rebase + update comments according to Brian's suggestions Created 6 years, 6 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/core.gypi ('k') | include/core/SkVertState.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
(...skipping 984 matching lines...) Expand 10 before | Expand all | Expand 10 after
995 */ 995 */
996 virtual void drawPicture(SkPicture& picture); 996 virtual void drawPicture(SkPicture& picture);
997 997
998 enum VertexMode { 998 enum VertexMode {
999 kTriangles_VertexMode, 999 kTriangles_VertexMode,
1000 kTriangleStrip_VertexMode, 1000 kTriangleStrip_VertexMode,
1001 kTriangleFan_VertexMode 1001 kTriangleFan_VertexMode
1002 }; 1002 };
1003 1003
1004 /** Draw the array of vertices, interpreted as triangles (based on mode). 1004 /** Draw the array of vertices, interpreted as triangles (based on mode).
1005
1006 If both textures and vertex-colors are NULL, it strokes hairlines with
1007 the paint's color. This behavior is a useful debugging mode to visualize
1008 the mesh.
1009
1005 @param vmode How to interpret the array of vertices 1010 @param vmode How to interpret the array of vertices
1006 @param vertexCount The number of points in the vertices array (and 1011 @param vertexCount The number of points in the vertices array (and
1007 corresponding texs and colors arrays if non-null) 1012 corresponding texs and colors arrays if non-null)
1008 @param vertices Array of vertices for the mesh 1013 @param vertices Array of vertices for the mesh
1009 @param texs May be null. If not null, specifies the coordinate 1014 @param texs May be null. If not null, specifies the coordinate
1010 in _texture_ space (not uv space) for each vertex. 1015 in _texture_ space (not uv space) for each vertex.
1011 @param colors May be null. If not null, specifies a color for each 1016 @param colors May be null. If not null, specifies a color for each
1012 vertex, to be interpolated across the triangle. 1017 vertex, to be interpolated across the triangle.
1013 @param xmode Used if both texs and colors are present. In this 1018 @param xmode Used if both texs and colors are present. In this
1014 case the colors are combined with the texture using mode, 1019 case the colors are combined with the texture using mode,
(...skipping 486 matching lines...) Expand 10 before | Expand all | Expand 10 after
1501 bool asROBitmap(SkBitmap*) const; 1506 bool asROBitmap(SkBitmap*) const;
1502 1507
1503 private: 1508 private:
1504 SkBitmap fBitmap; // used if peekPixels() fails 1509 SkBitmap fBitmap; // used if peekPixels() fails
1505 const void* fAddr; // NULL on failure 1510 const void* fAddr; // NULL on failure
1506 SkImageInfo fInfo; 1511 SkImageInfo fInfo;
1507 size_t fRowBytes; 1512 size_t fRowBytes;
1508 }; 1513 };
1509 1514
1510 #endif 1515 #endif
OLDNEW
« no previous file with comments | « gyp/core.gypi ('k') | include/core/SkVertState.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698