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 }; | |
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 106 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
542 int fWidth; //<! width in pixels | 554 int fWidth; //<! width in pixels |
543 int fHeight; //<! height in pixels | 555 int fHeight; //<! height in pixels |
544 GrPixelConfig fConfig; //<! color format | 556 GrPixelConfig fConfig; //<! color format |
545 GrSurfaceOrigin fOrigin; //<! pixel origin | 557 GrSurfaceOrigin fOrigin; //<! pixel origin |
546 /** | 558 /** |
547 * The number of samples per pixel. Gr uses this to influence decisions | 559 * The number of samples per pixel. Gr uses this to influence decisions |
548 * about applying other forms of anti-aliasing. | 560 * about applying other forms of anti-aliasing. |
549 */ | 561 */ |
550 int fSampleCnt; | 562 int fSampleCnt; |
551 /** | 563 /** |
564 * If fSampleCnt is > 1, which buffers are multisampled (color and stencil, | |
565 * or just stencil?). The default is both. Note that mixing multisampled | |
566 * and aliased buffers is only possible if NV_framebuffer_mixed_samples is | |
567 * available. | |
568 */ | |
569 GrSampleConfig fSampleConfig; | |
bsalomon
2015/03/31 16:37:33
Maybe just have a flag in fFlags? kStencilMSAAOnly
Chris Dalton
2015/03/31 22:24:57
I don't see an fFlags field for GrBackendRenderTar
| |
570 /** | |
552 * Number of bits of stencil per-pixel. | 571 * Number of bits of stencil per-pixel. |
553 */ | 572 */ |
554 int fStencilBits; | 573 int fStencilBits; |
555 /** | 574 /** |
556 * Handle to the 3D API object. | 575 * Handle to the 3D API object. |
557 * OpenGL: FBO ID | 576 * OpenGL: FBO ID |
558 */ | 577 */ |
559 GrBackendObject fRenderTargetHandle; | 578 GrBackendObject fRenderTargetHandle; |
560 }; | 579 }; |
561 | 580 |
(...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
626 public: | 645 public: |
627 GrAutoMalloc() : INHERITED() {} | 646 GrAutoMalloc() : INHERITED() {} |
628 explicit GrAutoMalloc(size_t size) : INHERITED(size) {} | 647 explicit GrAutoMalloc(size_t size) : INHERITED(size) {} |
629 virtual ~GrAutoMalloc() {} | 648 virtual ~GrAutoMalloc() {} |
630 private: | 649 private: |
631 typedef GrAutoMallocBaseType INHERITED; | 650 typedef GrAutoMallocBaseType INHERITED; |
632 }; | 651 }; |
633 | 652 |
634 #undef GrAutoMallocBaseType | 653 #undef GrAutoMallocBaseType |
635 #endif | 654 #endif |
OLD | NEW |