| OLD | NEW |
| 1 /* | 1 /* |
| 2 * Copyright 2011 Google Inc. | 2 * Copyright 2011 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 GrGpu_DEFINED | 8 #ifndef GrGpu_DEFINED |
| 9 #define GrGpu_DEFINED | 9 #define GrGpu_DEFINED |
| 10 | 10 |
| (...skipping 15 matching lines...) Expand all Loading... |
| 26 class GrMesh; | 26 class GrMesh; |
| 27 class GrNonInstancedVertices; | 27 class GrNonInstancedVertices; |
| 28 class GrPath; | 28 class GrPath; |
| 29 class GrPathRange; | 29 class GrPathRange; |
| 30 class GrPathRenderer; | 30 class GrPathRenderer; |
| 31 class GrPathRendererChain; | 31 class GrPathRendererChain; |
| 32 class GrPathRendering; | 32 class GrPathRendering; |
| 33 class GrPipeline; | 33 class GrPipeline; |
| 34 class GrPrimitiveProcessor; | 34 class GrPrimitiveProcessor; |
| 35 class GrRenderTarget; | 35 class GrRenderTarget; |
| 36 class GrInstancedRendering; |
| 36 class GrStencilAttachment; | 37 class GrStencilAttachment; |
| 37 class GrSurface; | 38 class GrSurface; |
| 38 class GrTexture; | 39 class GrTexture; |
| 39 | 40 |
| 40 class GrGpu : public SkRefCnt { | 41 class GrGpu : public SkRefCnt { |
| 41 public: | 42 public: |
| 42 /** | 43 /** |
| 43 * Create an instance of GrGpu that matches the specified backend. If the re
quested backend is | 44 * Create an instance of GrGpu that matches the specified backend. If the re
quested backend is |
| 44 * not supported (at compile-time or run-time) this returns nullptr. The con
text will not be | 45 * not supported (at compile-time or run-time) this returns nullptr. The con
text will not be |
| 45 * fully constructed and should not be used by GrGpu until after this functi
on returns. | 46 * fully constructed and should not be used by GrGpu until after this functi
on returns. |
| (...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 139 * @param intendedType hint to the graphics subsystem about what the buff
er will be used for. | 140 * @param intendedType hint to the graphics subsystem about what the buff
er will be used for. |
| 140 * @param accessPattern hint to the graphics subsystem about how the data
will be accessed. | 141 * @param accessPattern hint to the graphics subsystem about how the data
will be accessed. |
| 141 * @param data optional data with which to initialize the buffer. | 142 * @param data optional data with which to initialize the buffer. |
| 142 * | 143 * |
| 143 * @return the buffer if successful, otherwise nullptr. | 144 * @return the buffer if successful, otherwise nullptr. |
| 144 */ | 145 */ |
| 145 GrBuffer* createBuffer(size_t size, GrBufferType intendedType, GrAccessPatte
rn accessPattern, | 146 GrBuffer* createBuffer(size_t size, GrBufferType intendedType, GrAccessPatte
rn accessPattern, |
| 146 const void* data = nullptr); | 147 const void* data = nullptr); |
| 147 | 148 |
| 148 /** | 149 /** |
| 150 * Creates an instanced rendering object if it is supported on this platform
. |
| 151 */ |
| 152 virtual GrInstancedRendering* createInstancedRenderingIfSupported() { return
nullptr; } |
| 153 |
| 154 /** |
| 149 * Resolves MSAA. | 155 * Resolves MSAA. |
| 150 */ | 156 */ |
| 151 void resolveRenderTarget(GrRenderTarget* target); | 157 void resolveRenderTarget(GrRenderTarget* target); |
| 152 | 158 |
| 153 /** Info struct returned by getReadPixelsInfo about performing intermediate
draws before | 159 /** Info struct returned by getReadPixelsInfo about performing intermediate
draws before |
| 154 reading pixels for performance or correctness. */ | 160 reading pixels for performance or correctness. */ |
| 155 struct ReadPixelTempDrawInfo { | 161 struct ReadPixelTempDrawInfo { |
| 156 /** If the GrGpu is requesting that the caller do a draw to an intermedi
ate surface then | 162 /** If the GrGpu is requesting that the caller do a draw to an intermedi
ate surface then |
| 157 this is descriptor for the temp surface. The draw should always be a
rect with | 163 this is descriptor for the temp surface. The draw should always be a
rect with |
| 158 dst 0,0,w,h. */ | 164 dst 0,0,w,h. */ |
| (...skipping 452 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 611 SkTArray<const MultisampleSpecs*, true> fMultisa
mpleSpecsMap; | 617 SkTArray<const MultisampleSpecs*, true> fMultisa
mpleSpecsMap; |
| 612 GrTAllocator<MultisampleSpecs> fMultisa
mpleSpecsAllocator; | 618 GrTAllocator<MultisampleSpecs> fMultisa
mpleSpecsAllocator; |
| 613 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. | 619 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. |
| 614 GrContext* fContext
; | 620 GrContext* fContext
; |
| 615 | 621 |
| 616 friend class GrPathRendering; | 622 friend class GrPathRendering; |
| 617 typedef SkRefCnt INHERITED; | 623 typedef SkRefCnt INHERITED; |
| 618 }; | 624 }; |
| 619 | 625 |
| 620 #endif | 626 #endif |
| OLD | NEW |