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

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

Issue 2342873002: Fix key computation for GrPaths (Closed)
Patch Set: more MSVS warnings Created 4 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 | « no previous file | src/gpu/GrPath.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 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
11 #include "GrGpuResource.h" 11 #include "GrGpuResource.h"
12 #include "GrPathRendering.h" 12 #include "GrPathRendering.h"
13 #include "GrStyle.h" 13 #include "GrStyle.h"
14 #include "SkPath.h" 14 #include "SkPath.h"
15 #include "SkRect.h" 15 #include "SkRect.h"
16 16
17 class GrShape;
18
17 class GrPath : public GrGpuResource { 19 class GrPath : public GrGpuResource {
18 public: 20 public:
19 /** 21 /**
20 * Initialize to a path with a fixed stroke. Stroke must not be hairline. 22 * Initialize to a path with a fixed stroke. Stroke must not be hairline.
21 */ 23 */
22 GrPath(GrGpu* gpu, const SkPath& skPath, const GrStyle& style) 24 GrPath(GrGpu* gpu, const SkPath& skPath, const GrStyle& style)
23 : INHERITED(gpu) 25 : INHERITED(gpu)
24 , fBounds(SkRect::MakeEmpty()) 26 , fBounds(SkRect::MakeEmpty())
25 , fFillType(GrPathRendering::kWinding_FillType) 27 , fFillType(GrPathRendering::kWinding_FillType)
26 #ifdef SK_DEBUG 28 #ifdef SK_DEBUG
27 , fSkPath(skPath) 29 , fSkPath(skPath)
28 , fStyle(style) 30 , fStyle(style)
29 #endif 31 #endif
30 { 32 {
31 } 33 }
32 34
33 static void ComputeKey(const SkPath& path, const GrStyle& style, GrUniqueKey * key, 35 static void ComputeKey(const GrShape&, GrUniqueKey* key, bool* outIsVolatile );
34 bool* outIsVolatile);
35 36
36 const SkRect& getBounds() const { return fBounds; } 37 const SkRect& getBounds() const { return fBounds; }
37 38
38 GrPathRendering::FillType getFillType() const { return fFillType; } 39 GrPathRendering::FillType getFillType() const { return fFillType; }
39 #ifdef SK_DEBUG 40 #ifdef SK_DEBUG
40 bool isEqualTo(const SkPath& path, const GrStyle& style) const; 41 bool isEqualTo(const SkPath& path, const GrStyle& style) const;
41 #endif 42 #endif
42 43
43 protected: 44 protected:
44 // Subclass should init these. 45 // Subclass should init these.
45 SkRect fBounds; 46 SkRect fBounds;
46 GrPathRendering::FillType fFillType; 47 GrPathRendering::FillType fFillType;
47 #ifdef SK_DEBUG 48 #ifdef SK_DEBUG
48 SkPath fSkPath; 49 SkPath fSkPath;
49 GrStyle fStyle; 50 GrStyle fStyle;
50 #endif 51 #endif
51 52
52 private: 53 private:
53 typedef GrGpuResource INHERITED; 54 typedef GrGpuResource INHERITED;
54 }; 55 };
55 56
56 #endif 57 #endif
OLDNEW
« no previous file with comments | « no previous file | src/gpu/GrPath.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698