Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(276)

Side by Side Diff: src/gpu/GrGpu.h

Issue 1962243002: Separate user and raw stencil settings (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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
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
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
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698