Allow mock GrContexts to "support" shader derivatives

Change-Id: I0d8dce5e0873a058b59baae9c35903b2444a76fd
Reviewed-on: https://skia-review.googlesource.com/68480
Commit-Queue: Robert Phillips <robertphillips@google.com>
Reviewed-by: Robert Phillips <robertphillips@google.com>
This commit is contained in:
Brian Salomon 2017-11-07 16:41:11 -05:00 committed by Skia Commit-Bot
parent 9eccfff674
commit 821ef188b3
2 changed files with 4 additions and 2 deletions

View File

@ -16,8 +16,8 @@ struct GrMockTextureInfo {
/**
* A pointer to this type is used as the GrBackendContext when creating a Mock GrContext. It can be
* used to specificy capability options for the mock context. If nullptr is used a default
* constructed GrMockOptions is used.
* used to specify capability options for the mock context. If nullptr is used a default constructed
* GrMockOptions is used.
*/
struct GrMockOptions {
GrMockOptions() {
@ -48,6 +48,7 @@ struct GrMockOptions {
bool fIntegerSupport = false;
bool fFlatInterpolationSupport = false;
int fMaxVertexSamplers = 0;
bool fShaderDerivativeSupport = true;
};
#endif

View File

@ -28,6 +28,7 @@ public:
fShaderCaps->fIntegerSupport = options.fIntegerSupport;
fShaderCaps->fFlatInterpolationSupport = options.fFlatInterpolationSupport;
fShaderCaps->fMaxVertexSamplers = options.fMaxVertexSamplers;
fShaderCaps->fShaderDerivativeSupport = options.fShaderDerivativeSupport;
this->applyOptionsOverrides(contextOptions);
}