OLD | NEW |
---|---|
1 | 1 |
2 /* | 2 /* |
3 * Copyright 2010 Google Inc. | 3 * Copyright 2010 Google Inc. |
4 * | 4 * |
5 * Use of this source code is governed by a BSD-style license that can be | 5 * Use of this source code is governed by a BSD-style license that can be |
6 * found in the LICENSE file. | 6 * found in the LICENSE file. |
7 */ | 7 */ |
8 | 8 |
9 #ifndef GrTypes_DEFINED | 9 #ifndef GrTypes_DEFINED |
10 #define GrTypes_DEFINED | 10 #define GrTypes_DEFINED |
(...skipping 405 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
416 * to BottomLeft. | 416 * to BottomLeft. |
417 */ | 417 */ |
418 | 418 |
419 enum GrSurfaceOrigin { | 419 enum GrSurfaceOrigin { |
420 kDefault_GrSurfaceOrigin, // DEPRECATED; to be removed | 420 kDefault_GrSurfaceOrigin, // DEPRECATED; to be removed |
421 kTopLeft_GrSurfaceOrigin, | 421 kTopLeft_GrSurfaceOrigin, |
422 kBottomLeft_GrSurfaceOrigin, | 422 kBottomLeft_GrSurfaceOrigin, |
423 }; | 423 }; |
424 | 424 |
425 /** | 425 /** |
426 * Sample config clarifies the meaning of samples count. | |
427 * In default kUnified_GrSampleConfig sample count refers to MSAA sample count. | |
428 * If NV_framebuffer_mixed_samples is available and sample config is chosen to b e | |
429 * kStencil_GrSampleConfig, sample count refers to the stencil sample count only , | |
430 * and the color sample count is assumed to be zero. | |
431 */ | |
432 enum GrSampleConfig { | |
433 kUnified_GrSampleConfig, | |
434 kStencil_GrSampleConfig, | |
435 }; | |
Chris Dalton
2015/03/12 07:43:35
So I've been thinking:
rt.numSamples(kUnified_GrS
| |
436 | |
437 /** | |
426 * Describes a surface to be created. | 438 * Describes a surface to be created. |
427 */ | 439 */ |
428 struct GrSurfaceDesc { | 440 struct GrSurfaceDesc { |
429 GrSurfaceDesc() | 441 GrSurfaceDesc() |
430 : fFlags(kNone_GrSurfaceFlags) | 442 : fFlags(kNone_GrSurfaceFlags) |
431 , fOrigin(kDefault_GrSurfaceOrigin) | 443 , fOrigin(kDefault_GrSurfaceOrigin) |
432 , fWidth(0) | 444 , fWidth(0) |
433 , fHeight(0) | 445 , fHeight(0) |
434 , fConfig(kUnknown_GrPixelConfig) | 446 , fConfig(kUnknown_GrPixelConfig) |
435 , fSampleCnt(0) { | 447 , fSampleCnt(0) { |
(...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
550 int fSampleCnt; | 562 int fSampleCnt; |
551 /** | 563 /** |
552 * Number of bits of stencil per-pixel. | 564 * Number of bits of stencil per-pixel. |
553 */ | 565 */ |
554 int fStencilBits; | 566 int fStencilBits; |
555 /** | 567 /** |
556 * Handle to the 3D API object. | 568 * Handle to the 3D API object. |
557 * OpenGL: FBO ID | 569 * OpenGL: FBO ID |
558 */ | 570 */ |
559 GrBackendObject fRenderTargetHandle; | 571 GrBackendObject fRenderTargetHandle; |
572 /** | |
573 * Clarifies the meaning of fSampleCnt. By default the value refers to | |
574 * MSAA sample count. If sample config is kStencil_GrSampleConfig, then | |
575 * fSampleCnt refers to stencil samples only, and color sample count is | |
576 * assumed to be zero. kStencil_GrSampleConfig can be chosen only if | |
577 * NV_framebuffer_mixed_samples is available. | |
578 */ | |
Chris Dalton
2015/03/12 07:43:35
Any reason why this is at the end rather than righ
vbuzinov
2015/03/13 13:37:22
Done.
| |
579 GrSampleConfig fSampleConfig; | |
560 }; | 580 }; |
561 | 581 |
562 /** | 582 /** |
563 * The GrContext's cache of backend context state can be partially invalidated. | 583 * The GrContext's cache of backend context state can be partially invalidated. |
564 * These enums are specific to the GL backend and we'd add a new set for an alte rnative backend. | 584 * These enums are specific to the GL backend and we'd add a new set for an alte rnative backend. |
565 */ | 585 */ |
566 enum GrGLBackendState { | 586 enum GrGLBackendState { |
567 kRenderTarget_GrGLBackendState = 1 << 0, | 587 kRenderTarget_GrGLBackendState = 1 << 0, |
568 kTextureBinding_GrGLBackendState = 1 << 1, | 588 kTextureBinding_GrGLBackendState = 1 << 1, |
569 // View state stands for scissor and viewport | 589 // View state stands for scissor and viewport |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
626 public: | 646 public: |
627 GrAutoMalloc() : INHERITED() {} | 647 GrAutoMalloc() : INHERITED() {} |
628 explicit GrAutoMalloc(size_t size) : INHERITED(size) {} | 648 explicit GrAutoMalloc(size_t size) : INHERITED(size) {} |
629 virtual ~GrAutoMalloc() {} | 649 virtual ~GrAutoMalloc() {} |
630 private: | 650 private: |
631 typedef GrAutoMallocBaseType INHERITED; | 651 typedef GrAutoMallocBaseType INHERITED; |
632 }; | 652 }; |
633 | 653 |
634 #undef GrAutoMallocBaseType | 654 #undef GrAutoMallocBaseType |
635 #endif | 655 #endif |
OLD | NEW |