| 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 337 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 348 // Nonzero ID that uniquely identifies these multisample specs. | 348 // Nonzero ID that uniquely identifies these multisample specs. |
| 349 uint8_t fUniqueID; | 349 uint8_t fUniqueID; |
| 350 // The actual number of samples the GPU will run. NOTE: this value can b
e greater than the | 350 // The actual number of samples the GPU will run. NOTE: this value can b
e greater than the |
| 351 // the render target's sample count. | 351 // the render target's sample count. |
| 352 int fEffectiveSampleCnt; | 352 int fEffectiveSampleCnt; |
| 353 // If sample locations are supported, points to the subpixel locations a
t which the GPU will | 353 // If sample locations are supported, points to the subpixel locations a
t which the GPU will |
| 354 // sample. Pixel center is at (.5, .5), and (0, 0) indicates the top lef
t corner. | 354 // sample. Pixel center is at (.5, .5), and (0, 0) indicates the top lef
t corner. |
| 355 const SkPoint* fSampleLocations; | 355 const SkPoint* fSampleLocations; |
| 356 }; | 356 }; |
| 357 | 357 |
| 358 // Finds a render target's multisample specs. The stencil settings are only
needed in case we | 358 // Finds a render target's multisample specs. The pipeline is only needed in
case we need to |
| 359 // need to flush the draw state prior to querying multisample info. They are
not expected to | 359 // flush the draw state prior to querying multisample info. The pipeline is
not expected to |
| 360 // affect the multisample information itself. | 360 // affect the multisample information itself. |
| 361 const MultisampleSpecs& queryMultisampleSpecs(GrRenderTarget*, const GrStenc
ilSettings&); | 361 const MultisampleSpecs& queryMultisampleSpecs(const GrPipeline&); |
| 362 | 362 |
| 363 // Finds the multisample specs with a given unique id. | 363 // Finds the multisample specs with a given unique id. |
| 364 const MultisampleSpecs& getMultisampleSpecs(uint8_t uniqueID) { | 364 const MultisampleSpecs& getMultisampleSpecs(uint8_t uniqueID) { |
| 365 SkASSERT(uniqueID > 0 && uniqueID < fMultisampleSpecs.count()); | 365 SkASSERT(uniqueID > 0 && uniqueID < fMultisampleSpecs.count()); |
| 366 return fMultisampleSpecs[uniqueID]; | 366 return fMultisampleSpecs[uniqueID]; |
| 367 } | 367 } |
| 368 | 368 |
| 369 // Creates a GrGpuCommandBuffer in which the GrOpList can send draw commands
to instead of | 369 // Creates a GrGpuCommandBuffer in which the GrOpList can send draw commands
to instead of |
| 370 // directly to the Gpu object. | 370 // directly to the Gpu object. |
| 371 virtual GrGpuCommandBuffer* createCommandBuffer( | 371 virtual GrGpuCommandBuffer* createCommandBuffer( |
| (...skipping 236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 608 SkSTArray<1, MultisampleSpecs, true> fMultisampleSpecs; | 608 SkSTArray<1, MultisampleSpecs, true> fMultisampleSpecs; |
| 609 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. | 609 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. |
| 610 GrContext* fContext; | 610 GrContext* fContext; |
| 611 | 611 |
| 612 friend class GrPathRendering; | 612 friend class GrPathRendering; |
| 613 friend class gr_instanced::InstancedRendering; | 613 friend class gr_instanced::InstancedRendering; |
| 614 typedef SkRefCnt INHERITED; | 614 typedef SkRefCnt INHERITED; |
| 615 }; | 615 }; |
| 616 | 616 |
| 617 #endif | 617 #endif |
| OLD | NEW |