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 467 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
478 return this->onMakeCopyForTextureParams(texture, params, copyParams); | 478 return this->onMakeCopyForTextureParams(texture, params, copyParams); |
479 } | 479 } |
480 | 480 |
481 // This is only to be used in GL-specific tests. | 481 // This is only to be used in GL-specific tests. |
482 virtual const GrGLContext* glContextForTesting() const { return nullptr; } | 482 virtual const GrGLContext* glContextForTesting() const { return nullptr; } |
483 | 483 |
484 // This is only to be used by testing code | 484 // This is only to be used by testing code |
485 virtual void resetShaderCacheForTesting() const {} | 485 virtual void resetShaderCacheForTesting() const {} |
486 | 486 |
487 protected: | 487 protected: |
488 // Functions used to map clip-respecting stencil tests into normal | |
489 // stencil funcs supported by GPUs. | |
490 static GrStencilFunc ConvertStencilFunc(bool stencilInClip, | |
491 GrStencilFunc func); | |
492 static void ConvertStencilFuncAndMask(GrStencilFunc func, | |
493 bool clipInStencil, | |
494 unsigned int clipBit, | |
495 unsigned int userBits, | |
496 unsigned int* ref, | |
497 unsigned int* mask); | |
498 | |
499 static void ElevateDrawPreference(GrGpu::DrawPreference* preference, | 488 static void ElevateDrawPreference(GrGpu::DrawPreference* preference, |
500 GrGpu::DrawPreference elevation) { | 489 GrGpu::DrawPreference elevation) { |
501 GR_STATIC_ASSERT(GrGpu::kCallerPrefersDraw_DrawPreference > GrGpu::kNoDr
aw_DrawPreference); | 490 GR_STATIC_ASSERT(GrGpu::kCallerPrefersDraw_DrawPreference > GrGpu::kNoDr
aw_DrawPreference); |
502 GR_STATIC_ASSERT(GrGpu::kGpuPrefersDraw_DrawPreference > | 491 GR_STATIC_ASSERT(GrGpu::kGpuPrefersDraw_DrawPreference > |
503 GrGpu::kCallerPrefersDraw_DrawPreference); | 492 GrGpu::kCallerPrefersDraw_DrawPreference); |
504 GR_STATIC_ASSERT(GrGpu::kRequireDraw_DrawPreference > | 493 GR_STATIC_ASSERT(GrGpu::kRequireDraw_DrawPreference > |
505 GrGpu::kGpuPrefersDraw_DrawPreference); | 494 GrGpu::kGpuPrefersDraw_DrawPreference); |
506 *preference = SkTMax(*preference, elevation); | 495 *preference = SkTMax(*preference, elevation); |
507 } | 496 } |
508 | 497 |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
614 SkTArray<const MultisampleSpecs*, true> fMultisa
mpleSpecsMap; | 603 SkTArray<const MultisampleSpecs*, true> fMultisa
mpleSpecsMap; |
615 GrTAllocator<MultisampleSpecs> fMultisa
mpleSpecsAllocator; | 604 GrTAllocator<MultisampleSpecs> fMultisa
mpleSpecsAllocator; |
616 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. | 605 // The context owns us, not vice-versa, so this ptr is not ref'ed by Gpu. |
617 GrContext* fContext
; | 606 GrContext* fContext
; |
618 | 607 |
619 friend class GrPathRendering; | 608 friend class GrPathRendering; |
620 typedef SkRefCnt INHERITED; | 609 typedef SkRefCnt INHERITED; |
621 }; | 610 }; |
622 | 611 |
623 #endif | 612 #endif |
OLD | NEW |