OLD | NEW |
1 /* | 1 /* |
2 * Copyright 2015 Google Inc. | 2 * Copyright 2015 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 GrResourceProvider_DEFINED | 8 #ifndef GrResourceProvider_DEFINED |
9 #define GrResourceProvider_DEFINED | 9 #define GrResourceProvider_DEFINED |
10 | 10 |
(...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 /** | 83 /** |
84 * Factories for GrPath and GrPathRange objects. It's an error to call these
if path rendering | 84 * Factories for GrPath and GrPathRange objects. It's an error to call these
if path rendering |
85 * is not supported. | 85 * is not supported. |
86 */ | 86 */ |
87 GrPath* createPath(const SkPath&, const GrStrokeInfo&); | 87 GrPath* createPath(const SkPath&, const GrStrokeInfo&); |
88 GrPathRange* createPathRange(GrPathRange::PathGenerator*, const GrStrokeInfo
&); | 88 GrPathRange* createPathRange(GrPathRange::PathGenerator*, const GrStrokeInfo
&); |
89 GrPathRange* createGlyphs(const SkTypeface*, const SkDescriptor*, const GrSt
rokeInfo&); | 89 GrPathRange* createGlyphs(const SkTypeface*, const SkDescriptor*, const GrSt
rokeInfo&); |
90 | 90 |
91 using GrTextureProvider::assignUniqueKeyToResource; | 91 using GrTextureProvider::assignUniqueKeyToResource; |
92 using GrTextureProvider::findAndRefResourceByUniqueKey; | 92 using GrTextureProvider::findAndRefResourceByUniqueKey; |
| 93 using GrTextureProvider::findAndRefTextureByUniqueKey; |
93 using GrTextureProvider::abandon; | 94 using GrTextureProvider::abandon; |
94 | 95 |
95 enum Flags { | 96 enum Flags { |
96 /** If the caller intends to do direct reads/writes to/from the CPU then
this flag must be | 97 /** If the caller intends to do direct reads/writes to/from the CPU then
this flag must be |
97 * set when accessing resources during a GrDrawTarget flush. This inclu
des the execution of | 98 * set when accessing resources during a GrDrawTarget flush. This inclu
des the execution of |
98 * GrBatch objects. The reason is that these memory operations are done
immediately and | 99 * GrBatch objects. The reason is that these memory operations are done
immediately and |
99 * will occur out of order WRT the operations being flushed. | 100 * will occur out of order WRT the operations being flushed. |
100 * Make this automatic: http://skbug.com/4156 | 101 * Make this automatic: http://skbug.com/4156 |
101 */ | 102 */ |
102 kNoPendingIO_Flag = kNoPendingIO_ScratchTextureFlag, | 103 kNoPendingIO_Flag = kNoPendingIO_ScratchTextureFlag, |
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
135 */ | 136 */ |
136 GrBatchAtlas* createAtlas(GrPixelConfig, int width, int height, int numPlots
X, int numPlotsY, | 137 GrBatchAtlas* createAtlas(GrPixelConfig, int width, int height, int numPlots
X, int numPlotsY, |
137 GrBatchAtlas::EvictionFunc func, void* data); | 138 GrBatchAtlas::EvictionFunc func, void* data); |
138 | 139 |
139 /** | 140 /** |
140 * If passed in render target already has a stencil buffer, return it. Other
wise attempt to | 141 * If passed in render target already has a stencil buffer, return it. Other
wise attempt to |
141 * attach one. | 142 * attach one. |
142 */ | 143 */ |
143 GrStencilAttachment* attachStencilAttachment(GrRenderTarget* rt); | 144 GrStencilAttachment* attachStencilAttachment(GrRenderTarget* rt); |
144 | 145 |
| 146 const GrCaps* caps() { return this->gpu()->caps(); } |
| 147 |
145 private: | 148 private: |
146 const GrIndexBuffer* createInstancedIndexBuffer(const uint16_t* pattern, | 149 const GrIndexBuffer* createInstancedIndexBuffer(const uint16_t* pattern, |
147 int patternSize, | 150 int patternSize, |
148 int reps, | 151 int reps, |
149 int vertCount, | 152 int vertCount, |
150 const GrUniqueKey& key); | 153 const GrUniqueKey& key); |
151 | 154 |
152 const GrIndexBuffer* createQuadIndexBuffer(); | 155 const GrIndexBuffer* createQuadIndexBuffer(); |
153 | 156 |
154 GrUniqueKey fQuadIndexBufferKey; | 157 GrUniqueKey fQuadIndexBufferKey; |
155 | 158 |
156 typedef GrTextureProvider INHERITED; | 159 typedef GrTextureProvider INHERITED; |
157 }; | 160 }; |
158 | 161 |
159 #endif | 162 #endif |
OLD | NEW |