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

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

Issue 1908433002: Batch multiple single NVPR draw paths to instanced draws Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 8 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 | « no previous file | src/gpu/GrPathRendering.h » ('j') | src/gpu/gl/GrGLPathRendering.cpp » ('J')
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 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 GrPath_DEFINED 8 #ifndef GrPath_DEFINED
9 #define GrPath_DEFINED 9 #define GrPath_DEFINED
10 10
(...skipping 18 matching lines...) Expand all
29 #endif 29 #endif
30 { 30 {
31 } 31 }
32 32
33 static void ComputeKey(const SkPath& path, const GrStrokeInfo& stroke, GrUni queKey* key, 33 static void ComputeKey(const SkPath& path, const GrStrokeInfo& stroke, GrUni queKey* key,
34 bool* outIsVolatile); 34 bool* outIsVolatile);
35 35
36 const SkRect& getBounds() const { return fBounds; } 36 const SkRect& getBounds() const { return fBounds; }
37 37
38 GrPathRendering::FillType getFillType() const { return fFillType; } 38 GrPathRendering::FillType getFillType() const { return fFillType; }
39
40 /** Returns true if a path can be drawn in the same draw paths operation as the other
bsalomon 2016/04/22 13:20:38 We we usually write this style of comments as /**
Kimmo Kinnunen 2016/04/25 08:36:00 Done.
41 * path. Should return true only when the condition holds transitively with all other paths in
42 * the same group.
43 * E.g.
44 * canCombineDrawPathBatchWith(a) AND canCombineDrawPathBatchWith(b)
45 * canCombineDrawPathBatchWith(a) AND canCombineDrawPathBatchWith(c)
46 * implies
47 * canCombineDrawPathBatchWith(b) AND canCombineDrawPathBatchWith(c)
48 */
49 virtual bool canCombineDrawPathBatchWith(const GrPath& other) const = 0;
39 #ifdef SK_DEBUG 50 #ifdef SK_DEBUG
40 bool isEqualTo(const SkPath& path, const GrStrokeInfo& stroke) const; 51 bool isEqualTo(const SkPath& path, const GrStrokeInfo& stroke) const;
41 #endif 52 #endif
42 53
43 protected: 54 protected:
44 // Subclass should init these. 55 // Subclass should init these.
45 SkRect fBounds; 56 SkRect fBounds;
46 GrPathRendering::FillType fFillType; 57 GrPathRendering::FillType fFillType;
47 #ifdef SK_DEBUG 58 #ifdef SK_DEBUG
48 SkPath fSkPath; 59 SkPath fSkPath;
49 GrStrokeInfo fStroke; 60 GrStrokeInfo fStroke;
50 #endif 61 #endif
51 62
52 private: 63 private:
53 typedef GrGpuResource INHERITED; 64 typedef GrGpuResource INHERITED;
54 }; 65 };
55 66
56 #endif 67 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrPathRendering.h » ('j') | src/gpu/gl/GrGLPathRendering.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698