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

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: GrRenderTarget::BufferBits, BackendRTDesc::fFlags and hasMixedSamplesModulation Created 5 years, 8 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 3f02c62bfd07aab21c647c673beef0850a782c32..a3291030773ea3c0424f1bf5df8dd98439dc78d1 100644
--- a/include/gpu/GrTypes.h
+++ b/include/gpu/GrTypes.h
@@ -528,6 +528,21 @@ struct GrBackendTextureDesc {
///////////////////////////////////////////////////////////////////////////////
/**
+ * Optional bitfield flags that can be set on GrBackendRenderTargetDesc (below).
+ */
+enum GrBackendRenderTargetFlags {
+ 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
@@ -539,6 +554,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