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

Unified Diff: include/gpu/GrCaps.h

Issue 1666563003: Add support for GL_EXT_raster_multisample (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 4 years, 11 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
« no previous file with comments | « no previous file | src/gpu/GrCaps.cpp » ('j') | src/gpu/gl/GrGLGpu.cpp » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: include/gpu/GrCaps.h
diff --git a/include/gpu/GrCaps.h b/include/gpu/GrCaps.h
index 05da8d7cadf40d5af5eafa185b03ad761c8b7029..248298e01a1325772df631f94b7b646e4b2f174e 100644
--- a/include/gpu/GrCaps.h
+++ b/include/gpu/GrCaps.h
@@ -143,6 +143,9 @@ public:
bool oversizedStencilSupport() const { return fOversizedStencilSupport; }
bool textureBarrierSupport() const { return fTextureBarrierSupport; }
bool usesMixedSamples() const { return fUsesMixedSamples; }
+ /** "Raster multisample" is a special HW mode where the rasterizer runs more samples than are in
+ the target framebuffer. */
+ bool rasterMultisampleSupport() const { return fRasterMultisampleSupport; }
bool useDrawInsteadOfClear() const { return fUseDrawInsteadOfClear; }
bool useDrawInsteadOfPartialRenderTargetWrite() const {
@@ -220,6 +223,11 @@ public:
return SkTMin(this->maxColorSampleCount(), this->maxStencilSampleCount());
}
}
+ // This can only be called if raster multisample is supported.
+ int maxRasterSamples() const {
+ SkASSERT(this->rasterMultisampleSupport());
+ return fMaxRasterSamples;
+ }
virtual bool isConfigTexturable(GrPixelConfig config) const = 0;
@@ -268,6 +276,7 @@ protected:
bool fOversizedStencilSupport : 1;
bool fTextureBarrierSupport : 1;
bool fUsesMixedSamples : 1;
+ bool fRasterMultisampleSupport : 1;
bool fSupportsInstancedDraws : 1;
bool fFullClearIsFree : 1;
bool fMustClearUploadedBufferData : 1;
@@ -291,6 +300,7 @@ protected:
int fMaxTileSize;
int fMaxColorSampleCount;
int fMaxStencilSampleCount;
+ int fMaxRasterSamples;
private:
virtual void onApplyOptionsOverrides(const GrContextOptions&) {};
« no previous file with comments | « no previous file | src/gpu/GrCaps.cpp » ('j') | src/gpu/gl/GrGLGpu.cpp » ('J')

Powered by Google App Engine
This is Rietveld 408576698