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 362 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
373 SkAutoTDeleteArray<const SkPoint> fSampleLocations; | 373 SkAutoTDeleteArray<const SkPoint> fSampleLocations; |
374 }; | 374 }; |
375 | 375 |
376 // Finds a render target's multisample specs. The stencil settings are only
needed to flush the | 376 // Finds a render target's multisample specs. The stencil settings are only
needed to flush the |
377 // draw state prior to querying multisample information; they should not hav
e any effect on the | 377 // draw state prior to querying multisample information; they should not hav
e any effect on the |
378 // multisample information itself. | 378 // multisample information itself. |
379 const MultisampleSpecs& getMultisampleSpecs(GrRenderTarget*, const GrStencil
Settings&); | 379 const MultisampleSpecs& getMultisampleSpecs(GrRenderTarget*, const GrStencil
Settings&); |
380 | 380 |
381 // We pass in an array of meshCount GrMesh to the draw. The backend should l
oop over each | 381 // We pass in an array of meshCount GrMesh to the draw. The backend should l
oop over each |
382 // GrMesh object and emit a draw for it. Each draw will use the same GrPipel
ine and | 382 // GrMesh object and emit a draw for it. Each draw will use the same GrPipel
ine and |
383 // GrPrimitiveProcessor. | 383 // GrPrimitiveProcessor. This may fail if the draw would exceed any resource
limits (e.g. |
384 void draw(const GrPipeline&, | 384 // number of vertex attributes is too large). |
| 385 bool draw(const GrPipeline&, |
385 const GrPrimitiveProcessor&, | 386 const GrPrimitiveProcessor&, |
386 const GrMesh*, | 387 const GrMesh*, |
387 int meshCount); | 388 int meshCount); |
388 | 389 |
389 // Called by drawtarget when flushing. | 390 // Called by drawtarget when flushing. |
390 // Provides a hook for post-flush actions (e.g. PLS reset and Vulkan command
buffer submits). | 391 // Provides a hook for post-flush actions (e.g. PLS reset and Vulkan command
buffer submits). |
391 virtual void finishDrawTarget() {} | 392 virtual void finishDrawTarget() {} |
392 | 393 |
393 /////////////////////////////////////////////////////////////////////////// | 394 /////////////////////////////////////////////////////////////////////////// |
394 // Debugging and Stats | 395 // Debugging and Stats |
(...skipping 230 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
625 SkTArray<const MultisampleSpecs*, true> fMultisa
mpleSpecsMap; | 626 SkTArray<const MultisampleSpecs*, true> fMultisa
mpleSpecsMap; |
626 GrTAllocator<MultisampleSpecs> fMultisa
mpleSpecsAllocator; | 627 GrTAllocator<MultisampleSpecs> fMultisa
mpleSpecsAllocator; |
627 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. | 628 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. |
628 GrContext* fContext
; | 629 GrContext* fContext
; |
629 | 630 |
630 friend class GrPathRendering; | 631 friend class GrPathRendering; |
631 typedef SkRefCnt INHERITED; | 632 typedef SkRefCnt INHERITED; |
632 }; | 633 }; |
633 | 634 |
634 #endif | 635 #endif |
OLD | NEW |