OLD | NEW |
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 GrGLPathRendering_DEFINED | 8 #ifndef GrGLPathRendering_DEFINED |
9 #define GrGLPathRendering_DEFINED | 9 #define GrGLPathRendering_DEFINED |
10 | 10 |
11 #include "SkRefCnt.h" | 11 #include "SkRefCnt.h" |
12 #include "GrPathRendering.h" | 12 #include "GrPathRendering.h" |
13 #include "GrStencil.h" | 13 #include "GrStencil.h" |
14 #include "gl/GrGLTypes.h" | 14 #include "gl/GrGLTypes.h" |
15 #include "glsl/GrGLSLUtil.h" | 15 #include "glsl/GrGLSLUtil.h" |
16 | 16 |
17 class GrGLNameAllocator; | 17 class GrGLNameAllocator; |
18 class GrGLGpu; | 18 class GrGLGpu; |
19 class GrStyle; | |
20 | 19 |
21 /** | 20 /** |
22 * This class wraps the NV_path_rendering extension and manages its various | 21 * This class wraps the NV_path_rendering extension and manages its various |
23 * API versions. If a method is not present in the GrGLInterface of the GrGLGpu | 22 * API versions. If a method is not present in the GrGLInterface of the GrGLGpu |
24 * (because the driver version is old), it tries to provide a backup | 23 * (because the driver version is old), it tries to provide a backup |
25 * implementation. But if a backup implementation is not practical, it marks the | 24 * implementation. But if a backup implementation is not practical, it marks the |
26 * method as not supported. | 25 * method as not supported. |
27 */ | 26 */ |
28 class GrGLPathRendering : public GrPathRendering { | 27 class GrGLPathRendering : public GrPathRendering { |
29 public: | 28 public: |
30 /** | 29 /** |
31 * Create a new GrGLPathRendering object from a given GrGLGpu. | 30 * Create a new GrGLPathRendering object from a given GrGLGpu. |
32 */ | 31 */ |
33 GrGLPathRendering(GrGLGpu* gpu); | 32 GrGLPathRendering(GrGLGpu* gpu); |
34 virtual ~GrGLPathRendering(); | 33 virtual ~GrGLPathRendering(); |
35 | 34 |
36 // GrPathRendering implementations. | 35 // GrPathRendering implementations. |
37 GrPath* createPath(const SkPath&, const GrStyle&) override; | 36 GrPath* createPath(const SkPath&, const GrStrokeInfo&) override; |
38 virtual GrPathRange* createPathRange(GrPathRange::PathGenerator*, | 37 virtual GrPathRange* createPathRange(GrPathRange::PathGenerator*, |
39 const GrStyle&) override; | 38 const GrStrokeInfo&) override; |
40 | 39 |
41 /* Called when the 3D context state is unknown. */ | 40 /* Called when the 3D context state is unknown. */ |
42 void resetContext(); | 41 void resetContext(); |
43 | 42 |
44 /** | 43 /** |
45 * Called when the context either is about to be lost or is lost. Disconnect
Type indicates | 44 * Called when the context either is about to be lost or is lost. Disconnect
Type indicates |
46 * whether GPU resources should be cleaned up or abandoned when this is call
ed. | 45 * whether GPU resources should be cleaned up or abandoned when this is call
ed. |
47 */ | 46 */ |
48 void disconnect(GrGpu::DisconnectType); | 47 void disconnect(GrGpu::DisconnectType); |
49 | 48 |
(...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
123 GrGLGpu* gpu(); | 122 GrGLGpu* gpu(); |
124 | 123 |
125 GrGLuint fFirstPreallocatedPathID; | 124 GrGLuint fFirstPreallocatedPathID; |
126 GrGLsizei fPreallocatedPathCount; | 125 GrGLsizei fPreallocatedPathCount; |
127 MatrixState fHWProjectionMatrixState; | 126 MatrixState fHWProjectionMatrixState; |
128 GrStencilSettings fHWPathStencilSettings; | 127 GrStencilSettings fHWPathStencilSettings; |
129 Caps fCaps; | 128 Caps fCaps; |
130 }; | 129 }; |
131 | 130 |
132 #endif | 131 #endif |
OLD | NEW |