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

Side by Side Diff: include/gpu/GrTypes.h

Issue 1001503002: Implement support for mixed sampled render targets (Closed) Base URL: https://skia.googlesource.com/skia.git@mix1
Patch Set: Address comments Created 5 years, 6 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 /* 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 512 matching lines...) Expand 10 before | Expand all | Expand 10 after
523 /** 523 /**
524 * Handle to the 3D API object. 524 * Handle to the 3D API object.
525 * OpenGL: Texture ID. 525 * OpenGL: Texture ID.
526 */ 526 */
527 GrBackendObject fTextureHandle; 527 GrBackendObject fTextureHandle;
528 }; 528 };
529 529
530 /////////////////////////////////////////////////////////////////////////////// 530 ///////////////////////////////////////////////////////////////////////////////
531 531
532 /** 532 /**
533 * Optional bitfield flags that can be set on GrBackendRenderTargetDesc (below).
534 */
535 enum GrBackendRenderTargetFlags {
bsalomon 2015/06/10 19:57:06 I'm wondering if it is necessary to extend wrapped
Chris Dalton 2015/06/10 20:55:56 Mixed samples is not supported for FBO 0 so we can
536 kNone_GrBackendRenderTargetFlags = 0x0,
537 /**
538 * Which buffers are multisampled (color and stencil, or just stencil?).
539 * The default is both. Note that mixing multisampled and aliased buffers
540 * is only possible if NV_framebuffer_mixed_samples is available.
541 */
542 kStencilMSAAOnly_GrBackendRenderTargetFlags = 0x1,
543 };
544
545 GR_MAKE_BITFIELD_OPS(GrBackendRenderTargetFlags)
546
547 /**
533 * Gr can wrap an existing render target created by the client in the 3D API 548 * Gr can wrap an existing render target created by the client in the 3D API
534 * with a GrRenderTarget object. The client is responsible for ensuring that the 549 * with a GrRenderTarget object. The client is responsible for ensuring that the
535 * underlying 3D API object lives at least as long as the GrRenderTarget object 550 * underlying 3D API object lives at least as long as the GrRenderTarget object
536 * wrapping it. We require the client to explicitly provide information about 551 * wrapping it. We require the client to explicitly provide information about
537 * the target, such as width, height, and pixel config rather than querying the 552 * the target, such as width, height, and pixel config rather than querying the
538 * 3D API for these values. We expect these properties to be immutable even if 553 * 3D API for these values. We expect these properties to be immutable even if
539 * the 3D API doesn't require this (OpenGL). 554 * the 3D API doesn't require this (OpenGL).
540 */ 555 */
541 556
542 struct GrBackendRenderTargetDesc { 557 struct GrBackendRenderTargetDesc {
543 GrBackendRenderTargetDesc() { memset(this, 0, sizeof(*this)); } 558 GrBackendRenderTargetDesc() { memset(this, 0, sizeof(*this)); }
559 GrBackendRenderTargetFlags fFlags;
544 int fWidth; //<! width in pixels 560 int fWidth; //<! width in pixels
545 int fHeight; //<! height in pixels 561 int fHeight; //<! height in pixels
546 GrPixelConfig fConfig; //<! color format 562 GrPixelConfig fConfig; //<! color format
547 GrSurfaceOrigin fOrigin; //<! pixel origin 563 GrSurfaceOrigin fOrigin; //<! pixel origin
548 /** 564 /**
549 * The number of samples per pixel. Gr uses this to influence decisions 565 * The number of samples per pixel. Gr uses this to influence decisions
550 * about applying other forms of anti-aliasing. 566 * about applying other forms of anti-aliasing.
551 */ 567 */
552 int fSampleCnt; 568 int fSampleCnt;
553 /** 569 /**
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after
610 return 4 * width * height; 626 return 4 * width * height;
611 } 627 }
612 } 628 }
613 629
614 /** 630 /**
615 * This value translates to reseting all the context state for any backend. 631 * This value translates to reseting all the context state for any backend.
616 */ 632 */
617 static const uint32_t kAll_GrBackendState = 0xffffffff; 633 static const uint32_t kAll_GrBackendState = 0xffffffff;
618 634
619 #endif 635 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698