Add option to force GLSL string caching rather than program binaries.
Bug: chromium:924572 Change-Id: I055a6946528c75fa986c86fa562a2608b8958611 Reviewed-on: https://skia-review.googlesource.com/c/192827 Commit-Queue: Brian Salomon <bsalomon@google.com> Commit-Queue: Ethan Nicholas <ethannicholas@google.com> Auto-Submit: Brian Salomon <bsalomon@google.com> Reviewed-by: Ethan Nicholas <ethannicholas@google.com>
This commit is contained in:
parent
7af8fe55bd
commit
28bafb01c9
@ -183,6 +183,14 @@ struct SK_API GrContextOptions {
|
|||||||
*/
|
*/
|
||||||
PersistentCache* fPersistentCache = nullptr;
|
PersistentCache* fPersistentCache = nullptr;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* This affects the usage of the PersistentCache. If this is set to true GLSL shader strings
|
||||||
|
* rather than GL program binaries will be cached. It is intended to be used when the driver's
|
||||||
|
* binary loading/storing is believed to have bugs. Caching GLSL strings still saves a
|
||||||
|
* significant amount of CPU work when a GL program is created.
|
||||||
|
*/
|
||||||
|
bool fDisallowGLSLBinaryCaching = false;
|
||||||
|
|
||||||
#if GR_TEST_UTILS
|
#if GR_TEST_UTILS
|
||||||
/**
|
/**
|
||||||
* Private options that are only meant for testing within Skia's tools.
|
* Private options that are only meant for testing within Skia's tools.
|
||||||
|
@ -2818,6 +2818,9 @@ void GrGLCaps::onApplyOptionsOverrides(const GrContextOptions& options) {
|
|||||||
if (options.fDoManualMipmapping) {
|
if (options.fDoManualMipmapping) {
|
||||||
fDoManualMipmapping = true;
|
fDoManualMipmapping = true;
|
||||||
}
|
}
|
||||||
|
if (options.fDisallowGLSLBinaryCaching) {
|
||||||
|
fProgramBinarySupport = false;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
bool GrGLCaps::onSurfaceSupportsWritePixels(const GrSurface* surface) const {
|
bool GrGLCaps::onSurfaceSupportsWritePixels(const GrSurface* surface) const {
|
||||||
|
Loading…
Reference in New Issue
Block a user