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

Side by Side Diff: src/gpu/GrPathRendering.h

Issue 578563002: Remove createPath* from GrGpu and GrContext (Closed) Base URL: https://skia.googlesource.com/skia.git@upload_glyphmemorypath
Patch Set: Simple quick change Created 6 years, 3 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/gpu/GrGpu.cpp ('k') | src/gpu/GrStencilAndCoverPathRenderer.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 * Copyright 2014 Google Inc. 2 * Copyright 2014 Google Inc.
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 GrPathRendering_DEFINED 8 #ifndef GrPathRendering_DEFINED
9 #define GrPathRendering_DEFINED 9 #define GrPathRendering_DEFINED
10 10
(...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after
52 return 2; 52 return 2;
53 case kAffine_PathTransformType: 53 case kAffine_PathTransformType:
54 return 6; 54 return 6;
55 55
56 default: 56 default:
57 SkFAIL("Unknown path transform type"); 57 SkFAIL("Unknown path transform type");
58 return 0; 58 return 0;
59 } 59 }
60 } 60 }
61 61
62 /**
63 * Creates a new gpu path, based on the specified path and stroke and return s it.
64 * The caller owns a ref on the returned path which must be balanced by a ca ll to unref.
65 *
66 * @param skPath the path geometry.
67 * @param stroke the path stroke.
68 * @return a new path.
69 */
62 virtual GrPath* createPath(const SkPath&, const SkStrokeRec&) = 0; 70 virtual GrPath* createPath(const SkPath&, const SkStrokeRec&) = 0;
71
72 /**
73 * Creates a range of gpu paths with a common stroke. The caller owns a ref on the
74 * returned path range which must be balanced by a call to unref.
75 *
76 * @param PathGenerator class that generates SkPath objects for each path in the range.
77 * @param SkStrokeRec the common stroke applied to each path in the range.
78 * @return a new path range.
79 */
63 virtual GrPathRange* createPathRange(size_t size, const SkStrokeRec&) = 0; 80 virtual GrPathRange* createPathRange(size_t size, const SkStrokeRec&) = 0;
81
64 virtual void stencilPath(const GrPath*, SkPath::FillType) = 0; 82 virtual void stencilPath(const GrPath*, SkPath::FillType) = 0;
65 virtual void drawPath(const GrPath*, SkPath::FillType) = 0; 83 virtual void drawPath(const GrPath*, SkPath::FillType) = 0;
66 virtual void drawPaths(const GrPathRange*, const uint32_t indices[], int cou nt, 84 virtual void drawPaths(const GrPathRange*, const uint32_t indices[], int cou nt,
67 const float transforms[], PathTransformType, SkPath:: FillType) = 0; 85 const float transforms[], PathTransformType, SkPath:: FillType) = 0;
68 protected: 86 protected:
69 GrPathRendering() { } 87 GrPathRendering() { }
70 88
71 private: 89 private:
72 GrPathRendering& operator=(const GrPathRendering&); 90 GrPathRendering& operator=(const GrPathRendering&);
73 }; 91 };
74 92
75 #endif 93 #endif
OLDNEW
« no previous file with comments | « src/gpu/GrGpu.cpp ('k') | src/gpu/GrStencilAndCoverPathRenderer.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698