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

Side by Side Diff: src/gpu/gl/GrGLCaps.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 unified diff | Download patch
OLDNEW
1 /* 1 /*
2 * Copyright 2012 Google Inc. 2 * Copyright 2012 Google Inc.
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 8
9 #ifndef GrGLCaps_DEFINED 9 #ifndef GrGLCaps_DEFINED
10 #define GrGLCaps_DEFINED 10 #define GrGLCaps_DEFINED
(...skipping 47 matching lines...) Expand 10 before | Expand all | Expand 10 after
58 * Instead the texture is multisampled when bound to the FBO and then re solved automatically 58 * Instead the texture is multisampled when bound to the FBO and then re solved automatically
59 * when read. It also defines an alternate value for GL_MAX_SAMPLES (whi ch we call 59 * when read. It also defines an alternate value for GL_MAX_SAMPLES (whi ch we call
60 * GR_GL_MAX_SAMPLES_IMG). 60 * GR_GL_MAX_SAMPLES_IMG).
61 */ 61 */
62 kES_IMG_MsToTexture_MSFBOType, 62 kES_IMG_MsToTexture_MSFBOType,
63 /** 63 /**
64 * GL_EXT_multisampled_render_to_texture. Same as the IMG one above but uses the standard 64 * GL_EXT_multisampled_render_to_texture. Same as the IMG one above but uses the standard
65 * GL_MAX_SAMPLES value. 65 * GL_MAX_SAMPLES value.
66 */ 66 */
67 kES_EXT_MsToTexture_MSFBOType, 67 kES_EXT_MsToTexture_MSFBOType,
68 /**
69 * GL_NV_framebuffer_mixed_samples.
70 */
71 kMixedSamples_MSFBOType,
68 72
69 kLast_MSFBOType = kES_EXT_MsToTexture_MSFBOType 73 kLast_MSFBOType = kMixedSamples_MSFBOType
70 }; 74 };
71 75
72 enum InvalidateFBType { 76 enum InvalidateFBType {
73 kNone_InvalidateFBType, 77 kNone_InvalidateFBType,
74 kDiscard_InvalidateFBType, //<! glDiscardFramebuffer() 78 kDiscard_InvalidateFBType, //<! glDiscardFramebuffer()
75 kInvalidate_InvalidateFBType, //<! glInvalidateFramebuffer() 79 kInvalidate_InvalidateFBType, //<! glInvalidateFramebuffer()
76 80
77 kLast_InvalidateFBType = kInvalidate_InvalidateFBType 81 kLast_InvalidateFBType = kInvalidate_InvalidateFBType
78 }; 82 };
79 83
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
146 * Reports the type of MSAA FBO support. 150 * Reports the type of MSAA FBO support.
147 */ 151 */
148 MSFBOType msFBOType() const { return fMSFBOType; } 152 MSFBOType msFBOType() const { return fMSFBOType; }
149 153
150 /** 154 /**
151 * Does the supported MSAA FBO extension have MSAA renderbuffers? 155 * Does the supported MSAA FBO extension have MSAA renderbuffers?
152 */ 156 */
153 bool usesMSAARenderBuffers() const { 157 bool usesMSAARenderBuffers() const {
154 return kNone_MSFBOType != fMSFBOType && 158 return kNone_MSFBOType != fMSFBOType &&
155 kES_IMG_MsToTexture_MSFBOType != fMSFBOType && 159 kES_IMG_MsToTexture_MSFBOType != fMSFBOType &&
156 kES_EXT_MsToTexture_MSFBOType != fMSFBOType; 160 kES_EXT_MsToTexture_MSFBOType != fMSFBOType &&
161 kMixedSamples_MSFBOType != fMSFBOType;
157 } 162 }
158 163
159 /** 164 /**
160 * Is the MSAA FBO extension one where the texture is multisampled when boun d to an FBO and 165 * Is the MSAA FBO extension one where the texture is multisampled when boun d to an FBO and
161 * then implicitly resolved when read. 166 * then implicitly resolved when read.
162 */ 167 */
163 bool usesImplicitMSAAResolve() const { 168 bool usesImplicitMSAAResolve() const {
164 return kES_IMG_MsToTexture_MSFBOType == fMSFBOType || 169 return kES_IMG_MsToTexture_MSFBOType == fMSFBOType ||
165 kES_EXT_MsToTexture_MSFBOType == fMSFBOType; 170 kES_EXT_MsToTexture_MSFBOType == fMSFBOType;
166 } 171 }
(...skipping 239 matching lines...) Expand 10 before | Expand all | Expand 10 after
406 && fType == rhs.fType 411 && fType == rhs.fType
407 && fFboFormat == rhs.fFboFormat; 412 && fFboFormat == rhs.fFboFormat;
408 } 413 }
409 }; 414 };
410 mutable SkTHashMap<ReadPixelsSupportedFormat, bool> fReadPixelsSupportedCach e; 415 mutable SkTHashMap<ReadPixelsSupportedFormat, bool> fReadPixelsSupportedCach e;
411 416
412 typedef GrDrawTargetCaps INHERITED; 417 typedef GrDrawTargetCaps INHERITED;
413 }; 418 };
414 419
415 #endif 420 #endif
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698