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

Unified 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 side-by-side diff with in-line comments
Download patch
Index: include/gpu/GrTypes.h
diff --git a/include/gpu/GrTypes.h b/include/gpu/GrTypes.h
index fc233ea0cdf60646c49261f3c326b58e2d40d7aa..16d0db225557b2d50b3c7353e7a80f0517124f72 100644
--- a/include/gpu/GrTypes.h
+++ b/include/gpu/GrTypes.h
@@ -530,6 +530,21 @@ struct GrBackendTextureDesc {
///////////////////////////////////////////////////////////////////////////////
/**
+ * Optional bitfield flags that can be set on GrBackendRenderTargetDesc (below).
+ */
+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
+ kNone_GrBackendRenderTargetFlags = 0x0,
+ /**
+ * Which buffers are multisampled (color and stencil, or just stencil?).
+ * The default is both. Note that mixing multisampled and aliased buffers
+ * is only possible if NV_framebuffer_mixed_samples is available.
+ */
+ kStencilMSAAOnly_GrBackendRenderTargetFlags = 0x1,
+};
+
+GR_MAKE_BITFIELD_OPS(GrBackendRenderTargetFlags)
+
+/**
* Gr can wrap an existing render target created by the client in the 3D API
* with a GrRenderTarget object. The client is responsible for ensuring that the
* underlying 3D API object lives at least as long as the GrRenderTarget object
@@ -541,6 +556,7 @@ struct GrBackendTextureDesc {
struct GrBackendRenderTargetDesc {
GrBackendRenderTargetDesc() { memset(this, 0, sizeof(*this)); }
+ GrBackendRenderTargetFlags fFlags;
int fWidth; //<! width in pixels
int fHeight; //<! height in pixels
GrPixelConfig fConfig; //<! color format

Powered by Google App Engine
This is Rietveld 408576698